/* ==========================================================================
   binhnguyen.ai
   Editorial: light moss green, ink black and an oxblood accent; sharp geometry,
   a faint 12-column print grid behind the page, and heavy double rules between sections.
   All colors live in the tokens below; every text pair meets WCAG AA (4.5:1).
   ========================================================================== */

:root {
  --bg: #ECF0E4;            /* page: light moss */
  --bg-elev: #F6F8F1;       /* raised paper */
  --bg-sunk: #E0E8D4;       /* moss wash: panels, active pills */
  --moss-200: #C9D7B9;      /* light moss fills */
  --moss-300: #B2C49E;
  --moss-700: #3D5430;      /* deep moss: links */
  --ink: #141712;           /* near-black headings and rules */
  --text: #252A21;
  --muted: #545D4C;
  --rule: #CDD6C1;
  --rule-strong: #AEBB9E;
  --red: #9A1B22;           /* oxblood accent */
  --on-red: #FFFFFF;
  --column-line: rgb(61 84 48 / 0.075);
  --numeral-stroke: rgb(154 27 34 / 0.75);
  --footer-fg: #DCE5D1;
  --footer-muted: #9DA992;
  --footer-line: rgb(220 229 209 / 0.14);
  --header-bg: rgb(236 240 228 / 0.88);
  --shadow: 0 1px 2px rgb(20 23 18 / 0.05), 0 18px 40px -22px rgb(20 23 18 / 0.35);

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1140px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 2px;
  --header-h: 4.25rem;

  color-scheme: light;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

/* 12-column print grid aligned to the content width, fading out down the screen */
html::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: min(var(--container), 100%);
  padding-inline: var(--gutter);
  transform: translateX(-50%);
  pointer-events: none;
  background:
    linear-gradient(to left, var(--column-line) 1px, transparent 1px) content-box,
    linear-gradient(to right, var(--column-line) 1px, transparent 1px) content-box 0 0 / calc(100% / 12) 100%;
  -webkit-mask: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
  mask: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, var(--moss-200), transparent 560px) no-repeat,
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

a {
  color: var(--moss-700);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover { color: var(--red); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--moss-200); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { display: inline-block; width: 1.05em; height: 1.05em; flex: none; }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.label {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom-color: var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-dot { color: var(--red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  position: relative;
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.2rem;
  height: 2px;
  background: var(--red);
}
.nav-links .nav-cv {
  margin-left: 0.5rem;
  padding-inline: 1.05rem;
  background: var(--ink);
  color: var(--bg);
}
.nav-links .nav-cv:hover { background: var(--red); color: var(--on-red); }

.nav-toggle {
  display: none;
  place-items: center;
  align-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--ink); background: var(--bg-elev); }
.nav-toggle .bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s;
}
.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- Hero / about ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.74fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 7vw, 5.5rem);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.kicker::before {
  content: "";
  width: 2.5rem;
  height: 2px;
  background: currentColor;
}

.hero h1 {
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 1.5rem + 6vw, 6.1rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.affiliation {
  margin-bottom: 1.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  font-style: italic;
  font-weight: 400;
  color: var(--moss-700);
}
.affiliation a { color: inherit; text-decoration-color: var(--moss-300); }
.affiliation a:hover { color: var(--red); text-decoration-color: currentColor; }
.affiliation span { margin-inline: 0.3rem; color: var(--red); font-style: normal; }

.bio { max-width: 41rem; margin-bottom: 1.9rem; }
.bio p { margin-bottom: 1rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.05rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  font: 600 0.93rem/1 var(--font-body);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--ink); background: var(--bg-elev); color: var(--ink); }
.btn-solid { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.btn-solid:hover { border-color: var(--red); background: var(--red); color: var(--on-red); }

/* Portrait: a sharp rectangle sitting on an offset moss block */
.hero-aside { justify-self: end; width: 100%; max-width: 310px; }

.portrait {
  position: relative;
  isolation: isolate;
  margin: 0 12px 2.2rem 0;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translate(12px, 12px);
  background: var(--moss-300);
}
.portrait-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(155deg, var(--moss-200), var(--moss-300));
  outline: 1px solid var(--ink);
  outline-offset: -1px;
}
.monogram {
  font-family: var(--font-display);
  font-size: clamp(4rem, 2.8rem + 3.5vw, 6rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--moss-700);
  user-select: none;
}
.portrait-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placard {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--muted);
}
.placard p { margin: 0 0 0.4rem; }
.placard-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
}
.placard-line { display: flex; align-items: center; gap: 0.5rem; }
.placard-line .icon { color: var(--red); }

/* Gentle entrance for the hero */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero-text > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: 0.06s; }
.hero-text > :nth-child(3) { animation-delay: 0.12s; }
.hero-text > :nth-child(n+4) { animation-delay: 0.18s; }
.hero-aside { animation: rise 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ---------- Sections ---------- */

/* Newspaper double rule above each section */
.section-grid {
  position: relative;
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(3.25rem, 7vw, 5.25rem);
  border-top: 2px solid var(--ink);
}
.section-grid::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
}

.section-head {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  align-self: start;
}

/* Big outlined numerals (01, 02, 03) above the section titles */
main { counter-reset: section; }
.section { counter-increment: section; }
.section-num {
  display: block;
  margin-bottom: -0.2rem;
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 3rem + 3.5vw, 6rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums;
  color: transparent;
  -webkit-text-stroke: 1px var(--numeral-stroke);
}
.section-num::before { content: counter(section, decimal-leading-zero); }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.section-note { margin: 0.9rem 0 0; font-size: 0.92rem; color: var(--muted); }

.text-btn {
  margin-top: 1.1rem;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.93rem/1.4 var(--font-body);
  color: var(--moss-700);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.text-btn:hover { color: var(--red); text-decoration-color: currentColor; }

.load-error {
  padding: 1rem 1.2rem;
  border-left: 2px solid var(--red);
  background: var(--bg-elev);
  color: var(--muted);
}

/* ---------- Research themes ---------- */

.themes { margin: 0; padding: 0; list-style: none; counter-reset: theme; }
.theme {
  position: relative;
  padding: 1.4rem 0 1.5rem 2.6rem;
  border-bottom: 1px solid var(--rule);
  counter-increment: theme;
}
.theme:first-child { padding-top: 0.3rem; }
.theme::before {
  content: counter(theme, upper-alpha);
  position: absolute;
  left: 0;
  top: 1.3rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
  color: var(--red);
}
.theme:first-child::before { top: 0.2rem; }
.theme-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.theme-question {
  margin: 0.25rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--moss-700);
}
.theme p:not([class]) { max-width: 46rem; margin-bottom: 0.9rem; }
.theme-papers { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.theme-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red);
}
.theme-earlier { margin: 1.3rem 0 0; font-size: 0.96rem; color: var(--muted); }

/* ---------- News ---------- */

.news-list { margin: 0; padding: 0; list-style: none; }
.news-item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.news-item:first-child { padding-top: 0.35rem; }
.news-item:last-child { border-bottom: 0; }
.news-item p { margin: 0; }
.news-date {
  padding-top: 0.22rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--red);
}
.news-list:not(.show-all) .is-extra { display: none; }

/* ---------- Publications ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  font: 600 0.88rem/1 var(--font-body);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.filter .count { font-size: 0.74rem; opacity: 0.72; font-variant-numeric: tabular-nums; }

.pub-year {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.1rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: 0.35; }
.pub-group:first-child .pub-year { margin-top: 1.4rem; }

.pubs { margin: 0; padding: 0; list-style: none; }
.pub {
  display: grid;
  grid-template-columns: 8.75rem minmax(0, 1fr);
  gap: 1.25rem;
  margin-inline: -1.1rem;
  padding: 1.15rem 1.1rem;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  transition: background 0.25s, box-shadow 0.25s;
}
.pub:hover { background: var(--bg-elev); box-shadow: inset 2px 0 0 var(--ink); }
.pub:target,
.pub.is-target { background: var(--bg-elev); box-shadow: inset 3px 0 0 var(--red); }

.pub-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding-top: 0.15rem;
}
.badge {
  display: inline-block;
  padding: 0.4rem 0.62rem;
  background: var(--ink);
  font: 700 0.74rem/1 var(--font-body);
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: #E4ECD8;
}
.badge-accent {
  background: var(--red);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-red);
}

.pub-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.38;
}
.pub-title a {
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.35s ease;
}
.pub-title a:hover { color: var(--ink); background-size: 100% 1.5px; }

.pub-authors { margin: 0 0 0.15rem; font-size: 0.98rem; }
.me {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}
.pub-venue { margin: 0 0 0.75rem; font-size: 0.95rem; font-style: italic; color: var(--muted); }
.pub-status {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--red);
}

.pub-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  font: 600 0.8rem/1 var(--font-body);
  letter-spacing: 0.02em;
  color: var(--moss-700);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pill:hover { border-color: var(--red); color: var(--red); }
.pill[aria-expanded="true"] { border-color: var(--rule-strong); background: var(--bg-sunk); color: var(--ink); }
.pill .icon { width: 0.9em; height: 0.9em; transition: transform 0.2s; }
.pill[aria-expanded="true"] .icon { transform: rotate(180deg); }

.pub-panel {
  position: relative;
  margin-top: 0.85rem;
  padding: 0.95rem 1.1rem;
  border-left: 2px solid var(--red);
  background: var(--bg-sunk);
  font-size: 0.95rem;
  line-height: 1.62;
}
.pub-panel p { margin: 0; }
.pub-panel pre {
  margin: 0;
  overflow-x: auto;
  font: 0.8rem/1.6 var(--font-mono);
  white-space: pre;
  color: var(--text);
}
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.2rem 0 0.55rem;
}
.panel-bar .label { margin: 0; }
.copy-btn {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font: 600 0.75rem/1 var(--font-body);
  color: var(--ink);
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--ink); }

/* ---------- Experience ---------- */

.exp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
}
.timeline { margin: 1.1rem 0 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 2.1rem 1.7rem; }
.tl-item::before {           /* line to the next item */
  content: "";
  position: absolute;
  left: 0; top: 0.65rem; bottom: -0.65rem;
  width: 1px;
  background: var(--rule-strong);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child::before { display: none; }
.tl-item::after {            /* diamond marker */
  content: "";
  position: absolute;
  left: -5px; top: 0.4rem;
  width: 11px; height: 11px;
  border: 2px solid var(--moss-700);
  background: var(--bg);
  transform: rotate(45deg);
}
.tl-item.current::after {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--red);
}
.tl-when {
  margin: 0 0 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.tl-item.current .tl-when { color: var(--red); }
.tl-org {
  margin: 0 0 0.1rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.tl-role { margin: 0 0 0.4rem; font-weight: 600; }
.tl-meta { margin: 0 0 0.3rem; font-size: 0.96rem; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(2.5rem, 7vw, 5rem);
  background: var(--ink);
  color: var(--footer-fg);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 3.5rem 2.25rem;
}
.footer-name {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--footer-fg);
}
.footer-sub { margin: 0; color: var(--footer-muted); }
.footer-links { display: flex; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.footer-links a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--footer-line);
  border-radius: var(--radius);
  color: var(--footer-fg);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.footer-links a:hover { border-color: var(--red); background: var(--red); color: var(--on-red); }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid var(--footer-line);
  font-size: 0.88rem;
  color: var(--footer-muted);
}
.footer-meta p { margin: 0; }
.footer-meta a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--footer-fg);
  text-decoration: none;
}
.footer-meta a:hover { color: #E86A70; }

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-content: center;
  min-height: calc(100vh - var(--header-h) - 12rem);
  padding-block: 4rem;
  text-align: center;
}
.not-found .big {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(6rem, 4rem + 10vw, 11rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.not-found .big span { -webkit-text-stroke-color: var(--red); }
.not-found h1 {
  margin: 0.75rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.not-found p { color: var(--muted); }
.not-found .btn { justify-self: center; margin-top: 0.75rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .hero-aside { order: -1; justify-self: start; max-width: 136px; }
  .portrait { margin: 0 9px 0 0; }
  .portrait::after { transform: translate(9px, 9px); }
  .placard { display: none; }
  .monogram { font-size: 2.8rem; }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .section-head { position: static; }
  .exp-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    border-bottom: 1px solid var(--rule);
    background: var(--bg-elev);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.7rem 0.9rem; font-size: 1rem; }
  .nav-links a.is-active::after { left: 0.9rem; right: auto; width: 1.5rem; bottom: 0.35rem; }
  .nav-links .nav-cv { margin: 0.4rem 0 0; text-align: center; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .news-item { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .theme { padding-left: 2rem; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 0.7rem; margin-inline: -0.75rem; padding: 1rem 0.75rem; }
  .pub-badges { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  .btn { padding: 0.6rem 0.9rem; }
  .footer-top { align-items: flex-start; flex-direction: column; }
}

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

@media print {
  html::before { display: none; }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .filters, .pub-links, .text-btn, .hero-aside { display: none !important; }
  .hero, .section-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { position: static; }
  .news-list .is-extra { display: grid !important; }
}
