/* ============ tokens ============ */
:root {
  --bg: #07080a;
  --bg-2: #0d0f13;
  --panel: rgba(255,255,255,0.035);
  --line: rgba(255,255,255,0.09);
  --line-2: rgba(255,255,255,0.16);
  --ink: #ecebe4;
  --ink-2: #a6a59d;
  --ink-3: #6b6a64;
  --accent: #ff5c1f;      /* international orange */
  --accent-2: #8ab4ff;    /* cold blue counterweight */
  --accent-3: #d9ff5c;    /* one lime pop for numbers */
  --display: 'Syne', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #000; }

/* ============ webgl + grain ============ */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.8s steps(4) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-1%,-1%)} 100%{transform:translate(0,0)} }
main { position: relative; z-index: 2; }

/* ============ loader ============ */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; transition: clip-path 1s var(--ease); }
.loader.done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader-inner { width: min(420px, 80vw); }
.loader-num { font-family: var(--display); font-weight: 700; font-size: clamp(64px, 12vw, 140px); line-height: 1; letter-spacing: -0.05em; }
.loader-num em { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 0.5em; margin-left: 6px; }
.loader-line { height: 1px; background: var(--line); margin: 20px 0 12px; overflow: hidden; }
.loader-line i { display: block; height: 100%; width: 0; background: var(--accent); }
.loader-tag { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }

/* ============ cursor ============ */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; mix-blend-mode: difference; display: none; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot { position: absolute; width: 6px; height: 6px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-ring { position: absolute; width: 36px; height: 36px; border: 1px solid #fff; border-radius: 50%; transform: translate(-50%, -50%) scale(1); transition: transform 0.35s var(--ease), background 0.35s; }
.cursor.is-link .cursor-ring { transform: translate(-50%, -50%) scale(1.8); background: rgba(255,255,255,0.12); }
.cursor.is-label .cursor-ring { transform: translate(-50%, -50%) scale(2.6); background: #fff; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor-label { position: absolute; transform: translate(-50%, -50%); font: 600 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.cursor.is-label .cursor-label { opacity: 1; }

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--gutter);
  mix-blend-mode: difference; color: #fff;
  transition: transform 0.5s var(--ease);
}
.nav.hide { transform: translateY(-110%); }
.nav-logo { font-weight: 600; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 8px; justify-self: start; }
.nav-logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 12px var(--accent-3); }
.nav-links { display: flex; gap: 22px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a sup { font-size: 8px; margin-right: 4px; opacity: 0.6; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 12px; justify-self: end; }
.nav-right > *, .nav-clock, .nav-index { white-space: nowrap; }
@media (max-width: 1360px) { .nav-clock { display: none; } }
@media (max-width: 1180px) { .nav-index { display: none; } }
.nav-clock { font-size: 11px; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); }
@media (max-width: 900px) { .nav-links, .nav-clock { display: none; } .nav { grid-template-columns: 1fr auto; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 18px; border: 1px solid currentColor; border-radius: 999px;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
  will-change: transform;
}
.btn-solid { background: #fff; color: #000; border-color: #fff; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #000; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-lg { padding: 16px 26px; font-size: 13px; }
.hero .btn-solid { mix-blend-mode: normal; }

/* ============ hero ============ */
.hero {
  min-height: 100svh; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px;
}
.hero-inner { max-width: 1400px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 28px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 0 rgba(217,255,92,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(217,255,92,0); } 100% { box-shadow: 0 0 0 0 rgba(217,255,92,0); } }
.hero-title {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(64px, 15vw, 220px); line-height: 0.86; letter-spacing: -0.05em;
  text-transform: uppercase;
}
.hero-title .line { display: block; overflow: hidden; white-space: nowrap; }
.hero-title .word { display: inline-block; transform: translateY(110%); font-variation-settings: "wght" var(--kw, 800); transition: font-variation-settings 0.5s var(--ease); }
.hero-title .word-serif { font-family: var(--serif); font-weight: 400; font-style: italic; text-transform: none; color: var(--accent); letter-spacing: -0.03em; }
.hero-title .word-dot { color: var(--accent-3); display: inline-block; transform: translateY(110%); }
.hero-sub { max-width: 560px; margin: 32px 0 0; font-size: clamp(15px, 1.4vw, 18px); color: var(--ink-2); font-family: var(--display); font-weight: 400; line-height: 1.5; }
.hero-sub em { color: var(--accent); font-style: normal; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 40px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; }
.hero-meta b { display: block; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-size: 10px; margin-bottom: 6px; }
.hero-meta i { font-style: normal; color: var(--accent-3); }
.scroll-cue { position: absolute; right: var(--gutter); bottom: 44px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.scroll-cue span { width: 40px; height: 1px; background: var(--ink-3); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ''; position: absolute; inset: 0; background: var(--accent); animation: cue 1.6s infinite var(--ease); }
@keyframes cue { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (max-width: 900px) { .scroll-cue { display: none; } .hero-meta { gap: 24px; flex-wrap: wrap; } }

/* ============ marquee ============ */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; background: rgba(7,8,10,0.55); backdrop-filter: blur(8px); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 30s linear infinite; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.marquee-track span::before { content: '◆'; color: var(--accent); margin-right: 14px; font-size: 8px; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ sections ============ */
.section { position: relative; padding: clamp(80px, 12vw, 160px) var(--gutter); }
.section-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.section-num { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 8px; }
.section-num::before { content: '§ '; color: var(--accent); }
.section-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5.5vw, 84px); line-height: 0.98; letter-spacing: -0.04em; max-width: 14ch; }
.section-title em, .contact-title em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.02em; }
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; white-space: nowrap; }
.split .w > span { display: inline-block; transform: translateY(105%); }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }

/* ============ work: bento ============ */
.work { background: linear-gradient(180deg, transparent, rgba(13,15,19,0.6) 20%, rgba(13,15,19,0.6) 80%, transparent); }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 200px; gap: 12px; }
.card {
  position: relative; overflow: hidden; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line);
  grid-column: span 4; grid-row: span 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s;
  will-change: transform;
}
.card:hover { border-color: var(--line-2); background: rgba(255,255,255,0.06); }
.card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,92,31,0.16), transparent 60%); transition: opacity 0.3s; }
.card:hover::after { opacity: 1; }
.card-feat { grid-column: span 8; grid-row: span 3; }
.card-tall { grid-column: span 4; grid-row: span 3; }
.card-wide { grid-column: span 4; grid-row: span 2; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.32; filter: saturate(0.8) contrast(1.05); transition: opacity 0.5s, transform 1.2s var(--ease); transform: scale(1.04); }
.card:hover img { opacity: 0.5; transform: scale(1); }
.card-body { position: relative; z-index: 1; padding: 26px; background: linear-gradient(180deg, transparent, rgba(7,8,10,0.85) 45%); transform: translateZ(30px); }
.card-cat { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.card-cat::before { content: '▸ '; color: var(--accent); }
.card h3 { margin: 10px 0 8px; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.6vw, 40px); line-height: 1; letter-spacing: -0.03em; }
.card h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.card-feat h3 { font-size: clamp(32px, 4.2vw, 64px); }
.card p { margin: 0; color: var(--ink-2); font-size: 12.5px; max-width: 520px; line-height: 1.55; }
.card-stat { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.card-stat b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(28px, 3vw, 44px); line-height: 1; color: var(--accent-3); }
.card-stat span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 9px; }
@media (max-width: 1100px) { .bento { grid-template-columns: repeat(6, 1fr); } .card-feat { grid-column: span 6; } .card-tall { grid-column: span 3; } .card { grid-column: span 3; } .card-wide { grid-column: span 6; grid-row: span 2; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; grid-auto-rows: auto; } .card, .card-feat, .card-tall, .card-wide { grid-column: span 1; grid-row: auto; min-height: 260px; } .card-feat { min-height: 380px; } }

.work-list { margin-top: 48px; border-top: 1px solid var(--line); }
.work-list-head { display: flex; justify-content: space-between; padding: 14px 0; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.work-row { display: grid; grid-template-columns: 1fr auto 40px; align-items: center; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); transition: padding 0.3s var(--ease); }
.work-row:hover { padding-left: 14px; }
.work-row-title { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2vw, 26px); letter-spacing: -0.02em; }
.work-row-title small { display: block; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.work-row-tool { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.work-row i { font-style: normal; color: var(--accent); text-align: right; transition: transform 0.3s var(--ease); }
.work-row:hover i { transform: translate(4px, -4px); }

/* ============ about ============ */
.about { display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: start; }
.about .section-head { grid-column: 1 / -1; margin-bottom: 20px; }
.statement { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(24px, 3.4vw, 52px); line-height: 1.15; letter-spacing: -0.03em; max-width: 20ch; }
.statement .w { opacity: 0.18; transition: opacity 0.4s; }
.statement .w.on { opacity: 1; }
.stats { grid-column: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 60px; padding-top: 28px; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(40px, 5vw, 72px); line-height: 1; color: var(--accent-3); }
.stat b i { font-style: inherit; }
.stat span { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.about-photo { grid-column: 2; grid-row: 2 / 4; position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.35s var(--ease); }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(0.3) contrast(1.05); }
.about-photo-tag { position: absolute; left: 14px; bottom: 12px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); background: rgba(7,8,10,0.7); padding: 6px 10px; border-radius: 999px; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } .about-photo { grid-column: 1; grid-row: auto; max-width: 320px; } .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============ stack ============ */
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.skills { list-style: none; margin: 0; padding: 0; }
.skills li { display: grid; grid-template-columns: 140px 1fr 40px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.skills li i { height: 3px; background: var(--line); position: relative; overflow: hidden; }
.skills li i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 1.4s var(--ease); }
.skills li b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; color: var(--ink-2); text-align: right; }
.chips-head { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 16px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-wrap span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease); }
.chips-wrap span:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-2px); }
@media (max-width: 900px) { .stack-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ============ journey ============ */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.timeline li { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(10,11,14,0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.timeline li::before { content: ''; position: absolute; top: 0; left: 24px; width: 40px; height: 2px; background: var(--accent); }
.timeline time { display: block; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-3); margin: 8px 0 12px; }
.timeline h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 12.5px; }
@media (max-width: 900px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }

/* ============ certs ============ */
.certs { padding-top: 0; }
.cert-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cert-grid li { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; transition: background 0.3s; }
.cert-grid li { background: rgba(10,11,14,0.6); }
.cert-grid li:hover { background: rgba(255,255,255,0.05); }
.cert-grid b { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }
.cert-grid span { grid-column: 1; font-size: 12px; color: var(--ink-2); }
.cert-grid time { grid-column: 2; grid-row: 1 / 3; font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 18px; }
@media (max-width: 900px) { .cert-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } }

/* ============ contact ============ */
.contact { min-height: 90svh; display: flex; flex-direction: column; justify-content: center; }
.contact-title { margin: 20px 0 30px; font-family: var(--display); font-weight: 800; font-size: clamp(48px, 10vw, 160px); line-height: 0.9; letter-spacing: -0.05em; text-transform: uppercase; }
.contact-title em { text-transform: none; }
.contact-mail { display: inline-block; align-self: flex-start; font-family: var(--display); font-weight: 500; font-size: clamp(20px, 3vw, 40px); letter-spacing: -0.02em; border-bottom: 2px solid var(--accent); padding-bottom: 6px; transition: color 0.3s; }
.contact-mail:hover { color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.socials a:hover { color: var(--ink); }
.footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: clamp(60px, 10vw, 120px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }

/* ============ motion prefs ============ */
@media (prefers-reduced-motion: reduce) {
  .grain, .marquee-track, .pulse, .scroll-cue span::after { animation: none !important; }
  .hero-title .word, .hero-title .word-dot, .split .w > span { transform: none !important; }
  .card, .about-photo { transform: none !important; }
  .statement .w { opacity: 1; }
}

/* ============ round 2 ============ */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transform: scaleX(0); transform-origin: left; }
.nav-index { font-size: 11px; letter-spacing: 0.12em; color: rgba(255,255,255,0.6); margin-left: 18px; }
@media (max-width: 900px) { .nav-index { display: none; } }

.hero-role { display: flex; gap: 10px; align-items: baseline; margin-top: 26px; font-family: var(--mono); font-size: clamp(13px, 1.3vw, 16px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-3); min-height: 1.6em; }
.hero-role-k { color: var(--ink-3); }
.hero-sub { margin-top: 14px; }
.hero-title { cursor: crosshair; }

.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; background: transparent; color: #fff; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; top: 18px; transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.menu-btn span + span { top: 25px; }
.menu-btn.open span { top: 21px; transform: rotate(45deg); }
.menu-btn.open span + span { transform: rotate(-45deg); }
@media (max-width: 900px) { .menu-btn { display: block; } .nav-right .btn-ghost { display: none; } }
.menu { position: fixed; inset: 0; z-index: 45; background: rgba(7,8,10,0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gutter) 40px; clip-path: inset(0 0 100% 0); transition: clip-path 0.7s var(--ease); }
.menu.open { clip-path: inset(0 0 0 0); }
.menu-links { display: flex; flex-direction: column; gap: 6px; }
.menu-links a { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 10vw, 88px); line-height: 1; letter-spacing: -0.04em; text-transform: uppercase; opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.6s var(--ease); }
.menu-links a sup { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.1em; color: var(--accent); margin-right: 12px; vertical-align: top; }
.menu.open .menu-links a { opacity: 1; transform: none; }
.menu.open .menu-links a:nth-child(2) { transition-delay: 0.05s; } .menu.open .menu-links a:nth-child(3) { transition-delay: 0.1s; } .menu.open .menu-links a:nth-child(4) { transition-delay: 0.15s; } .menu.open .menu-links a:nth-child(5) { transition-delay: 0.2s; }
.menu-foot { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

.card { cursor: pointer; }
.panel-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.panel-backdrop.open { opacity: 1; pointer-events: auto; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(640px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform 0.7s var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.panel.open { transform: none; }
.panel-close { position: sticky; top: 0; float: right; margin: 16px 16px 0 0; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer; font-size: 14px; z-index: 2; }
.panel-inner { padding: 30px clamp(20px, 4vw, 44px) 60px; }
.panel-cat { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.panel-cat::before { content: '▸ '; color: var(--accent); }
.panel h2 { margin: 12px 0 8px; font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -0.03em; }
.panel h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.panel-lead { font-family: var(--display); font-size: 17px; color: var(--ink-2); margin: 0 0 24px; line-height: 1.5; }
.panel-img { border-radius: 14px; border: 1px solid var(--line); margin-bottom: 24px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.panel-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.panel-metrics li { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.panel-metrics b { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; line-height: 1; color: var(--accent-3); }
.panel-metrics span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.panel h4 { margin: 22px 0 8px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.panel p, .panel li { color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.panel ul.plain { padding-left: 18px; margin: 0; }
.panel .tags { margin-top: 10px; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 560px) { .panel-metrics { grid-template-columns: 1fr 1fr; } }

.now { grid-column: 1; display: grid; gap: 8px; margin-top: 40px; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: 14px; font-size: 12.5px; color: var(--ink-2); }
.now-k { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-3); }
.now b { color: var(--ink); font-weight: 500; margin-right: 6px; }

/* ============ round 3: dashboards, certs, word motion ============ */
.dash-intro { margin: -30px 0 40px; max-width: 60ch; color: var(--ink-2); font-family: var(--display); font-size: 15px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.dcard { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 0.35s var(--ease), border-color 0.3s; will-change: transform; }
.dcard:hover { border-color: var(--line-2); }
.dcard::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(138,180,255,0.14), transparent 60%); transition: opacity 0.3s; }
.dcard:hover::after { opacity: 1; }
.dcard img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); filter: saturate(0.95); transition: transform 1.2s var(--ease); }
.dcard:hover img { transform: scale(1.03); }
.dcard-body { padding: 22px 24px 26px; transform: translateZ(20px); }
.dcard h3 { margin: 10px 0 8px; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.4vw, 34px); line-height: 1; letter-spacing: -0.03em; }
.dcard h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-2); }
.dcard p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.dcard-text { justify-content: center; background: linear-gradient(160deg, rgba(138,180,255,0.08), rgba(255,92,31,0.06)); }
.dcard-nums { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.dcard-nums b { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 28px; line-height: 1; color: var(--accent-3); }
.dcard-nums span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 800px) { .dash-grid { grid-template-columns: 1fr; } }

/* gallery inside the panel */
.gal { margin: 0 0 24px; }
.gal-main { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 9; }
.gal-main img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity 0.3s; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); background: rgba(7,8,10,0.6); color: #fff; cursor: pointer; font-size: 16px; }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.gal-cap b { color: var(--ink); font-weight: 500; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gal-thumbs button { flex: 0 0 auto; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; padding: 0; cursor: pointer; opacity: 0.55; transition: opacity 0.2s, border-color 0.2s; }
.gal-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-thumbs button.on, .gal-thumbs button:hover { opacity: 1; border-color: var(--accent-2); }
.panel-cert { border-radius: 14px; border: 1px solid var(--line); width: 100%; margin: 18px 0 14px; background: #fff; }

.cert-grid li { cursor: pointer; }
.cert-grid li:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* hero letters: proximity weight + lift (JS sets --w / --y per letter) */
.hero-title .ch { display: inline-block; font-variation-settings: "wght" var(--w, 800); transform: translateY(var(--y, 0px)); transition: font-variation-settings 0.25s ease, transform 0.35s var(--ease); }
.hero-title .word-serif .ch { font-variation-settings: normal; }
/* section titles: words slide up, then thicken */
.split .w > span { font-variation-settings: "wght" 500; transition: font-variation-settings 0.9s var(--ease); }
.split.in .w > span { font-variation-settings: "wght" 700; }
.contact-title.split .w > span { font-variation-settings: "wght" 600; }
.contact-title.split.in .w > span { font-variation-settings: "wght" 800; }
/* contact letters jitter on hover */
[data-jitter] .ch { display: inline-block; transition: transform 0.5s var(--ease), color 0.3s; }
[data-jitter]:hover .ch { transform: translate(var(--jx, 0), var(--jy, 0)) rotate(var(--jr, 0)); }
/* work-row scramble */
.work-row-title .t { display: inline-block; min-width: 1ch; }

/* mobile: the particle field now renders at full brightness behind the hero copy, so give the text a dark halo */
@media (max-width: 900px) {
  .hero .reveal-line, .hero p, .hero-meta, .hero .eyebrow { text-shadow: 0 0 10px rgba(7,8,10,.95), 0 0 22px rgba(7,8,10,.85), 0 0 40px rgba(7,8,10,.7); }
}

.dash-intro a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.dash-intro a:hover, .dash-intro a:focus-visible { color: var(--accent, #ff5c1f); }
.card-feat img { object-position: 92% 40%; }
