:root {
  color-scheme: dark;
  --bg: #18181d;
  --bg-2: #222228;
  --bg-3: #4a363c;
  --surface: #222228;
  --surface-2: #2b2b31;
  --paper: #dfe6e0;
  --text: #dfe6e0;
  --muted: #a9bbcc;
  --soft: #7687ab;
  --line: rgba(223, 230, 224, 0.16);
  --line-strong: rgba(223, 230, 224, 0.34);
  --green: #9ba15f;
  --yellow: #d9c277;
  --red: #c17b5c;
  --blue: #7687ab;
  --berry: #85444a;
  --leaf: #596e47;
  --ink: #18181d;
  --text-rgb: 223, 230, 224;
  --ink-rgb: 24, 24, 29;
  --green-rgb: 155, 161, 95;
  --yellow-rgb: 217, 194, 119;
  --red-rgb: 193, 123, 92;
  --blue-rgb: 118, 135, 171;
  --bg-rgb: 24, 24, 29;
  --max: 1180px;
  --radius: 8px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
  scrollbar-color: var(--yellow) var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 78% 12%, rgba(var(--red-rgb), 0.16), transparent 30%),
    linear-gradient(rgba(var(--text-rgb), 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.026) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  letter-spacing: 0;
}

body.is-menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
  background: rgba(var(--bg-rgb), 0.74);
  backdrop-filter: blur(18px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(var(--bg-rgb), 0.92);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 14px 22px;
  gap: 24px;
}

.brand {
  display: inline-grid;
  grid-template-columns: 38px minmax(0, auto);
  align-items: center;
  gap: 10px;
  min-width: 176px;
}

.brand .brand-logo,
.brand .brand-logo.image,
.brand .brand-logo.has-media {
  display: grid;
  width: 38px;
  height: 38px;
  min-width: 38px;
  max-width: 38px;
  min-height: 38px;
  max-height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--yellow-rgb), 0.36);
  border-radius: 8px;
  background: rgba(var(--text-rgb), 0.04);
}

.brand .brand-logo img,
.brand .brand-logo.has-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.brand-caption {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--line);
  background: rgba(var(--text-rgb), 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--text);
  background: rgba(var(--text-rgb), 0.05);
  cursor: pointer;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 15px;
  color: var(--text);
  background: rgba(var(--text-rgb), 0.06);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.button:hover,
.button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--yellow-rgb), 0.72);
  background: rgba(var(--yellow-rgb), 0.14);
}

.button.primary {
  color: var(--ink);
  border-color: var(--yellow);
  background: var(--yellow);
}

.button.primary:hover,
.button.primary:focus-visible {
  border-color: var(--red);
  background: var(--red);
}

.button.ghost {
  background: transparent;
}

.button.small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.88rem;
}

.steam-button {
  color: var(--paper);
}

.steam-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.steam-mark::before,
.steam-mark::after {
  position: absolute;
  content: "";
  background: currentColor;
}

.steam-mark::before {
  width: 8px;
  height: 2px;
  top: 8px;
  left: -5px;
  transform: rotate(-28deg);
  transform-origin: right center;
}

.steam-mark::after {
  width: 5px;
  height: 5px;
  right: 3px;
  top: 3px;
  border-radius: 50%;
}

.button svg,
.icon-button svg,
.menu-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.page {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  min-height: 68svh;
  align-items: end;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.hero.compact {
  min-height: 62svh;
}

.hero-visual,
.hero-model {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.18), rgba(var(--bg-rgb), 0.86)),
    var(--bg-2);
}

.hero-model canvas {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  width: 100%;
  height: 112%;
  opacity: 0.72;
}

.hero-visual-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(var(--text-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.045) 1px, transparent 1px),
    #222228;
  background-size: 42px 42px;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 44%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(var(--bg-rgb), 0.98));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 122px 22px 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.58fr);
  align-items: end;
  gap: 56px;
}

.hero-copy {
  max-width: 820px;
}

.hero-identity {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 20px;
  font-size: 5.2rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-title {
  margin-bottom: 10px;
  font-size: 5.6rem;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.hero-location svg {
  width: 16px;
  height: 16px;
  color: var(--yellow);
  stroke-width: 2.4;
}

.lead {
  max-width: 800px;
  margin-bottom: 0;
  color: var(--paper);
  font-size: 1.38rem;
  line-height: 1.45;
}

.sublead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-side {
  display: grid;
  align-items: center;
}

.portrait-slot {
  width: 148px;
  height: 148px;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(var(--text-rgb), 0.26);
  border-radius: 50%;
  border-color: rgba(var(--text-rgb), 0.24);
  background:
    linear-gradient(180deg, rgba(var(--green-rgb), 0.16), rgba(var(--bg-rgb), 0.74)),
    repeating-linear-gradient(135deg, rgba(var(--text-rgb), 0.08) 0 1px, transparent 1px 14px),
    rgba(var(--bg-rgb), 0.76);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.32);
}

.portrait-slot span {
  max-width: 96px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.portrait-slot small {
  display: none;
}

.portrait-slot img {
  border-radius: 50%;
}

.portrait-slot::before {
  inset: 10px;
  border-radius: 50%;
}

.portrait-slot::after {
  display: none;
}

.signal {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(var(--bg-rgb), 0.74);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

a.signal:hover,
a.signal:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--green-rgb), 0.6);
  background: rgba(var(--green-rgb), 0.12);
}

.signal small {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
}

.signal strong {
  font-size: 1.08rem;
}

.section {
  border-bottom: 1px solid var(--line);
  background: #18181d;
}

.model-stage {
  position: relative;
  overflow: hidden;
}

.model-stage > .section-inner {
  position: relative;
  z-index: 2;
}

.section-model {
  position: absolute;
  top: 50%;
  left: clamp(18px, calc((100vw - var(--max)) / 2 - 260px), 120px);
  z-index: 1;
  width: clamp(180px, 13vw, 260px);
  height: clamp(420px, 36vw, 560px);
  pointer-events: none;
  opacity: 0.42;
  transform: translateY(-50%);
}

.section-model canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.section-model > :not(canvas) {
  display: none !important;
}

.section.alt {
  background: var(--bg-2);
}

.section.light {
  color: var(--text);
  background: #222228;
}

.section-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 78px 22px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  align-items: end;
  gap: 32px;
  margin-bottom: 34px;
}

.section-kicker {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section.light .section-kicker {
  color: var(--yellow);
}

h2 {
  margin-bottom: 0;
  font-size: 2.6rem;
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.32rem;
  line-height: 1.2;
}

.muted {
  color: var(--muted);
}

.section.light .muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.work-card,
.fact-card,
.role-card,
.contact-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(var(--text-rgb), 0.045);
}

.section.light .project-card,
.section.light .work-card,
.section.light .fact-card,
.section.light .role-card,
.section.light .contact-card,
.section.light .timeline-card {
  border-color: var(--line);
  background: rgba(var(--text-rgb), 0.045);
}

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: rgba(var(--yellow-rgb), 0.58);
  background: rgba(var(--yellow-rgb), 0.08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.card-body {
  display: grid;
  flex: 1;
  gap: 16px;
  padding: 18px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 0.78rem;
}

.section.light .tag,
.section.light .pill,
.section.light .filter-button {
  color: var(--muted);
  border-color: var(--line);
}

.tag.green {
  color: var(--green);
  border-color: rgba(var(--green-rgb), 0.42);
}

.tag.yellow {
  color: var(--yellow);
  border-color: rgba(var(--yellow-rgb), 0.44);
}

.tag.red {
  color: var(--red);
  border-color: rgba(var(--red-rgb), 0.44);
}

.tag.blue {
  color: var(--blue);
  border-color: rgba(var(--blue-rgb), 0.44);
}

.media-slot {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  overflow: hidden;
  contain: layout paint;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(var(--text-rgb), 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.065) 1px, transparent 1px),
    #222228;
  background-size: 22px 22px;
  color: var(--muted);
  text-align: center;
}

.section.light .media-slot {
  background:
    linear-gradient(rgba(var(--text-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--text-rgb), 0.05) 1px, transparent 1px),
    #222228;
  border-color: var(--line);
  color: var(--muted);
}

.media-slot::before {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(var(--text-rgb), 0.36);
  border-radius: 6px;
  content: "";
}

.section.light .media-slot::before {
  border-color: rgba(var(--text-rgb), 0.28);
}

.media-slot span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 78%;
  font-weight: 700;
}

.media-slot small {
  color: inherit;
  font-weight: 500;
  line-height: 1.45;
}

.media-slot.has-media {
  background: #222228;
}

.media-slot.has-media::before,
.media-slot.has-media::after {
  display: none;
}

.media-slot img,
.media-slot video {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  backface-visibility: hidden;
  object-fit: cover;
}

.media-slot video[data-loop-video="true"] {
  pointer-events: none;
}

.model-link {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  place-items: center;
  width: 100%;
  min-height: inherit;
  color: var(--text);
  font-weight: 800;
}

.portrait-slot.media-slot {
  min-height: 0;
}

.media-slot.wide {
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.media-slot.tall {
  min-height: 520px;
}

.media-slot.square {
  aspect-ratio: 1 / 1;
  min-height: auto;
}

.media-slot.video::after,
.media-slot.gif::after,
.media-slot.image::after,
.media-slot.model::after,
.media-slot.diagram::after {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--paper);
  background: rgba(var(--bg-rgb), 0.74);
  font-size: 0.72rem;
  font-weight: 700;
}

.media-slot.video::after {
  content: "VIDEO";
}

.media-slot.gif::after {
  content: "GIF";
}

.media-slot.image::after {
  content: "IMAGE";
}

.media-slot.model::after {
  content: "3D";
}

.media-slot.diagram::after {
  content: "DIAGRAM";
}

.case-list {
  display: grid;
  gap: 22px;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(var(--text-rgb), 0.045);
}

.case-row .media-slot {
  min-height: 330px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.case-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 28px;
}

.case-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.68;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.65fr);
  gap: 34px;
  align-items: start;
}

.copy-block {
  display: grid;
  gap: 20px;
}

.copy-block p {
  max-width: 800px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.74;
}

.section.light .copy-block p {
  color: var(--muted);
}

.facts-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact-card,
.role-card,
.timeline-card {
  padding: 18px;
}

.fact-card small,
.timeline-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
}

.fact-card strong,
.timeline-card strong {
  display: block;
  line-height: 1.3;
}

.role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-card ul,
.checklist,
.compact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-card li,
.checklist li,
.compact-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.section.light .role-card li,
.section.light .checklist li,
.section.light .compact-list li {
  color: var(--muted);
}

.role-card li::before,
.checklist li::before,
.compact-list li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--green);
}

.two-col {
  columns: 2;
  column-gap: 34px;
}

.two-col li {
  break-inside: avoid;
}

.skills-cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skill-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(var(--text-rgb), 0.045);
}

.skill-group strong {
  display: block;
  margin-bottom: 10px;
  color: var(--paper);
  font-size: 0.9rem;
}

.skill-group .pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: 36px;
  align-items: center;
}

.contact-strip {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(var(--text-rgb), 0.045);
}

.section.light:last-of-type .section-head {
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 0.7fr);
  align-items: center;
  margin-bottom: 0;
}

.section.light:last-of-type .section-actions {
  margin-top: 22px;
}

.contact-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  color: var(--text);
  font-weight: 800;
}

.contact-strip a:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--green);
}

.proof-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.proof-chips .tag {
  color: var(--paper);
  background: rgba(var(--text-rgb), 0.055);
}

.story-grid,
.proof-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-card {
  border-top: 2px solid var(--yellow);
  padding-top: 16px;
}

.story-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-weight: 700;
  text-transform: uppercase;
}

.story-card p,
.proof-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.roadmap {
  position: relative;
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.roadmap::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 18px;
  width: 2px;
  content: "";
  background: linear-gradient(180deg, var(--yellow), rgba(var(--red-rgb), 0.7), rgba(var(--green-rgb), 0.5));
}

.roadmap-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.72fr);
  gap: 24px;
  align-items: stretch;
  padding-left: 54px;
}

.roadmap-step::before {
  position: absolute;
  top: 20px;
  left: 7px;
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  content: "";
  background: var(--bg);
  box-shadow: 0 0 0 6px rgba(var(--yellow-rgb), 0.1);
}

.roadmap-copy,
.takeaway-card,
.contact-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(var(--text-rgb), 0.045);
}

.roadmap-copy {
  padding: 20px;
}

.roadmap-copy small {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--yellow);
  font-weight: 800;
  text-transform: uppercase;
}

.roadmap-copy p,
.takeaway-card p,
.contact-cta p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.roadmap-step .media-slot {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.takeaway-card {
  padding: 18px;
}

.takeaway-card h3 {
  color: var(--paper);
}

.contact-cta {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px;
}

.contact-cta .section-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.xp-hud {
  position: fixed;
  right: 18px;
  bottom: 14px;
  left: 18px;
  z-index: 220;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid rgba(var(--yellow-rgb), 0.42);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(var(--bg-rgb), 0.84);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.xp-label,
.xp-percent {
  color: var(--yellow);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.xp-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.22);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(var(--text-rgb), 0.1) 0 1px, transparent 1px 28px),
    rgba(var(--text-rgb), 0.08);
}

.xp-fill {
  width: calc(var(--xp-progress, 0) * 100%);
  height: 100%;
  background:
    linear-gradient(90deg, var(--yellow), var(--red)),
    var(--yellow);
  transition: width 0.12s linear;
}

.lvl-up-toast {
  position: fixed;
  right: 22px;
  bottom: 64px;
  z-index: 230;
  display: none;
  width: min(360px, calc(100vw - 44px));
  border: 1px solid rgba(var(--red-rgb), 0.62);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(var(--bg-rgb), 0.94);
  box-shadow: var(--shadow);
}

.lvl-up-toast.is-visible {
  display: grid;
  gap: 10px;
  animation: lvl-pop 0.5s ease both;
}

.lvl-up-toast strong {
  color: var(--red);
  font-size: 1.24rem;
  text-transform: uppercase;
}

.lvl-up-toast p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes lvl-pop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.system-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.system-flow span {
  display: grid;
  min-height: 88px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(var(--text-rgb), 0.045);
  color: var(--paper);
  font-weight: 800;
}

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.challenge-card,
.proof-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(var(--text-rgb), 0.045);
}

.challenge-card h3,
.proof-card h3 {
  color: var(--paper);
}

.related-card {
  display: grid;
  min-height: 100%;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(var(--text-rgb), 0.045);
}

.related-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.72fr);
  gap: 42px;
  align-items: end;
}

.project-hero-media {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.project-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(var(--text-rgb), 0.045);
}

.summary-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row small,
.summary-row strong {
  padding: 14px 16px;
}

.summary-row small {
  color: var(--yellow);
  font-weight: 800;
  text-transform: uppercase;
}

.summary-row strong {
  border-left: 1px solid var(--line);
  line-height: 1.35;
}

.proof-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.proof-media-grid .media-slot {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.production-layout,
.challenge-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
  gap: 28px;
  align-items: stretch;
}

.production-layout .media-slot,
.challenge-layout .media-slot {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.breakdown-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.breakdown-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(var(--text-rgb), 0.045);
}

.breakdown-card .media-slot {
  min-height: 150px;
  border-bottom: 1px solid var(--line);
}

.breakdown-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.breakdown-body small {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}

.breakdown-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(var(--text-rgb), 0.045);
  cursor: pointer;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--yellow);
  background: var(--yellow);
}

.work-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-card {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  scroll-margin-top: 110px;
}

.work-card[hidden] {
  display: none;
}

.work-card.case-highlight {
  border-color: rgba(var(--yellow-rgb), 0.82);
  box-shadow: 0 0 0 3px rgba(var(--yellow-rgb), 0.2), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.work-card .media-slot {
  min-height: 190px;
}

.work-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.work-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.lightbox-trigger {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.process-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.process-step {
  position: relative;
  border-top: 2px solid var(--line-strong);
  padding-top: 18px;
}

.process-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 800;
}

.process-step p {
  color: var(--muted);
  line-height: 1.68;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.workflow-node {
  display: grid;
  min-height: 120px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(var(--text-rgb), 0.045);
}

.workflow-node small {
  color: var(--soft);
}

.workflow-node strong {
  margin-top: 6px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.media-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.media-checklist .media-slot {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.contact-card .icon-button {
  justify-self: start;
}

.footer {
  background: #222228;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 34px 22px;
  gap: 20px;
  color: var(--soft);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(10px);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(100%, 920px);
  max-height: min(760px, 88vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.modal-body p {
  color: var(--muted);
  line-height: 1.68;
}

.modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.asset-note {
  border-left: 3px solid var(--green);
  padding: 12px 0 12px 14px;
  color: var(--muted);
  line-height: 1.62;
}

.model-drop {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.model-instructions {
  color: var(--muted);
  line-height: 1.68;
}

.model-instructions code {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--green);
  background: rgba(var(--green-rgb), 0.1);
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 22px;
}

@media (max-width: 980px) {
  h1,
  .hero-title {
    font-size: 4rem;
  }

  .hero-grid,
  .project-hero-grid,
  .hero-side,
  .section-head,
  .split,
  .case-row,
  .welcome-panel,
  .production-layout,
  .challenge-layout,
  .model-drop {
    grid-template-columns: 1fr;
  }

  .case-row .media-slot {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-grid,
  .facts-grid,
  .role-grid,
  .process-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-side {
    align-items: stretch;
  }

  .portrait-slot {
    width: 132px;
    height: 132px;
    max-width: none;
  }

  .workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-cloud,
  .story-grid,
  .proof-grid,
  .challenge-grid,
  .proof-media-grid,
  .breakdown-grid,
  .roadmap-step,
  .takeaways-grid,
  .contact-cta {
    grid-template-columns: 1fr;
  }

  .contact-cta .section-actions {
    justify-content: flex-start;
  }

  .system-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1400px) {
  .section-model {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-caption {
    max-width: 92px;
    font-size: 0.76rem;
  }

  .menu-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: 69px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(var(--bg-rgb), 0.96);
    box-shadow: var(--shadow);
  }

  body.is-menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 14px;
  }

  .nav-actions .button {
    display: none;
  }

  .hero {
    min-height: 76svh;
  }

  .hero-model canvas {
    opacity: 0.4;
  }

  .hero.compact {
    min-height: 54svh;
  }

  .hero-inner,
  .section-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-inner {
    padding-top: 118px;
    padding-bottom: 28px;
  }

  .hero-side {
    gap: 14px;
  }

  .hero-identity {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 18px;
  }

  .portrait-slot {
    width: 96px;
    height: 96px;
  }

  .portrait-slot span {
    max-width: 70px;
    font-size: 0.68rem;
    text-align: center;
  }

  h1,
  .hero-title {
    font-size: 3rem;
    line-height: 1;
  }

  h2 {
    font-size: clamp(2rem, 9.5vw, 2.65rem);
    line-height: 1.08;
  }

  .section-head,
  .section.light:last-of-type .section-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    margin-bottom: 26px;
  }

  .section-head .muted {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.55;
  }

  .summary-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-row small,
  .summary-row strong {
    padding: 11px 14px;
  }

  .summary-row strong {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .section.light:last-of-type .section-actions {
    margin-top: 18px;
  }

  .lead {
    font-size: 1.12rem;
  }

  .project-grid,
  .facts-grid,
  .role-grid,
  .process-grid,
  .work-grid,
  .contact-grid,
  .media-checklist,
  .timeline,
  .workflow {
    grid-template-columns: 1fr;
  }

  .two-col {
    columns: 1;
  }

  .media-slot.wide {
    min-height: 280px;
  }

  .challenge-layout .media-slot,
  .production-layout .media-slot,
  .proof-media-grid .media-slot,
  .roadmap-step .media-slot {
    min-height: 180px;
  }

  .media-slot span {
    max-width: calc(100% - 58px);
    gap: 6px;
    padding: 18px 12px;
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .media-slot small {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .media-slot.video::after,
  .media-slot.gif::after,
  .media-slot.image::after,
  .media-slot.model::after,
  .media-slot.diagram::after {
    top: 12px;
    right: 12px;
    padding: 4px 7px;
    font-size: 0.66rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .roadmap::before {
    left: 13px;
  }

  .roadmap-step {
    padding-left: 38px;
  }

  .roadmap-step::before {
    left: 2px;
  }

  .xp-hud {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: none;
    gap: 8px;
    padding: 6px 8px;
  }

  .xp-label {
    display: none;
  }

  .xp-track {
    height: 10px;
  }

  .xp-percent {
    font-size: 0.68rem;
  }

  .lvl-up-toast {
    right: 10px;
    bottom: calc(50px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    max-height: 30vh;
    overflow: auto;
    padding: 12px;
  }

  .lvl-up-toast strong {
    font-size: 1rem;
  }

  .lvl-up-toast p {
    font-size: 0.9rem;
  }

  .lvl-up-toast .button {
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
