/* ==========================================================================
   akshajnad.tech — "the stack"
   Dark, instrument-panel art direction. Warm paper text on ink, one signal
   orange, one phosphor lime, per-project brand hues from data.js.
   ========================================================================== */

:root {
  --bg: #0a0c0f;
  --bg-2: #0e1115;
  --surface: #12161b;
  --surface-2: #171c22;
  --line: rgba(236, 232, 225, 0.08);
  --line-2: rgba(236, 232, 225, 0.15);
  --line-3: rgba(236, 232, 225, 0.26);
  --text: #ece8e1;
  --muted: #a3a097;
  --dim: #75736c;
  --accent: #ff7a45;
  --accent-ink: #1a0d06;
  --signal: #c9e49e;
  --cool: #8fb4ff;
  --focus: #ffcf9e;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  --shell: min(1320px, 100% - 2 * var(--gutter));
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255, 122, 69, 0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(143, 180, 255, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  z-index: 100;
}
.noscript a {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 12, 15, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-shell {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 17px;
}
.wordmark-text span {
  color: var(--accent);
}
.wordmark-glyph {
  display: grid;
  gap: 2px;
  width: 18px;
}
.wordmark-glyph i {
  display: block;
  height: 4px;
  border-radius: 1px;
  background: var(--text);
  transition: transform 0.5s var(--ease-out);
}
.wordmark-glyph i:nth-child(1) {
  background: var(--accent);
  transform: translateX(3px);
}
.wordmark-glyph i:nth-child(2) {
  background: var(--signal);
  transform: translateX(-2px);
}
.wordmark-glyph i:nth-child(3) {
  opacity: 0.6;
}
.wordmark:hover .wordmark-glyph i {
  transform: none;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.site-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover {
  color: var(--text);
  background: rgba(236, 232, 225, 0.05);
}
.site-nav a.is-active {
  color: var(--text);
}
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  margin-right: 6px;
}
.site-nav .nav-resume {
  color: var(--text);
  margin-left: 8px;
}
.site-nav .nav-contact {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 600;
  padding-inline: 16px;
}
.site-nav .nav-contact:hover {
  background: #ff915f;
  color: var(--accent-ink);
}
.menu-toggle {
  display: none;
}
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--signal));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 550;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid var(--line-2);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s;
  will-change: transform;
}
.btn > span {
  pointer-events: none;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  background: #fff;
}
.btn-primary .btn-arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-out);
}
.btn-primary:hover .btn-arrow {
  transform: translateY(3px);
}
.btn-ghost:hover {
  border-color: var(--line-3);
  background: rgba(236, 232, 225, 0.05);
}
.btn-icon {
  width: 48px;
  padding: 0;
  justify-content: center;
}
.btn-icon svg {
  width: 20px;
  height: 20px;
}
.btn-icon:hover {
  border-color: var(--line-3);
  background: rgba(236, 232, 225, 0.05);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease-out), color 0.2s;
  padding-bottom: 2px;
}
.link-arrow:hover {
  background-size: 100% 1px;
  color: #fff;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(201, 228, 158, 0.28);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--signal);
  background: rgba(201, 228, 158, 0.05);
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(201, 228, 158, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(201, 228, 158, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 228, 158, 0);
  }
}

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: clamp(96px, 12vw, 160px) 0 clamp(64px, 8vw, 110px);
}
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
  transform: scaleX(var(--rule, 1));
  transition: transform 1.2s var(--ease-out);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  grid-template-areas: "title side";
  gap: 18px 56px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head .eyebrow {
  grid-area: eyebrow;
}
.section-head .section-title {
  grid-area: title;
}
.section-head-side {
  grid-area: side;
  color: var(--muted);
  font-size: 16px;
  max-width: 44ch;
}
.section-head-side p {
  margin: 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span {
  color: var(--accent);
}
.section-title {
  margin: 0;
  font-size: clamp(38px, 6.2vw, 84px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section-title em {
  font-size: 1.06em;
  color: var(--text);
}

/* Split-text reveal */
.js [data-split] .char,
.js [data-split-words] .word {
  display: inline-block;
  transform: translateY(0.6em) rotate(4deg);
  opacity: 0;
  filter: blur(6px);
  transition:
    transform 0.9s var(--ease-out),
    opacity 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 28ms + var(--d, 0ms));
}
.js [data-split-words] .word {
  transition-delay: calc(var(--i, 0) * 55ms);
}
.js .is-in [data-split] .char,
.js [data-split].is-in .char,
.js [data-split-words].is-in .word {
  transform: none;
  opacity: 1;
  filter: none;
}
.js .reveal-up {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js .reveal-up.is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-h) + clamp(24px, 6vh, 64px)) 0 40px;
  display: flex;
  align-items: stretch;
  overflow: clip;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 70% 45%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 70% 45%, #000 0%, transparent 75%);
  opacity: 0.55;
  z-index: 0;
}
.hero-stage {
  position: absolute;
  inset: 0 0 0 34%;
  z-index: 1;
}
.hero-canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-canvas.is-ready {
  opacity: 1;
}
.hero-fallback {
  position: absolute;
  right: 6%;
  top: 50%;
  width: min(520px, 46vw);
  transform: translateY(-50%);
  opacity: 0.85;
}
.has-webgl .hero-fallback {
  display: none;
}
.hero-labels,
.tower-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-label {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s;
  will-change: transform;
}
.hero-label.is-on {
  opacity: 1;
}
.hero-label b {
  color: var(--text);
  font-weight: 500;
}
.hero-label i {
  font-style: normal;
  color: var(--dim);
  text-transform: none;
  letter-spacing: 0.02em;
}
.hero-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.hero-shell > * {
  pointer-events: auto;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-loc {
  margin: 0;
}
.hero-title {
  margin: clamp(28px, 7vh, 72px) 0 0;
  font-size: clamp(64px, 13.2vw, 200px);
  font-weight: 600;
  line-height: 0.84;
  letter-spacing: -0.065em;
  pointer-events: none;
}
.hero-title .line {
  display: block;
  white-space: nowrap;
}
.hero-title .line:nth-child(2) {
  padding-left: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 232, 225, 0.6);
}
.hero-title .line:nth-child(2) .char:hover {
  color: var(--accent);
}
.hero-title .char {
  pointer-events: auto;
  transition: color 0.3s;
}
.hero-lower {
  margin-top: clamp(28px, 5vh, 48px);
  display: grid;
  gap: 28px;
  max-width: 600px;
}
.hero-lede {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: #cfcbc3;
  text-wrap: pretty;
}
.hero-lede em {
  color: var(--text);
  font-size: 1.12em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.now-strip {
  margin-top: auto;
  padding-top: 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}
.now-label {
  margin: 11px 0 0;
  color: var(--accent);
}
.now-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}
.now-list li + li {
  border-left: 1px solid var(--line);
}
.now-item {
  display: grid;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 12px 16px 6px;
  text-align: left;
  position: relative;
  transition: background 0.25s;
}
.now-item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--c, var(--accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--ease-out);
}
.now-item:hover::before,
.now-item:focus-visible::before {
  transform: scaleX(1);
}
.now-item:hover {
  background: linear-gradient(180deg, rgba(236, 232, 225, 0.04), transparent);
}
.now-item strong {
  font-size: 15px;
  font-weight: 550;
}
.now-item span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  width: 22px;
  height: 34px;
  margin-left: -11px;
  border: 1px solid var(--line-3);
  border-radius: 12px;
  display: none;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 2px;
  height: 7px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--text);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    transform: translateY(12px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Experience tower
   -------------------------------------------------------------------------- */
.tower-section {
  padding-bottom: 0;
}
.tower-track {
  position: relative;
  height: calc(var(--floors, 6) * 72vh + 30vh);
}
.tower-sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
}
.tower-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: center;
  height: 100%;
  max-height: 820px;
}
.floor-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  counter-reset: floor;
}
.floor-btn {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 12px;
  width: 100%;
  padding: 11px 12px 11px 10px;
  border-radius: 10px;
  text-align: left;
  color: var(--muted);
  transition: background 0.25s, color 0.25s;
}
.floor-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--c);
  transform: scaleY(0);
  transition: transform 0.4s var(--ease-out);
}
.floor-btn:hover {
  background: rgba(236, 232, 225, 0.04);
  color: var(--text);
}
.floor-btn[aria-current="true"] {
  color: var(--text);
  background: rgba(236, 232, 225, 0.05);
}
.floor-btn[aria-current="true"]::before {
  transform: scaleY(1);
}
.floor-num {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  padding-top: 3px;
}
.floor-btn[aria-current="true"] .floor-num {
  color: var(--c);
}
.floor-btn strong {
  font-weight: 550;
  font-size: 15px;
  line-height: 1.25;
}
.floor-btn small {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.3;
}
.tower-stage {
  position: relative;
  height: 100%;
  min-height: 420px;
}
.tower-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}
.tower-canvas.is-pointer {
  cursor: pointer;
}
.tower-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--dim);
  transition: color 0.3s, opacity 0.3s;
  will-change: transform;
}
.tower-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.tower-label.is-active {
  color: var(--text);
}
.tower-label.is-active b {
  color: var(--c);
}
.tower-label b {
  font-weight: 500;
}
.tower-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  min-width: 200px;
  max-width: 260px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(14, 17, 21, 0.92);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px)) scale(0.96);
  transition: opacity 0.18s, transform 0.18s var(--ease-out);
  font-size: 13px;
}
.tower-tip.is-on {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 18px));
}
.tower-tip b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.tower-tip span {
  display: block;
  color: var(--muted);
}
.tower-tip i {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c, var(--accent));
}
.tower-hint {
  position: absolute;
  left: 50%;
  bottom: 8px;
  margin: 0;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}

.floor-focus {
  --c: var(--accent);
  position: relative;
  padding: 26px 24px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 28, 34, 0.9), rgba(16, 20, 24, 0.9));
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.floor-focus::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--c);
}
.floor-focus::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.focus-swap {
  animation: focus-in 0.55s var(--ease-out);
}
@keyframes focus-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.focus-kicker {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
}
.focus-kicker span:first-child {
  color: var(--c);
}
.floor-focus h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.focus-role {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.focus-headline {
  margin: 18px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.2;
  color: #e3dfd7;
}
.focus-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 12px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.focus-metrics div {
  display: grid;
  gap: 2px;
}
.focus-metrics dt {
  order: 2;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.focus-metrics dd {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.focus-annex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.focus-annex button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.focus-annex button:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.focus-open {
  margin-top: 22px;
  width: 100%;
  justify-content: space-between;
  background: var(--c);
  border-color: var(--c);
  color: #0b0d10;
}
.focus-open:hover {
  filter: brightness(1.08);
}

/* stacked list: only shown when WebGL is unavailable */
.floor-list {
  display: none;
}
.no-tower .tower-track {
  display: none;
}
.no-tower .floor-list {
  display: grid;
  gap: 16px;
  padding-bottom: clamp(64px, 8vw, 110px);
}
.slab {
  --c: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: start;
  padding: 24px 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-2);
  text-align: left;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out), border-color 0.3s;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 10px 0 -4px #0d1014,
    0 10px 0 -3px var(--line-2);
}
.slab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c);
}
.slab:hover {
  transform: translateY(-4px) rotateX(4deg);
  border-color: color-mix(in srgb, var(--c) 50%, var(--line-2));
}
.slab-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 16%, #0e1115);
  color: var(--c);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.slab h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.slab p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 64ch;
}
.slab .slab-role {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 14px;
}
.slab-meta {
  text-align: right;
  display: grid;
  gap: 6px;
  justify-items: end;
}
.slab-metric strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.slab-metric span {
  font-size: 12px;
  color: var(--muted);
}
.slab-open {
  grid-column: 2 / -1;
  justify-self: start;
  margin-top: 8px;
  color: var(--c);
  font-size: 14px;
  font-weight: 550;
}
.slab-annex {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Selected work
   -------------------------------------------------------------------------- */
.showcase {
  display: grid;
  gap: clamp(72px, 10vw, 140px);
}
.show {
  --c: var(--accent);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.show:nth-child(even) {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}
.show:nth-child(even) .show-media {
  order: 2;
}
.show-media {
  position: relative;
  perspective: 1600px;
}
.show-media::before {
  content: "";
  position: absolute;
  inset: 10% 8% -6%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent);
  filter: blur(40px);
  opacity: 0.55;
  z-index: -1;
}
.show-tilt {
  transform: rotateX(calc(var(--tilt, 1) * 12deg)) rotateY(calc(var(--tilt, 1) * var(--yaw, -10deg))) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
}
.show-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}
.show-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.show-kicker .mono:first-child {
  color: var(--c);
}
.award-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #f5d48a;
  background: rgba(245, 212, 138, 0.07);
  border: 1px solid rgba(245, 212, 138, 0.25);
}
.show h3 {
  margin: 0;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.show-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  color: #e3dfd7;
}
.show-summary {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}
.show-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 8px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.show-metrics div {
  display: grid;
}
.show-metrics dd {
  order: -1;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.show-metrics dt {
  font-size: 12px;
  color: var(--muted);
}
.show-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.btn-case {
  background: var(--c);
  color: #0b0d10;
  border-color: var(--c);
}
.btn-case:hover {
  filter: brightness(1.08);
}

/* device frames */
.frame {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  cursor: zoom-in;
}
.frame img {
  width: 100%;
  height: auto;
}
.frame-browser {
  border-radius: 12px;
  background: #15191e;
  border: 1px solid var(--line-2);
  box-shadow:
    0 50px 80px -40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #111418;
}
.frame-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2f36;
}
.frame-bar span {
  margin: 0 auto;
  padding: 3px 14px;
  border-radius: 6px;
  background: #1a1f25;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  transform: translateX(-20px);
}
.frame-phone {
  padding: 12px;
  border-radius: 38px;
  background: linear-gradient(145deg, #2b3037, #121519 40%, #1d2127);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px #000,
    0 60px 90px -40px rgba(0, 0, 0, 0.95);
}
.frame-phone .screen {
  position: relative;
  border-radius: 27px;
  overflow: hidden;
  background: #000;
}
.frame-plain {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-2);
}
.frame-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 12, 15, 0.75);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}
.frame:hover .frame-zoom,
.frame:focus-visible .frame-zoom {
  opacity: 1;
  transform: none;
}
.media-caption {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--dim);
}

/* more builds */
.builds {
  margin-top: clamp(96px, 12vw, 160px);
}
.builds-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
}
.builds-title {
  margin: 0;
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.03em;
}
.builds-head .mono {
  margin: 0;
}
.build-grid {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.build-card {
  --c: var(--accent);
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 250px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition:
    transform 0.4s var(--ease-out),
    border-color 0.3s,
    background 0.3s;
  overflow: hidden;
}
.build-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.build-card:hover {
  border-color: color-mix(in srgb, var(--c) 40%, var(--line-2));
}
.build-card:hover::before {
  opacity: 1;
}
.build-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.build-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, #0e1115);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.build-card h4 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.build-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.build-foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
}
.build-foot .go {
  color: var(--c);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transform: translateX(-4px);
  opacity: 0.7;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.build-card:hover .go {
  transform: none;
  opacity: 1;
}
.build-card .award-chip {
  font-size: 11px;
  padding: 3px 8px;
}

/* --------------------------------------------------------------------------
   Skills explorer
   -------------------------------------------------------------------------- */
.sx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.sx-filters button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--muted);
  transition: all 0.2s;
}
.sx-filters button:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.sx-filters button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}
.sx-filters button small {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.6;
}
.sx {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 72px;
  align-items: start;
}
.sx-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.sx-wires path {
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
}
.sx-wires .wire {
  stroke-dasharray: var(--len) var(--len);
  stroke-dashoffset: var(--len);
  animation: wire-draw 0.7s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}
.sx-wires .wire-flow {
  stroke-dasharray: 2 10;
  animation: wire-flow 1.2s linear infinite;
  opacity: 0.9;
}
@keyframes wire-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes wire-flow {
  to {
    stroke-dashoffset: -24;
  }
}
.sx-tiles {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  perspective: 900px;
}
.sx-tiles li {
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}
.sx-tiles li[hidden] {
  display: none;
}
.sx-tile {
  --c: var(--accent);
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: grid;
  justify-items: start;
  align-content: space-between;
  gap: 14px;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(160deg, #161b21, #101317);
  border: 1px solid var(--line);
  text-align: left;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(0);
  transform-style: preserve-3d;
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.3s,
    background 0.3s,
    opacity 0.3s,
    box-shadow 0.3s;
}
.sx-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 18%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sx-tile:hover::after,
.sx-tile[aria-pressed="true"]::after,
.sx-tile.is-related::after {
  opacity: 1;
}
.sx-tile:hover {
  border-color: var(--line-3);
}
.sx-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #8b8a84;
  transform: translateZ(18px);
  transition: color 0.3s, transform 0.4s var(--ease-out);
}
.sx-icon svg {
  width: 26px;
  height: 26px;
}
.sx-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.sx-tile:hover .sx-icon,
.sx-tile[aria-pressed="true"] .sx-icon,
.sx-tile.is-related .sx-icon {
  color: var(--c);
  transform: translateZ(28px) scale(1.06);
}
.sx-name {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.2;
  transform: translateZ(10px);
}
.sx-count {
  position: absolute;
  right: 12px;
  top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}
.sx-tile[aria-pressed="true"] {
  border-color: var(--c);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, #161b21), #101317);
  box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--c) 60%, transparent);
  transform: translateY(-4px) rotateX(var(--rx)) rotateY(var(--ry));
}
.sx-tile.is-related {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
}
.sx.has-focus .sx-tile:not([aria-pressed="true"]):not(.is-related) {
  opacity: 0.38;
}

.sx-rail {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  z-index: 1;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: rgba(14, 17, 21, 0.9);
  overflow: hidden;
}
.sx-rail-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  min-height: 72px;
}
.sx-rail-head .sx-icon {
  color: var(--c, var(--muted));
  transform: none;
}
.sx-rail-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sx-rail-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.sx-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}
.sx-close:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.sx-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(640px, calc(100vh - var(--header-h) - 120px));
  overflow: auto;
  scrollbar-width: thin;
}
.sx-row {
  --c: var(--accent);
  border-radius: 10px;
  transition: opacity 0.3s, background 0.3s;
}
.sx-row.is-dim {
  opacity: 0.32;
}
.sx-row-btn {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 0 12px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  transition: background 0.2s;
}
.sx-row-btn:hover {
  background: rgba(236, 232, 225, 0.05);
}
.sx-row .dot {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.sx-row strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}
.sx-row small {
  display: block;
  font-size: 12px;
  color: var(--dim);
}
.sx-row .go {
  font-size: 13px;
  color: var(--dim);
  transition: color 0.2s, transform 0.3s var(--ease-out);
}
.sx-row-btn:hover .go {
  color: var(--c);
  transform: translateX(2px);
}
.sx-how {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.sx-how > div {
  overflow: hidden;
}
.sx-row.is-on {
  background: color-mix(in srgb, var(--c) 7%, transparent);
}
.sx-row.is-on .sx-how {
  grid-template-rows: 1fr;
}
.sx-how p {
  margin: 0;
  padding: 0 12px 12px 52px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #cbc7bf;
}
.sx-empty {
  padding: 20px 18px;
  font-size: 13px;
  color: var(--muted);
}
.sx-sheet-bar {
  display: none;
}

.sx-more {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.sx-more .mono {
  margin: 0 0 14px;
}
.sx-more dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 28px;
}
.sx-more dt {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
.sx-more dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sx-more .chip {
  padding: 5px 10px;
  font-size: 12.5px;
}
/* --------------------------------------------------------------------------
   Hackathon wins: medal wall
   -------------------------------------------------------------------------- */
.wins-section {
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, transparent, rgba(242, 205, 120, 0.035) 30%, rgba(242, 205, 120, 0.035) 70%, transparent);
}
.wins-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(55% 60% at 68% 55%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(55% 60% at 68% 55%, #000, transparent 75%);
}
.wins-light::before {
  content: "";
  position: absolute;
  left: 68%;
  top: 55%;
  width: 160vmax;
  height: 160vmax;
  margin: -80vmax 0 0 -80vmax;
  background: repeating-conic-gradient(from 0deg, rgba(242, 205, 120, 0.09) 0deg 2.5deg, transparent 2.5deg 10deg);
  animation: wins-spin 140s linear infinite;
}
.wins-light::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 45% at 68% 55%, rgba(242, 205, 120, 0.16), transparent 70%);
}
@keyframes wins-spin {
  to {
    transform: rotate(360deg);
  }
}
.wins-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.wins-big {
  margin: 0;
  display: flex;
  align-items: baseline;
  font-size: clamp(120px, 15vw, 210px);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.07em;
  background: linear-gradient(160deg, #fff3cf 10%, #f2cd78 45%, #a87a25 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wins-x {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.5em;
  margin-left: 0.04em;
}
.wins-label {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f2cd78;
}
.wins-also {
  list-style: none;
  margin: 22px 0 20px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(242, 205, 120, 0.2);
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}
.wins-also span {
  color: var(--muted);
}
.wins-also button {
  text-decoration: underline;
  text-decoration-color: rgba(242, 205, 120, 0.4);
  text-underline-offset: 3px;
}
.wins-also button:hover {
  color: #f5d48a;
}
.medals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  perspective: 1000px;
}
.medal {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0 12px 20px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(242, 205, 120, 0.2);
  background: linear-gradient(180deg, rgba(242, 205, 120, 0.07), rgba(12, 14, 18, 0.92) 55%);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition:
    transform 0.45s var(--ease-out),
    border-color 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
}
.medal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 238, 190, 0.2), transparent 60%),
    linear-gradient(115deg, transparent 40%, rgba(255, 245, 215, 0.12) 50%, transparent 60%) no-repeat;
  background-size: auto, 250% 100%;
  background-position: 0 0, 150% 0;
  opacity: 0;
  transition:
    opacity 0.3s,
    background-position 0.9s var(--ease-out);
  pointer-events: none;
}
button.medal:hover,
button.medal:focus-visible {
  border-color: rgba(242, 205, 120, 0.55);
  box-shadow: 0 30px 60px -30px rgba(242, 205, 120, 0.45);
}
.medal:hover::after,
.medal:focus-visible::after {
  opacity: 1;
  background-position: 0 0, -50% 0;
}
.medal-coin {
  display: block;
  width: min(110px, 80%);
  transform: translateZ(30px);
}
.medal-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  transition: transform 1.1s var(--ease-out);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55));
}
.medal:hover .medal-svg {
  transform: rotateY(360deg);
}
.ribbon-l {
  fill: var(--c);
}
.ribbon-r {
  fill: color-mix(in srgb, var(--c) 62%, #000);
}
.medal-mark {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  fill: #5a3e0c;
}
.medal-year {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #6b4b12;
}
.medal-event {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transform: translateZ(14px);
}
.medal-event small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.medal-prize {
  font-size: 13px;
  color: #f5d48a;
  line-height: 1.35;
}
.medal-project {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
button.medal:hover .medal-project {
  color: var(--text);
}
/* coins flip in when the wall scrolls into view */
.js .medals:not(.is-in) .medal-coin {
  opacity: 0;
}
.medals.is-in .medal-coin {
  animation: coin-in 1.2s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 130ms);
}
@keyframes coin-in {
  from {
    opacity: 0;
    transform: translateZ(30px) translateY(-40px) rotateY(-540deg) scale(0.6);
  }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 110px);
}
.about-main .section-title {
  margin: 18px 0 32px;
  font-size: clamp(36px, 5vw, 66px);
}
.about-text {
  display: grid;
  gap: 14px;
  max-width: 58ch;
  font-size: 18px;
  color: #cfcbc3;
}
.about-text p {
  margin: 0;
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 30px;
}
.about-side {
  display: grid;
  gap: 28px;
  align-content: start;
}
.portrait {
  margin: 0;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-2);
  filter: grayscale(0.2) contrast(1.05);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spec-sheet {
  margin: 0;
  border-top: 1px solid var(--line-2);
}
.spec-sheet div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.spec-sheet dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 3px;
}
.spec-sheet dd {
  margin: 0;
  font-size: 15px;
}
.spec-sheet dd span {
  color: var(--muted);
  font-size: 14px;
}
.papers {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.papers .mono {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-section {
  position: relative;
  padding: clamp(120px, 16vw, 220px) 0 clamp(80px, 10vw, 140px);
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.contact-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 50% 110%, rgba(255, 122, 69, 0.25), transparent 70%),
    radial-gradient(900px 400px at 50% 120%, rgba(201, 228, 158, 0.08), transparent 70%);
  pointer-events: none;
}
.contact-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(62deg) translateY(30%) scale(2);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(transparent, #000 70%);
  -webkit-mask-image: linear-gradient(transparent, #000 70%);
  opacity: 0.6;
}
.contact-inner {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 26px;
}
.contact-title {
  margin: 0;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-weight: 600;
  text-wrap: balance;
}
.contact-lede {
  margin: 0;
  max-width: 46ch;
  font-size: 18px;
  color: var(--muted);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: background 0.25s;
}
.contact-email:hover {
  background: #ff915f;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  color: var(--muted);
}
.contact-links a:hover {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 96px;
  font-size: 13px;
  color: var(--dim);
}
.footer-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  align-items: center;
}
.footer-shell p {
  margin: 0;
}
.footer-shell .mono {
  font-size: 11px;
  color: var(--dim);
}
.footer-shell a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Case study dialog
   -------------------------------------------------------------------------- */
.cs {
  --c: var(--accent);
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
}
.cs::backdrop {
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cs[open] {
  animation: cs-in 0.55s var(--ease-out);
}
.cs.is-closing {
  animation: cs-out 0.3s var(--ease) forwards;
}
@keyframes cs-in {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.985);
  }
}
@keyframes cs-out {
  to {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
  }
}
.cs-scroll {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(0px, 3vw, 32px);
}
.cs-body {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: clamp(0px, 2vw, 20px);
  overflow: hidden;
}
.cs-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 22px;
  background: rgba(14, 17, 21, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.cs-bar .mono {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-nav {
  display: flex;
  gap: 6px;
}
.cs-nav button,
.cs-close {
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.cs-nav button:hover,
.cs-close:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.cs-close {
  font-size: 13px;
  color: var(--text);
}
.cs-hero {
  position: relative;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 64px) clamp(28px, 4vw, 48px);
  overflow: hidden;
}
.cs-hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -40%;
  width: 70%;
  height: 140%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent);
  pointer-events: none;
}
.cs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  opacity: 0.6;
  pointer-events: none;
}
.cs-hero > * {
  position: relative;
  z-index: 1;
}
.cs-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.cs-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, #0e1115);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.cs-kicker .mono {
  margin: 0;
}
.cs-title {
  margin: 22px 0 0;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-weight: 600;
}
.cs-headline {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  color: #e3dfd7;
  max-width: 28ch;
  text-wrap: balance;
}
.cs-summary {
  margin: 22px 0 0;
  max-width: 64ch;
  font-size: 18px;
  color: #cbc7bf;
}
.cs-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.cs-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.cs-results div {
  display: grid;
  padding: 22px clamp(20px, 3vw, 32px);
}
.cs-results div + div {
  border-left: 1px solid var(--line);
}
.cs-results dd {
  order: -1;
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
}
.cs-results dt {
  font-size: 13px;
  color: var(--muted);
}
.cs-section {
  padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.cs-section:last-child {
  border-bottom: 0;
}
.cs-h {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 22px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-h::before {
  content: attr(data-n);
  color: var(--c);
}
.cs-two {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
}
.cs-problem {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.cs-built {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  counter-reset: b;
}
.cs-built li {
  position: relative;
  padding: 14px 0 14px 44px;
  border-top: 1px solid var(--line);
  color: #d6d2ca;
  counter-increment: b;
}
.cs-built li::before {
  content: counter(b, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c);
}
.cs-decisions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.cs-decision {
  padding: 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.cs-decision h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cs-decision p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}
.cs-status {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px dashed var(--line-2);
  font-size: 14px;
  color: var(--muted);
}
.cs-status b {
  color: var(--signal);
  font-weight: 500;
}
.cs-media {
  display: grid;
  gap: 28px;
}
.cs-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.cs-media figure {
  margin: 0;
}
.cs-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-2);
}
.cs-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.cs-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  color: #cfcbc3;
}
button.chip {
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
button.chip:hover {
  border-color: var(--c);
  color: var(--text);
  background: color-mix(in srgb, var(--c) 8%, transparent);
}
.chip svg {
  width: 14px;
  height: 14px;
}
.chip .arrow {
  color: var(--dim);
  font-size: 11px;
}
.cs-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: clamp(28px, 4vw, 44px) clamp(20px, 5vw, 64px);
  text-align: left;
  transition: background 0.3s;
}
.cs-next:hover {
  background: rgba(236, 232, 225, 0.03);
}
.cs-next small {
  display: block;
}
.cs-next strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
  font-weight: 600;
}
.cs-next .arrow {
  font-size: 28px;
  transition: transform 0.35s var(--ease-out);
}
.cs-next:hover .arrow {
  transform: translateX(6px);
}
.cs-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* diagram */
.dg {
  position: relative;
}
.dg-caption {
  margin: -6px 0 18px;
  font-size: 14px;
  color: var(--muted);
}
.dg-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}
.dg-canvas {
  position: relative;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(236, 232, 225, 0.09) 1px, transparent 1.5px) 0 0 / 22px 22px,
    #0c0f12;
}
.dg-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  grid-auto-rows: minmax(84px, auto);
  gap: 38px 34px;
}
.dg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.dg-svg path {
  fill: none;
  stroke: rgba(236, 232, 225, 0.22);
  stroke-width: 1.25;
  transition: stroke 0.3s, opacity 0.3s;
}
.dg-svg path.soft {
  stroke-dasharray: 3 5;
}
.dg-svg path.flow {
  stroke: var(--c);
  stroke-dasharray: 3 9;
  opacity: 0;
  animation: wire-flow 1s linear infinite;
}
.dg-svg path.flow.is-on {
  opacity: 1;
}
.dg-svg path.base.is-on {
  stroke: color-mix(in srgb, var(--c) 55%, transparent);
}
.dg-svg text {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--dim);
  letter-spacing: 0.04em;
}
.dg-svg .arrowhead {
  fill: rgba(236, 232, 225, 0.35);
}
.dg-node {
  --k: #9aa3ad;
  position: relative;
  display: grid;
  align-content: center;
  gap: 2px;
  width: 100%;
  min-height: 84px;
  padding: 12px 14px 12px 16px;
  border-radius: 11px;
  background: #13171c;
  border: 1px solid var(--line-2);
  text-align: left;
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.3s var(--ease-out),
    opacity 0.3s,
    box-shadow 0.3s;
}
.dg-node::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--k);
}
.dg-node[data-kind="ai"] {
  --k: #ff9a6b;
}
.dg-node[data-kind="infra"] {
  --k: #8fb4ff;
}
.dg-node[data-kind="data"] {
  --k: #d8b4ff;
}
.dg-node[data-kind="human"] {
  --k: #c9e49e;
}
.dg-node[data-kind="ui"] {
  --k: #5fd0c4;
}
.dg-node[data-kind="io"] {
  --k: #e8e4dc;
}
.dg-node b {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.dg-node small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.dg-node:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.dg-node[aria-pressed="true"] {
  border-color: var(--k);
  background: color-mix(in srgb, var(--k) 10%, #13171c);
  box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--k) 70%, transparent);
}
.dg.has-sel .dg-node:not([aria-pressed="true"]):not(.is-linked) {
  opacity: 0.62;
}
.dg-info {
  position: sticky;
  top: 72px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  min-height: 160px;
}
.dg-info .mono {
  margin: 0 0 10px;
}
.dg-info h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dg-info p {
  margin: 10px 0 0;
  color: #cbc7bf;
  font-size: 14.5px;
}
.dg-info ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.dg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--dim);
}
.dg-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dg-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--k);
}

/* lightbox */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 48px);
  border: 0;
  background: rgba(5, 6, 8, 0.94);
  color: var(--text);
}
.lightbox[open] {
  display: grid;
  place-items: center;
  animation: cs-in 0.35s var(--ease-out);
}
.lightbox::backdrop {
  background: transparent;
}
.lightbox figure {
  margin: 0;
  display: grid;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox img {
  max-width: min(1600px, 100%);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}
.lightbox figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  font-size: 22px;
  background: rgba(14, 17, 21, 0.8);
}

/* --------------------------------------------------------------------------
   Portfolio assistant (existing local search, restyled)
   -------------------------------------------------------------------------- */
.assistant-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(20, 24, 29, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  font-size: 14px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  transition: border-color 0.2s, transform 0.3s var(--ease-out);
}
.assistant-launcher:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.assistant-launcher-key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
}
.assistant-open .assistant-launcher {
  opacity: 0;
  pointer-events: none;
}
.assistant-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #101318;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: cs-in 0.4s var(--ease-out);
}
.assistant-panel[hidden] {
  display: none;
}
.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.assistant-header p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.assistant-header h2 {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.assistant-header-actions {
  display: flex;
  gap: 6px;
}
.assistant-icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.assistant-icon-button:hover {
  color: var(--text);
}
.assistant-messages {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.assistant-message {
  max-width: 92%;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.assistant-message-system {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #d4d0c8;
}
.assistant-message-user {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
}
.assistant-message-title {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}
.assistant-message p {
  margin: 0 0 6px;
}
.assistant-message ul {
  margin: 6px 0;
  padding-left: 18px;
}
.assistant-message-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}
.assistant-message-links a {
  color: var(--accent);
}
.assistant-typing {
  display: flex;
  gap: 4px;
}
.assistant-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1s infinite;
}
.assistant-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.assistant-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 12px;
}
.assistant-suggestions button {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
}
.assistant-suggestions button:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.assistant-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.assistant-form input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: #0b0d10;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.assistant-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.assistant-form button {
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
}
.assistant-form button:disabled {
  opacity: 0.5;
}
.assistant-note {
  margin: 0;
  padding: 0 18px 12px;
  font-size: 11px;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-height: 760px) and (min-width: 1100px) {
  .scroll-cue {
    display: block;
  }
}

@media (max-width: 1180px) {
  .tower-grid {
    grid-template-columns: 220px minmax(0, 1fr) 300px;
  }
  .floor-focus h3 {
    font-size: 26px;
  }
  .sx {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
  }
}

@media (max-width: 1023px) {
  .wins-grid {
    grid-template-columns: 1fr;
  }
  .medals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-stage {
    inset: 0 -20% 0 20%;
    opacity: 0.55;
  }
  .hero-labels {
    display: none;
  }
  .now-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .now-list li:nth-child(3) {
    border-left: 0;
  }
  .now-list li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .section-head {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "side";
    gap: 18px;
  }
  .show,
  .show:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .show:nth-child(even) .show-media {
    order: 0;
  }
  .about-grid,
  .cs-two,
  .cs-media-row {
    grid-template-columns: 1fr;
  }
  .dg-wrap {
    grid-template-columns: 1fr;
  }
  .dg-info {
    position: static;
  }
}

/* Phones and small tablets: same tower, stacked layout */
@media (max-width: 899px) {
  .tower-track {
    height: calc(var(--floors, 6) * 64vh + 30vh);
  }
  .tower-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 0 64px;
    max-height: none;
  }
  .floor-index {
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .floor-index::-webkit-scrollbar {
    display: none;
  }
  .floor-index ol {
    display: flex;
    gap: 6px;
    width: max-content;
  }
  .floor-btn {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 8px 12px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    white-space: nowrap;
  }
  .floor-btn::before,
  .floor-btn small {
    display: none;
  }
  .floor-btn strong {
    font-size: 13px;
  }
  .floor-num {
    padding: 0;
  }
  .floor-btn[aria-current="true"] {
    border-color: var(--c);
  }
  .tower-stage {
    min-height: 0;
  }
  .tower-labels,
  .tower-hint {
    display: none;
  }
  .floor-focus {
    padding: 16px 16px 14px;
  }
  .floor-focus h3 {
    font-size: 22px;
  }
  .focus-kicker {
    margin-bottom: 8px;
  }
  .focus-headline {
    margin-top: 8px;
    font-size: 18px;
  }
  .focus-metrics {
    margin-top: 12px;
    padding-top: 10px;
    gap: 8px 12px;
  }
  .focus-metrics div:nth-child(n + 3),
  .focus-annex {
    display: none;
  }
  .focus-metrics dd {
    font-size: 18px;
  }
  .focus-open {
    margin-top: 12px;
    min-height: 42px;
  }
  .slab {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 20px 18px 22px;
  }
  .slab-mark {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }
  .slab-meta {
    grid-column: 2;
    justify-items: start;
    text-align: left;
    grid-auto-flow: column;
    gap: 16px;
  }
  .slab-open,
  .slab-annex {
    grid-column: 1 / -1;
  }

  .sx {
    grid-template-columns: 1fr;
  }
  .sx-wires {
    display: none;
  }
  .sx-tiles {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
  .sx-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    max-height: 72vh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    background: #101318;
    box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, 0.9);
    transform: translateY(105%);
    visibility: hidden;
    transition:
      transform 0.45s var(--ease-out),
      visibility 0s 0.45s;
    display: flex;
    flex-direction: column;
  }
  .sx.has-focus .sx-rail {
    transform: none;
    visibility: visible;
    transition: transform 0.45s var(--ease-out);
  }
  .sx-sheet-bar {
    display: block;
    width: 40px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 4px;
    background: var(--line-3);
  }
  .sx-list {
    max-height: none;
    flex: 1;
  }
  .sx-row.is-dim {
    display: none;
  }
  body:has(.sx.has-focus) .assistant-launcher {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .medals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .medals li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .wins-big {
    font-size: 120px;
  }
  :root {
    --header-h: 58px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 14px;
  }
  .menu-toggle-icon {
    position: relative;
    width: 14px;
    height: 8px;
  }
  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.3s var(--ease-out);
  }
  .menu-toggle-icon::before {
    top: 0;
  }
  .menu-toggle-icon::after {
    bottom: 0;
  }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
    transform: translateY(3.25px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    transform: translateY(-3.25px) rotate(-45deg);
  }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 20px;
    background: rgba(10, 12, 15, 0.97);
    border-bottom: 1px solid var(--line-2);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.3s var(--ease-out), visibility 0.25s;
  }
  .site-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .site-nav a {
    padding: 14px 12px;
    font-size: 17px;
    border-radius: 10px;
  }
  .site-nav .nav-resume {
    margin-left: 0;
  }
  .site-nav .nav-contact {
    margin-top: 6px;
    text-align: center;
  }
  .menu-open .site-header {
    background: rgba(10, 12, 15, 0.97);
  }

  .hero {
    min-height: auto;
    padding-bottom: 32px;
  }
  .hero-stage {
    inset: 0 -45% 30% 20%;
    opacity: 0.4;
  }
  .hero-title {
    font-size: clamp(54px, 17.5vw, 96px);
    margin-top: 40px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
  .hero-actions .btn-primary {
    flex-basis: 100%;
  }
  .hero-actions .btn-icon {
    flex: 0 0 48px;
  }
  .now-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .now-label {
    margin: 0;
  }
  .now-list {
    grid-template-columns: 1fr;
  }
  .now-list li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .spec-sheet div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .cs-results div + div {
    border-left: 0;
  }
  .cs-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cs-results div:nth-child(even) {
    border-left: 1px solid var(--line);
  }
  .cs-results div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .cs-nav {
    display: none;
  }
  .dg-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .dg-node {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 0;
  }
  .dg-svg {
    display: none;
  }
  .dg-node .dg-to {
    display: block;
  }
  .assistant-launcher {
    right: 12px;
    bottom: 12px;
    height: 42px;
    font-size: 13px;
  }
  .assistant-launcher-key,
  .assistant-launcher-text {
    display: none;
  }
  .assistant-launcher {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    font-size: 18px;
  }
  .assistant-panel {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    height: min(560px, calc(100vh - 80px));
  }
}

.dg-to {
  display: none;
  margin-top: 4px;
  font-size: 11px;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   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-split] .char,
  .js [data-split-words] .word,
  .js .reveal-up {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .show-tilt {
    transform: none;
  }
  .sx-wires .wire {
    stroke-dashoffset: 0;
  }
  .js .medals:not(.is-in) .medal-coin {
    opacity: 1;
  }
}

@media print {
  .site-header,
  .hero-stage,
  .assistant-launcher,
  .assistant-panel,
  .scroll-cue,
  .tower-track,
  .contact-field {
    display: none !important;
  }
  .floor-list {
    display: grid !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
