/* Brand tokens: see ../DESIGN.md */
:root {
  --brand: #8ec5ff;          /* Sky Blue, the brand color */
  --brand-light: #d6eaff;    /* top of the brand gradient */
  --brand-ink: #0b2545;      /* text on brand fills */
  --gradient: linear-gradient(180deg, var(--brand-light) 0%, #ffffff 100%);
  --adire: url("assets/adire.svg");

  --bg: #ffffff;
  --bg-alt: #f5f9ff;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #55607a;
  --line: #e2e9f3;
  --accent: #1f5fae;         /* readable blue for links and labels */
  --accent-soft: #eaf4ff;
  --accent-ink: var(--brand-ink);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-light: #12294a;
    --gradient: linear-gradient(180deg, #12294a 0%, #0b0f17 100%);
    --adire: url("assets/adire-dark.svg");
    --bg: #0b0f17;
    --bg-alt: #0f1624;
    --surface: #131c2c;
    --text: #e8eef7;
    --muted: #9aa6bb;
    --line: #22304a;
    --accent: #8ec5ff;
    --accent-soft: #15253f;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { font-weight: 600; font-size: 18px; letter-spacing: 0.06em; text-decoration: none; color: var(--text); }
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav nav a:hover { color: var(--text); }
.nav nav .btn { color: var(--brand-ink); margin: 0; padding: 8px 16px; }

/* Type */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 5.5vw, 60px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.4vw, 36px); }
h3 { font-size: 18px; letter-spacing: -0.01em; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 8px; font-weight: 600; }
p { margin: 0 0 16px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 12px; }
.muted { color: var(--muted); }

/* Sections */
section { padding: 96px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

/* Hero */
.hero { padding: 104px 0 104px; background: var(--gradient); overflow: hidden; }
.hero .media { position: relative; }
.hero .media::before {
  content: ""; position: absolute; inset: 28px 28px -28px -28px;
  background: var(--adire); border-radius: var(--radius);
}
.hero .media > * { position: relative; }
.hero .wrap { position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: center; }
.role { font-size: 18px; color: var(--accent); font-weight: 500; margin-bottom: 20px; }
.lede { font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--muted); max-width: 54ch; }
.headshot { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); }
.headshot.placeholder { display: grid; place-items: center; background: var(--surface); color: var(--text); font-size: 56px; font-weight: 600; letter-spacing: -0.03em; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.socials a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.socials a:hover { color: var(--accent); }

/* Pillars strip */
.adire-band { background: var(--adire) !important; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillars a { background: var(--surface); padding: 24px; text-decoration: none; }
.pillars a:hover { background: var(--accent-soft); }
.pillars strong { display: block; font-size: 15px; margin-bottom: 4px; }
.pillars span { color: var(--muted); font-size: 14px; line-height: 1.5; display: block; }

/* Writing */
.posts { border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.post strong { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.post .blurb { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.post .arrow { color: var(--muted); }
.post:hover strong, .post:hover .arrow { color: var(--accent); }
.post.upcoming { cursor: default; }
.post.upcoming strong { color: var(--muted); font-weight: 500; }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.date { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Career */
.career { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.timeline-co { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.timeline-co li { position: relative; padding: 0 0 28px 28px; }
.timeline-co li:last-child { padding-bottom: 0; }
.timeline-co li::before { content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--bg); }
.timeline-co li:first-child::before { background: var(--accent); }
.timeline-co h3 { font-size: 18px; margin-bottom: 6px; }
.co-note { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; letter-spacing: 0; }
.role-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.role-row:last-child { border-bottom: 0; }
.chips { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; font-weight: 500; background: var(--accent-soft); color: var(--accent); padding: 4px 12px; border-radius: 999px; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; }
.card .btn, .card .link { margin-top: auto; align-self: flex-start; }
.card p:last-of-type { margin-bottom: 24px; }
.plain { list-style: none; padding: 0; margin: 0 0 24px; }
.plain li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.plain li:last-child { border-bottom: 0; }
.book-title { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.stat { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.timeline { list-style: none; padding: 0; margin: 0 0 24px; border-left: 1px solid var(--line); }
.timeline li { padding: 2px 0 14px 18px; position: relative; font-size: 15px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.timeline .date { display: block; font-size: 13px; }
.badge { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }

/* Chess: recent games */
.games { list-style: none; padding: 0; margin: 0 0 20px; }
.games li { border-bottom: 1px solid var(--line); }
.games li:last-child { border-bottom: 0; }
.games a { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; }
.games a:hover .opp { color: var(--accent); }
.games .muted { padding: 10px 0; font-size: 14px; }
.res { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.res.win { background: var(--accent-soft); color: var(--accent); }
.res.loss { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--line); }
.res.draw { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.game-main { min-width: 0; }
.opp { display: block; font-size: 15px; font-weight: 500; }
.opp .muted { font-weight: 400; padding: 0; }
.game-meta { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Takes: deliberately understated */
.takes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.takes blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); font-family: var(--serif); font-size: 19px; line-height: 1.5; }

/* Buttons */
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.row.center { justify-content: center; }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--brand); transition: opacity .15s; }
.btn:hover { opacity: .9; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); opacity: 1; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* CTA */
.cta { text-align: center; background: var(--adire) !important; border-bottom: 0 !important; }
.cta-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 56px 32px; max-width: 720px; margin: 0 auto; box-shadow: 0 8px 32px rgba(11, 37, 69, .08); }
.cta h2 { max-width: 20ch; margin: 0 auto 12px; }
.cta p { color: var(--muted); font-size: 17px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; margin-left: 20px; }
footer a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav nav a:not(.btn) { display: none; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero .media { order: -1; max-width: 160px; }
  .hero .media::before { inset: 14px 14px -14px -14px; }
  .lede { font-size: 19px; }
  .grid-2, .career { grid-template-columns: 1fr; }
  .role-row { flex-direction: column; gap: 0; }
  .card { padding: 24px; }
  .post { grid-template-columns: 1fr; gap: 4px; }
  .post .arrow { display: none; }
  footer a { margin: 0 16px 0 0; }
}

/* ── Scholarship page ── */
.sch-hero { background: var(--gradient); padding: 96px 0 72px; }
.sch-hero .lede { margin-bottom: 20px; }
.motivation { margin: 0 auto; max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 40px; text-align: center; }
.motivation blockquote { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px); line-height: 1.35; letter-spacing: -0.01em; }
.motivation figcaption { color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--surface); padding: 28px 24px; }
.facts b { display: block; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 6px; }
.facts span { color: var(--muted); font-size: 15px; line-height: 1.55; }
.criteria { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.criteria li { counter-increment: c; position: relative; padding: 0 0 22px 48px; }
.criteria li:last-child { padding-bottom: 0; }
.criteria li::before { content: counter(c); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; display: grid; place-items: center; }
.criteria b { display: block; font-size: 17px; }
.criteria span { color: var(--muted); font-size: 15px; }

.form-panel { text-align: left; max-width: 760px; }
.form-panel h2 { max-width: none; margin: 0 0 12px; }
#apply-form { display: grid; gap: 18px; margin-top: 24px; }
#apply-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
#apply-form .sub { font-weight: 400; color: var(--muted); }
#apply-form input, #apply-form textarea {
  font: 400 16px/1.5 var(--sans); color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%;
}
#apply-form textarea { resize: vertical; }
#apply-form input:focus, #apply-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.counter { font-weight: 400; font-size: 13px; color: var(--muted); justify-self: end; }
#apply-form .hint { margin: -8px 0 0; font-size: 13px; color: var(--accent); }
#apply-form .check { grid-template-columns: 20px 1fr; align-items: start; gap: 12px; font-weight: 400; font-size: 14px; color: var(--muted); }
#apply-form .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#apply-form .error { margin: 0; color: #b42318; font-size: 14px; font-weight: 500; }
#apply-form .btn { justify-self: start; cursor: pointer; font-family: var(--sans); }
#apply-form .btn:disabled { opacity: .6; cursor: progress; }
.notice { margin-top: 24px; padding: 24px; border-radius: 12px; background: var(--accent-soft); }
.notice h3 { margin-bottom: 6px; }
.notice p, .cta .notice p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .facts, .field-row { grid-template-columns: 1fr; }
  .motivation { padding: 28px 20px; }
  .sch-hero { padding: 56px 0 48px; }
}

/* One-page layout */
.section-head .copy p { color: var(--muted); margin: 0 0 14px; font-size: 17px; }
.wrap.wide { max-width: 1240px; }
.outside-head { font-size: 34px; margin: 0 0 32px; }
.glimpses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.glimpse { padding: 24px; }
.glimpse .num { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--accent); margin: 0 0 4px; }
.glimpse h3 { margin: 0 0 18px; }
.glimpse-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.glimpse-title { font-family: var(--serif); font-size: 22px; line-height: 1.3; margin: 0 0 6px; }
.glimpse-title a { text-decoration: none; }
.glimpse .photos { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; gap: 8px; margin-bottom: 20px; flex: 1; min-height: 180px; }
.glimpse .photos span { border-radius: 8px; border: 1px solid var(--line); background: var(--adire), var(--accent-soft); }
.glimpse .stat { font-size: 36px; }
.glimpse .games a { grid-template-columns: 24px 1fr; }
.glimpse .games .date, .glimpse .game-meta { display: none; }
@media (max-width: 1040px) { .glimpses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .glimpses { grid-template-columns: 1fr; } }

.greeting { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.about-text { font-size: 18px; max-width: 58ch; }

/* ===== Home: spatial interface ===== */
.home { --ink:#050A24; --navy:#0B1650; --cobalt:#1D3FD6; --electric:#3D6BFF; --sky:#8FB2FF; --peri:#C3CDFF; --pale:#EDF1FF;
  --bg:#F8F9FF; --text:#050A24; --muted:#4A5685; --line:#C9D3F5; --accent:#1D3FD6; --surface:#fff; --accent-soft:#EDF1FF; --brand:#1D3FD6; --brand-ink:#fff;
  --serif:'Schibsted Grotesk',system-ui,sans-serif; --sans:'Schibsted Grotesk',system-ui,sans-serif; --mono:'DM Mono',ui-monospace,monospace;
  font-family:var(--sans); color-scheme:light; background:var(--bg); overflow-x:hidden; }
.home .wide { max-width:1240px; margin:0 auto; padding:0 56px; position:relative; }
.home .meta { font:400 12px/1.4 var(--mono); color:var(--electric); margin:0 0 14px; }
.home .nav { position:absolute; left:0; right:0; background:transparent; border:0; backdrop-filter:none; z-index:20; }
.home .nav .brand, .home .nav nav a { color:#EAF0FF; font:500 13px var(--mono); text-decoration:none; }
.home .nav nav a { padding:9px 18px; border:1px solid var(--sky); border-radius:999px; transition:background .3s,color .3s; } .home .nav nav a:hover { background:#fff; color:var(--ink); }
.home a:focus-visible, .home button:focus-visible, .journey:focus-visible { outline:2px solid var(--electric); outline-offset:3px; }
.home .btn, .pill { border-radius:999px; }
.rail { position:fixed; top:0; bottom:0; width:16px; overflow:hidden; z-index:4; pointer-events:none; font:10px/1.1 var(--mono); color:var(--electric); opacity:.28; }
.rail.l { left:8px } .rail.r { right:8px }
.rail span { display:block; writing-mode:vertical-rl; white-space:nowrap; animation:drift 140s linear infinite; transform:translateY(calc(var(--sy,0) * -.25px)); } .rail.r span { animation-direction:reverse; }
@keyframes drift { to { margin-top:-50%; } }
/* Hero */
.intro { position:relative; overflow:hidden; color:#EAF0FF; padding:150px 0 0; border-radius:0 0 50% 50% / 0 0 110px 110px; background:linear-gradient(135deg,var(--ink) 0%,var(--navy) 50%,var(--cobalt) 135%) 0 0/170% 170%; animation:shift 22s ease-in-out infinite alternate; }
.intro::before { content:""; position:absolute; inset:-120px 0 0; background:linear-gradient(rgba(143,178,255,.1) 1px,transparent 1px) 0 0/100% 96px,linear-gradient(90deg,rgba(143,178,255,.1) 1px,transparent 1px) 0 0/96px 100%; transform:translateY(calc(var(--sy,0) * .12px)); }
@keyframes shift { to { background-position:100% 100%; } }
.igrid { position:relative; max-width:1240px; margin:0 auto; padding:0 56px 120px; display:grid; grid-template-columns:repeat(12,1fr); gap:0 24px; }
.intro .meta { color:var(--sky); } .m1 { grid-column:1/8; }
.greeting { grid-column:1/8; font:400 15px var(--mono); color:var(--sky); margin:56px 0 0; }
.intro h1 { grid-column:1/12; position:relative; z-index:3; font:800 clamp(60px,12vw,172px)/.86 var(--serif); letter-spacing:-.05em; margin:6px 0 44px; background:linear-gradient(100deg,#fff 25%,var(--sky) 95%); -webkit-background-clip:text; background-clip:text; color:transparent; transform:translateY(calc(var(--sy,0) * .1px)); }
.about-text { grid-column:3/9; font-size:18px; line-height:1.6; color:#CFDAFF; margin:0; max-width:60ch; }
.media { grid-column:9/13; grid-row:2/5; margin:0; position:relative; align-self:start; margin-top:-8px; transform:translateY(calc(var(--sy,0) * -.07px)); }
.media img, .media .headshot { width:100%; aspect-ratio:4/5; object-fit:cover; display:block; border:0; border-radius:999px 999px 28px 28px; }
.media::before { content:""; position:absolute; inset:18px -18px -18px 18px; border:1px solid var(--sky); border-radius:999px 999px 28px 28px; opacity:.5; z-index:-1; }
.media figcaption { margin:14px 0 0; color:var(--sky); }
.stream { position:absolute; left:0; right:0; bottom:46px; overflow:hidden; white-space:nowrap; font:11px var(--mono); color:var(--sky); opacity:.5; }
.stream span { display:inline-block; animation:marq 160s linear infinite; } @keyframes marq { to { transform:translateX(-100%); } }
/* Journey */
#history { position:relative; margin-top:-70px; padding:190px 0 140px; overflow:hidden; background:linear-gradient(var(--pale) 1px,transparent 1px) 0 0/100% 88px,linear-gradient(90deg,var(--pale) 1px,transparent 1px) 0 0/88px 100%,var(--bg); }
.jbin { position:absolute; inset:0; margin:0; font:10px/1.35 var(--mono); word-break:break-all; color:var(--cobalt); opacity:.07; transition:opacity .4s; pointer-events:none; transform:translateY(calc(var(--sy,0) * -.04px)); }
.display { font:800 clamp(48px,8vw,120px)/.9 var(--serif); letter-spacing:-.045em; margin:0; color:var(--ink); }
.journey { margin-top:56px; outline-offset:12px; }
.arcwrap { position:relative; aspect-ratio:1000/160; max-width:100%; } .arcwrap svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.arcline { fill:none; stroke:var(--electric); stroke-width:1.5; } .arctext { font:7px var(--mono); fill:var(--electric); opacity:.6; }
.pin { position:absolute; transform:translate(-50%,-50%); background:var(--bg); border:1.5px solid var(--electric); border-radius:999px; padding:8px 18px; display:flex; flex-direction:column; align-items:center; cursor:pointer; font-family:var(--mono); color:var(--ink); transition:background .4s,color .4s; z-index:2; }
.pin b { font:600 14px var(--sans); } .pin small { font-size:11px; color:var(--muted); } .pin.on { background:var(--cobalt); color:#fff; border-color:var(--cobalt); } .pin.on small { color:var(--peri); }
.puck { position:absolute; width:76px; height:76px; margin:-38px 0 0 -38px; border-radius:50%; border:1px dashed var(--cobalt); pointer-events:none; z-index:1; }
.deck { position:relative; height:610px; margin-top:28px; perspective:1500px; }
.node { position:absolute; left:50%; top:0; width:min(780px,90%); height:100%; overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:44px 180px 44px 44px; padding:40px 52px; cursor:pointer;
  transform:translateX(calc(-50% + var(--o,0) * 62%)) translateZ(calc(var(--ab,0) * -140px)) rotateY(calc(var(--o,0) * -9deg)); opacity:calc(1 - var(--ab,0) * .32);
  transition:transform .8s cubic-bezier(.6,0,.2,1),opacity .6s; }
.node:not(.on) { filter:saturate(.7); } .node:not(.on) .more { opacity:0; } .more { transition:opacity .5s .2s; }
.node header { display:flex; gap:20px; font:400 12px var(--mono); color:var(--electric); } .node .idx { color:var(--ink); }
.node h3 { font:800 clamp(44px,6vw,92px)/.92 var(--serif); letter-spacing:-.045em; margin:16px 0 6px; } .kick { font:400 13px var(--mono); color:var(--muted); margin:0 0 22px; }
.node.dark { background:linear-gradient(130deg,var(--ink),var(--navy) 55%,var(--cobalt)); color:#EAF0FF; border:0; } .dark header, .dark .kick, .dark .roles .date { color:var(--sky); } .dark .idx { color:#fff; }
.roles p { display:flex; justify-content:space-between; gap:16px; margin:0; padding:9px 0; border-top:1px dotted var(--line); font-size:15px; } .dark .roles p { border-color:rgba(143,178,255,.3); } .roles .date { font:400 12px var(--mono); color:var(--muted); }
.facts { display:flex; flex-wrap:wrap; gap:6px 48px; margin:26px 0 20px; } .facts div { display:flex; flex-direction:column-reverse; }
.facts dd { margin:0; font:800 clamp(44px,6vw,84px)/1 var(--serif); letter-spacing:-.05em; } .facts dt { font:400 12px var(--mono); color:var(--sky); } .node:not(.dark) .facts dd { color:var(--cobalt); } .node:not(.dark) .facts dt { color:var(--muted); }
.prods { list-style:none; padding:0 0 0 16px; margin:0 0 16px; border-left:1px solid var(--electric); display:grid; gap:4px; font-size:15px; }
.stack { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:6px; } .stack li { font:400 12px var(--mono); border:1px solid rgba(143,178,255,.55); padding:4px 12px; border-radius:999px; } .node:not(.dark) .stack li { border-color:var(--line); color:var(--cobalt); }
.ctrls { display:flex; justify-content:center; gap:12px; margin-top:20px; } .pill { font:500 13px var(--mono); padding:10px 22px; border:1px solid var(--electric); background:transparent; color:var(--ink); cursor:pointer; } .pill:hover { background:var(--cobalt); color:#fff; }
.sys-foot { display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap; margin-top:44px; padding-top:20px; border-top:1px solid var(--line); } .sys-foot .chips { margin:0; } .sys-foot .chips li { font:400 12px var(--mono); }
/* Orbit */
#outside { padding:130px 0 150px; background:linear-gradient(180deg,var(--pale),var(--peri) 55%,var(--sky)); overflow:hidden; border-radius:140px 140px 0 0 / 70px 70px 0 0; margin-top:-70px; position:relative; z-index:2; }
.outside-head { margin-bottom:48px; font-style:italic; font-weight:700; }
.orbit { --R:560px; position:relative; height:250px; overflow:hidden; outline:0; }
.ring { position:absolute; left:50%; top:34px; width:calc(var(--R) * 2); height:calc(var(--R) * 2); margin-left:calc(var(--R) * -1); border-radius:50%; border:1px solid var(--electric); transform:rotate(calc(var(--a,0) * -26deg)); transition:transform .9s cubic-bezier(.6,0,.2,1); }
.ring::after { content:""; position:absolute; inset:14px; border-radius:50%; background:repeating-conic-gradient(var(--electric) 0 .35deg,transparent .35deg 2.6deg); -webkit-mask:radial-gradient(closest-side,transparent calc(100% - 22px),#000 calc(100% - 21px) calc(100% - 9px),transparent calc(100% - 8px)); mask:radial-gradient(closest-side,transparent calc(100% - 22px),#000 calc(100% - 21px) calc(100% - 9px),transparent calc(100% - 8px)); opacity:.6; }
.pod { position:absolute; left:50%; top:0; transform-origin:50% var(--R); transform:translateX(-50%) rotate(calc(var(--o,0) * 26deg)); opacity:calc(1 - var(--ab,0) * .2); transition:transform .9s cubic-bezier(.6,0,.2,1),background .4s,color .4s,opacity .5s; white-space:nowrap;
  font:700 18px var(--sans); padding:12px 24px; border-radius:999px; border:1.5px solid var(--electric); background:rgba(255,255,255,.55); backdrop-filter:blur(10px); color:var(--ink); cursor:pointer; }
.pod i { font:400 11px var(--mono); color:var(--electric); margin-right:10px; font-style:normal; } .pod.on { background:var(--cobalt); color:#fff; font-size:22px; padding:14px 30px; opacity:1; } .pod.on i { color:var(--peri); }
.stages { position:relative; height:470px; margin-top:-10px; }
.sbin { position:absolute; inset:0; margin:0; font:10px/1.35 var(--mono); word-break:break-all; color:var(--navy); opacity:.1; overflow:hidden; border-radius:60px; pointer-events:none; }
.g { position:absolute; inset:0; padding:44px 56px; border-radius:56px 56px 56px 260px; display:grid; align-items:center; gap:0 48px; opacity:0; pointer-events:none; transform:translateX(calc(var(--o,0) * 120px)) scale(.97); transition:transform .8s cubic-bezier(.6,0,.2,1),opacity .5s; background:rgba(255,255,255,.62); backdrop-filter:blur(14px); }
.g.on { opacity:1; pointer-events:auto; transform:none; }
.glimpse-label { font:400 12px var(--mono); color:var(--muted); margin:0 0 8px; }
.write { grid-template-columns:1fr; align-content:center; justify-items:start; padding-left:140px; } .write .glimpse-title { font:800 clamp(40px,6vw,88px)/.98 var(--serif); letter-spacing:-.045em; margin:0 0 14px; max-width:16ch; } .write .muted { margin:0 0 28px; }
.read { grid-template-columns:300px 1fr; background:linear-gradient(120deg,rgba(255,255,255,.7),rgba(195,205,255,.5)); } .read p { margin:0 0 6px; }
.cover { width:230px; aspect-ratio:2/3; margin:0 auto; padding:24px 22px; display:flex; align-items:flex-end; border-radius:8px 28px 28px 8px; background:linear-gradient(160deg,var(--electric),var(--navy) 80%); color:#fff; font:700 28px/1.05 var(--serif); letter-spacing:-.03em; box-shadow:-12px 16px 0 var(--cobalt); transform:rotate(-4deg); transition:transform .5s; } .g.on .cover:hover { transform:rotate(0) translateY(-8px); } .cover a { color:#fff; }
.travel { grid-template-columns:1fr 280px; } .photos { position:relative; height:100%; min-height:340px; } .travel .btn { justify-self:start; }
.photos span { position:absolute; transition:transform .7s; box-shadow:0 0 0 6px #fff; }
.photos span:nth-child(1) { left:0; top:30px; width:46%; height:250px; border-radius:50%; background:linear-gradient(150deg,var(--sky),var(--electric)); }
.photos span:nth-child(2) { left:34%; top:0; width:34%; height:300px; border-radius:999px 999px 24px 24px; background:linear-gradient(200deg,var(--peri),var(--cobalt)); }
.photos span:nth-child(3) { left:58%; top:70px; width:42%; height:240px; border-radius:30px 140px 30px 140px; background:linear-gradient(120deg,var(--navy),var(--electric) 90%); }
.g.on:hover .photos span:nth-child(1) { transform:translateX(-18px) rotate(-6deg); } .g.on:hover .photos span:nth-child(3) { transform:translateX(20px) rotate(5deg); }
.chess { grid-template-columns:300px 1fr; background:var(--ink); color:#EAF0FF; backdrop-filter:none; }
.board { aspect-ratio:1; border-radius:50% 50% 50% 14%; overflow:hidden; background:repeating-conic-gradient(var(--navy) 0 25%,var(--cobalt) 0 50%) 0 0/25% 25%; outline:1px solid var(--sky); outline-offset:8px; transition:transform .8s; } .chess:hover .board { transform:rotate(90deg); }
.chess .stat { font:800 84px/1 var(--serif); letter-spacing:-.05em; margin:0; } .chess .stat-label { color:var(--sky); font:400 12px var(--mono); margin:0 0 14px; } .chess .games { margin-bottom:16px; } .chess .games a, .chess .opp { color:#EAF0FF; } .chess .games li { border-color:rgba(143,178,255,.25); } .chess .btn { background:#fff; color:var(--ink); }
.getin { background:linear-gradient(160deg,var(--ink),var(--navy)); color:#fff; padding:120px 0 130px; margin-top:-70px; position:relative; z-index:1; padding-top:200px; } .getin .display { color:#fff; margin-bottom:40px; } .getin .row { display:flex; gap:16px; flex-wrap:wrap; }
.getin .btn { background:#fff; color:var(--ink); } .getin .btn.ghost { background:transparent; color:#fff; border:1px solid var(--sky); }
.home footer { background:#030618; border:0; color:var(--sky); font:12px var(--mono); } .home footer a { color:var(--sky); }
@media (max-width:900px) { .rail { display:none; } .home .wide, .igrid { padding-left:22px; padding-right:22px; } .igrid > * { grid-column:1/-1 !important; grid-row:auto !important; } .media { max-width:240px; margin:32px 0 0; }
  .arcwrap { display:none; } .journey .ctrls { margin-top:12px; } .deck { height:640px; } .node { width:84%; padding:30px 26px; } .orbit { --R:380px; height:200px; } .pod { font-size:14px; padding:10px 14px; } .pod.on { font-size:16px; padding:11px 18px; }
  .stages { height:640px; } .g, .read, .chess, .travel { grid-template-columns:1fr; padding:30px 26px; border-radius:40px 40px 40px 120px; align-content:start; } .write { padding-left:26px; } .cover { width:150px; margin:0 0 20px 8px; } .photos { min-height:220px; } .board { max-width:180px; margin-bottom:18px; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important; } }

/* Targeted edits: no grid lines, accordion history, tighter hero */
.intro::before { inset:0; background:radial-gradient(ellipse 60% 60% at 75% 30%,rgba(61,107,255,.35),transparent 70%),radial-gradient(ellipse 50% 50% at 8% 95%,rgba(29,63,216,.32),transparent 70%); transform:translateY(calc(var(--sy,0) * .06px)); }
.igrid { max-width:1120px; } .greeting { margin-top:44px; } .intro h1 { grid-column:1/13; } .about-text { grid-column:1/8; } .media { grid-column:8/12; margin-top:-4px; }
#history { color:#EAF0FF; background:radial-gradient(ellipse 70% 45% at 18% 12%,#14287F 0%,transparent 70%),radial-gradient(ellipse 60% 45% at 88% 90%,rgba(29,63,216,.4),transparent 70%),linear-gradient(180deg,#040820,#0A1344 50%,#050A24); }
#history .display { color:#fff; } #history .jbin { color:var(--sky); opacity:.06; }
.acc { list-style:none; margin:56px 0 0; padding:0; border-top:1px solid rgba(143,178,255,.3); }
.acc li { border-bottom:1px solid rgba(143,178,255,.3); }
.acc-h { width:100%; display:grid; grid-template-columns:56px 1fr auto 44px; gap:20px; align-items:center; padding:28px 4px; background:none; border:0; color:#EAF0FF; text-align:left; cursor:pointer; font:inherit; }
.acc-h .idx { font:400 12px var(--mono); color:var(--sky); }
.acc-h .co { display:block; font:800 clamp(30px,4.6vw,64px)/1 var(--serif); letter-spacing:-.045em; transition:transform .5s; } .acc-h:hover .co { transform:translateX(10px); }
.acc-h .role { display:block; margin-top:8px; font-size:14px; color:var(--peri); }
.acc-h .date { font:400 12px var(--mono); color:var(--sky); }
.plus { width:40px; height:40px; border:1px solid var(--sky); border-radius:50%; position:relative; transition:transform .5s,background .3s; }
.plus::before, .plus::after { content:""; position:absolute; left:50%; top:50%; width:14px; height:1.5px; margin:-.75px 0 0 -7px; background:#fff; } .plus::after { transform:rotate(90deg); }
.open .plus { transform:rotate(45deg); background:var(--cobalt); border-color:var(--cobalt); } .acc-h:hover .plus { background:rgba(143,178,255,.2); }
.acc-p { display:grid; grid-template-rows:0fr; transition:grid-template-rows .6s cubic-bezier(.6,0,.2,1); } .open .acc-p { grid-template-rows:1fr; }
.acc-p > div { overflow:hidden; visibility:hidden; transition:visibility 0s .6s; } .open .acc-p > div { visibility:visible; transition-delay:0s; }
.acc-body { padding:4px 4px 44px 76px; display:grid; grid-template-columns:1.1fr 1fr; gap:24px 56px; }
.story { margin:0; font-size:18px; line-height:1.6; color:#CFDAFF; max-width:52ch; }
.acc .facts { margin:28px 0 0; } .acc .facts dd { color:#fff; font-size:clamp(40px,5vw,68px); } .acc .facts dt { color:var(--sky); }
.acc .roles p { border-color:rgba(143,178,255,.3); } .acc .roles .date { color:var(--sky); } .acc .prods { color:#CFDAFF; } .acc .stack li { border-color:rgba(143,178,255,.55); color:#EAF0FF; }
#history .sys-foot { border-color:rgba(143,178,255,.3); } #history .chips li { background:rgba(143,178,255,.14); color:var(--peri); } #history .link { color:var(--sky); }
@media (max-width:900px) { .acc-h { grid-template-columns:36px 1fr 40px; } .acc-h .date { display:none; } .acc-body { grid-template-columns:1fr; padding-left:4px; } }

/* Journey restored, on the dark navy background */
#history .arcline { stroke:var(--sky); } #history .arctext { fill:var(--sky); opacity:.55; }
#history .pin { background:#0A1344; color:#EAF0FF; border-color:var(--sky); } #history .pin small { color:var(--sky); } #history .pin.on { background:var(--cobalt); border-color:var(--cobalt); } #history .pin.on small { color:var(--peri); }
#history .puck { border-color:var(--sky); } #history .node.dark { border:1px solid rgba(143,178,255,.4); }
#history .pill { color:#EAF0FF; border-color:var(--sky); } #history .pill:hover { background:var(--cobalt); }

/* ===== Update: higher bio + scroll-driven history ===== */
.intro { padding-top:96px; }
.igrid { padding-bottom:110px; }
.greeting { margin-top:8px; }
.intro h1 { font-size:clamp(48px,8.5vw,120px); margin:4px 0 28px; }
.intro h1 { grid-column:1/8; grid-row:3; }
.intro .m1 { grid-row:1; } .greeting { grid-row:2; } .about-text { grid-row:4; }
.media { grid-row:1/5; margin-top:0; }
@media (max-width:900px) { .intro { padding-top:84px; } .greeting { margin-top:16px; } .media { margin-top:28px; } }

#history { padding:0; overflow:clip; }
.htrack { position:relative; height:calc(100vh + (var(--n,4) - 1) * 70vh); }
.hstage { position:sticky; top:0; height:100vh; overflow:hidden; display:flex; flex-direction:column; justify-content:center; padding:96px 0 20px; }
.hstage .jbin { transform:none; }
.hhead { display:flex; align-items:flex-end; justify-content:space-between; gap:12px 24px; flex-wrap:wrap; }
#history .display { font-size:clamp(40px,6vw,88px); }
.hhint { font:400 12px var(--mono); color:var(--sky); margin:0 0 10px; opacity:.8; }
#history .journey { margin-top:24px; }
#history .arcwrap { max-width:860px; margin:0 auto; }
#history .deck { height:clamp(340px, calc(100vh - 400px), 560px); margin-top:16px; perspective:none; }
#history .node { transition:none; will-change:transform,opacity; filter:none; width:min(780px,100%); padding:36px 48px; overflow-y:auto; transform:translate3d(-50%,0,0); }
#history .node h3 { font-size:clamp(38px,5vw,76px); }
#history .node .facts dd { font-size:clamp(34px,4.5vw,64px); }
#history .ctrls { margin-top:14px; }
#history .deck { overflow:hidden; border-radius:44px 180px 44px 44px; }
#history .node .more { opacity:1; }
#history .node:not(.dark) { color:var(--ink); }
#history .node .facts { display:flex; background:none; border:0; border-radius:0; overflow:visible; }
#history .node .facts div { background:none; padding:0; }
#history .puck { transition:none; }
.hfoot { padding-top:24px; padding-bottom:140px; }
#history .sys-foot { margin-top:0; }
@media (max-width:900px) {
  .hstage { padding-top:76px; }
  #history .deck { height:clamp(400px, calc(100vh - 260px), 620px); }
  #history .node { width:100%; padding:26px 22px; border-radius:32px 90px 32px 32px; }
  #history .node .facts { gap:4px 28px; }
}

/* ===== Compact career cards ===== */
#history .deck { height:clamp(290px, calc(100vh - 440px), 330px); border-radius:32px 110px 32px 32px; }
#history .node { width:min(880px,100%); padding:28px 40px; border-radius:32px 110px 32px 32px; display:flex; flex-direction:column; }
#history .node header { flex:none; }
.nbody { flex:1; display:grid; grid-template-columns:1fr 1fr; gap:20px 44px; align-items:center; align-content:center; margin-top:4px; }
#history .node h3 { font-size:clamp(34px,4.2vw,56px); margin:0 0 6px; }
#history .node .kick { margin:0 0 18px; font-size:12px; }
#history .node .roles p { font-size:14px; padding:7px 0; gap:12px; }
#history .node .roles p > span:first-child { min-width:0; }
#history .node .roles .date { white-space:nowrap; font-size:11px; }
#history .node .facts { gap:6px 32px; margin:0 0 16px; align-items:flex-end; }
#history .node .facts div { max-width:15ch; }
#history .node .facts dd { font-size:clamp(30px,3.4vw,46px); }
#history .node .facts dt { font-size:11px; line-height:1.35; margin-top:2px; }
.hl { list-style:none; margin:0; padding:0 0 0 14px; border-left:1px solid var(--electric); display:grid; gap:8px; font-size:15px; line-height:1.45; }
.ndesc { margin:0; font-size:15px; line-height:1.55; color:#CFDAFF; }
#history .node:not(.dark) .ndesc { color:var(--muted); }
#history .node { height:auto; overflow:hidden; }
/* When I'm not working: side tab for recent articles and books */
.stages { display:grid; height:auto; }
.stages .g { position:relative; inset:auto; grid-area:1/1; min-height:470px; }
.write { grid-template-columns:1fr minmax(260px,340px); padding-left:96px; align-items:center; }
.read { grid-template-columns:260px 1fr minmax(260px,320px); }
.side { align-self:center; background:rgba(255,255,255,.6); border:1px solid rgba(61,107,255,.25); border-radius:28px; padding:24px 26px; backdrop-filter:blur(8px); }
.side .glimpse-label { margin-bottom:12px; }
.slist { list-style:none; margin:0; padding:0; counter-reset:s; }
.slist li { counter-increment:s; display:grid; grid-template-columns:28px 1fr; gap:10px; padding:12px 0; border-top:1px solid rgba(61,107,255,.18); }
.slist li:first-child { border-top:0; padding-top:2px; }
.slist li.muted { display:block; font-size:14px; }
.slist .sn::before { content:counter(s, decimal-leading-zero); font:400 11px var(--mono); color:var(--electric); }
.slist .st { font:600 16px/1.3 var(--sans); color:var(--ink); }
.slist .st a { color:inherit; text-decoration:none; } .slist .st a:hover { color:var(--cobalt); }
.slist small { display:block; margin-top:3px; font:400 12px var(--mono); color:var(--muted); }
@media (max-width:900px) {
  .stages { height:auto; }
  .stages .g { min-height:0; }
  .write, .read { grid-template-columns:1fr; padding-left:26px; }
  .side { margin-top:22px; padding:18px 20px; border-radius:22px; }
  .read .cover { font-size:20px; padding:18px 16px; margin-bottom:24px; }
}
#history .hstage { justify-content:flex-start; padding-top:clamp(80px, 13vh, 150px); }
#history .nbody { flex:none; align-items:start; margin-top:4px; }
.dark .hl { color:#CFDAFF; } #history .node:not(.dark) .hl { color:var(--muted); }
@media (max-width:900px) {
  #history .deck { height:clamp(440px, calc(100vh - 290px), 540px); border-radius:28px 80px 28px 28px; }
  .ndesc { font-size:14px; line-height:1.5; }
  #history .node .facts { display:grid; grid-template-columns:1fr 1fr; gap:4px 20px; margin-bottom:12px; }
  #history .node .facts div { max-width:none; }
  #history .node .roles p { padding:6px 0; }
  #history .node h3 { font-size:clamp(30px,9vw,40px); }
  #history .node { padding:24px 22px; border-radius:28px 80px 28px 28px; }
  .nbody { grid-template-columns:1fr; align-items:start; align-content:start; gap:20px; margin-top:6px; }
  #history .node .kick { margin-bottom:10px; }
  .hl { font-size:14px; }
}

/* Real book cover (found automatically from the sheet's current read). Keeps the tilted-book shape. */
.cover.has-img { padding:0; background:var(--cover-url) center/cover no-repeat, var(--navy); }
.cover.has-img > span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ── Layout fixes for the "When I'm not working" cards ── */
/* Photo shapes scale down with their box instead of keeping fixed pixel heights (they spilled over the
   Instagram button on small screens). On wide screens min() keeps the original sizes. */
.photos span:nth-child(1) { top:min(9%, 30px);  height:min(74%, 250px); }
.photos span:nth-child(2) { top:0;              height:min(88%, 300px); }
.photos span:nth-child(3) { top:min(21%, 70px); height:min(71%, 240px); }
/* The cards' big rounded bottom-left corner cuts into the space beside it, so give the bottom-left
   content extra room beneath it. Wide screens: the Medium button. */
.write { padding-bottom:84px; }
@media (max-width:900px) {
  /* Small screens: the curve is smaller but the side padding is too, so every card needs the room */
  .g { padding-bottom:80px; }
  .travel .photos { margin-bottom:24px; }
}

/* Travel photos fill the shapes (set from data.js); the shape's rounded border crops the picture */
.photos span { overflow:hidden; }
.photos span img { display:block; width:100%; height:100%; object-fit:cover; }

/* Small place captions on the travel photos. Placed per shape so they stay inside each one's curve. */
.photos .cap { position:absolute; left:50%; bottom:10px; transform:translateX(-50%); width:max-content; max-width:calc(100% - 16px);
  padding:4px 10px; border-radius:14px; background:rgba(6,12,50,.66); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  color:#fff; font:400 11px/1.25 var(--mono); text-align:center; pointer-events:none; }
.photos span:nth-child(1) .cap { left:19%; bottom:14%; transform:none; max-width:52%; text-align:left; }  /* round window: stays in the part the arch doesn't cover, clear of its curve */
.photos span:nth-child(3) .cap { left:auto; right:14px; bottom:24px; transform:none; max-width:calc(100% - 44px); text-align:right; } /* leaf: its big curve is bottom-left */
@media (max-width:600px) { .photos .cap { font-size:10px; padding:3px 8px; } }
