/* ==========================================================================
   rubelmollik.com — Rubel Hassan Mollik
   ---------------------------------------------------------------------------
   Direction: modern classic. The bones are borrowed from a printed title page
   — a double rule, a drop cap, letterspaced small caps, a portrait in an
   offset frame. The surface treatment is current: elevated cards on a tinted
   ground, generous radii, soft layered shadows, a blurred sticky masthead.

   Type    Newsreader (display) — a transitional serif with classical
           proportions and a contemporary cut, on a variable optical-size axis
           so large settings tighten correctly.
           Atkinson Hyperlegible (body) — drawn by the Braille Institute with
           deliberately disambiguated letterforms for low-vision readers.
   Colour  Warm paper, near-black ink, one deep forest green. Every text pair
           measured: the lowest ratio on the site is 5.79:1 against AA's 4.5.
   Motion  Short, small, and removed entirely under prefers-reduced-motion.
   JS      None anywhere.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */

:root {
  /* Surfaces & ink */
  --paper:      #FAF8F4;
  --surface:    #FFFFFF;
  --ink:        #14181A;  /* 16.84:1 on paper */
  --muted:      #59636B;  /*  5.79:1 */
  --accent:     #14532D;  /*  8.59:1 */
  --accent-2:   #1B6E3F;  /*  5.91:1 */
  --accent-ink: #E8F1EB;
  --wash:       rgba(20, 83, 45, 0.055);
  --line:       #E4E0D8;
  --line-soft:  #EFECE5;
  --focus:      #00853E;
  --masthead:   rgba(250, 248, 244, 0.82);

  --shadow-1: 0 1px 2px rgba(20,24,26,.05), 0 1px 3px rgba(20,24,26,.04);
  --shadow-2: 0 2px 4px rgba(20,24,26,.05), 0 14px 30px -14px rgba(20,24,26,.20);
  --shadow-3: 0 4px 10px rgba(20,24,26,.07), 0 28px 56px -26px rgba(20,24,26,.28);

  /* Type */
  --font-display: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body:    "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
                  Menlo, Consolas, "Liberation Mono", monospace;

  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0:  1.0625rem;
  --step-1:  1.1875rem;
  --step-2:  clamp(1.5rem,  1.25rem + 1.05vw, 2rem);
  --step-3:  clamp(2rem,    1.55rem + 2.1vw,  2.9rem);
  --step-4:  clamp(2.375rem, 1.7rem + 3.1vw,  3.25rem);

  /* Space */
  --s-1: 0.5rem;
  --s-2: 0.875rem;
  --s-3: 1.25rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;

  /* Layout */
  --wrap:    52rem;
  --measure: 38rem;
  --radius:  14px;
  --radius-s: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0E1113;
    --surface:    #161A1D;
    --ink:        #ECEAE5;  /* 15.76:1 */
    --muted:      #A5AEB5;  /*  8.41:1 */
    --accent:     #86D3A5;  /* 10.71:1 */
    --accent-2:   #A8E3C0;  /* 13.01:1 */
    --accent-ink: #0E1A14;
    --wash:       rgba(134, 211, 165, 0.05);
    --line:       #272D31;
    --line-soft:  #1E2427;
    --focus:      #4BC57E;
    --masthead:   rgba(14, 17, 19, 0.82);

    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 2px 4px rgba(0,0,0,.35), 0 14px 30px -14px rgba(0,0,0,.7);
    --shadow-3: 0 4px 10px rgba(0,0,0,.4),  0 28px 56px -26px rgba(0,0,0,.8);
  }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --line: var(--ink); --line-soft: var(--ink); }
}

/* ----------------------------------------------------------- 2. Foundation */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* clears the sticky masthead on anchor jumps */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(58rem 34rem at 50% -14rem, var(--wash), transparent 72%);
  background-repeat: no-repeat;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-underline-offset: 0.18em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--surface); }

/* --------------------------------------------------------- 3. Skip to main */

.skip-link {
  /* Fixed, not absolute: the masthead is sticky, so an absolutely positioned
     skip link would sit off-screen if it took focus after scrolling. */
  position: fixed;
  left: var(--s-3);
  top: var(--s-3);
  z-index: 200;
  transform: translateY(-250%);
  padding: 0.7em 1.2em;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-3);
  transition: transform 160ms ease-out;
}

.skip-link:focus { transform: translateY(0); }

/* -------------------------------------------------------------- 4. Wrapper */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-3);
}

@media (min-width: 40em) { .wrap { padding-inline: var(--s-4); } }

/* ------------------------------------------------------------- 5. Masthead */

.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--masthead);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  padding-block: var(--s-3);
}

/* Only pin it when there is vertical room to spare — a stuck header eats the
   viewport for anyone at high zoom. */
@media (min-height: 34rem) {
  .site-header { position: sticky; top: 0; }
}

.site-header > .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
}

.site-header__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
}

.site-header__name:hover { color: var(--accent); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 0.35rem 0.7rem;   /* target size >= 24px (WCAG 2.2 SC 2.5.8) */
  min-height: 24px;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--step--1);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.site-nav a:hover { color: var(--ink); background: var(--line-soft); }

/* Current page is marked by weight, fill and a rule — never colour alone. */
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  background: var(--wash);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ----------------------------------------------------------------- 6. Main */

main { display: block; padding-block: var(--s-5) var(--s-7); }

@media (min-width: 40em) { main { padding-block: var(--s-6) var(--s-7); } }

/* ----------------------------------------------------------- 7. Typography */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.018em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }

p, ul, ol, dl, blockquote, figure, pre, table { margin: 0 0 var(--s-3); }
p, li { max-width: var(--measure); }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }

strong { font-weight: 700; }

/* Letterspaced mono carries every piece of metadata on the site. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s-3);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.eyebrow a { color: inherit; }

/* The classic double rule — thick over thin, as set on a printed title page. */
.rule-double {
  width: 100%;
  height: 0;
  margin: var(--s-3) 0 0;
  border: 0;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-top: 3px;
  opacity: 0.9;
}

.rule-accent {
  width: 3.5rem;
  height: 3px;
  margin: var(--s-2) 0 0;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
}

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Drop cap. Purely visual — the letter stays in the text for screen readers. */
.dropcap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.5em;
  line-height: 0.8;
  padding: 0.07em 0.09em 0 0;
  color: var(--accent);
}

/* ----------------------------------------------------------- 8. Page title */

.page-head { margin-bottom: var(--s-6); }
.page-head h1 { font-size: var(--step-3); }
.page-head > p { color: var(--muted); margin-top: var(--s-4); }
.page-head .linkrow { margin-top: var(--s-4); }

/* ---------------------------------------------------- 8a. Publication page */

.publication-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
}

.publication-breadcrumb a { color: var(--accent); }
.publication-page__head { padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.publication-page__head h1 { max-width: 48rem; margin-top: var(--s-2); font-size: clamp(2rem, 5.2vw, 3.4rem); }
.publication-page__authors { margin-top: var(--s-4); color: var(--muted); font-size: var(--step-1); }
.publication-page__authors strong { color: var(--ink); }
.publication-page__venue { margin-top: var(--s-2); color: var(--muted); font-family: var(--font-display); font-size: var(--step-0); font-style: italic; }
.publication-page__head .linkrow { margin-top: var(--s-4); }
.publication-page .section { margin-top: var(--s-6); }
.publication-abstract p { margin-top: var(--s-3); font-size: var(--step-0); line-height: 1.75; }

/* ----------------------------------------------------------------- 9. Hero */

/* Name lockup left, portrait right, so the display type fills the column
   instead of leaving a dead gutter beside a stacked photo. */
.hero__id {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-4) var(--s-5);
}

.hero__portrait { width: clamp(132px, 15vw, 190px); aspect-ratio: 1; }

/* Below the breakpoint the two would fight for width: stack, portrait first. */
@media (max-width: 46em) {
  .hero__id { grid-template-columns: 1fr; justify-items: start; }
  .hero__portrait { order: -1; }
}

.hero__photo {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}

.hero__name {
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.033em;
}

.hero__role {
  margin: var(--s-3) 0 0;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.8;
  color: var(--muted);
  /* No max-width: this is 12px letterspaced mono, so an em-based cap here is
     far narrower than it looks and breaks the line in the wrong place. */
}

.hero__bio { margin-top: var(--s-5); }
.hero__bio p + p { margin-top: var(--s-3); }
.hero__bio .lede { margin-bottom: var(--s-4); }

/* ------------------------------------------------------------- 10. Section */

.section { margin-top: var(--s-7); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-3);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}

.section__head h2 { margin: 0; }
.section__more { font-size: var(--step--1); white-space: nowrap; }

.section > h3 { margin-top: var(--s-4); }
.section > h3 + p { margin-top: var(--s-2); }

/* ------------------------------------------------- 11. Entry cards */
/* Every dated thing on the site — papers, roles, awards, posts — is one of
   these. The year sits as a mono eyebrow; the accent bar on the left edge
   appears on hover and on keyboard focus within.                            */

.entries {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  position: relative;
  overflow: hidden;
  /* These cards are <li>, so they inherit the global prose measure. The card
     spans the column; the paragraphs inside it keep the measure. */
  max-width: none;
  padding: var(--s-4) var(--s-4) var(--s-4) calc(var(--s-4) + 3px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 240ms cubic-bezier(0.2, 0, 0.2, 1);
}

.entry:hover,
.entry:focus-within {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.entry:hover::before,
.entry:focus-within::before { transform: scaleY(1); }

.entry__year {
  margin: 0 0 var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.entry__body { /* structural only; the card carries the styling */ }

.entry__title {
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.014em;
  margin: 0;
}

.entry__title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 260ms cubic-bezier(0.2, 0, 0.2, 1), color 200ms ease;
}

.entry__title a:hover { color: var(--accent); background-size: 100% 1.5px; }

.entry__authors,
.entry__venue,
.entry__note {
  margin: var(--s-1) 0 0;
  font-size: var(--step--1);
  color: var(--muted);
  max-width: var(--measure);
}

.entry__venue { font-family: var(--font-display); font-style: italic; font-size: var(--step-0); }
.entry__authors .me { color: var(--ink); font-weight: 700; }

.entry ul:not(.entry__links) {
  margin: var(--s-2) 0 0;
  padding-left: 1.15rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.entry ul:not(.entry__links) li { margin-bottom: 0.35rem; }
.entry ul:not(.entry__links) li::marker { color: var(--accent); }

.entry__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  margin: var(--s-3) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.entry__links li { max-width: none; }

.entry__links a {
  display: inline-block;
  min-height: 24px;
  padding-block: 0.15rem;
  font-weight: 700;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

.entry__links a:hover { text-decoration-color: currentColor; }

/* Publication reading and citation controls. The citation uses native
   details/summary behavior, so its BibTeX remains available without JS. */
.publication-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.publication-tool,
.citation > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .48rem .9rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease,
              border-color 160ms ease, transform 160ms ease;
}

.publication-tool {
  background: var(--accent);
  color: var(--accent-ink);
}

.publication-tool:hover {
  transform: translateY(-1px);
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: var(--accent-ink);
}

.citation { max-width: 100%; }

.citation > summary {
  background: transparent;
  color: var(--accent);
  list-style: none;
}

.citation > summary::-webkit-details-marker { display: none; }
.citation > summary::before { content: "{ }"; margin-right: .45rem; font-weight: 500; }
.citation > summary:hover { background: var(--wash); color: var(--accent-2); }
.citation[open] { flex-basis: 100%; }
.citation[open] > summary { width: fit-content; margin-bottom: var(--s-2); background: var(--wash); }

.citation__panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper);
}

.citation__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: .55rem .65rem .55rem .9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
}

.citation__head button {
  min-height: 34px;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 700 var(--step--2)/1 var(--font-mono);
  cursor: pointer;
}

.citation__head button:hover { border-color: var(--accent); color: var(--accent); }

.citation__panel pre {
  max-height: 19rem;
  margin: 0;
  padding: var(--s-3);
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  color: var(--ink);
  font-size: .75rem;
  line-height: 1.55;
  white-space: pre;
}

.citation__panel code { font-family: var(--font-mono); }

/* ------------------------------------------------------------ 12. Tag pill */
/* Status always reads as a word. Colour is reinforcement, never the message. */

.tag {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.15em 0.65em;
  border: 1px solid var(--line);   /* fallback if color-mix is unsupported */
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  background: var(--wash);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  vertical-align: 0.12em;
  white-space: nowrap;
}

/* ------------------------------------------------------------ 13. Link row */

.linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}

.linkrow li { max-width: none; }

.linkrow a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease,
              border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.linkrow a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-2);
  color: var(--accent);
  background: var(--surface);
}

/* First pill in a row reads as the primary action. */
.linkrow--lead li:first-child a {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.linkrow--lead li:first-child a:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--accent-ink);
}

/* -------------------------------------------------------- 14. Contact list */

.contact-list { margin: 0; display: grid; gap: 0; }

.contact-list > div {
  display: grid;
  gap: 0.15rem var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
}

.contact-list > div:first-child { padding-top: 0; }
.contact-list > div:last-child { border-bottom: 0; }

@media (min-width: 36em) {
  .contact-list > div { grid-template-columns: 7rem 1fr; align-items: baseline; }
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list dd { margin: 0; }

.contact-list dd .note {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* --------------------------------------------------------- 15. Focus cards */
/* The three research areas on the home page.                                */

/* Three columns of ~230px would cramp the text and is the stock "feature
   cards" pattern anyway. These run full width instead, with the heading held
   in a left column against the description — a definition list in card form. */

.focus-grid {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.focus {
  max-width: none;   /* <li>, same reason as .entry */
  display: grid;
  gap: 0.4rem var(--s-5);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

@media (min-width: 44em) {
  .focus { grid-template-columns: 13.5rem 1fr; align-content: start; }
  .focus__mark { grid-column: 1; grid-row: 1; }
  .focus h3    { grid-column: 1; grid-row: 2; }
  .focus p     { grid-column: 2; grid-row: 1 / span 2; }
}

.focus h3 {
  font-size: var(--step-1);
  line-height: 1.25;
  text-wrap: balance;
}

.focus p { font-size: var(--step--1); color: var(--muted); max-width: 34em; }

.focus__mark {
  display: block;
  width: 1.75rem;
  height: 3px;
  margin-bottom: 0.35rem;
  border-radius: 2px;
  background: var(--accent);
}

/* ------------------------------------------------------------- 16. Callout */

.callout {
  margin: var(--s-4) 0 0;
  padding: var(--s-4);
  background: var(--wash);
  border: 1px solid var(--line);   /* fallback if color-mix is unsupported */
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

.callout > :first-child { margin-top: 0; }
.callout p { font-size: var(--step--1); }

/* --------------------------------------------------------- 17. Empty state */

.empty {
  margin-top: var(--s-4);
  padding: var(--s-6) var(--s-4);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty p { margin-inline: auto; color: var(--muted); }

/* ------------------------------------------------------------ 18. Quotebar */
/* One pull-quote block, used once on the home page.                          */

.statement {
  margin-top: var(--s-7);
  padding: var(--s-5) var(--s-4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.statement p {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.15rem + 1.1vw, 1.875rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0 auto;
  max-width: 30ch;
  text-wrap: balance;
}

/* ---------------------------------------------------------- 19. Blog prose */

.prose h2 { margin-top: var(--s-6); margin-bottom: var(--s-3); }
.prose h3 { margin-top: var(--s-5); margin-bottom: var(--s-2); }
.prose li { margin-bottom: var(--s-1); }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li::marker { color: var(--accent); }

.prose blockquote {
  margin: var(--s-4) 0;
  padding: var(--s-1) 0 var(--s-1) var(--s-4);
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  color: var(--muted);
}

.prose pre {
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-1);
  overflow-x: auto;
  font-size: var(--step--1);
  line-height: 1.6;
}

.prose code { font-family: var(--font-mono); font-size: 0.9em; }

.prose :not(pre) > code {
  padding: 0.14em 0.4em;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.prose pre code { padding: 0; background: none; border: 0; }

.prose figure { margin: var(--s-4) 0; }
.prose figure img { border-radius: var(--radius-s); box-shadow: var(--shadow-2); }

.prose figcaption {
  margin-top: var(--s-2);
  font-size: var(--step--1);
  color: var(--muted);
}

.post-meta {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-nav {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
}

/* --------------------------------------------------------------- 20. Table */

.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
}

table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }

caption {
  text-align: left;
  color: var(--muted);
  font-size: var(--step--1);
  padding: var(--s-3) var(--s-4) var(--s-2);
}

th, td { text-align: left; padding: 0.7rem var(--s-4); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--wash); font-weight: 700; border-bottom-color: var(--line); }
tbody tr:last-child td { border-bottom: 0; }

kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.2em 0.5em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
  white-space: nowrap;
}

/* -------------------------------------------------------------- 21. Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: var(--s-5);
  font-size: var(--step--1);
  color: var(--muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-4);
  margin: 0 0 var(--s-4);
  padding: 0;
  list-style: none;
}

.site-footer__links li { max-width: none; }

.site-footer__links a {
  display: inline-block;
  min-height: 24px;
  padding-block: 0.2rem;
  color: var(--muted);
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
}

.site-footer__links a:hover { color: var(--accent); text-decoration-color: currentColor; }
.site-footer p { margin: 0; font-size: var(--step--2); max-width: none; }
.site-footer p + p { margin-top: var(--s-1); }

/* ------------------------------------------------------------- 22. On load */

@media (prefers-reduced-motion: no-preference) {
  .settle { animation: settle 520ms cubic-bezier(0.2, 0, 0.2, 1) both; }
  .settle-2 { animation-delay: 90ms; }
  .settle-3 { animation-delay: 170ms; }

  @keyframes settle {
    from { opacity: 1; transform: translateY(0.75rem); }
    to   { opacity: 1; transform: none; }
  }
}

/* ------------------------------------------------------------- 23. Utility */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============================================================================
   PROGRESSIVE ENHANCEMENT
   Everything below is layered on by js/site.js. Without JavaScript the page
   is complete: reveals stay visible, the questions stay as plain jump links,
   and the two fixed bars simply never appear.
   ========================================================================== */

/* ------------------------------------------------------- 24. Scroll progress */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 90;
  background: transparent;
  pointer-events: none;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 90ms linear;
}

@media (prefers-reduced-motion: reduce) {
  .progress__bar { transition: none; }
}

/* --------------------------------------------------------- 25. Scroll reveal */

/* Driven by the scroll position through a CSS view() timeline — no script and
   no observer involved.

   This is deliberately NOT done in JavaScript. A missed callback in an
   observer leaves real content stranded at opacity 0, which is a far worse
   outcome than no animation. Here the hidden state exists only inside
   @supports: a browser without scroll timelines never applies the rule and
   simply shows everything, and so does anyone who asked for reduced motion. */

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .entry,
    .focus,
    .statement,
    .empty,
    .ama__thread,
    .table-scroll {
      animation: reveal-in linear both;
      animation-timeline: view();
      /* Entry-relative on both ends, and finished well before the element is
         fully on screen. A range that ends in the `cover` phase can strand the
         last element on a page that cannot scroll far enough to complete it. */
      animation-range: entry 5% entry 55%;
    }
  }
}

/* ------------------------------------------------- 26. Focus announcer bar */
/* Mirrors what a screen reader would say about the focused element. Hidden
   from assistive technology itself (aria-hidden) so it never double-speaks —
   it is a window onto the experience for people who do not use a screen
   reader, and a live check for the person maintaining the site.            */

.announcer {
  position: fixed;
  left: 50%;
  bottom: var(--s-3);
  translate: -50% 0;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  max-width: min(46rem, calc(100vw - 2rem));
  padding: 0.7rem 0.75rem 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  box-shadow: var(--shadow-3);
  font-size: var(--step--1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

.announcer.is-on { opacity: 1; visibility: visible; transform: none; }

.announcer__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-right: 1px solid rgba(255,255,255,.22);
  padding-right: var(--s-3);
}

.announcer__text {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcer__close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: var(--paper);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.announcer__close:hover { background: rgba(255,255,255,.24); }

@media (max-width: 40em) {
  .announcer__label { display: none; }
}

/* ---------------------------------------------------- 27. Ask me anything */

.ama__intro { color: var(--muted); margin-bottom: var(--s-4); }

.ama__score {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ama__thread { display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }
.ama__thread:empty { margin-bottom: 0; }

.ama__turn { display: grid; gap: var(--s-2); }

.ama__q,
.ama__a {
  max-width: 90%;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  font-size: var(--step--1);
  line-height: 1.6;
}

.ama__q {
  justify-self: end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 4px;
  font-weight: 700;
}

.ama__a {
  justify-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-1);
  color: var(--ink);
}

.ama__a p { max-width: none; margin: 0; }
.ama__a p + p { margin-top: var(--s-2); }
.ama__a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.ama__go {
  display: inline-block;
  margin-top: var(--s-2);
  font-weight: 700;
  font-size: var(--step--1);
}

.ama__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.ama__chips li { max-width: none; }

.ama__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step--1);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease,
              border-color 180ms ease, color 180ms ease;
}

.ama__chip::before {
  content: "?";
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.ama__chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-2);
  color: var(--accent);
}

/* Answered questions stay visible but step back — progress you can see. */
.ama__chip[data-asked] {
  opacity: 0.55;
  box-shadow: none;
  background: transparent;
}

.ama__chip[data-asked]::before { content: "\2713"; }

.ama__done {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  background: var(--wash);
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: var(--step--1);
}

/* Section the reader was just sent to, briefly marked so they land oriented. */
@keyframes landed {
  from { background: var(--wash); }
  to   { background: transparent; }
}

.is-landed { animation: landed 1600ms ease-out; border-radius: var(--radius-s); }

@media (prefers-reduced-motion: reduce) {
  .is-landed { animation: none; }
}

/* --------------------------------------------------------------- 28. Print */

@media print {
  :root {
    --paper: #fff; --surface: #fff; --ink: #000; --muted: #333;
    --accent: #000; --accent-2: #000; --line: #bbb; --line-soft: #ddd;
    --shadow-1: none; --shadow-2: none; --shadow-3: none; --wash: transparent;
  }
  body { background-image: none; font-size: 11pt; }
  .site-nav, .skip-link, .linkrow, .site-footer__links, .publication-tools,
  .statement, .progress, .announcer, .ama__chips, .ama__intro { display: none; }
  /* Never let a scroll-driven animation decide what reaches paper. */
  .entry, .focus, .empty, .ama__thread, .table-scroll {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .site-header { position: static; }
  .entry, .focus, .section { break-inside: avoid; box-shadow: none; }
  a { text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
}

/* ========================================================================== 
   HOME — RESEARCH EXPEDITION
   A bolder, keyboard-friendly narrative layer. Kept under .home-page so the
   long-form CV, research, and blog pages retain their quiet reading layout.
   ========================================================================== */

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.home-page {
  --home-ink: #101a1d;
  --home-night: #0d191a;
  --home-night-2: #132527;
  --home-paper: #f5f3ec;
  --home-card: #fffdf7;
  --home-lime: #c9f65a;
  --home-mint: #75d6b2;
  --home-coral: #c84f3a;
  --home-line: #d8d8cb;
  overflow-x: clip;
  background: var(--home-paper);
}

.home-page main { padding: 0; }
.home-page .home-wrap { max-width: 76rem; padding-inline: clamp(1.25rem, 4vw, 3.5rem); }
.home-page h1,
.home-page h2,
.home-page h3 { font-family: var(--font-body); }
.home-page h2 { font-size: clamp(2.25rem, 4.8vw, 4.6rem); line-height: .98; letter-spacing: -.055em; }
.home-page h3 { letter-spacing: -.025em; }
.home-page svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-page :focus-visible { outline-color: #176a50; }
.home-page .home-hero :focus-visible,
.home-page .contact-chapter :focus-visible,
.home-page .assistant-head :focus-visible { outline-color: var(--home-lime); }

.home-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 60;
  border: 0;
  padding-block: 1.15rem;
  background: transparent;
  color: #f7faf5;
  backdrop-filter: none;
}

@media (min-height: 34rem) { .home-header { position: absolute; } }

.home-header .site-header__name { display: inline-flex; align-items: center; color: #fff; gap: 1rem; font-family: var(--font-body); font-size: .92rem; letter-spacing: -.01em; text-transform: none; }
.brand-mark { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: var(--home-lime); font-family: var(--font-mono); font-size: .7rem; letter-spacing: -.08em; }
.home-header .site-nav a { color: rgba(255,255,255,.72); font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em; }
.home-header .site-nav a[aria-current] { color: #fff; }
.home-header .site-nav a:hover,
.home-header .site-nav a:focus-visible { background: var(--home-lime); color: #142013; }
.home-header .site-nav a::after { background: var(--home-lime); }
.home-header .site-nav .nav-cta { padding: .58rem .9rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff; }
.home-header .site-nav .nav-cta:hover,
.home-header .site-nav .nav-cta:focus-visible { border-color: var(--home-lime); background: var(--home-lime); color: #142013; }
.home-header .site-nav .nav-cta::after { display: none; }

.home-hero {
  position: relative;
  min-height: min(58rem, 100svh);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 7.5rem 0 6.5rem;
  color: #f8fbf6;
  background:
    radial-gradient(circle at 92% 18%, rgba(117,214,178,.2), transparent 26rem),
    linear-gradient(135deg, var(--home-night) 0%, #0d1d20 60%, #153235 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .13;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: linear-gradient(90deg, #000, transparent 70%);
}

.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(20rem, .88fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center; }
.hero-copy { position: relative; z-index: 2; padding-top: 1rem; }
.terminal-line { display: inline-flex; gap: .65rem; align-items: center; margin-bottom: clamp(2rem, 5vh, 4rem); color: var(--home-lime); font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; }
.terminal-line span { font-size: .55rem; }
.hero-kicker { display: flex; width: max-content; max-width: 100%; align-items: center; gap: clamp(.4rem, .8vw, .65rem); margin-bottom: .8rem; color: rgba(255,255,255,.65); font-family: var(--font-mono); font-size: clamp(.68rem, .85vw, .76rem); letter-spacing: .07em; line-height: 1.5; text-transform: uppercase; white-space: nowrap; }
.hero-kicker__separator { flex: none; color: var(--home-coral); }
.hero-copy h1 { max-width: 10ch; color: #fff; font-size: clamp(3.65rem, 7.1vw, 7rem); line-height: .88; letter-spacing: -.075em; text-wrap: balance; }
.hero-copy h1 em { display: block; color: var(--home-lime); font-family: var(--font-display); font-weight: 400; }
.hero-intro { max-width: 34rem; margin-top: 1.8rem; color: rgba(255,255,255,.76); font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .7rem; padding: .78rem 1.15rem; border: 1px solid transparent; border-radius: .55rem; font: 700 .82rem/1 var(--font-mono); text-decoration: none; cursor: pointer; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button--primary { background: var(--home-lime); color: #142013; }
.button--primary:hover { background: #dcff82; color: #142013; }
.button--ghost { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.05); color: #fff; }
.button--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.journey-hint { margin-top: 1.7rem; color: rgba(255,255,255,.7); font-family: var(--font-mono); font-size: .66rem; }
.journey-hint kbd { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; }
.journey-hint span { margin-inline: .35rem; }

.portrait-stage { position: relative; justify-self: stretch; min-height: clamp(27rem, 56vw, 39rem); }
.portrait-frame { position: absolute; inset: 3% 3% 3% 6%; margin: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 1.75rem; background: var(--home-night-2); box-shadow: 0 40px 90px rgba(0,0,0,.35); transform: rotate(1.5deg) scale(.9); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 56%, rgba(5,14,15,.74)); pointer-events: none; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; filter: saturate(.85) contrast(1.03); }
.portrait-frame figcaption { position: absolute; z-index: 2; bottom: 1rem; left: 1rem; display: flex; align-items: center; gap: .5rem; margin: 0; padding: .52rem .75rem; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(7,18,19,.62); backdrop-filter: blur(10px); color: rgba(255,255,255,.8); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .05em; }
.status-dot { width: .46rem; height: .46rem; border-radius: 50%; background: var(--home-lime); box-shadow: 0 0 0 4px rgba(201,246,90,.12); }
.portrait-orbit { position: absolute; border: 1px solid rgba(201,246,90,.24); border-radius: 50%; }
.portrait-orbit--one { inset: -1% -8% 2% 0; transform: rotate(17deg); }
.portrait-orbit--two { inset: 8% -2% 8% -8%; transform: rotate(-12deg); border-color: rgba(117,214,178,.18); }
.portrait-note { position: absolute; z-index: 3; display: flex; align-items: baseline; gap: .45rem; padding: .65rem .8rem; border: 1px solid rgba(255,255,255,.22); background: rgba(13,25,26,.78); backdrop-filter: blur(12px); color: rgba(255,255,255,.66); font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; transform: scale(.8); }
.portrait-note span { color: var(--home-lime); font-size: 1rem; font-weight: 700; }
.portrait-note--top span { text-transform: none; }
.portrait-note--top { top: 15%; right: -15%; transform-origin: right center; }
.portrait-note--bottom { bottom: 24%; left: -2%; transform-origin: left center; }

.social-launchpad { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); }
.social-launchpad > p { flex: 1; margin: 0; color: rgba(255,255,255,.68); font-family: var(--font-mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; }
.social-launchpad ul { display: flex; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.social-launchpad li { max-width: none; }
.social-launchpad a { position: relative; display: grid; place-items: center; width: 2.85rem; height: 2.85rem; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; color: rgba(255,255,255,.68); text-decoration: none; transition: transform 180ms ease, border 180ms ease, color 180ms ease, background 180ms ease; }
.social-launchpad a:hover,
.social-launchpad a:focus-visible { transform: translateY(-3px) rotate(-3deg); border-color: var(--home-lime); background: var(--home-lime); color: var(--home-night); }
.social-launchpad a span { position: absolute; left: 50%; bottom: calc(100% + .5rem); transform: translate(-50%, .25rem); padding: .3rem .5rem; border-radius: .25rem; background: #fff; color: var(--home-night); font-family: var(--font-mono); font-size: .58rem; opacity: 0; visibility: hidden; transition: 160ms ease; }
.social-launchpad a:hover span,
.social-launchpad a:focus-visible span { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.scroll-cue { position: fixed; z-index: 30; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; display: grid; width: 3rem; height: 3rem; place-items: center; translate: -50% 0; border: 1px solid var(--home-lime); border-radius: 50%; background: rgba(13,25,26,.82); color: var(--home-lime); box-shadow: 0 8px 28px rgba(0,0,0,.24); text-decoration: none; transition: opacity 180ms ease, visibility 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease; }
.scroll-cue:hover,
.scroll-cue:focus-visible { background: var(--home-lime); color: #142013; transform: translateY(3px); }
.scroll-cue.is-dismissed { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(.75rem); }
.scroll-cue svg { width: 1.3rem; height: 1.3rem; }

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue svg { animation: scroll-cue-invite 1.4s ease-in-out 3; }
  @keyframes scroll-cue-invite { 50% { transform: translateY(.25rem); } }
}

.journey-shell { position: relative; display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); }
.journey-map { position: sticky; top: 1.5rem; align-self: start; height: fit-content; margin-top: 7rem; padding: 1.2rem 0; }
.journey-map__label { margin: 0 0 1.1rem; color: #596663; font: .65rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.journey-map ol { position: relative; display: grid; gap: 0; margin: 0; padding: 0 0 0 1rem; list-style: none; }
.journey-map ol::before { content: ""; position: absolute; inset: .9rem auto .9rem 0; width: 1px; background: var(--home-line); }
.journey-map li { max-width: none; }
.journey-map a { position: relative; display: flex; gap: .7rem; padding: .62rem 0; color: #596663; font-size: .75rem; text-decoration: none; transition: color 160ms ease, transform 160ms ease; }
.journey-map a::before { content: ""; position: absolute; top: 1.06rem; left: -1.19rem; width: .42rem; height: .42rem; border: 2px solid var(--home-paper); border-radius: 50%; background: #aeb7b3; box-shadow: 0 0 0 1px #aeb7b3; }
.journey-map a span { font-family: var(--font-mono); font-size: .62rem; }
.journey-map a:hover,
.journey-map a[aria-current="location"] { transform: translateX(.15rem); color: var(--home-ink); font-weight: 700; }
.journey-map a[aria-current="location"]::before { background: var(--home-coral); box-shadow: 0 0 0 1px var(--home-coral), 0 0 0 5px rgba(255,128,102,.15); }
.journey-map a[data-visited]::before { background: #1e8565; box-shadow: 0 0 0 1px #1e8565; }
.journey-score { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--home-line); color: #596663; font-size: .7rem; }
.journey-score span { display: block; color: var(--home-ink); font: 700 1.05rem/1 var(--font-mono); margin-bottom: .25rem; }

.journey-content { min-width: 0; }
.chapter { position: relative; scroll-margin-top: 2rem; padding-block: clamp(6.5rem, 12vw, 10rem); border-bottom: 1px solid var(--home-line); }
.chapter-label { display: flex; gap: .8rem; align-items: center; margin-bottom: 2.4rem; color: #596663; font: .68rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.chapter-label span { padding: .42rem .58rem; border: 1px solid #bbc4be; border-radius: 999px; color: var(--home-ink); font-weight: 700; }
.story-grid { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.story-grid h2 em { color: #27795f; font-family: var(--font-display); font-weight: 400; }
.story-grid .lede { font-family: var(--font-body); font-size: 1.18rem; font-weight: 700; line-height: 1.52; }
.story-grid p { color: #52605d; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; margin-top: .8rem; color: var(--home-ink); font: 700 .78rem/1.3 var(--font-mono); text-decoration-color: #95a19b; }
.text-link:hover { color: #176a50; }
.text-link svg { width: 1rem; transition: transform 160ms ease; }
.text-link:hover svg { transform: translateX(.25rem); }
.principle-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 4rem; border: 1px solid var(--home-line); background: var(--home-card); }
.principle-strip span { padding: 1rem .8rem; border-right: 1px solid var(--home-line); font: .68rem/1.2 var(--font-mono); text-align: center; text-transform: uppercase; }
.principle-strip span:last-child { border-right: 0; }

.chapter-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; }
.chapter-heading h2 { max-width: 10ch; }
.chapter-heading > p { max-width: 24rem; color: #64706d; }
.quest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.quest-card { position: relative; max-width: none; min-height: 28rem; display: flex; flex-direction: column; padding: 1.4rem; overflow: hidden; border: 1px solid var(--home-line); border-radius: .75rem; background: var(--home-card); transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, color 220ms ease; }
.quest-card::after { content: ""; position: absolute; right: -2.5rem; bottom: -2.5rem; width: 8rem; height: 8rem; border: 1px solid currentColor; border-radius: 50%; opacity: .08; }
.quest-card:hover,
.quest-card:focus-visible,
.quest-card:focus-within { z-index: 2; transform: translateY(-.6rem) rotate(-.6deg); background: var(--home-night-2); color: #fff; box-shadow: 0 30px 60px rgba(21,35,34,.18); }
.quest-card:nth-child(2):hover,
.quest-card:nth-child(2):focus-visible,
.quest-card:nth-child(2):focus-within { transform: translateY(-.6rem) rotate(.6deg); }
.quest-number { display: flex; justify-content: space-between; max-width: none; color: #65716e; font: .62rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.quest-number span { color: #16684f; }
.quest-card:hover .quest-number,
.quest-card:focus-within .quest-number { color: rgba(255,255,255,.5); }
.quest-card:hover .quest-number span,
.quest-card:focus-within .quest-number span { color: var(--home-lime); }
.quest-glyph { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; margin: 3rem 0 1.5rem; border: 1px solid var(--home-line); border-radius: 50%; color: #27795f; font: 1.25rem/1 var(--font-mono); }
.quest-card:hover .quest-glyph,
.quest-card:focus-within .quest-glyph { border-color: rgba(255,255,255,.25); color: var(--home-lime); }
.quest-card h3 { font-size: clamp(1.35rem, 2.1vw, 1.8rem); }
.quest-card > p:not(.quest-number) { margin-top: 1rem; color: #5d6966; font-size: .95rem; }
.quest-card:hover > p:not(.quest-number),
.quest-card:focus-within > p:not(.quest-number) { color: rgba(255,255,255,.66); }
.quest-card > a { display: inline-flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: 1.5rem; color: #246f58; font: 700 .72rem/1 var(--font-mono); }
.quest-card:hover > a,
.quest-card:focus-within > a { color: var(--home-lime); }
.quest-card > a svg { width: 1rem; }

.manifesto { position: relative; margin-block: 2rem; padding: clamp(3rem, 7vw, 6rem); overflow: hidden; border-radius: 1rem; color: #fff; background: var(--home-coral); transform: rotate(-.6deg); }
.manifesto::after { content: "ACCESSIBLE BY DESIGN"; position: absolute; inset: auto -1rem -1.4rem auto; color: rgba(60,16,9,.09); font: 700 clamp(2rem, 7vw, 6rem)/1 var(--font-mono); white-space: nowrap; }
.manifesto p { position: relative; z-index: 1; max-width: 18ch; margin: 0 auto; font-family: var(--font-body); font-size: clamp(2rem, 4.3vw, 4rem); font-weight: 700; line-height: 1.02; letter-spacing: -.055em; text-align: center; text-wrap: balance; }
.manifesto-mark { position: absolute; top: -.6rem; left: 1rem; color: rgba(255,255,255,.2); font: 10rem/1 var(--font-display); }

.home-page #research { padding-bottom: 0; }
.research-list { margin: 0; padding: 0; border-top: 1px solid var(--home-line); list-style: none; }
.research-list li { position: relative; max-width: none; display: grid; grid-template-columns: 9rem 1fr 4rem; gap: .5rem 1.2rem; padding: 2rem 0; border-bottom: 1px solid var(--home-line); transition: padding 180ms ease, background 180ms ease; }
.research-list li:hover,
.research-list li:focus-within { padding-inline: 1rem; background: rgba(255,255,255,.55); }
.research-meta { grid-row: 1 / span 2; margin: .15rem 0 0; color: #6b7673; font: .63rem/1.5 var(--font-mono); text-transform: uppercase; }
.research-meta span { display: block; color: #1b7157; font-weight: 700; }
.research-list h3 { grid-column: 2; font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.22; }
.research-list h3 a { color: inherit; text-decoration: none; }
.research-list h3 a:hover { color: #176a50; }
.research-list li > p:not(.research-meta) { grid-column: 2; margin: 0; color: #65716e; font-size: .9rem; }
.research-list li > p.research-authors { color: #465450; font-size: .82rem; font-style: italic; line-height: 1.5; }
.research-authors strong { color: var(--home-ink); font-weight: 700; }
.research-index { grid-column: 3; grid-row: 1 / span 2; justify-self: end; color: #aab1ad; font: 1.1rem/1 var(--font-mono); }

.origin-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 7vw, 6rem); align-items: center; }
.origin-grid h2 { margin-bottom: 2rem; }
.origin-grid > div:first-child > p { color: #596663; }
.interest-board { padding: 1.5rem; border-radius: .85rem; background: var(--home-night-2); color: #fff; box-shadow: 1.2rem 1.2rem 0 var(--home-lime); transform: rotate(1.2deg); }
.interest-board__title { max-width: none; margin: 0; padding: .7rem .8rem 1.4rem; color: var(--home-lime); font: .66rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.interest-board ul { margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.15); list-style: none; }
.interest-board li { display: flex; gap: 1rem; max-width: none; padding: 1rem .8rem; border-bottom: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.82); }
.interest-board li span { color: var(--home-mint); font: .66rem/1.8 var(--font-mono); }

.contact-chapter { margin-bottom: 7rem; padding: clamp(3rem, 6vw, 5rem); border: 0; border-radius: 1rem; background: var(--home-night); color: #fff; }
.chapter-label--light { color: rgba(255,255,255,.54); }
.chapter-label--light span { border-color: rgba(255,255,255,.3); color: var(--home-lime); }
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.contact-grid h2 { max-width: 10ch; color: #fff; }
.contact-grid p { margin-top: 1.5rem; color: rgba(255,255,255,.62); }
.contact-orb { display: grid; place-items: center; width: 9rem; aspect-ratio: 1; border-radius: 50%; background: var(--home-lime); color: var(--home-night); font: 700 .72rem/1 var(--font-mono); text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease; }
.contact-orb:hover { transform: rotate(-7deg) scale(1.05); color: var(--home-night); box-shadow: 0 0 0 10px rgba(201,246,90,.12); }
.contact-orb svg { width: 1.8rem; height: 1.8rem; margin-bottom: -1.8rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; margin: 3rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid rgba(255,255,255,.13); list-style: none; }
.contact-links li { max-width: none; }
.contact-links a { display: inline-flex; gap: .45rem; align-items: center; min-height: 30px; color: rgba(255,255,255,.68); font: .68rem/1 var(--font-mono); }
.contact-links a:hover { color: var(--home-lime); }
.contact-links svg { width: 1rem; }

.home-footer { border-top-color: var(--home-line); background: #ebeae2; }
.home-footer .home-wrap { display: flex; justify-content: space-between; gap: 1rem; }
.home-footer p:first-child { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }

/* The guide is intentionally a local, curated knowledge base. */
.assistant-launcher { position: fixed; z-index: 100; right: 1.25rem; bottom: 1.25rem; display: flex; align-items: center; gap: .7rem; max-width: calc(100vw - 2.5rem); padding: .55rem .9rem .55rem .55rem; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: var(--home-night); color: #fff; box-shadow: 0 14px 40px rgba(11,26,27,.28); font: .67rem/1.3 var(--font-mono); text-align: left; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease; }
.assistant-launcher:hover { transform: translateY(-3px); box-shadow: 0 18px 48px rgba(11,26,27,.36); }
.assistant-launcher strong { display: block; color: var(--home-lime); font-weight: 700; }
.assistant-launcher__icon { display: grid; flex: none; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--home-lime); color: var(--home-night); }
.assistant-launcher__icon svg { width: 1.25rem; }
.assistant-launcher[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.assistant-panel { position: fixed; z-index: 110; right: 1.25rem; bottom: 1.25rem; width: min(25rem, calc(100vw - 2.5rem)); height: min(38rem, calc(100svh - 2.5rem)); grid-template-rows: auto minmax(0,1fr) auto auto; overflow: hidden; border: 1px solid #cbd2ca; border-radius: 1rem; background: #fbfbf6; box-shadow: 0 30px 90px rgba(8,23,23,.3); }
.assistant-panel:not([hidden]) { display: grid; animation: assistant-in 220ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes assistant-in { from { opacity: 0; transform: translateY(1rem) scale(.97); } }
.assistant-head { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .9rem; background: var(--home-night); color: #fff; }
.assistant-avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .65rem; background: var(--home-lime); color: var(--home-night); }
.assistant-avatar svg { width: 1.4rem; }
.assistant-head p { max-width: none; margin: 0; font-weight: 700; line-height: 1.2; }
.assistant-head span { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; color: rgba(255,255,255,.58); font: .6rem/1 var(--font-mono); }
.assistant-head i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--home-lime); }
.assistant-head button { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; cursor: pointer; }
.assistant-head button:hover { background: rgba(255,255,255,.17); }
.assistant-body { overflow-y: auto; padding: 1rem; }
.assistant-messages { display: grid; gap: .7rem; }
.assistant-message { max-width: 88%; padding: .72rem .85rem; border-radius: .75rem; font-size: .86rem; line-height: 1.45; }
.assistant-message p { max-width: none; margin: 0; }
.assistant-message a { display: inline-block; margin-top: .5rem; color: inherit; font-weight: 700; }
.assistant-message__links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.assistant-message--bot { justify-self: start; border: 1px solid #dce0d9; border-bottom-left-radius: .2rem; background: #fff; color: #34423f; }
.assistant-message--user { justify-self: end; border-bottom-right-radius: .2rem; background: #247258; color: #fff; }
.assistant-prompts { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.assistant-prompts button { min-height: 36px; padding: .45rem .65rem; border: 1px solid #cad1ca; border-radius: 999px; background: transparent; color: #3d4c48; font: .64rem/1.25 var(--font-mono); text-align: left; cursor: pointer; }
.assistant-prompts button:hover { border-color: #28765c; color: #176046; background: #eff7ef; }
.assistant-prompts button[disabled] { opacity: .45; cursor: default; }
.assistant-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .7rem; border-top: 1px solid #dfe2dc; background: #fff; }
.assistant-form input { min-width: 0; min-height: 44px; padding: .65rem .75rem; border: 1px solid #cbd1cb; border-radius: .55rem; background: #f8f8f3; color: var(--home-ink); font: .82rem/1.3 var(--font-body); }
.assistant-form input:focus { border-color: #28765c; outline: 3px solid rgba(40,118,92,.18); }
.assistant-form button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: .55rem; background: #247258; color: #fff; cursor: pointer; }
.assistant-form button:hover { background: #155942; }
.assistant-note { max-width: none; margin: 0; padding: 0 .8rem .7rem; background: #fff; color: #7b8580; font: .55rem/1.3 var(--font-mono); text-align: center; }
.noscript-note { position: fixed; z-index: 120; right: 1rem; bottom: 1rem; max-width: 24rem; padding: 1rem; border: 1px solid var(--home-line); background: #fff; box-shadow: var(--shadow-3); }

.home-page .is-revealed { animation: chapter-arrive 520ms ease-out both; }
@keyframes chapter-arrive { from { opacity: 1; transform: translateY(1rem); } }

@media (max-width: 62em) {
  .home-header .site-nav li:first-child { display: none; }
  .hero-grid { grid-template-columns: 1fr minmax(17rem, .72fr); gap: 2rem; }
  .portrait-stage { min-height: 31rem; }
  .journey-shell { grid-template-columns: 1fr; }
  .journey-map { z-index: 20; top: 0; display: flex; align-items: center; gap: .8rem; margin: 0 calc(clamp(1.25rem, 4vw, 3.5rem) * -1); padding: .65rem clamp(1.25rem, 4vw, 3.5rem); overflow-x: auto; border-bottom: 1px solid var(--home-line); background: rgba(245,243,236,.94); backdrop-filter: blur(12px); }
  .journey-map__label, .journey-score { display: none; }
  .journey-map ol { display: flex; gap: .3rem; padding: 0; }
  .journey-map ol::before, .journey-map a::before { display: none; }
  .journey-map a { width: max-content; padding: .52rem .7rem; border-radius: 999px; }
  .journey-map a[aria-current="location"] { transform: none; background: var(--home-night); color: #fff; }
  .journey-content { max-width: 56rem; margin-inline: auto; }
}

@media (max-width: 47em) {
  .home-header .wrap { flex-wrap: nowrap; }
  .home-header .site-header__name > span:last-child { display: none; }
  .home-header .site-nav ul { gap: .2rem .8rem; }
  .home-header .site-nav li:nth-child(4) { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .home-hero { min-height: auto; padding: 6.5rem 0 5rem; }
  .hero-copy h1 { font-size: clamp(3.45rem, 16vw, 5.2rem); }
  .terminal-line { margin-bottom: 2.3rem; }
  .portrait-stage { min-height: min(124vw, 33rem); margin-top: 1rem; }
  .portrait-frame { inset: 1% 4%; }
  .portrait-note--top { top: 12%; right: 0; }
  .portrait-note--bottom { left: 0; }
  .social-launchpad { align-items: flex-start; }
  .social-launchpad > p { display: none; }
  .social-launchpad ul { width: 100%; justify-content: center; flex-wrap: wrap; }
  .story-grid, .origin-grid { grid-template-columns: 1fr; }
  .chapter { padding-block: 5.5rem; }
  .chapter-heading { display: grid; }
  .principle-strip { grid-template-columns: 1fr 1fr; }
  .principle-strip span { border-bottom: 1px solid var(--home-line); }
  .principle-strip span:nth-child(2) { border-right: 0; }
  .principle-strip span:nth-child(n+3) { border-bottom: 0; }
  .quest-grid { grid-template-columns: 1fr; }
  .quest-card { min-height: 22rem; }
  .research-list li { grid-template-columns: 1fr auto; }
  .research-meta { grid-column: 1; grid-row: auto; }
  .research-list h3, .research-list li > p:not(.research-meta) { grid-column: 1; }
  .research-index { grid-column: 2; grid-row: 1 / span 3; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-orb { width: 7.5rem; }
  .home-footer .home-wrap { display: grid; }
  .assistant-launcher { right: .75rem; bottom: .75rem; }
  .assistant-launcher > span:last-child { display: none; }
  .assistant-launcher { padding: .5rem; }
  .assistant-panel { inset: auto .5rem .5rem; width: auto; height: min(40rem, calc(100svh - 1rem)); }
}

@media (max-width: 36em) {
  .hero-kicker { display: grid; width: auto; gap: .12rem; white-space: normal; }
  .hero-kicker__item { white-space: nowrap; }
  .hero-kicker__separator { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .is-revealed, .assistant-panel:not([hidden]) { animation: none; }
}

@media print {
  .home-header { position: static; background: #fff; color: #000; }
  .home-header .site-header__name, .home-header .site-nav a { color: #000; }
  .home-hero { min-height: 0; padding: 2rem 0; background: #fff; color: #000; }
  .home-hero::before, .portrait-orbit, .portrait-note, .journey-map, .assistant-launcher, .assistant-panel, .scroll-cue, .journey-hint { display: none !important; }
  .hero-grid { grid-template-columns: 1fr 12rem; }
  .hero-copy h1, .hero-copy h1 em, .hero-intro, .hero-kicker { color: #000; }
  .portrait-stage { min-height: 12rem; }
  .portrait-frame { inset: 0; border-radius: 0; transform: none; }
  .social-launchpad { display: none; }
  .journey-shell { display: block; }
  .chapter { padding-block: 2rem; }
  .quest-grid { grid-template-columns: repeat(3,1fr); }
  .quest-card { min-height: 0; }
  .contact-chapter, .manifesto, .interest-board { background: #fff; color: #000; box-shadow: none; transform: none; }
}
