﻿/* Tokens: danial-shabanian design system. Dark/light follow the system unless a
   choice is saved (html[data-theme]). */
:root {
  --bg: #0A0C0F; --surface: #12161B; --line: #262C34; --ink: #ECEDEE; --muted: #9BA4AE;
  --accent: #FF6B3D; --accent-ink: #0A0C0F;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: 32px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F4F0; --surface: #FFFFFF; --line: #DCD9D0; --ink: #121417; --muted: #545A62;
    --accent: #C2410C; --accent-ink: #FFFFFF; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F5F4F0; --surface: #FFFFFF; --line: #DCD9D0; --ink: #121417; --muted: #545A62;
  --accent: #C2410C; --accent-ink: #FFFFFF; color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  overflow-x: hidden; transition: background-color .5s ease, color .5s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.small { font-size: 14px; }
.grow { flex-grow: 1; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; line-height: 1.5; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--accent); display: inline-block; }

/* progress + cursor */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }
.cursor { position: fixed; top: 0; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); pointer-events: none; z-index: 70; opacity: 0; mix-blend-mode: difference; }
@media (hover: none) { .cursor { display: none; } }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-in { padding-top: 14px; padding-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-tools { display: flex; align-items: center; gap: 4px; padding-left: 20px; border-left: 1px solid var(--line); }
.icon-link { width: 40px; height: 40px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; cursor: pointer; transition: color .25s, background .25s; }
.icon-link:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.theme-toggle span { display: none; line-height: 0; }
:root:not([data-theme-choice]) .theme-toggle [data-for="auto"], :root[data-theme-choice="auto"] .theme-toggle [data-for="auto"], :root[data-theme-choice="light"] .theme-toggle [data-for="light"], :root[data-theme-choice="dark"] .theme-toggle [data-for="dark"] { display: inline-flex; }
.brand { display: flex; align-items: center; gap: 12px; }
.mono-badge { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 19px; font-style: italic; }
.brand-name { font-weight: 600; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.nav-links > a:not(.btn) { position: relative; padding: 6px 0; }
.nav-links > a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.nav-links > a:not(.btn):hover, .nav-links > a.is-active { color: var(--ink); }
.nav-links > a:not(.btn):hover::after, .nav-links > a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; white-space: nowrap; will-change: transform; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-accent { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-ghost { border: 1px solid var(--line); transition: border-color .3s; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 15px 24px; font-size: 17px; }
.btn-xl { padding: 18px 28px; font-size: 19px; }
.btn svg { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.btn:hover svg { transform: translateX(3px); }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.text-link:hover svg { transform: translate(2px, -2px); }
.text-link svg { transition: transform .3s; }
.pill { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; transition: border-color .3s; }
a.pill:hover { border-color: var(--ink); }
.pill-accent { border-color: var(--accent); color: var(--accent); }

/* hero */
.hero { padding-top: 96px; padding-bottom: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; min-height: calc(100svh - 70px); }
.hero-copy { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-kicker { display: flex; align-items: center; gap: 12px; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 8.4vw, 112px); line-height: .95; letter-spacing: -.03em; }
.h1 em, .h-contact em { color: var(--accent); }
.hero-lede { margin: 0; max-width: 600px; font-size: 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.instrument { position: relative; width: 460px; max-width: 100%; aspect-ratio: 1; transform-style: preserve-3d; will-change: transform; }
.instrument svg { overflow: visible; display: block; }
/* Spine (frontal view). Colours live here, not in the SVG, so both themes work. */
.vert-body { fill: var(--bg); stroke: var(--ink); stroke-width: 1.4; }
.vert-part { fill: var(--bg); stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; }
.vert-disc { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .7; }
.vert-label { font: 9px var(--mono); letter-spacing: .08em; fill: var(--muted); opacity: 0; }
.sacrum path { fill: var(--bg); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.sacrum-holes circle { fill: none; stroke: var(--muted); stroke-width: 1; }
.vert.is-hit .vert-body, .vert.is-hit .vert-part { stroke: var(--accent); }
.vert.is-locked .vert-body { fill: color-mix(in srgb, var(--accent) 22%, var(--bg)); stroke: var(--accent); }
.vert.is-locked .vert-part { stroke: var(--accent); }
.vert.is-locked .vert-label { fill: var(--accent); }
.vert-body, .vert-part { transition: stroke .35s, fill .35s; }
html.js.motion .scan, html.js.motion .axis { opacity: 0; }
.hud { position: absolute; left: 0; bottom: 0; display: flex; flex-direction: column; gap: 1px; padding-left: 10px; border-left: 1px solid var(--accent); font-size: 11px; }
.hud-row { white-space: pre; }
.hud-trust { font-variant-numeric: tabular-nums; }

/* marquee */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; overflow: hidden; white-space: nowrap; }
.mq-track { display: inline-flex; gap: 48px; font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--muted); will-change: transform; }
.mq-item { display: inline-flex; align-items: center; gap: 48px; }
.mq-star { font-style: normal; font-size: 22px; }

/* sections */
.section { padding: 140px 0 40px; display: flex; flex-direction: column; gap: 56px; }
.sec-head { display: flex; flex-direction: column; gap: 14px; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.4vw, 64px); line-height: 1; letter-spacing: -.02em; max-width: 900px; }
.h3 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.h3-display { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4vw, 52px); line-height: 1.02; }
.card { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); transition: border-color .4s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.frame { margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-wide { flex: 1 1 100%; aspect-ratio: 21 / 8; }
.frame-talk { aspect-ratio: 16 / 7; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 12px; }
.chip-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.featured { border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; gap: 48px; position: relative; overflow: hidden; }
.featured::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); pointer-events: none; }
.featured-copy { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; position: relative; }
.lede-s { margin: 0; font-size: 19px; }
.metrics { flex: 1 1 380px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric { border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.metric-v { font-family: var(--serif); font-size: 44px; line-height: 1; }

.grid-projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project { padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; background: transparent; transform-style: preserve-3d; will-change: transform; }
.project .frame { margin-bottom: 10px; }
.project-copy { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.project-copy p { margin: 0; }

.pubs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pub { border-bottom: 1px solid var(--line); padding: 32px 0; display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.pub-year { font-size: 13px; padding-top: 6px; }
.pub-main { display: flex; flex-direction: column; gap: 8px; }
.pub-title { font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.pub-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.section-split { flex-direction: row; flex-wrap: wrap; gap: 56px; }
.path-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.path-side .sec-head { position: static; }
.skills { display: flex; flex-wrap: wrap; row-gap: 6px; max-width: 420px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.skill { transition: color .3s; }
.skill:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--line); }
.skill:hover { color: var(--ink); }
.timeline { position: relative; flex: 999 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0 0 0 32px; display: flex; flex-direction: column; gap: 44px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); }
html:not(.js) .tl-line { transform: scaleY(1); }
.tl-item { position: relative; display: flex; flex-direction: column; gap: 6px; }
.tl-dot { position: absolute; left: -39px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-role { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.tl-body { margin: 6px 0 0; max-width: 620px; }

.grid-life { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.life { padding: 30px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; will-change: transform; }
.life p { margin: 0; }
.life-n { font-family: var(--serif); font-style: italic; font-size: 64px; line-height: 1; color: var(--accent); }
.life-t { font-size: 22px; font-weight: 600; }

.talks { display: flex; flex-wrap: wrap; gap: 20px; }
.keynote { flex: 1 1 460px; min-width: 0; border-radius: 28px; background: var(--ink); color: var(--bg); padding: 44px; display: flex; flex-direction: column; gap: 18px; min-height: 320px; }
.keynote .accent, .keynote .text-link { color: color-mix(in srgb, var(--accent) 80%, var(--bg)); }
.keynote-body { margin: 0; opacity: .75; flex-grow: 1; }
.certs { flex: 1 1 460px; min-width: 0; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cert { border-bottom: 1px solid var(--line); padding: 18px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.cert-n { font-weight: 500; }

.contact { padding-top: 160px; padding-bottom: 96px; gap: 36px; }
.h-contact { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 10vw, 128px); line-height: .92; letter-spacing: -.035em; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.foot { border-top: 1px solid var(--line); }
.foot-in { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { transition: color .25s; }
.foot-links a:hover { color: var(--ink); }
.contact-links .btn svg { transition: none; }
.contact-links .btn:hover svg { transform: none; }

/* SplitText line masks */
.split-line { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

/* Pre-animation state: only while JS + GSAP are expected to reveal things. */
html.js.motion [data-hero], html.js.motion [data-anim] { visibility: hidden; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-tools { padding-left: 0; border-left: 0; }
  .hero { padding-top: 56px; min-height: 0; }
  .featured, .keynote { padding: 28px; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pub-actions { justify-content: flex-start; }
  .section { padding-top: 88px; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .brand-name { display: none; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .grid-projects { grid-template-columns: minmax(0, 1fr); }
  .btn-xl { font-size: 16px; padding: 16px 22px; white-space: normal; word-break: break-all; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
}
