/* =========================================================
   Minimal: light first, quiet motion, one accent
   ========================================================= */
:root {
  --bg: #fbfbfd;
  --bg2: #f2f2f6;
  --card: #ffffff;
  --pill: #ffffff;
  --text: #1d1d1f;
  --muted: #5f5f64;   /* small text: 6.2:1 on --bg, 5.7:1 on --bg2 */
  --faint: #86868b;   /* large text only: 3.6:1 */
  --line: #e4e4ea;
  --acc: #3651ff;
  --acc2: #7a4dff;
  --on-acc: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 40px rgba(0, 0, 0, .06);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --max: 1080px;
  --gap: clamp(64px, 8vw, 112px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0c; --bg2: #141417; --card: #17171a; --pill: #2c2c31;
    --text: #f5f5f7; --muted: #a1a1a6; --faint: #8e8e93; --line: #2a2a2f;
    --acc: #7d8cff; --acc2: #b896ff; --on-acc: #0a0a0c;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 20px 50px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0c; --bg2: #141417; --card: #17171a; --pill: #2c2c31;
  --text: #f5f5f7; --muted: #a1a1a6; --faint: #8e8e93; --line: #2a2a2f;
  --acc: #7d8cff; --acc2: #b896ff; --on-acc: #0a0a0c;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 20px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 var(--sans); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.035em; }
p { margin: 0; }
strong { font-weight: 600; }
.muted { color: var(--faint); }
.grad {
  background: linear-gradient(100deg, var(--acc), var(--acc2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Focus + skip link ---------- */
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .chips a:focus-visible, .segmented button:focus-visible { border-radius: 999px; }
.skip {
  position: fixed; left: 12px; top: 10px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  transform: translateY(-150%); transition: transform .2s;
}
.skip:focus { transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { max-width: var(--max); margin: 0 auto; height: 52px; padding: 0 22px; display: flex; align-items: center; gap: 28px; }
.brand { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 13px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.theme, .menu { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color .2s, transform .5s var(--ease); }
.theme:hover, .menu:hover { color: var(--text); }
.theme svg { width: 18px; height: 18px; }
.theme[aria-pressed="true"] { transform: rotate(180deg); }
.menu { display: none; position: relative; }
.menu span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease); }
.menu span:first-child { transform: translateY(-4px); }
.menu span:last-child { transform: translateY(4px); }
.menu[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--acc), var(--acc2)); }

@media (max-width: 720px) {
  .nav-inner { gap: 4px; }
  .theme { margin-left: auto; }
  .menu { display: grid; }
  .nav-links {
    position: absolute; top: 52px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 22px 22px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    font-size: 22px; font-weight: 600; font-family: var(--display); letter-spacing: -.02em; color: var(--text);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: transform .3s var(--ease), background-color .3s, box-shadow .3s; }
.btn-primary { background: var(--acc); color: var(--on-acc); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px color-mix(in srgb, var(--acc) 35%, transparent); }
.link-arrow { color: var(--acc); font-size: 16px; font-weight: 500; }
.link-arrow span { display: inline-block; transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { min-height: 92svh; padding: 112px 22px 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 48px; }
.hero-text { max-width: 760px; will-change: transform, opacity; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.display { font-size: clamp(3rem, 9vw, 6.4rem); line-height: 1.02; letter-spacing: -.045em; }
.display .word { display: inline-block; }
.lead { margin: 22px auto 0; max-width: 34em; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); line-height: 1.5; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.portrait {
  margin: 0; width: clamp(170px, 19vw, 240px); aspect-ratio: 4 / 5;
  border-radius: 30px; overflow: hidden; background: var(--bg2); box-shadow: var(--shadow);
  transform: translateY(var(--py, 0px)) scale(var(--ps, 1)); opacity: var(--po, 1);
  will-change: transform, opacity;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 9%; transform: scale(1.35); transform-origin: 50% 12%; }

/* load-in animation */
.fade-in { opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: var(--gap) 22px 0; }
main > .section:last-of-type { padding-bottom: var(--gap); }
.kicker { font-size: 15px; font-weight: 600; color: var(--acc); margin-bottom: 14px; }
.h-lg { font-size: clamp(2.2rem, 5.6vw, 4.2rem); line-height: 1.06; }
.h-sm { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; }
.display-sm { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.04; letter-spacing: -.045em; }

/* scroll reveal: short, subtle */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--rd, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* highlights */
.highlights { text-align: center; padding-top: 8px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.chips a { padding: 10px 18px; border-radius: 999px; background: var(--bg2); font-size: 14px; font-weight: 500; transition: background-color .25s, color .25s, transform .25s var(--ease); }
.chips a:hover { background: var(--text); color: var(--bg); transform: translateY(-1px); }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; font-size: 1.1rem; color: var(--muted); }
.about-grid strong { color: var(--text); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 20px; } }

/* numbers */
.num-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 18px; }
.num { padding-top: 24px; border-top: 1px solid var(--line); }
.num .big { display: block; font: 600 clamp(3.2rem, 6.4vw, 5.2rem)/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.num:first-child .big { background: linear-gradient(100deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num p { margin-top: 12px; color: var(--muted); max-width: 16em; }
@media (max-width: 760px) { .num-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Sticky story ---------- */
.story { position: relative; height: calc(var(--n) * 55vh + 100vh); margin: -40px 0 -96px; }
.story-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; max-width: var(--max); margin: 0 auto; padding: 72px 22px 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.story-left { position: relative; }
.story-items { position: relative; min-height: 290px; margin-top: 10px; }
.story-item {
  position: absolute; inset: 0; opacity: 0; transform: translateY(16px); visibility: hidden; pointer-events: none;
  transition: opacity .22s ease-in, transform .22s ease-in, visibility 0s .22s;
}
.story-item.is-past { transform: translateY(-16px); }
.story-item.is-active {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity .6s var(--ease) .18s, transform .6s var(--ease) .18s, visibility 0s;
}
.story-item .idx { display: block; font: 500 14px var(--sans); color: var(--muted); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.story-item h3 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.04; }
.story-item p { margin-top: 18px; font-size: 1.12rem; color: var(--muted); max-width: 28em; }
.story-dots { display: flex; gap: 8px; margin-top: 30px; }
.story-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .5s var(--ease), background-color .5s; }
.story-dots i.on { width: 26px; background: var(--acc); }
.story-right { display: grid; place-items: center; min-height: 0; }
.art-card { position: relative; width: min(100%, calc(100svh - 190px), 460px); aspect-ratio: 1 / 1; border-radius: 32px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.art-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--acc) 10%, transparent), transparent 60%), radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--acc2) 10%, transparent), transparent 55%); }
.art { position: absolute; inset: 14%; width: 72%; height: 72%; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .5s var(--ease); }
.art > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease); }
.art > *:nth-child(even) { stroke: var(--acc); }
.art.is-active { opacity: 1; }
.art.is-active > * { stroke-dashoffset: 0; }
.art.is-active > *:nth-child(2) { transition-delay: .15s; } .art.is-active > *:nth-child(3) { transition-delay: .3s; }
.art.is-active > *:nth-child(4) { transition-delay: .45s; } .art.is-active > *:nth-child(5) { transition-delay: .6s; }

@media (max-width: 860px) {
  .story { height: auto; margin: 0; }
  .story-sticky { position: static; height: auto; grid-template-columns: 1fr; gap: 24px; padding: var(--gap) 22px 0; }
  .story-items { min-height: 0; }
  .story-item, .story-item.is-active, .story-item.is-past { position: static; opacity: 1; transform: none; visibility: visible; pointer-events: auto; padding: 20px 0; border-top: 1px solid var(--line); transition: none; }
  .story-item h3 { font-size: 1.8rem; }
  .story-item p { margin-top: 10px; font-size: 1rem; }
  .story-dots, .story-right { display: none; }
}

/* ---------- Stack ---------- */
.segmented { position: relative; display: inline-flex; gap: 2px; padding: 4px; margin-top: 32px; border-radius: 999px; background: var(--bg2); max-width: 100%; }
.segmented button { position: relative; z-index: 1; border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font: 500 14px var(--sans); color: var(--muted); cursor: pointer; white-space: nowrap; transition: color .3s; }
.segmented button.is-on { color: var(--text); }
.segmented .short { display: none; }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--pill); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent); transition: transform .45s var(--ease), width .45s var(--ease); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.tile { position: relative; padding: 24px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.js .tile.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease), translate .45s var(--ease); transition-delay: var(--rd, 0s); }
.tile:hover { translate: 0 -3px; }
.tile[hidden] { display: none; }
.tile.pop { animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; scale: .97; } to { opacity: 1; scale: 1; } }
/* logos sit on a white chip in both themes so every brand renders in its true colours */
.tile .ic { min-width: 48px; height: 48px; padding: 0 11px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); margin-bottom: 18px; }
.tile .ic img { height: 26px; width: auto; max-width: 26px; object-fit: contain; }
.tile .ic.wide img { max-width: 92px; height: 22px; }
.tile h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.tile .cat { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tile p:last-child { margin-top: 10px; font-size: .95rem; color: var(--muted); }
.fine { margin-top: 20px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .segmented .long { display: none; }
  .segmented .short { display: inline; }
  .segmented button { padding: 8px 11px; font-size: 13px; }
}

/* ---------- Journey ---------- */
.timeline-wrap { position: relative; margin-top: 48px; padding-left: 34px; }
.timeline-wrap::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-fill { position: absolute; left: 5px; top: 8px; width: 2px; height: calc(100% - 16px); border-radius: 2px; background: linear-gradient(var(--acc), var(--acc2)); transform-origin: top; transform: scaleY(0); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-bottom: 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); transition: border-color .4s, background-color .4s; }
.timeline li.in::before { border-color: var(--acc); }
.timeline li.now::before { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 18%, transparent); }
.timeline time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-top: 4px; letter-spacing: -.025em; }
.timeline .org { color: var(--acc); font-weight: 500; font-size: 15px; margin-top: 2px; }
.timeline li > p:last-child { margin-top: 8px; color: var(--muted); max-width: 40em; }

/* ---------- Credentials ---------- */
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.cred { padding: 28px; border-radius: 24px; background: var(--bg2); }
.cred h3 { font-size: 1.2rem; margin-bottom: 14px; letter-spacing: -.02em; }
.cred ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cred li { font-weight: 500; font-size: .98rem; }
.cred li span { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) { .cred-grid { grid-template-columns: 1fr; } }

/* ---------- Contact / footer ---------- */
.contact { text-align: center; }
.contact .lead { margin-top: 22px; }
.mail { margin-top: 22px; font-size: 15px; color: var(--muted); }
.mail a { border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.mail a:hover { color: var(--text); border-color: var(--text); }
.center { justify-content: center; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .fade-in, .js .reveal { opacity: 1; transform: none; }
  .portrait { --py: 0px; --ps: 1; --po: 1; }
}

/* ---------- Print ---------- */
@media print {
  .js .reveal, .fade-in, .story-item, .portrait { opacity: 1 !important; transform: none !important; visibility: visible !important; animation: none !important; }
  .nav, .progress, .skip, .story-right, .story-dots, .segmented, .hero-cta { display: none !important; }
  .story { height: auto; }
  .story-sticky { position: static; height: auto; display: block; }
  .story-item { position: static; margin-bottom: 16px; }
  .tile[hidden] { display: block; }
  body { background: #fff; color: #000; }
}
