/* ------------------------------------------------------------------
   Hassan Emamirad — personal academic pages
   Palette and type follow the Université de Poitiers identity:
   navy #153142, red #f00340, Raleway + Noto Sans.
   ------------------------------------------------------------------ */

:root {
  --navy: #153142;
  --navy-deep: #0b2029;
  --navy-soft: #1d4457;
  --red: #f00340;
  --red-deep: #c40232;
  --slate: #667a87;
  --slate-light: #93a4ae;
  --mist: #f0f0f0;
  --mist-warm: #f7f8f9;
  --paper: #fff;
  --rule: #dde3e7;
  --rule-dark: rgba(255, 255, 255, .16);

  --display: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --body: "Noto Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --wide: 1180px;
  --shadow: 0 1px 2px rgba(21, 49, 66, .06), 0 12px 32px -18px rgba(21, 49, 66, .28);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font: 400 1rem/1.65 var(--body);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy); text-decoration-color: var(--slate-light); text-underline-offset: .18em; }
a:hover { color: var(--red-deep); text-decoration-color: currentColor; }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

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

.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -110%);
  z-index: 200; background: var(--red); color: #fff; padding: .6rem 1.1rem;
  font: 600 .85rem var(--body); border-radius: 0 0 3px 3px; text-decoration: none;
}
.skip:focus { transform: translate(-50%, 0); color: #fff; }

/* --- eyebrow / section furniture ------------------------------------ */

.eyebrow {
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 2px;
  background: var(--red);
  flex: none;
}
.eyebrow--light { color: rgba(255, 255, 255, .68); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--mist { background: var(--mist-warm); border-block: 1px solid var(--rule); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.lede { color: var(--slate); font-size: 1.05rem; margin-top: .9rem; }

/* --- top utility bar ------------------------------------------------ */

.topbar { background: var(--navy-deep); color: rgba(255, 255, 255, .8); }
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 2.4rem;
  font: 400 .72rem/1.4 var(--mono);
  letter-spacing: .04em;
}
.topbar__lab { color: rgba(255, 255, 255, .62); }
.topbar__lab a { color: inherit; text-decoration: none; }
.topbar__lab a:hover { color: #fff; }

.langswitch { display: flex; align-items: center; gap: .1rem; flex: none; }
.langswitch button {
  appearance: none; background: none; border: 0; cursor: pointer;
  font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55); padding: .45rem .55rem;
}
.langswitch button:hover { color: #fff; }
.langswitch button[aria-current="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.langswitch span { color: rgba(255, 255, 255, .25); }

/* --- masthead ------------------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.25rem;
}
.brand { display: flex; flex-direction: column; text-decoration: none; gap: .15rem; }
.brand__name {
  font: 800 1.05rem/1 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.brand__name em { font-style: normal; box-shadow: inset 0 -.32em 0 rgba(240, 3, 64, .16); }
.brand__role { font: 400 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }

.nav { display: flex; align-items: center; gap: clamp(.4rem, 1.5vw, 1.4rem); }
.nav a {
  font: 600 .84rem/1 var(--body);
  text-decoration: none;
  color: var(--navy);
  padding: 1.55rem .1rem;
  position: relative;
  white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--navy); }

.navtoggle {
  display: none; appearance: none; background: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 2px; padding: .5rem .7rem;
  font: 600 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
}

@media (max-width: 780px) {
  .navtoggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden;
  }
  .nav[data-open="true"] { max-height: 26rem; }
  .nav a { padding: .95rem var(--gutter); border-top: 1px solid var(--rule); }
  .nav a::after { top: 0; bottom: auto; width: 3px; height: auto; left: 0; right: auto; transform: scaleY(0); }
  .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleY(1); }
  .masthead__inner { position: relative; }
}

/* --- hero ----------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 82% 18%, rgba(29, 68, 87, .95) 0%, rgba(21, 49, 66, 0) 60%),
    linear-gradient(180deg, #17384b 0%, var(--navy) 55%, var(--navy-deep) 100%);
}
.hero__diagram {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  opacity: .5;
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  letter-spacing: -.03em;
}
.hero h1 span { display: block; }
.hero h1 .hero__given { font-weight: 300; letter-spacing: -.01em; opacity: .82; font-size: .58em; }
.hero__role {
  font: 500 .78rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin: 1.4rem 0 0;
}
.hero__thesis {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.02rem, 1.9vw, 1.3rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .84);
  max-width: 30ch;
  margin: 1.4rem 0 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2rem, 4vw, 2.8rem) 0 0;
  padding: 0; list-style: none;
  border-top: 1px solid var(--rule-dark);
}
.stats li {
  padding: 1rem .9rem 0 0;
  border-right: 1px solid var(--rule-dark);
}
.stats li:last-child { border-right: 0; padding-right: 0; }
.stats b {
  display: block;
  font: 300 1.9rem/1 var(--display);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stats span { font: 400 .64rem/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .6rem; }
  .stats li:nth-child(2n) { border-right: 0; padding-right: 0; }
}

/* book card inside the hero */
.bookcard {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--rule-dark);
  border-radius: 3px;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  backdrop-filter: blur(2px);
}
.bookcard__flag {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--red); color: #fff;
  font: 600 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: .45rem .6rem; border-radius: 2px;
}
.bookcard h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  margin: 1.1rem 0 0;
  color: #fff;
}
.bookcard__meta {
  font: 400 .74rem/1.5 var(--mono); letter-spacing: .04em;
  color: rgba(255, 255, 255, .6); margin: .8rem 0 0;
}
.bookcard p.bookcard__pitch {
  color: rgba(255, 255, 255, .78); font-size: .94rem; margin: 1rem 0 0;
}
.bookcard__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 .84rem/1 var(--body);
  padding: .8rem 1.15rem;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn svg { width: .85em; height: .85em; flex: none; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #fff; color: var(--navy); }
.btn--ghost { border-color: var(--rule-dark); color: rgba(255, 255, 255, .88); background: none; }
.btn--ghost:hover { border-color: #fff; color: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--red); color: #fff; }

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

/* --- page header (interior pages) ----------------------------------- */

.pagehead {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.pagehead::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, #1a3e52 0%, var(--navy) 62%, var(--navy-deep) 100%);
}
.pagehead__inner { padding-block: clamp(2.5rem, 6vw, 4.25rem); }
.pagehead h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 40rem; }
.pagehead .lede { color: rgba(255, 255, 255, .74); max-width: 44rem; }
.pagehead__rule {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--red) 0 22%, rgba(240, 3, 64, 0) 22%);
}

/* --- themes grid ---------------------------------------------------- */

.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.theme { background: var(--paper); padding: clamp(1.5rem, 3vw, 2.1rem); }
.theme__mark { font: 500 .72rem/1 var(--mono); color: var(--red); letter-spacing: .1em; }
.theme h3 { font-size: 1.08rem; margin: 1rem 0 .6rem; letter-spacing: -.005em; }
.theme p { color: var(--slate); font-size: .92rem; margin: 0; }

/* --- publication list ----------------------------------------------- */

.pubs__toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 4.25rem; z-index: 40;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
}
.search { position: relative; flex: 1 1 16rem; min-width: 12rem; }
.search input {
  width: 100%; appearance: none;
  border: 1px solid var(--rule); border-radius: 2px;
  background: var(--paper);
  padding: .7rem .8rem .7rem 2.3rem;
  font: 400 .9rem var(--body); color: var(--navy);
}
.search input::placeholder { color: var(--slate-light); }
.search input:focus-visible { border-color: var(--navy); }
.search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--slate); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  appearance: none; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--slate);
  border-radius: 100px; padding: .5rem .85rem;
  font: 500 .78rem/1 var(--body);
  transition: all .16s ease;
}
.chip:hover { color: var(--navy); border-color: var(--slate-light); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.pubs__count { font: 400 .78rem/1 var(--mono); color: var(--slate); letter-spacing: .06em; flex: none; }

.pubs__layout { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.decaderail { position: sticky; top: 9rem; }
.decaderail h2 { font: 500 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-bottom: .9rem; }
.decaderail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.decaderail a {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
  padding: .5rem 0 .5rem .8rem;
  font: 500 .8rem/1 var(--mono); text-decoration: none; color: var(--navy);
  border-left: 2px solid transparent; margin-left: -1px;
}
.decaderail a:hover { border-left-color: var(--red); color: var(--red-deep); }
.decaderail em { font-style: normal; font-size: .7rem; color: var(--slate-light); }

.yeargroup { padding-top: .5rem; }
.yeargroup + .yeargroup { margin-top: 2.2rem; }
.yeargroup__label {
  display: flex; align-items: center; gap: 1rem;
  font: 300 1.5rem/1 var(--display); letter-spacing: -.01em;
  color: var(--navy); margin: 0 0 .5rem;
  font-variant-numeric: tabular-nums;
}
.yeargroup__label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.yeargroup__label small { font: 500 .68rem/1 var(--mono); letter-spacing: .1em; color: var(--slate-light); text-transform: uppercase; }

.pub {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto;
  gap: 0 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.pub:hover .pub__key { color: var(--red); }
.pub__key {
  font: 500 .8rem/1.6 var(--mono);
  color: var(--slate-light);
  font-variant-numeric: tabular-nums;
  transition: color .16s ease;
  padding-top: .1rem;
}
.pub__title { font: 500 1.02rem/1.45 var(--body); color: var(--navy); margin: 0; }
.pub__authors { font-size: .88rem; color: var(--navy); opacity: .8; margin: .25rem 0 0; }
.pub__authors b { font-weight: 700; opacity: 1; }
.pub__venue { font-size: .86rem; color: var(--slate); margin: .2rem 0 0; }
.pub__venue i { font-style: italic; }
.pub__venue .vol { font-family: var(--mono); font-size: .82em; letter-spacing: .02em; }
.pub__actions { display: flex; align-items: center; gap: .35rem; grid-row: 1 / span 4; grid-column: 3; }

.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: .42rem .55rem; border-radius: 2px;
  border: 1px solid var(--rule); color: var(--slate); background: var(--paper);
  text-decoration: none; cursor: pointer;
  transition: all .16s ease;
}
.tag:hover { border-color: var(--navy); color: var(--navy); }
.tag--file { border-color: rgba(240, 3, 64, .3); color: var(--red-deep); }
.tag--file:hover { background: var(--red); border-color: var(--red); color: #fff; }
.tag--soon { border-style: dashed; cursor: default; }
.tag--soon:hover { border-color: var(--rule); color: var(--slate); }

.pub__bib { grid-column: 2 / -1; margin: .8rem 0 .2rem; }
.pub__bib pre {
  margin: 0; padding: .9rem 1rem;
  background: var(--navy-deep); color: #e8eef1;
  font: 400 .76rem/1.6 var(--mono);
  border-radius: 3px; overflow-x: auto;
  white-space: pre;
}
.pub__bib .pub__bibbar { display: flex; gap: .4rem; margin-top: .5rem; }

.empty { padding: 3rem 0; color: var(--slate); }

@media (max-width: 860px) {
  .pubs__layout { grid-template-columns: 1fr; }
  .decaderail { position: static; }
  .decaderail ol { display: flex; flex-wrap: wrap; gap: .35rem; border-left: 0; }
  .decaderail a { border: 1px solid var(--rule); border-radius: 100px; padding: .45rem .75rem; margin: 0; }
  .decaderail a:hover { border-color: var(--red); }
  .pubs__toolbar { position: static; }
}
@media (max-width: 620px) {
  .pub { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .pub__actions { grid-row: auto; grid-column: 2; margin-top: .7rem; flex-wrap: wrap; }
}

/* --- selected list on the home page --------------------------------- */

.selected { border-top: 1px solid var(--rule); }
.selected .pub:last-of-type { border-bottom: 1px solid var(--rule); }

/* --- book page ------------------------------------------------------ */

.booklayout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.prose { max-width: 40rem; }
.prose h2 { font-size: 1.5rem; margin-bottom: 1.1rem; }
.prose p { color: #2c4655; }

.factsheet { border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.factsheet h2 { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); padding: 1rem 1.15rem; background: var(--mist-warm); border-bottom: 1px solid var(--rule); }
.factsheet dl { margin: 0; padding: .5rem 1.15rem 1.15rem; }
.factsheet dt { font: 500 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); margin-top: 1rem; }
.factsheet dd { margin: .35rem 0 0; font-size: .92rem; }
.factsheet dd a { word-break: break-word; }

.chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.chapters li { border-bottom: 1px solid var(--rule); }
.chapters a {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: 1rem;
  align-items: baseline; padding: 1.05rem .25rem; text-decoration: none;
}
.chapters a:hover { background: var(--mist-warm); }
.chapters a:hover .chapters__n { color: var(--red); }
.chapters__n { font: 500 .82rem/1.5 var(--mono); color: var(--slate-light); font-variant-numeric: tabular-nums; transition: color .16s ease; }
.chapters__t { font: 500 1rem/1.45 var(--body); color: var(--navy); }
.chapters__p { font: 400 .78rem/1.5 var(--mono); color: var(--slate); white-space: nowrap; }

.citeblock { margin-top: 1.4rem; }
.citeblock pre {
  margin: 0; padding: 1rem 1.15rem; overflow-x: auto;
  background: var(--navy-deep); color: #e8eef1;
  font: 400 .78rem/1.65 var(--mono); border-radius: 3px;
}
.citeblock .pub__bibbar { display: flex; gap: .4rem; margin-top: .6rem; }

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

/* --- doctoral descent ----------------------------------------------- */

.lineage { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.lineage__step {
  position: relative;
  padding: 0 0 1.6rem 1.6rem;
  display: grid;
  gap: .15rem;
}
.lineage__step:last-child { padding-bottom: 0; }
.lineage__step::before {
  content: "";
  position: absolute; left: -4.5px; top: .55rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule); box-shadow: 0 0 0 4px var(--paper);
}
.lineage__step--self::before { background: var(--red); }
.lineage__step:nth-child(2) { padding-left: 2.4rem; }
.lineage__step:nth-child(3) { padding-left: 3.2rem; }
.lineage__step:nth-child(4) { padding-left: 4rem; }
.lineage__head { font: 500 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin: 0 0 1.2rem; }
.lineage__name {
  font: 700 1.05rem/1.35 var(--display); letter-spacing: 0;
  color: var(--navy); text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--rule);
  justify-self: start;
}
.lineage__name:hover { color: var(--red-deep); box-shadow: inset 0 -1px 0 var(--red); }
.lineage__step--self .lineage__name { color: var(--red-deep); box-shadow: inset 0 -1px 0 rgba(240, 3, 64, .35); }
.lineage__where { font: 400 .78rem/1.5 var(--mono); color: var(--slate); }
.lineage__thesis { font-size: .92rem; font-style: italic; color: #2c4655; }
.lineage__thesis a { font-style: normal; font-family: var(--mono); font-size: .8rem; }
.section--mist .lineage__step::before { box-shadow: 0 0 0 4px var(--mist-warm); }

.sourcenote { font: 400 .78rem/1.6 var(--mono); color: var(--slate-light); margin-top: 2rem; }

/* compact descent chain, used on the home page */
.chain { display: flex; flex-direction: column; gap: .3rem; margin: 0; font-size: .9rem; }
.chain span { position: relative; color: var(--slate); }
.chain span::before {
  content: "↳"; position: absolute; left: -1rem;
  font-family: var(--mono); color: var(--slate-light);
}
.chain span:first-child::before { content: none; }
.chain span:nth-child(2) { margin-left: 1rem; }
.chain span:nth-child(3) { margin-left: 2rem; }
.chain span:nth-child(4) { margin-left: 3rem; }
.chain .chain__self { color: var(--navy); font-weight: 600; }

/* --- students ------------------------------------------------------- */

.students { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.students li {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: .3rem 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--rule);
}
.students__year { font: 500 .95rem/1.5 var(--mono); color: var(--red); font-variant-numeric: tabular-nums; }
.students__name { font: 700 1.05rem/1.4 var(--display); letter-spacing: 0; }
.students__thesis { grid-column: 2; color: var(--slate); font-size: .94rem; font-style: italic; }
.students__hdr { grid-column: 2; font: 500 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate-light); margin-top: .5rem; }
.students__co { grid-column: 2; font: 500 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate-light); margin-top: .5rem; }
@media (max-width: 560px) {
  .students li { grid-template-columns: 1fr; }
  .students__thesis, .students__hdr, .students__co { grid-column: 1; }
}

/* --- contact -------------------------------------------------------- */

.contactgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.contactgrid--stack { grid-template-columns: 1fr; }
.contactgrid > div { background: var(--paper); padding: clamp(1.4rem, 3vw, 2rem); }
.contactgrid h3 { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-bottom: .9rem; }
.contactgrid .mail { font: 600 1.02rem/1.4 var(--body); word-break: break-word; }
.contactgrid ul { list-style: none; margin: 0; padding: 0; }
.contactgrid li + li { margin-top: .5rem; }

.portrait {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .55rem;
  background: var(--paper);
  max-width: 15rem;
}
.portrait img { border-radius: 2px; width: 100%; }
.portrait--mini { max-width: 8.5rem; margin: 1.15rem 0 0; }
.portrait figcaption { font: 400 .7rem/1.5 var(--mono); color: var(--slate); padding: .6rem .2rem 0; }

/* --- footer --------------------------------------------------------- */

.footer { background: var(--navy-deep); color: rgba(255, 255, 255, .7); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: flex-start; justify-content: space-between; }
.footer__id { font: 800 1rem/1 var(--display); text-transform: uppercase; letter-spacing: .01em; color: #fff; }
.footer__note { font-size: .82rem; max-width: 32rem; margin-top: .7rem; color: rgba(255, 255, 255, .55); }
.footer__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer__nav a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .88rem; }
.footer__nav a:hover { color: #fff; box-shadow: inset 0 -1px 0 var(--red); }
.footer__logo { background: #fff; padding: .5rem .6rem; border-radius: 2px; }
.footer__logo img { max-height: 3rem; width: auto; }

/* --- KaTeX fitting -------------------------------------------------- */

.katex { font-size: 1.02em; }
.pub__title .katex { font-size: .98em; }

/* --- motion --------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }

.wavepath { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.4s cubic-bezier(.4, 0, .2, 1) .2s forwards; }
.rayline { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s ease-out 1.5s forwards; }
.corepulse { animation: pulse 6s ease-in-out 2.4s infinite; transform-origin: center; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .wavepath, .rayline, .corepulse { animation: none; stroke-dashoffset: 0; }
  * { transition-duration: .01ms !important; }
}

@media print {
  .topbar, .masthead, .footer, .pubs__toolbar, .decaderail, .pub__actions, .hero__diagram { display: none !important; }
  body { color: #000; }
  .hero, .pagehead { background: none; color: #000; }
  .pub { break-inside: avoid; }
}
