/* Liftoff: public site stylesheet. Plain CSS, no build step.
   Order: tokens, base, layout, components, pages, small screens, motion.
   Class contract for page markup: artifacts/mockups/v3/liftoff/CONTRACT.md */

/* ---------- Tokens ---------- */
:root {
  /* Grounds, light to dark */
  --panel: #3B2BA6;        /* diagonal panel, the lightest ground */
  --ground-top: #30248A;   /* top stop of the dusk gradient */
  --ground: #2A1F6B;       /* dusk, the reading ground */
  --ground-low: #231A5C;   /* low stop of the story gradient */
  --night-2: #1B1548;
  --surface: #1A1444;      /* dark card */
  --surface-line: #342B7A;
  --night: #0E0A26;        /* night block, menu sheet */
  --foot: #090617;         /* footer */
  --scrim: rgba(9, 6, 23, .92);

  /* Ink and accents */
  --white: #FFFFFF;
  --ink: #17123B;          /* text on white and on spark */
  --soft: #CFC8FF;         /* secondary text on dark grounds */
  --muted: #54507A;        /* secondary text on white */
  --muted-line: #8B86B5;
  --tint: #ECE9FB;         /* pill fill on white */
  --violet: #4B32D6;       /* links, tags and focus on white */
  --violet-hi: #5B3DF5;
  --violet-lo: #3421A8;
  --spark: #FF7A59;        /* accent, focus on dark grounds. Never text on white. */
  --spark-deep: #F2623D;   /* spark for a button on a white card: 3.2:1 against white, ink label 5.6:1 */

  /* Translucent layers */
  --panel-clear: rgba(59, 43, 166, 0);
  --line: rgba(255, 255, 255, .24);
  --line-mid: rgba(255, 255, 255, .3);
  --line-strong: rgba(255, 255, 255, .5);
  --glass: rgba(255, 255, 255, .1);
  --glass-hi: rgba(255, 255, 255, .14);
  --glass-press: rgba(255, 255, 255, .22);
  --well: rgba(14, 10, 38, .45);
  --well-hi: rgba(14, 10, 38, .7);
  --bar: rgba(14, 10, 38, .74);   /* sticky header ground; solid where it cannot blur */

  /* Focus ring colour; swapped to violet inside white containers */
  --focus: var(--spark);

  /* Type */
  --display: 'Clash Display', 'General Sans', system-ui, sans-serif;
  --body: 'General Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, monospace;

  /* Shape and depth (plain dark drop shadows, no glows) */
  --r-pill: 999px;
  --r-card: 32px;
  --r-tile: 28px;
  --r-block: 56px;
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, .5);
  --shadow-deep: 0 30px 60px -30px rgba(0, 0, 0, .6);
  --shadow-bar: 0 34px 60px -30px rgba(0, 0, 0, .6);
  --shadow-rise: 0 -30px 70px -30px rgba(0, 0, 0, .55);
  --gutter: clamp(16px, 4vw, 40px);

  /* Icon sizes */
  --ico-s: 18px;
  --ico-m: 22px;
  --ico-l: 28px;
  --bar-h: 88px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { :root { --bar: var(--night); } }
@media (prefers-reduced-transparency: reduce) { :root { --bar: var(--night); } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--ground); color: var(--white); font: 400 18px/1.6 var(--body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 20; background: var(--white); color: var(--ink); padding: 14px 20px; border-radius: var(--r-pill); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
.skip-link:hover { background: var(--tint); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); position: relative; }

/* Grain: one tiny inline SVG, tiled. */
.grain { position: relative; isolation: isolate; }
.grain::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .32; mix-blend-mode: soft-light;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Components ---------- */

/* Icons: one inline sprite per page, used as <svg class="ico ico-s"><use href="#i-name"> */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { flex: none; display: inline-block; width: var(--ico-m); height: var(--ico-m); vertical-align: -.2em; }
.ico-s { width: var(--ico-s); height: var(--ico-s); }
.ico-m { width: var(--ico-m); height: var(--ico-m); }
.ico-l { width: var(--ico-l); height: var(--ico-l); }

/* Eyebrow: mono label with a short spark rule */
.eyebrow { font: 400 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; flex: none; width: 28px; height: 2px; background: var(--spark); }

/* Pills */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 14px 24px; border-radius: var(--r-pill); border: 0; font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; transition: transform 120ms ease-out; }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { transform: translateY(-2px); }
  .card:hover { transform: translateY(-6px); }
}
.pill:active, .chip:active, .card:active { transform: scale(.97); }
.pill-spark { background: var(--spark); color: var(--ink); box-shadow: var(--shadow); }
.cform-card .pill-spark, .parent .pill-spark { background: var(--spark-deep); }
.pill-white { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.pill-white:hover { background: var(--tint); }
.pill-line { background: transparent; color: var(--white); border: 1.5px solid var(--white); }
.pill-line:hover, .pill-quiet:hover { background: var(--glass-hi); }
.pill-quiet { background: transparent; color: var(--white); padding: 14px 18px; gap: 8px; }
.pill svg:not(.ico), .go svg { width: 18px; height: 18px; }

/* Static pill lists (not interactive) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; }
.pills li { display: inline-flex; align-items: center; min-height: 36px; padding: 9px 16px; border-radius: var(--r-pill); font: 600 15px/1 var(--body); background: var(--tint); color: var(--ink); }
.places { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.places li { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 20px; border-radius: var(--r-pill); border: 1.5px solid var(--white); font: 600 16px/1 var(--body); }

/* Header */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding-top: 20px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; font: 600 22px/1 var(--display); letter-spacing: -.01em; }
.brand img { height: 48px; width: auto; margin: 0 -6px 0 -8px; }
.brand:hover { opacity: .85; }
.brand:active { opacity: .7; }
.site-nav { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; align-items: center; gap: 2px; padding: 8px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-links a, .nav-links button { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 18px; border: 0; border-radius: var(--r-pill); background: transparent; text-decoration: none; font: 500 15px/1 var(--body); cursor: pointer; }
.nav-links a:hover, .nav-links button:hover { background: var(--glass-hi); }
.nav-links a:active, .nav-links button:active { background: var(--glass-press); }
.nav-links a[aria-current] { background: var(--white); color: var(--ink); font-weight: 600; }
/* Link icons and the rows under the rule belong to the phone sheet only. */
.nav-links .ico, .nav-links .nav-more, .nav-menu { display: none; }
.nav-contact[aria-current] { box-shadow: inset 0 0 0 2.5px var(--ink); }
.nav-menu[aria-expanded="true"] .ico:first-child, .nav-menu:not([aria-expanded="true"]) .ico:last-child { display: none; }
/* Wide screens: the bar sticks, on a translucent ground, and still floats over the hero. */
@media (min-width: 861px) {
  html { scroll-padding-top: calc(var(--bar-h) + 16px); }
  .site-header { position: sticky; display: flex; align-items: center; height: var(--bar-h); margin-bottom: calc(-1 * var(--bar-h)); padding-top: 0; background: var(--bar); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .nav-links { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
/* Header fix: on wide screens the coral Contact pill is the only Contact in the bar. The group keeps its link for the phone sheet. */
@media (min-width: 861px) {
  .nav-links a[href="/contact/"] { display: none; }
}
/* Without script the Ask pill and the menu button do nothing, so they are not shown. */
html:not(.js) [data-ask-open], html:not(.js) .nav-menu { display: none; }

/* Ask: bar, chips, answer panel */
.ask { margin-top: 44px; max-width: 620px; }
.ask-bar { display: flex; align-items: center; gap: 8px; height: 56px; margin: 0 -8px; padding: 8px 8px 8px 28px; border-radius: var(--r-pill); background: var(--white); background-clip: padding-box; border: 8px solid var(--glass-hi); box-sizing: content-box; box-shadow: var(--shadow-bar); }
.ask-bar input { flex: 1; min-width: 0; height: 56px; border: 0; background: transparent; font: 500 19px/1 var(--body); color: var(--ink); }
.ask-bar input::placeholder { color: var(--muted); opacity: 1; }
.ask-bar input:focus { outline: 0; }
.ask-bar:focus-within { border-color: var(--spark); }
.go { --focus: var(--violet); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--spark-deep); color: var(--ink); cursor: pointer; transition: transform .2s; }
.go:hover { transform: translateX(3px); }
.go:active { transform: scale(.92); }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 20px; border-radius: var(--r-pill); background: var(--well); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font: 500 15px/1 var(--body); color: var(--white); cursor: pointer; transition: transform 120ms ease-out; }
.chip:hover { background: var(--well-hi); border-color: var(--white); }
/* Answer panel: sits right after the form. Empty until the first answer. */
.ask-answer { --focus: var(--violet); max-width: 620px; margin-top: 18px; padding: 22px 24px; border-radius: var(--r-tile); background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.ask-answer:empty { display: none; }
.ask-answer-text { font: 500 18px/1.55 var(--body); }
.ask-answer-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 0 20px; }
.ask-answer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--violet); font: 600 16px/1.2 var(--body); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ask-answer a:hover { color: var(--ink); }
.ask-answer a:active { opacity: .7; }

/* Ask dialog (inner pages): a native dialog the script builds */
.ask-dialog { width: min(680px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); margin: 12vh auto auto; padding: 0; border: 1px solid var(--surface-line); border-radius: var(--r-card); background: var(--night); color: var(--white); box-shadow: var(--shadow-deep); }
.ask-dialog::backdrop { background: var(--scrim); }
.ask-dialog-inner { display: flex; flex-direction: column; padding: 20px 28px 28px; }
.ask-dialog-close { align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 20px; border-radius: var(--r-pill); border: 1.5px solid var(--white); background: transparent; color: var(--white); font: 600 15px/1 var(--body); cursor: pointer; transition: transform .2s; }
.ask-dialog-close:hover { background: var(--glass-hi); }
.ask-dialog-close:active { transform: scale(.96); }
.ask-dialog .ask { margin-top: 20px; max-width: none; padding: 0 8px; }
.ask-dialog .ask-answer { max-width: none; box-shadow: none; }

/* Home path cards */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 320px; padding: 32px; border-radius: var(--r-card); text-decoration: none; transition: transform 120ms ease-out; }
.card h3 { font: 600 clamp(30px, 3.4vw, 44px)/1 var(--display); letter-spacing: -.02em; }
.card p { margin-top: 12px; max-width: 34ch; font-size: 17px; line-height: 1.5; }
.tag { display: block; font: 400 13px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.card .tag { margin-bottom: 18px; }
.card .arrow { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; }
.card .arrow svg { width: 22px; height: 22px; }
.card-edu { grid-column: span 7; background: var(--white); color: var(--ink); box-shadow: var(--shadow-deep); }
.card-edu .tag { color: var(--violet); }
.card-edu .arrow { background: var(--violet); color: var(--white); }
.card-edu .mark { position: absolute; right: -70px; top: -40px; height: 520px; width: auto; max-width: none; opacity: .16; }
.card-about { grid-column: span 5; background: linear-gradient(150deg, var(--violet-hi), var(--violet) 50%, var(--violet-lo)); box-shadow: var(--shadow-deep); }
.card-about .arrow, .card-glass .arrow { background: var(--white); color: var(--ink); }
.card-about .pills li { background: var(--well); color: var(--white); }
.card-glass { background: var(--surface); border: 1px solid var(--surface-line); }
.card-glass .pills li { background: var(--surface-line); color: var(--white); }
.card-ventures { grid-column: span 5; }
.card-writing { grid-column: span 7; }
.card p.soft, .card-glass p { color: var(--soft); }
.posts { margin: 22px 0 28px; }
.posts li { display: flex; gap: 18px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--surface-line); font: 500 18px/1.3 var(--body); }
.posts time { flex: none; font: 400 13px/1 var(--mono); color: var(--soft); }

/* Motto band (home and about) */
.motto { position: relative; overflow: hidden; padding: 130px 0; background: linear-gradient(105deg, var(--panel) 0 31%, var(--panel-clear) 31% 100%), linear-gradient(180deg, var(--ground-top) 0%, var(--ground) 100%); }
.motto-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; }
.motto-mark { width: 300px; height: auto; }
.h-big { font: 600 clamp(44px, 6.4vw, 88px)/.92 var(--display); letter-spacing: -.03em; margin-top: 18px; }
.motto blockquote { font: 600 clamp(36px, 5.4vw, 74px)/1 var(--display); letter-spacing: -.025em; }
.motto .actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer { background: var(--foot); padding: 56px 0 44px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.seal { display: flex; align-items: center; gap: 18px; font: 600 22px/1.1 var(--display); }
.seal small { display: block; margin-top: 6px; font: 400 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.seal-ring { flex: none; width: 92px; height: 92px; border-radius: 50%; border: 1.5px solid var(--line-strong); box-shadow: inset 0 0 0 5px var(--foot), inset 0 0 0 6px var(--line-mid); display: flex; align-items: center; justify-content: center; background: var(--night); }
.seal-ring img { height: 64px; width: auto; }
.foot-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 14px; border-radius: var(--r-pill); font: 500 16px/1 var(--body); text-decoration: none; }
.foot-links a:hover { background: var(--glass); }
.foot-links a:active { background: var(--glass-press); }
.foot-links a[aria-current] { background: var(--glass); font-weight: 600; }
.foot-links .ico { color: var(--soft); }

/* ---------- Pages ---------- */

/* Home: hero */
.hero { position: relative; overflow: hidden; min-height: 800px; padding: 150px 0 72px;
  background: linear-gradient(105deg, var(--panel-clear) 0 56%, var(--panel) 56% 100%), linear-gradient(170deg, var(--ground-top) 0%, var(--ground) 100%); }
.hero-art { position: absolute; z-index: -1; height: 1120px; width: auto; max-width: none; top: -30px; right: -150px; }
.hero-name { font: 600 clamp(100px, 15.6vw, 208px)/.84 var(--display); letter-spacing: -.035em; margin: 26px 0 0 -.04em; }
.hero-name .cursor { display: inline-block; width: .11em; height: .68em; margin-left: .06em; background: var(--spark); border-radius: .03em; }
.hero-tagline { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 500 21px/1.3 var(--body); }
.hero-tagline li + li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--white); opacity: .7; margin-right: 22px; vertical-align: middle; }
.scroll-hint { margin-top: 64px; display: inline-flex; align-items: center; gap: 12px; font: 400 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.scroll-hint svg { width: 18px; height: 18px; }

/* Home: ticker band, the hand-off from hero to story */
.ticker-wrap { position: relative; z-index: 2; height: 120px; margin: -60px 0; overflow-x: clip; pointer-events: none; }
.ticker { position: absolute; left: -4%; width: 108%; top: 16px; transform: rotate(-2.2deg); background: var(--white); color: var(--ink); box-shadow: var(--shadow-deep); padding: 20px 0; overflow: hidden; white-space: nowrap; }
.ticker ul { display: inline-flex; gap: 44px; animation: slide 36s linear infinite; }
.ticker li { font: 600 34px/1 var(--display); letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 44px; }
.ticker li::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--spark); }
@keyframes slide { to { transform: translateX(-50%); } }

/* Home: story */
.story { padding: 170px 0 150px; background: linear-gradient(180deg, var(--ground) 0%, var(--ground-low) 100%); }
.story-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.story-label { grid-column: 1 / span 3; padding-top: 14px; }
.story-text { grid-column: 4 / span 9; font: 500 clamp(28px, 3.7vw, 50px)/1.14 var(--display); letter-spacing: -.015em; }
.story-text em { font-style: normal; box-shadow: inset 0 -.12em 0 var(--spark); }
.stats { grid-column: 4 / span 9; margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { border-top: 2px solid var(--white); padding-top: 16px; }
.stat b { display: block; font: 600 clamp(64px, 8vw, 112px)/.9 var(--display); letter-spacing: -.03em; }
.stat span { display: block; margin-top: 10px; font: 500 17px/1.35 var(--body); color: var(--soft); max-width: 16ch; }

/* Home: night block that rises over the dusk ground */
.paths { position: relative; z-index: 3; margin-top: -64px; padding: 96px 0 110px; border-radius: var(--r-block) var(--r-block) 0 0; background: var(--night); box-shadow: var(--shadow-rise); }
.paths-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.paths-head p { max-width: 30ch; color: var(--soft); font-size: 17px; }

/* Inner pages: hero */
.page-hero { position: relative; overflow: hidden; padding: 170px 0 90px; background: linear-gradient(105deg, var(--panel-clear) 0 60%, var(--panel) 60% 100%), linear-gradient(170deg, var(--ground-top) 0%, var(--ground) 100%); }
.page-hero .hero-art { height: 900px; top: -120px; right: -90px; opacity: .85; }
.page-title { font: 600 clamp(54px, 9.4vw, 128px)/.9 var(--display); letter-spacing: -.035em; margin: 22px 0 0 -.03em; max-width: 9ch; }
.page-intro { margin-top: 28px; font: 500 clamp(20px, 2vw, 26px)/1.35 var(--body); max-width: 26ch; }
.page-intro-long { font: 500 clamp(18px, 1.6vw, 21px)/1.5 var(--body); max-width: 44ch; }
.jump { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.page-hero .pills { margin: 28px 0 0; max-width: 620px; }
.page-hero .pills li { background: var(--well); color: var(--white); border: 1px solid var(--line); }
/* 404: the hero is the whole page */
.page-hero-solo { display: flex; align-items: center; min-height: 86vh; }
.jump + .jump { margin-top: 12px; }
/* Blog post: mono date in the eyebrow, long title */
.post-title { font-size: clamp(36px, 5.4vw, 72px); line-height: .98; letter-spacing: -.03em; margin-left: 0; max-width: 18ch; overflow-wrap: break-word; }

/* Inner pages: numbered blocks */
.prose-area { background: var(--ground); padding: 30px 0 120px; }
.block { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 72px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; }
.block-head { grid-column: 1 / span 4; }
.block-head .num { font: 400 13px/1 var(--mono); letter-spacing: .16em; color: var(--soft); }
.block-head h2 { margin-top: 14px; font: 600 clamp(34px, 4vw, 52px)/.98 var(--display); letter-spacing: -.025em; }
.block-body { grid-column: 6 / span 7; min-width: 0; }
.prose p { font: 400 19px/1.72 var(--body); color: var(--white); max-width: 60ch; }
.prose p + p { margin-top: 1.15em; }
.prose a, .post-body a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 600; }
.prose a:hover, .post-body a:hover, .exam a:hover { color: var(--soft); }
.prose a:active, .post-body a:active, .exam a:active { opacity: .7; }
.prose p.pull { margin: 0 0 34px; font: 500 clamp(24px, 2.6vw, 34px)/1.2 var(--display); letter-spacing: -.01em; max-width: 22ch; }
.prose p.pull::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--spark); margin-bottom: 18px; }

/* Education */
.facts { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fact { padding: 20px; border-radius: 24px; background: var(--well); border: 1px solid var(--line); font: 600 17px/1.25 var(--body); }
.fact svg { width: 28px; height: 28px; display: block; margin-bottom: 16px; }
.exams, .ventures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.exam, .venture { padding: 26px; border-radius: var(--r-tile); display: flex; flex-direction: column; }
.exam { background: var(--night); box-shadow: var(--shadow); min-height: 190px; }
.exam:nth-child(2), .exam:nth-child(3) { background: var(--night-2); }
.exam h3 { font: 600 38px/1 var(--display); letter-spacing: -.02em; }
.exam p { margin-top: auto; padding-top: 22px; font: 400 17px/1.5 var(--body); color: var(--soft); }
.exam a { color: var(--white); font-weight: 600; text-underline-offset: 4px; display: inline-flex; min-height: 44px; align-items: center; }

/* White card (education, "Contact for parents") */
.parent { --focus: var(--violet); display: flex; flex-wrap: wrap; gap: 20px 26px; align-items: center; justify-content: space-between; padding: 28px; border-radius: var(--r-card); background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.parent p { font: 500 19px/1.5 var(--body); }
.parent .pill { box-shadow: none; }

/* ---------- Contact form ---------- */
.cform-card { --focus: var(--violet); --error: #B3261E; padding: 32px; border-radius: var(--r-card); background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.cform { display: grid; gap: 10px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font: 600 16px/1.3 var(--body); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; margin: 0; padding: 13px 16px; border: 1.5px solid var(--muted); border-radius: 14px; background: var(--white); color: var(--ink); font: 400 17px/1.4 var(--body); }
.field textarea { display: block; min-height: 160px; resize: vertical; }
/* Each field keeps one line for its error, so a message appearing never moves the button. The select has no error. */
.field select { margin-bottom: 29px; }
/* An error is the message under the field plus a heavier edge, never colour alone. */
.field [aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1.5px var(--error); }
.field-help, .cform-note { font: 400 15px/1.5 var(--body); color: var(--muted); }
.field-error { min-height: 21px; font: 600 15px/1.4 var(--body); color: var(--error); }
.cform-extra { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cform-send { justify-self: start; min-width: 200px; margin: 6px 0 8px; box-shadow: none; }
.cform-send:disabled { opacity: .6; cursor: default; transform: none; }
/* Message boxes: a full hairline border, a tinted ground, an icon and the text. */
.cform-msg { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--violet); border-radius: 14px; background: var(--tint); font: 600 17px/1.4 var(--body); }
.cform-msg .ico { margin-top: 1px; color: var(--violet); }
.cform-alert { margin-bottom: 22px; border-color: var(--error); background: #FDF0EE; }
.cform-alert .ico { color: var(--error); }
.cform-again { margin-top: 22px; background: var(--tint); color: var(--ink); }
.where { margin-top: 28px; display: flex; align-items: center; gap: 10px; font: 600 18px/1.3 var(--body); color: var(--soft); }

/* About: heading icons, rows of name and place with a leading icon */
.block-head h2 .ico { display: block; margin-bottom: 14px; color: var(--soft); }
.rows li { display: grid; grid-template-columns: var(--ico-m) 1fr; column-gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.rows li > .ico { grid-row: span 2; margin-top: 2px; color: var(--soft); }
.rows span .ico { margin-right: 6px; vertical-align: -4px; }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows b { display: block; font: 600 20px/1.3 var(--body); }
.rows span { display: block; margin-top: 6px; font: 400 13px/1.5 var(--mono); letter-spacing: .06em; color: var(--soft); }

/* Ventures */
.venture { background: var(--surface); border: 1px solid var(--surface-line); }
.venture .tag { margin-bottom: 16px; color: var(--soft); }
.venture h3 { display: flex; align-items: flex-start; gap: 12px; font: 600 28px/1.05 var(--display); letter-spacing: -.02em; }
.venture h3 .ico { margin-top: 4px; color: var(--soft); }
.page-end { margin-top: 8px; padding-top: 44px; border-top: 1px solid var(--line); }
.venture p { margin-top: 12px; font: 400 17px/1.5 var(--body); color: var(--soft); }

/* Blog index */
.post-list li { border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; }
/* Each row is one link: date, title, excerpt and a static arrow. */
.post-row { display: grid; grid-template: "meta title go" auto "meta text go" 1fr / 150px 1fr auto; gap: 8px 24px; min-height: 48px; margin: 0 -16px; padding: 34px 16px; border-radius: 24px; outline-offset: 0; text-decoration: none; }
.post-row-meta { grid-area: meta; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 8px; }
.post-row time { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1 var(--mono); letter-spacing: .06em; color: var(--soft); white-space: nowrap; }
.post-latest { padding: 6px 10px; border-radius: var(--r-pill); background: var(--spark); color: var(--ink); font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.post-row h2 { grid-area: title; font: 600 clamp(24px, 2.8vw, 36px)/1.05 var(--display); letter-spacing: -.02em; }
.post-row p { grid-area: text; font: 400 17px/1.55 var(--body); color: var(--soft); max-width: 62ch; }
.post-go { grid-area: go; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) {
  .post-row:hover { background: var(--glass); }
  .post-row:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .post-row:hover .post-go { background: var(--white); border-color: var(--white); color: var(--ink); }
}
.post-row:active { opacity: .7; }
@media (max-width: 860px) {
  .post-row { grid-template: "meta go" auto "title go" auto "text go" auto / 1fr auto; gap: 10px 14px; margin: 0 -12px; padding: 24px 12px; }
  .post-row-meta { flex-direction: row; align-items: center; padding-top: 0; }
  .post-go { width: 44px; height: 44px; }
}

/* Blog post: long-form prose */
.post-body { max-width: 620px; margin: 0 auto; padding-top: 42px; font: 400 19px/1.75 var(--body); }
.post-body > * + * { margin-top: 1.25em; }
.post-body h2, .post-body h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin-top: 2em; }
.post-body h2 { font-size: clamp(28px, 3vw, 38px); }
.post-body h3 { font-size: 24px; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body ul { list-style: disc; }
.post-body li + li { margin-top: .5em; }
.post-body li::marker { color: var(--soft); }
.post-body blockquote { padding: 24px 28px; border-radius: 24px; background: var(--well); border: 1px solid var(--line); font-weight: 500; }
.post-body blockquote > * + * { margin-top: 1em; }
.post-body cite { display: block; font: 400 13px/1.5 var(--mono); letter-spacing: .04em; color: var(--soft); }
.post-body figure { margin-top: 2em; margin-bottom: 2em; }
.post-body img { margin: 0 auto; border-radius: 20px; }
.post-body figcaption { margin-top: 10px; font: 400 13px/1.5 var(--mono); color: var(--soft); }
.post-body code { font: 400 .88em/1.5 var(--mono); color: var(--soft); }
.post-body pre { padding: 20px; border-radius: 20px; background: var(--well); border: 1px solid var(--line); overflow-x: auto; }
.post-body hr { height: 1px; border: 0; background: var(--line); margin: 2.5em 0; }
.post-foot { max-width: 620px; margin: 32px auto 0; }

/* Blog post: reading time, the way back, older and newer, reading progress */
.post-meta { flex-wrap: wrap; row-gap: 10px; }
.post-read { display: inline-flex; align-items: center; gap: 12px; }
.post-read::before { content: ''; flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--soft); }
.post-up { margin-top: 26px; }
.post-up .pill { min-height: 44px; padding: 10px 18px 10px 14px; background: var(--well); border: 1px solid var(--line); color: var(--white); }
.post-up .pill:hover { background: var(--well-hi); border-color: var(--white); }
.post-nav { max-width: 620px; margin: 64px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav a { display: flex; flex-direction: column; gap: 12px; min-height: 48px; padding: 22px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--surface-line); text-decoration: none; transition: transform 120ms ease-out; }
.post-nav .tag { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); }
.post-nav b { font: 600 20px/1.15 var(--display); letter-spacing: -.01em; }
.post-nav time { margin-top: auto; font: 400 13px/1 var(--mono); color: var(--soft); }
.post-newer { grid-column: 2; align-items: flex-end; text-align: right; }
.post-nav a:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .post-nav a:hover { border-color: var(--white); transform: translateY(-2px); }
}
@media (max-width: 860px) {
  .post-body { padding-top: 26px; font-size: 18px; line-height: 1.7; }
  .post-body blockquote { padding: 20px; }
  .post-nav { grid-template-columns: 1fr; margin-top: 48px; }
  .post-newer { grid-column: auto; }
}
/* Reading progress: fills while the article scrolls past, full when its end is on screen.
   CSS only. Browsers without scroll timelines, and reduced motion, show nothing. */
.read-progress { display: none; }
@keyframes read-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@supports (animation-timeline: scroll()) and (timeline-scope: --post) {
  @media (prefers-reduced-motion: no-preference) {
    .post-area { timeline-scope: --post; }
    .post-body { view-timeline: --post block; }
    .read-progress { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 11; height: 3px; background: var(--spark); pointer-events: none; transform-origin: left; animation: read-progress linear both; animation-timeline: --post; animation-range: contain 0% contain 100%; }
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  /* Header: brand, Contact pill, menu button, and the links as a sheet under the header */
  .nav-ask { display: none; }
  .nav-contact { padding: 14px 20px; }
  .nav-menu { display: inline-flex; width: 48px; padding: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--white); }
  .nav-menu:hover { background: var(--glass-hi); }
  .nav-links a { flex: none; }
  /* With script: hidden until the toggle sets data-open, then a sheet that opens from the button's corner.
     Browsers without allow-discrete drop the transition and show or hide it at once. */
  html.js .nav-links { display: none; opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; position: absolute; top: calc(100% + 10px); left: var(--gutter); right: var(--gutter); flex-direction: column; align-items: stretch; gap: 4px; padding: 10px; border-radius: var(--r-tile); background: var(--night); border: 1px solid var(--surface-line); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-deep); }
  /* data-moves is set on first use, so the sheet does not fade out while the page loads. */
  html.js .nav-links[data-moves] { transition: opacity .2s, transform .2s cubic-bezier(.23, 1, .32, 1), display .2s allow-discrete; }
  html.js .nav-links[data-open] { display: flex; opacity: 1; transform: none; }
  @starting-style { html.js .nav-links[data-open] { opacity: 0; transform: translateY(-8px) scale(.98); } }
  html.js .nav-links a, html.js .nav-links button { display: flex; gap: 14px; min-height: 48px; font-size: 17px; text-align: left; }
  html.js .nav-links .ico { display: block; }
  html.js .nav-links hr { display: block; width: auto; height: 1px; margin: 6px 18px; border: 0; background: var(--line); }
  /* Without script: the links stay visible as one scrolling row under the brand. */
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .nav-contact { display: none; }
  html:not(.js) .site-nav, html:not(.js) .nav-links { width: 100%; }
  html:not(.js) .nav-links { overflow-x: auto; }
  html:not(.js) .hero, html:not(.js) .page-hero { padding-top: 200px; }
  .ask-dialog { margin-top: 12px; }
  .ask-dialog-inner { padding: 16px 16px 20px; }
  .brand { font-size: 20px; }
  .brand img { height: 40px; }

  /* Home */
  .hero { min-height: 0; padding: 124px 0 96px; background: linear-gradient(100deg, var(--panel-clear) 0 72%, var(--panel) 72% 100%), linear-gradient(170deg, var(--ground-top) 0%, var(--ground) 100%); }
  .hero-art { height: 640px; top: 44px; right: -206px; opacity: .7; }
  .hero-name { margin-top: 20px; }
  .hero-tagline { font-size: 18px; flex-direction: column; gap: 4px; margin-top: 24px; }
  .hero-tagline li + li::before { display: none; }
  .ask { margin-top: 32px; }
  .ask-bar { height: 48px; padding-left: 22px; }
  .ask-bar input { font-size: 17px; }
  .go { width: 48px; height: 48px; }
  .scroll-hint { display: none; }
  .ticker { top: 28px; padding: 14px 0; }
  .ticker li { font-size: 24px; gap: 28px; }
  .ticker ul { gap: 28px; }
  .story { padding: 110px 0 120px; }
  .story-grid, .block { display: block; }
  .story-text { margin-top: 22px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .stat:first-child { grid-column: span 2; }
  .paths { margin-top: -40px; padding: 64px 0 72px; border-radius: 36px 36px 0 0; }
  .paths-head { display: block; }
  .paths-head p { margin-top: 16px; }
  .bento { display: flex; flex-direction: column; gap: 16px; }
  .card { min-height: 0; padding: 26px; border-radius: var(--r-tile); }
  .card .arrow { margin-top: 26px; }
  .card-edu .mark { height: 380px; right: -110px; top: -30px; opacity: .13; }
  .posts li { flex-direction: column; gap: 6px; }
  .motto { padding: 84px 0; }
  .motto-grid { display: block; }
  .motto-mark { width: 150px; margin-bottom: 30px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .foot-nav { align-items: flex-start; }
  .foot-links { margin-left: -14px; }

  /* Inner pages */
  .page-hero { padding: 130px 0 64px; background: linear-gradient(100deg, var(--panel-clear) 0 72%, var(--panel) 72% 100%), linear-gradient(170deg, var(--ground-top) 0%, var(--ground) 100%); }
  .page-hero .hero-art { height: 560px; top: 30px; right: -190px; opacity: .55; }
  .page-hero-solo { min-height: 78vh; }
  .block { padding: 52px 0; }
  .block-body { margin-top: 26px; }
  .prose p { font-size: 18px; line-height: 1.7; }
  .prose p.pull { font-size: 26px; line-height: 1.2; }
  .facts { grid-template-columns: 1fr; }
  .fact { display: flex; align-items: center; gap: 14px; }
  .fact svg { margin: 0; flex: none; }
  .exams, .ventures { grid-template-columns: 1fr; }
  .exam { min-height: 0; }
  .parent { padding: 24px; }
  .cform-card { padding: 22px; border-radius: var(--r-tile); }
  .cform-send { width: 100%; }
  .rows b { font-size: 18px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* The menu sheet still fades, without moving. */
  html.js .nav-links { transform: none !important; }
  html.js .nav-links[data-moves] { transition: opacity .2s, display .2s allow-discrete !important; }
}
