/* ==========================================================================
   Elamaran Sugumar — Portfolio design system
   Near-black · metallic silver · restrained amber + electric cyan
   ========================================================================== */
:root {
  --bg: #09090a;
  --bg-2: #0f0f11;
  --panel: #141417;
  --panel-2: #1a1a1e;
  --line: rgba(220, 224, 232, 0.1);
  --line-2: rgba(220, 224, 232, 0.18);
  --text: #ecebe7;
  --muted: #9a9ca3;
  --dim: #6d6f76;
  --silver: #c9ccd2;
  --amber: #e9a85a;
  --cyan: #45d3e6;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
picture { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--amber); color: #111; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--silver); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--text); color: #111; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.accent-cyan { color: var(--cyan); }
.accent-amber { color: var(--amber); }

/* film grain */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── buttons & chips ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em; min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover svg:last-child { transform: translateX(3px); }
.btn--primary { background: var(--text); color: #0b0b0c; }
.btn--primary:hover { background: #fff; }
.btn--ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--silver); }
.btn--link { padding: 0 6px; color: var(--amber); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); transition: border-color 0.3s, background 0.3s;
}
.icon-btn:hover { border-color: var(--silver); background: rgba(255, 255, 255, 0.04); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: 13px; transition: all 0.3s var(--ease);
}
.chip sup { font: 500 10px var(--mono); color: var(--dim); }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active { color: #0b0b0c; background: var(--silver); border-color: var(--silver); }
.chip.is-active sup { color: #333; }
.badge { display: inline-flex; align-items: center; gap: 5px; font: 500 11px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.badge--live { color: var(--cyan); border-color: rgba(69, 211, 230, 0.35); }
.badge--live svg { width: 10px; height: 10px; }
.badge--dash { border-style: dashed; color: var(--amber); border-color: rgba(233, 168, 90, 0.45); }
.eyebrow, .section__kicker {
  font: 500 12px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.section__kicker { display: flex; align-items: center; gap: 14px; }
.section__num { color: var(--amber); }
.section__num::after { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--line-2); margin-left: 14px; vertical-align: middle; }
.mini-title { font: 500 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 32px 0 14px; }

/* placeholder slots */
.slot {
  width: 100%; height: 100%; min-height: 160px; display: grid; place-content: center; gap: 4px; text-align: center;
  border: 1px dashed rgba(233, 168, 90, 0.35); border-radius: 10px; padding: 16px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 12px, transparent 12px 24px);
}
.slot__label { font-size: 14px; color: var(--silver); }
.slot__hint { font: 11px var(--mono); color: var(--amber); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── header ─────────────────────────────── */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: transform 0.5s var(--ease), background 0.4s; }
.site-header.is-scrolled { background: rgba(9, 9, 10, 0.72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.menu-open { backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; background: transparent; }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; max-width: 1560px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; font: 500 12px var(--mono); letter-spacing: 0.06em; background: linear-gradient(145deg, #2a2b30, #111); }
.brand__name { font-weight: 500; font-size: 15px; letter-spacing: 0.02em; }
.nav__list { display: flex; gap: 4px; }
.nav__link { position: relative; display: block; padding: 8px 12px; font-size: 13.5px; color: var(--muted); border-radius: 999px; transition: color 0.3s; }
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--amber); }
.nav__idx { display: none; }
.nav__toggle { display: none; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; }
.scroll-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--cyan), var(--amber)); }

@media (max-width: 1180px) {
  .site-header__cta { display: none; }
  .nav__toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; z-index: 2; }
  .nav__toggle-bars, .nav__toggle-bars::before { display: block; width: 18px; height: 1.5px; background: var(--text); transition: transform 0.4s var(--ease); }
  .nav__toggle-bars::before { content: ''; transform: translateY(6px); }
  .nav__toggle-bars { transform: translateY(-3px); }
  .nav__toggle[aria-expanded='true'] .nav__toggle-bars { transform: rotate(45deg); }
  .nav__toggle[aria-expanded='true'] .nav__toggle-bars::before { transform: rotate(-90deg); }
  .nav__list {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 0; padding: 80px var(--gutter) 40px;
    background: rgba(9, 9, 10, 0.97); backdrop-filter: blur(20px); opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav__list.is-open { opacity: 1; visibility: visible; }
  .nav__link { font: 400 clamp(32px, 8vw, 54px)/1.15 var(--serif); color: var(--silver); padding: 6px 0; display: flex; align-items: baseline; gap: 16px; }
  .nav__idx { display: inline; font: 12px var(--mono); color: var(--amber); }
  .nav__link.is-active::after { display: none; }
}

/* ── hero ─────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--header-h) + 40px) 0 32px; overflow: hidden; isolation: isolate; }
.hero__stage { position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 70% at 72% 42%, #1c1d22 0%, var(--bg) 62%); }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); touch-action: pan-y; }
.hero.is-3d .hero__canvas { opacity: 1; }
.hero__vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(9, 9, 10, 0.85) 0%, rgba(9, 9, 10, 0.3) 45%, transparent 70%), linear-gradient(0deg, var(--bg) 0%, transparent 28%); }
/* lightweight fallback sculpture (CSS only) */
.hero__fallback { position: absolute; right: 5%; top: 47%; width: min(40vw, 560px); aspect-ratio: 1; transform: translateY(-50%); transition: opacity 1.2s; }
.hero.is-3d .hero__fallback { opacity: 0; }
.hero__fallback span { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4f5f7 0%, #9da1a9 18%, #3b3d43 46%, #0d0d0f 72%); box-shadow: 0 0 120px rgba(69, 211, 230, 0.08), inset -30px -40px 80px rgba(233, 168, 90, 0.18); animation: float 9s ease-in-out infinite; }
.hero__fallback span:nth-child(2) { inset: 2%; background: none; border: 1px solid rgba(201, 204, 210, 0.22); box-shadow: none; transform: rotateX(70deg); animation: spin 26s linear infinite; }
.hero__fallback span:nth-child(3) { inset: 6% -4%; background: none; border: 1px solid rgba(233, 168, 90, 0.28); box-shadow: none; animation: spin 40s linear infinite reverse; border-radius: 50%; transform: rotate(-20deg) scaleY(0.32); }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes spin { to { rotate: 360deg; } }

.hero__content { position: relative; }
.hero__name { margin: 18px 0 22px; font: 300 clamp(54px, 8.6vw, 150px)/0.88 var(--sans); letter-spacing: -0.045em; text-transform: uppercase; }
.hero__name-line { display: block; overflow: hidden; padding-bottom: 0.26em; margin-bottom: -0.2em; }
.hero__name-line span { display: inline-block; }
.hero__name-line:nth-child(2) span { font: italic 400 1.04em/0.86 var(--serif); letter-spacing: -0.02em; text-transform: none; color: var(--silver);
  background: linear-gradient(100deg, #f2f2f0 0%, #9ea2aa 40%, #e6e7ea 60%, #7d8189 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__headline { font: 500 clamp(13px, 1.25vw, 16px)/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; max-width: 60ch; }
.hero__lede { margin-top: 14px; max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 28px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero__stats strong { display: block; font: 400 clamp(22px, 3vw, 40px)/1 var(--serif); white-space: nowrap; color: var(--text); }
.hero__stats span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.hero__scroll { position: absolute; right: var(--gutter); bottom: 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 11px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); writing-mode: vertical-rl; }
.hero__scroll i { width: 1px; height: 54px; background: linear-gradient(var(--silver), transparent); animation: scrollcue 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes scrollcue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.hero__hint { position: absolute; right: calc(var(--gutter) + 40px); top: calc(var(--header-h) + 24px); font: 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); opacity: 0; transition: opacity 1s 1.5s; }
.hero.is-3d .hero__hint { opacity: 1; }
.js [data-hero-in] { opacity: 0; transform: translateY(24px); }
.js .is-loaded [data-hero-in] { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.js .is-loaded .hero__name-line[data-hero-in] { opacity: 1; transform: none; }
.js .hero__name-line span { transform: translateY(105%); }
.js .is-loaded .hero__name-line span { transform: none; transition: transform 1.3s var(--ease); }
.js .is-loaded .hero__name-line:nth-child(2) span { transition-delay: 0.12s; }
.js .is-loaded [data-hero-in]:nth-of-type(n) { transition-delay: calc(var(--i, 0) * 90ms + 250ms); }

@media (max-width: 760px) {
  .hero { justify-content: flex-end; padding-bottom: 24px; }
  .hero__vignette { background: linear-gradient(0deg, var(--bg) 8%, rgba(9, 9, 10, 0.6) 52%, rgba(9, 9, 10, 0.1) 100%); }
  .hero__fallback { right: -18%; top: 30%; width: 92vw; }
  .hero__stats { grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
  .hero__stats span { font-size: 11.5px; }
  .hero__scroll, .hero__hint { display: none; }
  .hero__ctas .btn--ghost { order: 3; }
}

/* ── sections ─────────────────────────────── */
.section { position: relative; padding: clamp(96px, 13vw, 180px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { max-width: 900px; margin-bottom: clamp(40px, 5vw, 72px); }
.section__title { margin-top: 20px; font: 300 clamp(36px, 5.4vw, 80px)/1.02 var(--sans); letter-spacing: -0.035em; }
.section__title em { color: var(--silver); }
.section__lede { margin-top: 22px; max-width: 58ch; font-size: clamp(16px, 1.3vw, 18px); color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }

/* reveal (enhanced by GSAP when available) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease) var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ── work carousel ─────────────────────────────── */
.work { overflow: hidden; background: radial-gradient(60% 50% at 80% 0%, rgba(69, 211, 230, 0.05), transparent 70%); }
.work__viewport { perspective: 1600px; }
.work__rail {
  display: flex; gap: clamp(16px, 2vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 24px max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))) 40px; scrollbar-width: none; cursor: grab; transform-style: preserve-3d;
  overscroll-behavior-x: contain;
}
.work__rail::-webkit-scrollbar { display: none; }
.work__rail.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.work__rail.is-dragging .pcard__inner { pointer-events: none; }
.pcard { flex: 0 0 clamp(290px, 34vw, 460px); scroll-snap-align: start; transform-style: preserve-3d; will-change: transform; transition: opacity 0.5s var(--ease); }
.pcard[hidden] { display: none; }
.pcard__inner {
  display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line);
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateZ(var(--tz, 0px)); transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}
.pcard__inner:hover, .pcard__inner:focus-visible { border-color: var(--line-2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(233, 168, 90, 0.12); }
.pcard__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #111; }
.pcard__img, .pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity 0.6s; }
img[data-vimeo-thumb]:not([src]) { opacity: 0; }
.pcard__inner:hover .pcard__img, .pcard__inner:hover .pcard__img img { transform: scale(1.05); }
.pcard__num { position: absolute; left: 16px; top: 14px; font: 500 11px var(--mono); color: rgba(255, 255, 255, 0.7); letter-spacing: 0.1em; mix-blend-mode: difference; }
.pcard__gen { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; font: italic 400 clamp(22px, 2.2vw, 30px)/1.05 var(--serif); color: rgba(236, 235, 231, 0.75);
  background: radial-gradient(80% 90% at 85% 15%, #2b2d33 0%, #121215 60%); }
.pcard__gen::before { content: ''; position: absolute; right: 12%; top: 16%; width: 38%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line-2); box-shadow: inset -20px -20px 40px rgba(0, 0, 0, 0.6); background: radial-gradient(circle at 35% 30%, #d9dbe0, #5a5d64 40%, #18181b 75%); }
.pcard__gen::after { content: ''; position: absolute; right: 4%; top: 32%; width: 54%; height: 1px; background: linear-gradient(90deg, transparent, var(--amber), transparent); transform: rotate(-14deg); opacity: 0.7; }
.pcard__gen--ai::after, .pcard__gen--tech::after, .pcard__gen--uiux::after { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.pcard__gen--gaming::before { border-radius: 22%; transform: rotate(18deg); }
.pcard__gen--3d::before { border-radius: 4px; transform: rotate(45deg) scale(0.8); }
.pcard__gen--branding::before { border-radius: 50% 50% 0 50%; }
.pcard__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; flex: 1; }
.pcard__meta { display: flex; justify-content: space-between; gap: 10px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pcard__kind { color: var(--amber); }
.pcard__title { font: 500 clamp(19px, 1.6vw, 23px)/1.2 var(--sans); letter-spacing: -0.015em; }
.pcard__summary { color: var(--muted); font-size: 14.5px; }
.pcard__foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pcard__cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--silver); }
.pcard__inner:hover .pcard__cta svg { transform: translateX(3px); }
.pcard__cta svg { transition: transform 0.3s var(--ease); }
.pcard--placeholder .pcard__inner { border-style: dashed; background: transparent; }
.work__controls { display: flex; align-items: center; gap: 24px; }
.work__progress { flex: 1; height: 1px; background: var(--line); }
.work__progress span { display: block; height: 100%; background: var(--silver); transform-origin: left; transform: scaleX(0.1); transition: transform 0.3s; }
.work__arrows { display: flex; gap: 8px; }
.noscript-list { display: grid; gap: 24px; margin-top: 24px; }

/* ── art direction ─────────────────────────────── */
.art { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.pipeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; counter-reset: step; }
.pipeline::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line); }
.pipeline::after { content: ''; position: absolute; left: 0; top: 7px; height: 1px; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--amber)); transform-origin: left; transform: scaleX(var(--pp, 0)); transition: transform 0.2s linear; }
.pipeline__step { position: relative; padding-top: 34px; opacity: 0.35; transition: opacity 0.6s var(--ease); }
.pipeline__step.is-on { opacity: 1; }
.no-js .pipeline__step { opacity: 1; }
.pipeline__dot { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); z-index: 1; transition: background 0.5s, border-color 0.5s, box-shadow 0.5s; }
.pipeline__step.is-on .pipeline__dot { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(233, 168, 90, 0.12); }
.pipeline__n { font: 500 11px var(--mono); color: var(--dim); letter-spacing: 0.1em; }
.pipeline__step h3 { margin: 6px 0 8px; font: 400 clamp(22px, 2vw, 28px)/1.1 var(--serif); }
.pipeline__step p { font-size: 14px; color: var(--muted); }
.boards { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 16px; margin-top: clamp(56px, 7vw, 96px); }
.board { position: relative; border-radius: var(--radius); overflow: hidden; }
.board--0 { grid-row: span 2; }
.board--3 { grid-column: span 2; }
.board img { width: 100%; height: 100%; object-fit: cover; }
.board picture { height: 100%; }
.board figcaption { position: absolute; left: 14px; bottom: 12px; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.board .slot { border-radius: var(--radius); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: clamp(56px, 7vw, 96px); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.principles li { background: var(--bg-2); padding: 32px 28px; }
.principles h3 { font: 400 26px/1.1 var(--serif); margin-bottom: 10px; }
.principles p { color: var(--muted); font-size: 15px; }

/* ── 3D & gaming ─────────────────────────────── */
.viewer { display: grid; grid-template-columns: 1fr 320px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; background: radial-gradient(70% 80% at 40% 40%, #1d1e23 0%, #0c0c0e 75%); }
.viewer__stage { position: relative; aspect-ratio: 16 / 10; min-height: 360px; }
.viewer__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.viewer__canvas:active { cursor: grabbing; }
.viewer__status { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; font: 12px var(--mono); color: var(--dim); letter-spacing: 0.08em; pointer-events: none; transition: opacity 0.5s; }
.viewer__status.is-hidden { opacity: 0; }
.viewer__help { position: absolute; left: 18px; bottom: 14px; font: 11px var(--mono); color: var(--dim); letter-spacing: 0.08em; }
.viewer__panel { border-left: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 12px; background: rgba(9, 9, 10, 0.5); }
.viewer__label { font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-top: 8px; }
.viewer__list { display: grid; gap: 6px; }
.viewer__item { text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; transition: border-color 0.3s, background 0.3s; }
.viewer__item small { display: block; font: 11px var(--mono); color: var(--dim); margin-top: 2px; }
.viewer__item.is-active { border-color: var(--silver); background: rgba(255, 255, 255, 0.04); }
.viewer__item--slot { border-style: dashed; border-color: rgba(233, 168, 90, 0.35); color: var(--muted); }
.viewer__mats, .viewer__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.viewer__tools { margin-top: auto; padding-top: 12px; }
.disciplines { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.discipline { min-width: 0; border-top: 1px solid var(--line-2); padding-top: 16px; }
.discipline .slot, .discipline__img { aspect-ratio: 4 / 3; height: auto; min-height: 0; margin-bottom: 16px; border-radius: 10px; overflow: hidden; }
.discipline__img img { width: 100%; height: 100%; object-fit: cover; }
.discipline h3 { font-size: 17px; font-weight: 500; }
.discipline p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── motion / video ─────────────────────────────── */
.motion { background: radial-gradient(60% 40% at 15% 10%, rgba(233, 168, 90, 0.05), transparent 70%); }
.reel { margin-bottom: 40px; }
.reel__btn { position: relative; display: block; width: 100%; aspect-ratio: 21 / 9; border-radius: calc(var(--radius) + 4px); overflow: hidden; background: linear-gradient(120deg, #1a1b1f, #0c0c0e); border: 1px solid var(--line); }
.reel__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.6s var(--ease), opacity 0.6s; }
.reel__btn:hover img { transform: scale(1.0); }
.reel__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9, 9, 10, 0.85), rgba(9, 9, 10, 0.1) 60%); }
.reel__label { position: absolute; left: clamp(18px, 3vw, 40px); bottom: clamp(18px, 3vw, 36px); right: 20px; display: flex; align-items: center; gap: 20px; text-align: left; }
.reel__label strong { display: block; font: 400 clamp(32px, 4.4vw, 64px)/1 var(--serif); }
.reel__label small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.reel__play, .vcard__play { flex: none; display: grid; place-items: center; width: clamp(56px, 6vw, 84px); aspect-ratio: 1; border-radius: 50%; background: rgba(236, 235, 231, 0.92); color: #0b0b0c; transition: transform 0.5s var(--ease); }
.reel__play svg { width: 34%; height: 34%; margin-left: 4%; }
.reel__btn:hover .reel__play { transform: scale(1.08); }
.vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vcard[hidden] { display: none; }
.vcard__btn { display: block; width: 100%; text-align: left; }
.vcard__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #1b1c20, #0d0d0f); border: 1px solid var(--line); }
.vcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity 0.6s; }
.vcard__btn:hover .vcard__media img { transform: scale(1.05); }
.vcard__play { position: absolute; left: 50%; top: 50%; width: 54px; transform: translate(-50%, -50%) scale(0.9); opacity: 0.88; }
.vcard__play svg { width: 36%; height: 36%; margin-left: 4%; }
.vcard__btn:hover .vcard__play { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.vcard__dur { position: absolute; right: 10px; bottom: 10px; font: 500 11px var(--mono); padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); }
.vcard__dur:empty { display: none; }
.vcard__meta { display: block; padding: 14px 2px 0; }
.vcard__cat { display: block; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.vcard__title { display: block; margin-top: 4px; font-size: 16px; font-weight: 500; }
.vcard--slot .slot { aspect-ratio: 16 / 9; min-height: 0; }

/* ── capabilities ─────────────────────────────── */
.caps__wrap { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.caps__tabs { display: grid; border-top: 1px solid var(--line); }
.caps__tab { display: flex; align-items: baseline; gap: 16px; padding: 18px 4px; text-align: left; border-bottom: 1px solid var(--line); font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); transition: color 0.3s, padding 0.4s var(--ease); }
.caps__tab span { font: 11px var(--mono); color: var(--dim); }
.caps__tab:hover { color: var(--text); }
.caps__tab.is-active { color: var(--text); padding-left: 14px; }
.caps__tab.is-active span { color: var(--amber); }
.caps__panel { padding: clamp(24px, 3vw, 44px); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: linear-gradient(160deg, var(--panel-2), var(--bg) 70%); }
.js .caps__panel[hidden] { display: none; }
.no-js .caps__panel { margin-bottom: 16px; }
.caps__panel h3 { font: 400 clamp(34px, 3.6vw, 52px)/1 var(--serif); }
.caps__summary { margin-top: 10px; color: var(--muted); }
.caps__items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; margin-top: 28px; }
.caps__items li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.caps__items li::before { content: '—'; color: var(--cyan); margin-right: 10px; }
.caps__tools-label { margin-top: 28px; font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.caps__tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.caps__tools li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--silver); }
.caps__panel.is-entering { animation: panelIn 0.6s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

/* ── experience ─────────────────────────────── */
.exp__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.exp__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.exp__intro .section__head { margin-bottom: 28px; }
.exp__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.edu ul { display: grid; gap: 14px; }
.edu li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; }
.edu li > span { font: 500 12px/1.9 var(--mono); color: var(--amber); }
.edu strong { font-weight: 500; }
.edu p { font-size: 14px; color: var(--muted); }
.edu .hl { gap: 10px; }
.edu .hl li { display: block; font-size: 14px; color: var(--muted); padding-left: 18px; position: relative; }
.edu .hl li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 8px; height: 1px; background: var(--cyan); }
.timeline { position: relative; padding-left: 40px; }
.timeline__line { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline__line i { position: absolute; inset: 0; background: linear-gradient(var(--cyan), var(--amber)); transform-origin: top; transform: scaleY(var(--tp, 0)); }
.tl { position: relative; padding-bottom: 48px; }
.tl:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: -40px; top: 6px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); }
.tl.is-in .tl__dot { border-color: var(--amber); box-shadow: inset 0 0 0 4px var(--bg); background: var(--amber); transition: all 0.6s 0.3s var(--ease); }
.tl__period { font: 500 12px var(--mono); letter-spacing: 0.08em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tl__track { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); font-size: 10.5px; text-transform: uppercase; }
.tl__role { margin-top: 10px; font: 400 clamp(26px, 2.6vw, 36px)/1.1 var(--serif); }
.tl__org { margin-top: 4px; color: var(--amber); font-size: 15px; }
.tl__points { margin-top: 12px; display: grid; gap: 6px; }
.tl__points li { color: var(--muted); font-size: 15px; padding-left: 16px; position: relative; }
.tl__points li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 6px; height: 1px; background: var(--dim); }

/* ── about ─────────────────────────────── */
.about { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.about__portrait { position: sticky; top: calc(var(--header-h) + 32px); border-radius: calc(var(--radius) + 6px); overflow: hidden; clip-path: inset(var(--clip, 0%) 0 0 0 round 20px); }
.about__portrait img { width: 100%; height: auto; transform: scale(var(--ps, 1)); transform-origin: center top; }
.about__portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9, 9, 10, 0.7), transparent 40%); pointer-events: none; }
.about__portrait figcaption { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; justify-content: space-between; gap: 12px; font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver); }
.about__headline { margin: 22px 0 32px; font: 400 clamp(38px, 4.8vw, 74px)/1.02 var(--serif); letter-spacing: -0.01em; }
.about__p { max-width: 62ch; color: var(--muted); font-size: clamp(16px, 1.25vw, 18px); margin-bottom: 18px; }
.about__p:first-of-type { color: var(--text); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.pillars h3 { font: 500 13px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver); margin-bottom: 8px; }
.pillars p { font-size: 14.5px; color: var(--muted); }

/* ── contact ─────────────────────────────── */
.contact { overflow: hidden; padding-bottom: 40px; }
.contact__glow { position: absolute; left: 50%; top: 10%; width: 80vw; height: 60vw; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(233, 168, 90, 0.09), rgba(69, 211, 230, 0.04) 55%, transparent); pointer-events: none; }
.contact__grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact__title { margin: 22px 0 24px; font: 300 clamp(44px, 6.4vw, 104px)/0.98 var(--sans); letter-spacing: -0.045em; text-transform: uppercase; }
.contact__title em { display: block; text-transform: none; font-size: 0.86em; letter-spacing: -0.015em; line-height: 1.02; color: var(--silver); }
.contact__lede { color: var(--muted); max-width: 48ch; }
.contact__email { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.contact__email a { font: 400 clamp(24px, 2.8vw, 40px)/1.1 var(--serif); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: border-color 0.3s, color 0.3s; word-break: break-all; }
.contact__email a:hover { color: var(--amber); border-color: var(--amber); }
.copy-toast { font: 12px var(--mono); color: var(--cyan); }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contact__links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; transition: border-color 0.3s; }
.contact__links a:hover { border-color: var(--silver); }
.form { padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); background: rgba(20, 20, 23, 0.7); backdrop-filter: blur(10px); display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span { font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field i { font-style: normal; color: var(--dim); text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(9, 9, 10, 0.6); transition: border-color 0.3s, box-shadow 0.3s; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(69, 211, 230, 0.15); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #f07a6a; }
.field .err { font-size: 12px; color: #f3a093; }
.hp { position: absolute; left: -9999px; }
.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form__status { font-size: 13px; color: var(--muted); }
.form__status.is-ok { color: var(--cyan); }
.form__status.is-err { color: #f3a093; }
.footer { position: relative; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(80px, 10vw, 140px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.footer a:hover { color: var(--text); }

/* ── dialogs ─────────────────────────────── */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(5, 5, 6, 0.86); backdrop-filter: blur(8px); }
.cs { width: min(1120px, 100vw); height: 100dvh; margin: 0 auto; }
.cs[open] { animation: dlgIn 0.6s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(30px); } }
.cs__inner { height: 100%; overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding: clamp(72px, 8vw, 96px) clamp(20px, 5vw, 64px) 64px; overscroll-behavior: contain; }
.cs__close, .player__close { position: fixed; top: 18px; right: 18px; background: rgba(9, 9, 10, 0.7); backdrop-filter: blur(10px); z-index: 3; }
.cs__kicker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cs__title { margin: 18px 0 18px; font: 300 clamp(34px, 5vw, 68px)/1.02 var(--sans); letter-spacing: -0.035em; }
.cs__summary { font-size: clamp(17px, 1.5vw, 21px); color: var(--silver); max-width: 60ch; }
.cs__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin: 36px 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cs__facts div { background: var(--bg-2); padding: 18px; }
.cs__facts dt { font: 500 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.cs__facts dd { margin: 6px 0 0; font-size: 15px; }
.cs__body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.cs__body h3 { font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.cs__body p { color: var(--muted); }
.cs__list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cs__list li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; }
.cs__media { display: grid; gap: 20px; margin-top: 44px; }
.cs__media .embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.cs__media .embed iframe, .cs__media .embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs__media .embed button { position: absolute; inset: 0; width: 100%; }
.cs__media .embed button img { width: 100%; height: 100%; object-fit: cover; }
.cs__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 70px; aspect-ratio: 1; border-radius: 50%; background: rgba(236, 235, 231, 0.92); color: #0b0b0c; }
.cs__play svg { width: 36%; height: 36%; margin-left: 4%; }
.cs__media img { border-radius: 12px; width: 100%; }
.cs__media .slot { aspect-ratio: 16 / 9; }
.cs__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs__nav button { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.cs__nav button:hover { color: var(--text); }
.player { width: 100vw; height: 100dvh; display: none; }
.player[open] { display: grid; place-items: center; animation: dlgIn 0.5s var(--ease); }
.player__frame { position: relative; width: min(92vw, calc((100dvh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.player__frame iframe, .player__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__title { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; font: 500 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ── responsive ─────────────────────────────── */
@media (max-width: 1100px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .pipeline::before, .pipeline::after { display: none; }
  .viewer { grid-template-columns: 1fr; }
  .viewer__panel { border-left: 0; border-top: 1px solid var(--line); }
  .disciplines { grid-template-columns: repeat(2, 1fr); }
  .vgrid { grid-template-columns: repeat(2, 1fr); }
  .exp__grid, .about__grid, .contact__grid, .caps__wrap { grid-template-columns: 1fr; }
  .exp__intro, .about__portrait { position: relative; top: 0; }
  .about__portrait { max-width: 520px; }
  .cs__body { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand__name { display: none; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .boards { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .board--0, .board--3 { grid-row: auto; grid-column: auto; }
  .board { aspect-ratio: 4 / 3; }
  .principles, .pillars { grid-template-columns: 1fr; }
  .vgrid { grid-template-columns: 1fr; }
  .caps__items { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .reel__btn { aspect-ratio: 16 / 10; }
  .reel__label small { display: none; }
  .pcard { flex-basis: 82vw; }
  .viewer__stage { aspect-ratio: 1; min-height: 0; }
  .viewer__panel { padding: 18px; }
  .disciplines { gap: 12px; }
}
@media (max-width: 420px) { .pipeline { grid-template-columns: 1fr; } .disciplines { grid-template-columns: 1fr 1fr; } }

/* ── reduced motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-hero-in], .js .hero__name-line span { opacity: 1; transform: none; }
  .pcard__inner { transform: none !important; }
}
