/* ============================================================================
   Md Nasiat Hasan Fahim — academic site
   assets/site.css

   One accent colour, two typefaces, one grid.
   Change a token under :root and the whole site follows.

   CONTENTS
   01  Tokens
   02  Reset & base
   03  Typography primitives
   04  Layout: wrap, sections, rules
   05  Masthead & navigation
   06  Hero
   07  Scientific waveform & homepage summaries
   08  Entry (the core academic record block)
   09  Rows, columns, prose
   10  Footer
   11  Responsive
   12  Print
   13  Motion & accessibility preferences
   ========================================================================= */


/* ── 01  TOKENS ─────────────────────────────────────────────────────────── */

:root {
  /* Surfaces — cool chart stock, deliberately not warm cream */
  --paper:      #F0F2F0;
  --paper-2:    #E8EBE9;
  --paper-3:    #DCE1DE;

  /* Ink */
  --ink:        #14181A;
  --ink-2:      #4E585C;   /* 6.5:1 on --paper */
  --ink-3:      #5F6A6D;   /* 4.95:1 — de-emphasised but still WCAG AA body */

  /* Hairlines */
  --rule:       #C9D0CE;
  --rule-2:     #DDE2E0;

  /* The only accent. Deep viridian. */
  --signal:     #0B6357;
  --signal-2:   #0A7A69;
  --signal-wash: rgba(11, 99, 87, .075);

  /* Type */
  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino,
           Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono",
           Menlo, Consolas, "Liberation Mono", monospace;

  /* Measure & rhythm */
  --wrap:       1180px;
  --measure:    68ch;
  --gutter-w:   170px;

  --step-1: clamp(.76rem, .72rem + .18vw, .82rem);
  --step-0: clamp(1rem, .96rem + .22vw, 1.09rem);
  --step-1u: clamp(1.16rem, 1.08rem + .38vw, 1.34rem);
  --step-2: clamp(1.42rem, 1.26rem + .74vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.9vw, 3.1rem);
  --step-4: clamp(2.6rem, 1.7rem + 4.1vw, 5.4rem);

  --space-section: clamp(52px, 7vw, 104px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0E1214;
    --paper-2:    #141A1C;
    --paper-3:    #1C2326;

    --ink:        #E9EEEC;
    --ink-2:      #A4B0B3;
    --ink-3:      #77858A;

    --rule:       #273134;
    --rule-2:     #1B2325;

    --signal:     #57C6AE;
    --signal-2:   #7BDCC6;
    --signal-wash: rgba(87, 198, 174, .10);
  }
}


/* ── 02  RESET & BASE ───────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.62;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

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

::selection { background: var(--signal); color: var(--paper); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--signal);
  color: #fff;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: .8rem;
  text-decoration: none;
}
.skip:focus { left: 8px; top: 8px; }


/* ── 03  TYPOGRAPHY PRIMITIVES ──────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  font-weight: 200;
  line-height: .96;
  letter-spacing: -.035em;
}
h1 em {
  font-style: italic;
  font-weight: 200;
  color: var(--ink-2);
}

.h2 {
  font-size: var(--step-2);
  font-weight: 300;
  letter-spacing: -.022em;
  margin-top: 6px;
}

h3 {
  font-size: var(--step-1u);
  font-weight: 500;
  letter-spacing: -.018em;
  margin-bottom: .55em;
}

h4 {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--signal);
  margin-bottom: 14px;
  line-height: 1.4;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

/* Body links: hairline underline that thickens on hover.
   No colour change — the accent is reserved for structure. */
.prose a,
.entry p a,
.finding a,
figcaption a,
.foot a {
  color: var(--signal);
  text-decoration: none;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size .18s ease;
}
.prose a:hover,
.entry p a:hover,
.finding a:hover,
figcaption a:hover,
.foot a:hover { background-size: 100% 2px; }

/* The instrument-label voice. Every piece of structural metadata
   is set in mono — that is what makes the page read as a record. */
.mono {
  font-family: var(--mono);
  font-size: .715rem;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: .13em;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0;
  font-feature-settings: "kern" 1;
}

strong, b { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

small { font-size: inherit; }


/* ── 04  LAYOUT ─────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 56px);
}

.section {
  padding-block: var(--space-section);
  border-top: 1px solid var(--rule-2);
}
.section:first-of-type { border-top: 0; }

/* Section head: label + title on the left, "all →" on the right,
   sitting on a hairline. */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 22px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--rule);
}
.section-head > div:first-child { min-width: 0; }
.section-head .mono { color: var(--signal); margin-bottom: 2px; }

.section-head > a {
  font-family: var(--mono);
  font-size: .715rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s ease;
}
.section-head > a:hover { color: var(--signal); }

/* A label-only head (no title) needs far less air beneath it */
.section-head:not(:has(.h2)) {
  padding-bottom: 12px;
  margin-bottom: 0;
}

/* Never stack the head's rule directly on a block's own rule */
.section-head + .rows,
.section-head + .entry { border-top: 0; }

/* Reference pages — the CV — want density, not gallery spacing */
.section.dense { padding-block: clamp(30px, 3.6vw, 50px); }


/* ── 05  MASTHEAD & NAVIGATION ──────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
@supports not (backdrop-filter: blur(1px)) {
  .masthead { background: var(--paper); }
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  padding-block: 12px;
}

.brand {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  transition: color .15s ease;
}
.brand:hover { color: var(--signal); }

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mobile-pdf {
  display: none;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--signal);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 5px 10px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  font-family: var(--mono);
  font-size: .715rem;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: .11em;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  padding-block: 4px;
  position: relative;
  transition: color .15s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.nav a[aria-current="page"] { color: var(--signal); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* The CV download is the one button on the site. */
.nav a.pdf {
  color: var(--signal);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 6px 12px;
  transition: background .16s ease, color .16s ease;
}
.nav a.pdf::after { display: none; }
.nav a.pdf:hover { background: var(--signal); color: var(--paper); }


/* ── 06  HERO ───────────────────────────────────────────────────────────── */

.hero {
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(36px, 5vw, 68px);
}

.home-hero { padding-bottom: clamp(28px, 4vw, 48px); }

.interior-hero {
  padding-top: clamp(54px, 7vw, 86px);
  padding-bottom: clamp(34px, 4.5vw, 58px);
}

.interior-hero h1 {
  max-width: 17ch;
  font-size: clamp(2.35rem, 5.6vw, 4.7rem);
}

.interior-hero .lede { max-width: 48ch; }
.page-label { color: var(--signal); margin-bottom: 16px; }

.hero-role {
  max-width: 62ch;
  margin: 0 0 clamp(20px, 3vw, 34px);
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--signal);
}

.hero-role span { padding-inline: .4em; color: var(--ink-3); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(200px, 24vw, 292px);
  gap: clamp(32px, 5vw, 76px);
  align-items: start;
}

.lede {
  font-size: var(--step-1u);
  font-weight: 300;
  line-height: 1.42;
  letter-spacing: -.012em;
  color: var(--ink);
  max-width: 34ch;
  margin-top: clamp(22px, 3vw, 34px);
  text-wrap: pretty;
}
.lede b { font-weight: 500; }

.standfirst {
  font-size: var(--step-0);
  color: var(--ink-2);
  max-width: 56ch;
  margin-top: 16px;
  text-wrap: pretty;
}

.opportunity {
  max-width: 58ch;
  margin-top: 22px;
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--signal);
  color: var(--ink-2);
  line-height: 1.52;
}

.primary-links { margin-top: 24px; }
.secondary-links { margin-top: 12px; }
.secondary-links a { color: var(--ink-3); }

.referee-intro {
  margin: 0 0 1.5rem;
  max-width: 52rem;
  color: var(--ink-2);
}

.referee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.referee-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
  padding: 1.2rem 1.1rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.referee-card h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  line-height: 1.25;
}

.referee-role,
.referee-affiliation,
.referee-relation,
.referee-card p {
  margin: 0;
}

.referee-role {
  color: var(--ink-2);
  font-weight: 600;
}

.referee-affiliation {
  color: var(--ink-2);
  line-height: 1.5;
}

.referee-relation {
  font-weight: 600;
  color: var(--signal);
}

.referee-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
}

.referee-links a {
  color: var(--signal);
}

@media (max-width: 760px) {
  .referee-grid {
    grid-template-columns: 1fr;
  }
}

/* Link rail under the hero — mono, separated by hairlines. */
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  margin-top: clamp(26px, 3.5vw, 40px);
}
.links a {
  font-family: var(--mono);
  font-size: .715rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  text-decoration: none;
  color: var(--ink-2);
  padding: 3px 14px;
  border-left: 1px solid var(--rule);
  transition: color .15s ease;
}
.links a:first-child { border-left: 0; padding-left: 0; }
.links a:hover { color: var(--signal); }

.links a.key {
  color: var(--signal);
  font-weight: 550;
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper-3);
  border-radius: 1px;
  filter: grayscale(1) contrast(1.04);
  transition: filter .5s ease;
}
.portrait:hover { filter: grayscale(0) contrast(1); }

/* Keep a real photograph from glaring on the dark ground */
@media (prefers-color-scheme: dark) {
  .portrait { filter: grayscale(1) contrast(1.02) brightness(.86); }
  .portrait:hover { filter: grayscale(0) contrast(1) brightness(.94); }
}

.profile-facts {
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.profile-facts > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding-block: 9px;
  border-bottom: 1px solid var(--rule-2);
}

.profile-facts dt {
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--signal);
}

.profile-facts dd {
  margin: 0;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.profile-facts a { color: var(--signal); text-decoration: none; }


/* ── 07  SCIENTIFIC WAVEFORM AND HOMEPAGE SUMMARIES ───────────────────── */

.wave-divider {
  margin: clamp(34px, 4.5vw, 58px) 0 0;
  padding-top: clamp(20px, 2.7vw, 30px);
  border-top: 1px solid var(--rule);
}

.wave-divider svg { width: 100%; height: 36px; }

.wave-divider path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: trace-draw 1.8s ease-out .2s forwards;
}

@keyframes trace-draw { to { stroke-dashoffset: 0; } }

.home-section { padding-block: clamp(48px, 6vw, 76px); }

.section-intro {
  max-width: 72ch;
  margin-bottom: clamp(28px, 4vw, 44px);
  color: var(--ink-2);
  font-size: var(--step-1u);
  font-weight: 300;
  line-height: 1.5;
}

.focus-grid,
.research-grid,
.publication-grid,
.supporting-grid,
.closing-grid {
  display: grid;
  gap: 0;
}

.focus-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.research-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.publication-grid,
.supporting-grid,
.closing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.focus-grid > div,
.research-grid > article,
.publication-grid > article,
.supporting-grid > article,
.closing-grid > div {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 30px);
  border-left: 1px solid var(--rule-2);
}

.focus-grid > :first-child,
.research-grid > :first-child,
.publication-grid > :first-child,
.supporting-grid > :first-child,
.closing-grid > :first-child { border-left: 0; padding-left: 0; }

.focus-grid > :last-child,
.research-grid > :last-child,
.publication-grid > :last-child,
.supporting-grid > :last-child,
.closing-grid > :last-child { padding-right: 0; }

.focus-grid h3,
.research-grid h3,
.publication-grid h3,
.supporting-grid h3,
.closing-grid h2 { margin-top: 10px; }

.focus-grid p,
.research-grid p,
.publication-grid p,
.supporting-grid p,
.closing-grid p { color: var(--ink-2); }

.research-grid article > p:not(.mono),
.publication-grid article > p:not(.mono),
.supporting-grid article > p:not(.mono) { font-size: .96rem; line-height: 1.6; }

.research-grid h3 a { text-decoration: none; }
.research-grid h3 a:hover { color: var(--signal); }
.research-grid .status { margin-bottom: 12px; }

.publication-grid .cite {
  margin-block: 10px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-2);
}

.closing-grid { align-items: start; }
.closing-grid .beyond-research { border-left-color: var(--rule); }


/* ── 08  ENTRY ──────────────────────────────────────────────────────────── */
/* The core block. Mono metadata in a left gutter, content on the right,
   separated by a hairline. Every research item, paper and project uses it. */

.entry {
  display: grid;
  grid-template-columns: var(--gutter-w) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 52px);
  padding-block: clamp(28px, 3.5vw, 40px);
  border-top: 1px solid var(--rule-2);
}
.entry:first-of-type { border-top: 0; padding-top: 0; }

.gutter { padding-top: .35em; }
.gutter .mono + .mono { margin-top: 10px; }

.status {
  color: var(--signal) !important;
  font-weight: 550;
}
.status::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
  vertical-align: .18em;
}
.dim { color: var(--ink-3); }

.entry h3 a {
  text-decoration: none;
  transition: color .15s ease;
}
.entry h3 a:hover { color: var(--signal); }

.entry p { color: var(--ink-2); max-width: var(--measure); }
.entry p strong { color: var(--ink); }

/* Citation line */
.cite {
  font-size: .93rem;
  color: var(--ink-2) !important;
  line-height: 1.6;
  margin-bottom: 1.1em;
  max-width: 78ch;
}
.cite .me {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--signal);
}

/* Contribution / Result / Why it matters */
.finding {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 6px 22px;
  margin: 0 0 1.2em;
  padding: 18px 0 0;
  border-top: 1px solid var(--rule-2);
  max-width: 78ch;
}
.finding dt {
  font-family: var(--mono);
  font-size: .665rem;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--signal);
  padding-top: .34em;
}
.finding dd {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: .97rem;
  line-height: 1.6;
}
.finding dd:last-of-type { margin-bottom: 0; }

/* Method tags — quiet, not badges */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.tags span {
  font-family: var(--mono);
  font-size: .655rem;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-3);
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
}
.actions a {
  font-family: var(--mono);
  font-size: .69rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .11em;
  text-decoration: none;
  color: var(--signal);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.actions a:hover { border-bottom-color: var(--signal); }

.tags + .actions { margin-top: 16px; }

.research-record,
.project-record {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0 24px;
  max-width: 82ch;
  margin: 18px 0 22px;
  border-top: 1px solid var(--rule-2);
}

.research-record dt,
.project-record dt {
  padding-block: 13px;
  border-bottom: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 550;
  line-height: 1.45;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--signal);
}

.research-record dd,
.project-record dd {
  margin: 0;
  padding-block: 12px;
  border-bottom: 1px solid var(--rule-2);
  color: var(--ink-2);
  font-size: .96rem;
  line-height: 1.58;
}

.research-record a,
.project-record a,
.row a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}


/* ── 09  ROWS, COLUMNS, PROSE ───────────────────────────────────────────── */

/* Rows: date / thing / attribution. Awards, education, experience. */
.rows { border-top: 1px solid var(--rule-2); }

.row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 132px;
  gap: 8px 28px;
  align-items: start;
  padding-block: 20px;
  border-bottom: 1px solid var(--rule-2);
  transition: background .16s ease;
}
.row:hover { background: var(--signal-wash); }

.row > .mono:first-child {
  color: var(--signal);
  font-weight: 550;
  padding-top: .22em;
}

.row .what {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--ink);
}
.row .what small {
  display: block;
  margin-top: 7px;
  font-size: .89rem;
  line-height: 1.58;
  color: var(--ink-2);
  max-width: 72ch;
}

.row .who {
  text-align: right;
  color: var(--ink-3);
  padding-top: .3em;
}

/* Columns: teaching lists, skills, evidence */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(238px, 100%), 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.cols > div { min-width: 0; }
.cols p { color: var(--ink-2); font-size: .97rem; }

.cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cols li {
  padding: 8px 0;
  border-top: 1px solid var(--rule-2);
  font-size: .97rem;
  color: var(--ink-2);
  line-height: 1.45;
}
.cols li:first-child { border-top: 0; padding-top: 0; }

/* Prose: statements, research vision */
.prose {
  max-width: var(--measure);
  font-size: var(--step-0);
  color: var(--ink-2);
}
.prose p { margin-bottom: 1.25em; }
.prose strong { color: var(--ink); }

/* Opening paragraph carries the weight */
.prose .first {
  font-size: var(--step-1u);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -.01em;
  text-wrap: pretty;
}

.prose ul {
  margin: 0 0 1.25em;
  padding: 0;
  list-style: none;
}
.prose ul li {
  position: relative;
  padding: 9px 0 9px 24px;
  border-top: 1px solid var(--rule-2);
  line-height: 1.55;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.02em;
  width: 9px;
  height: 1px;
  background: var(--signal);
}

.download-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding: 22px 0;
  border-block: 1px solid var(--rule);
}

.download-callout p { margin: 0; color: var(--ink-2); }
.download-callout a {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 550;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--signal);
}


/* ── 10  FOOTER ─────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding-block: clamp(46px, 6vw, 78px);
  margin-top: clamp(40px, 6vw, 80px);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.foot-name { color: var(--signal); margin-bottom: 12px; }

.foot-summary {
  margin-bottom: 8px;
  font-size: var(--step-1u);
  font-weight: 300;
  line-height: 1.45;
  color: var(--ink);
  max-width: 44ch;
}

.foot-grid > div:first-child > p:not(.foot-summary):not(.foot-name) {
  max-width: 58ch;
  color: var(--ink-2);
}

.foot .meta {
  text-align: right;
  line-height: 2.15;
}
.foot .meta a {
  text-decoration: none;
  color: var(--ink-2);
  background: none;
  padding: 0;
  transition: color .15s ease;
}
.foot .meta a:hover { color: var(--signal); background: none; }
.foot .meta span { color: var(--ink-3); }


/* ── 11  RESPONSIVE ─────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  /* Name leads on every screen size — the portrait follows it, never
     precedes it. Below the fold-width it becomes a wide plate + caption. */
  .profile-panel {
    display: grid;
    grid-template-columns: clamp(140px, 30vw, 190px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .profile-facts { margin-top: 0; }

  .focus-grid,
  .research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .focus-grid > :nth-child(3),
  .research-grid > :nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule-2);
  }

  .focus-grid > :nth-child(4) { border-top: 1px solid var(--rule-2); }

  .entry { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gutter {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 18px;
    padding-top: 0;
  }
  .gutter .mono + .mono { margin-top: 0; }

  .row { grid-template-columns: 128px minmax(0, 1fr); }
  .row .who { grid-column: 2; text-align: left; padding-top: 0; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 120px; }

  .masthead .wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-block: 11px;
  }

  .mobile-pdf { display: inline-block; }
  .desktop-pdf { display: none; }
  /* One scrollable line, never a wrapped block */
  .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex-shrink: 0; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .finding { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .finding dt { padding-top: 8px; }
  .finding dd { margin-bottom: 14px; }

  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot .meta { text-align: left; }

  .links a {
    border-left: 0;
    padding-left: 0;
    padding-right: 18px;
  }

  .focus-grid,
  .research-grid,
  .publication-grid,
  .supporting-grid,
  .closing-grid { grid-template-columns: minmax(0, 1fr); }

  .focus-grid > div,
  .research-grid > article,
  .publication-grid > article,
  .supporting-grid > article,
  .closing-grid > div {
    padding: 24px 0;
    border-left: 0;
    border-top: 1px solid var(--rule-2);
  }

  .focus-grid > :first-child,
  .research-grid > :first-child,
  .publication-grid > :first-child,
  .supporting-grid > :first-child,
  .closing-grid > :first-child { border-top: 0; padding-top: 0; }

  .research-record,
  .project-record { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .research-record dt,
  .project-record dt { padding-bottom: 4px; border-bottom: 0; }
  .research-record dd,
  .project-record dd { padding-top: 0; }

  .download-callout { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .profile-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .portrait { max-width: 210px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .who { grid-column: 1; }
}


/* ── 12  PRINT ──────────────────────────────────────────────────────────── */
/* Someone on a hiring committee will print the CV page. */

@media print {
  :root {
    --paper: #fff; --paper-2: #fff; --paper-3: #eee;
    --ink: #000; --ink-2: #333; --ink-3: #666;
    --rule: #bbb; --rule-2: #ddd;
    --signal: #0B6357;
  }
  html { scroll-behavior: auto; }
  body { font-size: 10.5pt; line-height: 1.45; background: #fff; }

  .masthead, .nav, .skip, .wave-divider, .section-head > a, .links { display: none !important; }

  .section {
    padding-block: 14pt;
    break-inside: avoid;
    border-top: 1px solid var(--rule-2);
  }
  .entry, .row { break-inside: avoid; }
  .hero { padding-block: 0 12pt; }
  h1 { font-size: 22pt; }
  .h2 { font-size: 13pt; }
  h3 { font-size: 11.5pt; }
  .portrait { display: none; }
  .foot { background: none; border-top: 1px solid var(--rule); padding-block: 12pt; }

  /* Expose destinations for external links on paper */
  .actions a[href^="http"]::after,
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-family: var(--mono);
    font-size: 7.5pt;
    color: #666;
    word-break: break-all;
  }
  a { text-decoration: none; background: none !important; }
}


/* ── 13  MOTION & ACCESSIBILITY PREFERENCES ─────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .wave-divider path { stroke-dashoffset: 0; }
}

@media (prefers-contrast: more) {
  :root {
    --ink-2: var(--ink);
    --ink-3: #3A4447;
    --rule: #8A9694;
    --rule-2: #A8B2B0;
  }
  .nav a, .links a, .actions a { text-decoration: underline; }
}
