/*
 * mortezashafiei.com — site stylesheet
 * No inline styles anywhere: the Content-Security-Policy only allows this file (style-src 'self').
 */

/* ---------- Fonts (self-hosted, SIL Open Font License; see /assets/fonts/LICENSE-*.txt) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Brand */
  --navy-950: #061120;
  --navy-900: #0b1a2e;
  --navy-800: #12294a;
  --navy-700: #1d3a63;
  --maroon: #881c1c;
  --maroon-700: #6f1515;
  --sand: #e2c88e;
  --sand-deep: #c9a65a;
  --glauconite: #6f8f5a;
  --glauconite-deep: #4b6a3b;
  --clay: #a07862;
  --gold: #e9c46a;

  /* Light theme (default): cool white-blue */
  --bg: #fbfcfe;
  --bg-alt: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #253246;
  --text-strong: #0d1b2e;
  --muted: #526073;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #881c1c;
  --accent-hover: #6f1515;
  --accent-soft: #f2f5f9;
  --link: #1b4f8f;
  --chip-bg: #eef2f7;
  --chip-text: #2c3b50;
  --focus: #c47f12;
  --highlight: #fff1c9;

  /* Theme-dependent surfaces: hero, accent panels, buttons, footer */
  --hero-bg:
    radial-gradient(900px 480px at 88% 6%, rgba(136, 28, 28, 0.035), transparent 60%),
    radial-gradient(760px 460px at 0% 100%, rgba(47, 127, 193, 0.06), transparent 62%),
    linear-gradient(180deg, #f3f7fc 0%, #fafbfd 62%, #fbfcfe 100%);
  --hero-contours: url("/assets/img/contours-light.svg");
  --hero-contours-opacity: 0.5;
  --panel-contours-opacity: 0.35;
  --hero-title: #0b1a2e;
  --hero-role: #33465f;
  --hero-text: #2f3d52;
  --hero-strong: #0d1b2e;
  --hero-muted: #526073;
  --hero-line: rgba(13, 27, 46, 0.12);
  --hero-pill-bg: rgba(255, 255, 255, 0.78);
  --hero-pill-hover: #ffffff;
  --hero-pill-border: rgba(13, 27, 46, 0.12);
  --hero-pill-text: #881c1c;
  --hero-link: #1d3a63;
  --hero-link-hover: #881c1c;
  --hero-icon: #881c1c;
  --hero-frame: rgba(29, 58, 99, 0.32);
  --hero-portrait-shadow: 0 26px 50px -26px rgba(13, 27, 46, 0.38);
  --panel-bg: #f5f8fb;
  --panel-border: #e2e8f0;
  --panel-text: #33465f;
  --panel-heading: #0d1b2e;
  --panel-eyebrow: #881c1c;
  --panel-chip-bg: #ffffff;
  --panel-chip-text: #2c3b50;
  --panel-contours: url("/assets/img/contours-light.svg");
  --btn-main-bg: #0b1a2e;
  --btn-main-text: #ffffff;
  --btn-main-hover: #881c1c;
  --btn-alt-bg: rgba(255, 255, 255, 0.72);
  --btn-alt-border: #b9c9dc;
  --btn-alt-text: #0d1b2e;
  --btn-alt-hover: #ffffff;
  --footer-bg: #f3f6fa;
  --footer-text: #4a5a70;
  --footer-strong: #0d1b2e;
  --footer-link: #1d3a63;
  --footer-link-hover: #881c1c;

  /* Figure palette */
  --soil-a: #e8dcbc;
  --soil-b: #d6dec2;
  --soil-c: #c9b8a6;
  --soil-dot-1: #7f9a62;
  --soil-dot-2: #b09658;
  --soil-shade: rgba(13, 27, 46, 0.12);
  --rod: #1b2638;
  --rod-muted: #8b95a6;
  --water: #2f7fc1;

  --shadow-sm: 0 1px 2px rgba(16, 42, 80, 0.06), 0 1px 3px rgba(16, 42, 80, 0.05);
  --shadow-md: 0 14px 34px -16px rgba(16, 42, 80, 0.2), 0 4px 10px -6px rgba(16, 42, 80, 0.08);
  --shadow-lg: 0 30px 60px -28px rgba(6, 17, 32, 0.45);

  --radius: 16px;
  --radius-sm: 10px;
  --max-w: 1160px;
  --gutter: 24px;
  --header-h: 68px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111d;
  --bg-alt: #0d1626;
  --surface: #111c2e;
  --surface-2: #14213a;
  --text: #cdd5e1;
  --text-strong: #f3f6fb;
  --muted: #97a3b6;
  --line: #213049;
  --line-strong: #2e4262;
  --accent: #ec8f8f;
  --accent-hover: #f4b0b0;
  --accent-soft: #2a1820;
  --link: #93bbff;
  --chip-bg: #172540;
  --chip-text: #cdd5e1;
  --focus: #f0b54a;
  --highlight: #3a3320;

  --soil-a: #2b2a22;
  --soil-b: #1f2b22;
  --soil-c: #2d2420;
  --soil-dot-1: #5d7d48;
  --soil-dot-2: #7d6a3e;
  --soil-shade: rgba(0, 0, 0, 0.28);
  --rod: #e6ebf3;
  --rod-muted: #6c7a90;
  --water: #6cb4f0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 34px -16px rgba(0, 0, 0, 0.6);

  --hero-bg:
    radial-gradient(900px 480px at 85% 10%, rgba(136, 28, 28, 0.28), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(111, 143, 90, 0.16), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, #16233c 100%);
  --hero-contours: url("/assets/img/contours.svg");
  --hero-contours-opacity: 0.85;
  --panel-contours-opacity: 0.5;
  --hero-title: #ffffff;
  --hero-role: #c9d4e4;
  --hero-text: #b9c6d8;
  --hero-strong: #ffffff;
  --hero-muted: #97a6bc;
  --hero-line: rgba(255, 255, 255, 0.12);
  --hero-pill-bg: rgba(255, 255, 255, 0.07);
  --hero-pill-hover: rgba(255, 255, 255, 0.13);
  --hero-pill-border: rgba(255, 255, 255, 0.16);
  --hero-pill-text: var(--gold);
  --hero-link: #c9d4e4;
  --hero-link-hover: #ffffff;
  --hero-icon: var(--gold);
  --hero-frame: rgba(233, 196, 106, 0.55);
  --hero-portrait-shadow: var(--shadow-lg);
  --panel-bg: var(--navy-900);
  --panel-border: transparent;
  --panel-text: #c9d4e4;
  --panel-heading: #ffffff;
  --panel-eyebrow: var(--gold);
  --panel-chip-bg: rgba(255, 255, 255, 0.09);
  --panel-chip-text: #e6ecf5;
  --panel-contours: url("/assets/img/contours.svg");
  --btn-main-bg: #ffffff;
  --btn-main-text: #0b1a2e;
  --btn-main-hover: #e6ecf5;
  --btn-alt-bg: rgba(255, 255, 255, 0.06);
  --btn-alt-border: rgba(255, 255, 255, 0.22);
  --btn-alt-text: #f3f6fb;
  --btn-alt-hover: rgba(255, 255, 255, 0.14);
  --footer-bg: var(--navy-950);
  --footer-text: #9aa8bd;
  --footer-strong: #ffffff;
  --footer-link: #c9d4e4;
  --footer-link-hover: #ffffff;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--highlight);
  color: var(--text-strong);
}

cite {
  font-style: italic;
  font-family: var(--font-serif);
}

strong {
  font-weight: 650;
  color: var(--text-strong);
}

[hidden] {
  display: none !important;
}

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

.sprite {
  display: none;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 9px;
  fill: currentColor;
  stroke: none;
  letter-spacing: -0.02em;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Strata rule (signature motif: sand / glauconite / clay) ---------- */
.strata-rule {
  height: 6px;
  background: linear-gradient(
    to bottom,
    var(--sand) 0 33.3%,
    var(--glauconite) 33.3% 66.6%,
    var(--maroon) 66.6% 100%
  );
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 12px -4px rgba(11, 26, 46, 0.45);
}

.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 650;
  font-size: 1.12rem;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text-strong);
  background: var(--chip-bg);
}

.site-nav a[aria-current="true"] {
  color: var(--text-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 8px 8px 0 0;
}

.site-nav .nav-cta {
  margin-left: 8px;
  padding: 8px 16px;
  background: var(--btn-main-bg);
  color: var(--btn-main-text);
  font-weight: 600;
}

.site-nav .nav-cta:hover {
  background: var(--btn-main-hover);
  color: var(--btn-main-text);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
}

.menu-toggle .icon {
  width: 22px;
  height: 22px;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav {
  margin-left: auto;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-strong);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--text-strong);
}

.theme-toggle .icon {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (max-width: 1099px) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 10px var(--gutter) 18px;
    gap: 2px;
  }

  .js .site-nav a {
    display: block;
    padding: 12px 14px;
    font-size: 1rem;
  }

  .js .site-nav a[aria-current="true"] {
    box-shadow: inset 3px 0 0 var(--accent);
    border-radius: 0 8px 8px 0;
  }

  .js .site-nav .nav-cta {
    margin: 8px 0 0;
    text-align: center;
  }

  /* Without JavaScript the full navigation simply wraps. */
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-block: 10px;
  }
}

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--maroon);
  color: #fff;
}

.btn-primary:hover {
  background: var(--maroon-700);
  color: #fff;
}

.btn-main {
  background: var(--btn-main-bg);
  color: var(--btn-main-text);
}

.btn-main:hover {
  background: var(--btn-main-hover);
  color: var(--btn-main-text);
}

.btn-alt {
  background: var(--btn-alt-bg);
  border-color: var(--btn-alt-border);
  color: var(--btn-alt-text);
}

.btn-alt:hover {
  background: var(--btn-alt-hover);
  border-color: var(--btn-alt-text);
  color: var(--btn-alt-text);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text-strong);
}

.btn-outline:hover {
  border-color: var(--text-strong);
  color: var(--text-strong);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.chip-mono {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  border-radius: 7px;
}

.chip-strata::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--sand) 0 33%, var(--glauconite) 33% 66%, var(--maroon) 66%);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--hero-text);
  background: var(--hero-bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-contours) center / cover no-repeat;
  opacity: var(--hero-contours-opacity);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
  padding-block: 84px 132px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--hero-pill-bg);
  border: 1px solid var(--hero-pill-border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-pill-text);
}

.hero-kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fd1a3;
  box-shadow: 0 0 0 4px rgba(127, 209, 163, 0.16);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.6rem, 2.2rem + 2.6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--hero-title);
}

.hero-role {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  font-style: italic;
  color: var(--hero-role);
}

.hero-lead {
  margin-top: 22px;
  max-width: 40em;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--hero-text);
}

.hero-lead strong {
  color: var(--hero-strong);
  font-weight: 600;
}

.hero-advisers {
  margin-top: 14px;
  max-width: 40em;
  font-size: 0.93rem;
  color: var(--hero-muted);
}

.hero-advisers strong {
  color: var(--hero-strong);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.profile-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hero-line);
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hero-link);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.profile-links a:hover {
  color: var(--hero-link-hover);
  text-decoration: underline;
}

.profile-links .icon {
  width: 20px;
  height: 20px;
  color: var(--hero-icon);
}

/* Portrait with a "borehole log" strip */
.portrait {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 380px);
  padding-left: 30px;
}

.portrait-frame {
  position: relative;
  border-radius: 22px;
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1.5px solid var(--hero-frame);
  border-radius: 24px;
}

.portrait-frame picture,
.portrait-frame img {
  position: relative;
  width: 100%;
  border-radius: 22px;
}

.portrait-frame img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--hero-portrait-shadow);
}

.borehole {
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: calc(100% - 36px);
  border-radius: 7px;
}

.borehole .bh-1 { fill: var(--sand); }
.borehole .bh-2 { fill: var(--glauconite); }
.borehole .bh-3 { fill: #8a8f8a; }
.borehole .bh-4 { fill: var(--maroon); }
.borehole .bh-5 { fill: var(--sand-deep); }
.borehole .bh-tick { stroke: rgba(255, 255, 255, 0.55); stroke-width: 1; }

.portrait-caption {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-42%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy-900);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

.portrait-caption .icon {
  width: 16px;
  height: 16px;
  color: var(--maroon);
}

.hero .strata-rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

/* ---------- Key metrics (overlaps hero) ---------- */
.metrics {
  position: relative;
  z-index: 2;
  margin-top: -78px;
}

.metrics-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.metric {
  padding: 26px 26px 24px;
  border-left: 1px solid var(--line);
}

.metric:first-child {
  border-left: 0;
}

.metric-value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 1.6rem + 1vw, 2.5rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.metric-label {
  display: block;
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.metric-label strong {
  color: var(--text-strong);
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 96px;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 1.5rem + 1.3vw, 2.5rem);
  letter-spacing: -0.02em;
}

.section-head > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
}

.section-head .chips {
  margin-top: 8px;
}

/* ---------- Research focus cards ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-figure {
  margin: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.card-figure svg {
  width: 100%;
  height: 200px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 24px 24px 26px;
}

.card-body h3 {
  font-size: 1.28rem;
}

.card-body p {
  font-size: 0.95rem;
  color: var(--text);
}

.card-result {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-strong);
}

.card-result b {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* Illustration palette (inline SVG, themed by classes) */
.illus .i-bg { fill: var(--surface-2); }
.illus .i-soil-a { fill: var(--soil-a); }
.illus .i-soil-b { fill: var(--soil-b); }
.illus .i-soil-c { fill: var(--soil-c); }
.illus .i-dot-1 { fill: var(--soil-dot-1); }
.illus .i-dot-2 { fill: var(--soil-dot-2); }
.illus .i-ground { stroke: var(--text-strong); stroke-width: 1.5; fill: none; }
.illus .i-hatch { stroke: var(--muted); stroke-width: 1; }
.illus .i-frame { stroke: var(--muted); stroke-width: 3; fill: none; stroke-linecap: round; }
.illus .i-beam { fill: var(--muted); }
.illus .i-rod { stroke: var(--rod); stroke-width: 5; stroke-linecap: round; }
.illus .i-cone { fill: var(--rod); }
.illus .i-reducer { fill: var(--accent); }
.illus .i-water { stroke: var(--water); stroke-width: 2; stroke-linecap: round; fill: none; }
.illus .i-drop { fill: var(--water); }
.illus .i-chamber { fill: none; stroke: var(--text-strong); stroke-width: 2.5; }
.illus .i-clay { fill: var(--kaolin); }
.illus .i-layer { stroke: var(--kaolin-line); stroke-width: 1; }
.illus .i-plate { fill: var(--muted); }
.illus .i-arrow { stroke: var(--accent); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.illus .i-pile { fill: var(--rod); }
.illus .i-sensor { fill: var(--gold); stroke: var(--rod); stroke-width: 1.5; }
.illus .i-gauge { fill: var(--water); }
.illus .i-label { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.illus .i-tag { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.illus .i-grain { stroke: var(--text-strong); stroke-width: 1.4; stroke-linejoin: round; }
.illus .i-grain-1 { fill: var(--soil-a); }
.illus .i-grain-2 { fill: var(--soil-b); }
.illus .i-grain-3 { fill: var(--soil-c); }
.illus .i-circle { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 3; }
.illus .i-mesh { stroke: var(--muted); stroke-width: 1; opacity: 0.55; }
.illus .i-mesh-frame { fill: none; stroke: var(--muted); stroke-width: 2; }

/* ---------- Highlight figures ---------- */
.figures-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 24px;
  align-items: stretch;
}

.figure-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.figure-card h3 {
  margin-top: 6px;
  font-size: 1.35rem;
}

.figure-card figcaption {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Publications ---------- */
.pub-group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pub-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.pub-list {
  list-style: none;
  display: grid;
  gap: 18px;
}

.pub-list + .pub-group-title {
  margin-top: 44px;
}

.pub {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pub-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-year {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 650;
  line-height: 1;
  color: var(--text-strong);
}

.pub-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.pub-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.pub-title {
  font-size: 1.28rem;
  line-height: 1.35;
}

.pub-title a {
  color: var(--text-strong);
  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 0.25s ease, color 0.15s ease;
}

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

.pub-authors {
  font-size: 0.95rem;
  color: var(--text);
}

.pub-authors .me {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--highlight);
  color: var(--text-strong);
  font-weight: 650;
}

.pub-venue {
  font-size: 0.92rem;
  color: var(--muted);
}

.pub-venue cite {
  color: var(--text-strong);
}

.pub .chips {
  margin-top: 4px;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
}

.pub-actions .btn .icon {
  width: 15px;
  height: 15px;
}

details.disclosure {
  border-radius: 10px;
}

details.disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

details.disclosure > summary::-webkit-details-marker {
  display: none;
}

details.disclosure > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

details.disclosure[open] > summary::before {
  transform: rotate(45deg);
}

details.disclosure > summary:hover {
  border-color: var(--text-strong);
}

.pub-summary-text {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.93rem;
  line-height: 1.7;
}

.cite-box {
  position: relative;
  margin-top: 12px;
}

.cite-box pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--navy-950);
  color: #dbe4f0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Teaching & appointments ---------- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: start;
}

.role-list {
  list-style: none;
  display: grid;
  gap: 18px;
}

.role {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.role-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.role-icon .icon {
  width: 26px;
  height: 26px;
}

.role h3 {
  font-size: 1.18rem;
}

.role-org {
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--link);
}

.role p {
  margin-top: 8px;
  font-size: 0.95rem;
}

.aside-card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--panel-text);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.aside-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--panel-contours) center / cover no-repeat;
  opacity: var(--panel-contours-opacity);
  pointer-events: none;
}

.aside-card > * {
  position: relative;
}

.aside-card h3 {
  color: var(--panel-heading);
  font-size: 1.2rem;
}

.aside-card p {
  margin-top: 10px;
  font-size: 0.94rem;
}

.aside-card .chips {
  margin-top: 16px;
}

.aside-card .chip {
  background: var(--panel-chip-bg);
  color: var(--panel-chip-text);
}

.aside-card .eyebrow {
  color: var(--panel-eyebrow);
}

/* ---------- Education timeline ---------- */
.timeline {
  list-style: none;
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--sand) 0 33%, var(--glauconite) 33% 66%, var(--maroon) 66%);
  border-radius: 2px;
}

.tl-item {
  position: relative;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 28px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
}

.tl-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
}

.tl-head h3 {
  font-size: 1.18rem;
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.tl-org {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--link);
}

.tl-item p {
  margin-top: 8px;
  font-size: 0.94rem;
}

.pd-block {
  margin-top: 44px;
}

.role h4 {
  font-size: 1.12rem;
  line-height: 1.35;
}

/* ---------- Expertise ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.skill-card .role-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.skill-card h3 {
  font-size: 1.15rem;
}

.skill-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.skill-card .chips {
  margin-top: 4px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-label .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.contact-card .contact-main {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.contact-main a {
  color: inherit;
  text-decoration-color: var(--line-strong);
}

.contact-main a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.contact-card p,
.contact-card address {
  font-size: 0.92rem;
  font-style: normal;
  color: var(--muted);
}

.contact-links {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text-strong);
}

.contact-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.contact-links .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.contact-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 30px;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--panel-text);
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--panel-contours) center / cover no-repeat;
  opacity: var(--panel-contours-opacity);
  pointer-events: none;
}

.contact-cta > * {
  position: relative;
}

.contact-cta h3 {
  color: var(--panel-heading);
  font-size: 1.3rem;
}

.contact-cta p {
  margin-top: 4px;
  font-size: 0.95rem;
}

.contact-cta .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 30px;
}

.footer-inner strong {
  color: var(--footer-strong);
}

.footer-inner a {
  color: var(--footer-link);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--footer-link-hover);
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ---------- CV page ---------- */
.cv-page {
  background: var(--bg);
}

.cv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 28px 0;
}

.cv-toolbar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cv-sheet {
  max-width: 900px;
  margin: 24px auto 72px;
  padding: 56px 60px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.cv-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--text-strong);
}

.cv-header h1 {
  font-size: 2.3rem;
  letter-spacing: -0.02em;
}

.cv-title {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
}

.cv-contact {
  list-style: none;
  display: grid;
  gap: 2px;
  text-align: right;
  font-size: 0.84rem;
  color: var(--muted);
}

.cv-contact a {
  color: inherit;
}

.cv-section {
  margin-top: 28px;
}

.cv-section h2 {
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.cv-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  margin-bottom: 14px;
  break-inside: avoid;
}

.cv-entry h3 {
  font-size: 1.02rem;
}

.cv-entry .when {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.cv-entry .where {
  grid-column: 1 / -1;
  font-size: 0.92rem;
  color: var(--link);
  font-weight: 600;
}

.cv-entry p,
.cv-entry ul {
  grid-column: 1 / -1;
  font-size: 0.9rem;
}

.cv-entry ul {
  padding-left: 18px;
  margin-top: 4px;
}

.cv-refs {
  padding-left: 22px;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

.cv-refs li {
  padding-left: 4px;
  break-inside: avoid;
}

.cv-refs .me {
  font-weight: 700;
  color: var(--text-strong);
}

.cv-skills {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 18px;
  font-size: 0.9rem;
}

.cv-skills dt {
  font-weight: 650;
  color: var(--text-strong);
}

.cv-skills dd {
  margin: 0;
}

.cv-footnote {
  margin-top: 32px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - var(--header-h) - 90px);
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 80px;
}

.notfound h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 1.6rem + 2vw, 3rem);
}

.notfound p {
  margin: 14px auto 26px;
  max-width: 34em;
  color: var(--muted);
}

.notfound .illus {
  width: min(320px, 80vw);
  margin-inline: auto;
}

/* ---------- v2: zone palette (stress zones around a driven pile) ---------- */
:root {
  --z1: #b7861f;
  --z2: #a3262a;
  --z3: #2f7fc1;
  --z1-ink: #7d5a10;
  --z2-ink: #a3262a;
  --z3-ink: #1f5f99;
  --glauc-bg: #dfe6cf;
  --glauc-1: #5f7f4c;
  --glauc-2: #8fa874;
  --glauc-3: #c2a868;
  --kaolin: #e4e0d8;
  --kaolin-line: #cdc7bb;
  --steel: #8b95a3;
  --steel-dark: #4a5563;
  --ok: #1f7a4a;
  --ok-soft: #e3f3ea;
  --no: #8a5a14;
  --no-soft: #f6ecda;
}

:root[data-theme="dark"] {
  --z1: #e2b85c;
  --z2: #ec8a8a;
  --z3: #6cb4f0;
  --z1-ink: #e2b85c;
  --z2-ink: #ec8a8a;
  --z3-ink: #6cb4f0;
  --glauc-bg: #1c2a21;
  --glauc-1: #5d7f4a;
  --glauc-2: #3f5a37;
  --glauc-3: #6e5f3a;
  --kaolin: #343029;
  --kaolin-line: #4a443a;
  --steel: #9aa5b4;
  --steel-dark: #c7d0dc;
  --ok: #7fd1a3;
  --ok-soft: #173326;
  --no: #e5b86a;
  --no-soft: #33281a;
}

.gd-1 { fill: var(--glauc-1); }
.gd-2 { fill: var(--glauc-2); }
.gd-3 { fill: var(--glauc-3); }

/* Off-screen shared SVG <defs> (patterns used by several figures). Not display:none, so patterns still paint. */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- v2: hero extras ---------- */
.hero-featured {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 14px 8px 10px;
  border-radius: 12px;
  background: var(--hero-pill-bg);
  border: 1px solid var(--hero-pill-border);
  color: var(--hero-strong);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

.hero-featured:hover {
  background: var(--hero-pill-hover);
  color: var(--hero-strong);
}

.hero-featured .badge {
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--gold);
  color: #2b2210;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- v2: About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: start;
}

.about-text {
  display: grid;
  gap: 16px;
  font-size: 1.05rem;
  line-height: 1.78;
}

.about-text p:first-child::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  font-family: var(--font-serif);
  font-size: 3.6rem;
  font-weight: 650;
  line-height: 0.8;
  color: var(--accent);
}

.facts {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.facts h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.facts dl {
  display: grid;
  margin: 0;
}

.facts dt {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 3px 0 0;
  font-size: 0.95rem;
  color: var(--text-strong);
}

.facts dd a {
  font-weight: 600;
}

/* ---------- v2: News timeline ---------- */
.news {
  list-style: none;
  display: grid;
  gap: 14px;
}

.news-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-top: 3px;
}

.news-kind {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-item h3 {
  font-size: 1.08rem;
  line-height: 1.4;
}

.news-item p {
  margin-top: 6px;
  font-size: 0.93rem;
  color: var(--muted);
}

.news-item a {
  font-weight: 600;
}

/* ---------- v2: research figures ---------- */
.figures-stack {
  display: grid;
  gap: 24px;
}

.figure-sub {
  margin-top: 8px;
  max-width: 62em;
  color: var(--muted);
  font-size: 0.97rem;
}

.zones-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 28px;
  align-items: center;
}

.zones-figure {
  width: 100%;
  height: auto;
}

.zones-figure .zf-soil { fill: var(--glauc-bg); }
.zones-figure .zf-shade-top { stop-color: var(--soil-shade); stop-opacity: 0; }
.zones-figure .zf-shade-bottom { stop-color: var(--soil-shade); stop-opacity: 1; }
.zones-figure .zf-ground { stroke: var(--text-strong); stroke-width: 2; }
.zones-figure .zf-hatch { stroke: var(--muted); stroke-width: 1.2; }
.zones-figure .zf-hammer { fill: var(--steel-dark); }
.zones-figure .zf-cap { fill: var(--steel); }
.zones-figure .zf-pile-edge { fill: none; stroke: var(--steel-dark); stroke-width: 1.2; }
.zones-figure .zf-z1 { fill: var(--z1); fill-opacity: 0.42; }
.zones-figure .zf-z3 { fill: var(--z3); fill-opacity: 0.3; }
.zones-figure .zf-z3-edge { stroke: var(--z3); stroke-width: 1.4; stroke-dasharray: 5 4; fill: none; }
.zones-figure .zf-z2-stop { stop-color: var(--z2); }
.zones-figure .zf-z2-line { stroke: var(--z2); stroke-width: 1.4; stroke-dasharray: 6 5; fill: none; }
.zones-figure .zf-el-orig { fill: none; stroke: var(--text-strong); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: 0.7; }
.zones-figure .zf-el { stroke-width: 1.8; }
.zones-figure .zf-el-1 { fill: var(--z1); fill-opacity: 0.35; stroke: var(--z1); }
.zones-figure .zf-el-2 { fill: var(--z2); fill-opacity: 0.22; stroke: var(--z2); }
.zones-figure .zf-el-3 { fill: var(--z3); fill-opacity: 0.25; stroke: var(--z3); }
.zones-figure .zf-arr { fill: none; stroke-linecap: round; }
.zones-figure .zf-arr-1 { stroke: var(--z1); }
.zones-figure .zf-arr-2 { stroke: var(--z2); }
.zones-figure .zf-arr-3 { stroke: var(--z3); }
.zones-figure .zf-thin { stroke-width: 1.6; }
.zones-figure .zf-thick { stroke-width: 3; }
.zones-figure .zf-ah-1 { fill: var(--z1); }
.zones-figure .zf-ah-2 { fill: var(--z2); }
.zones-figure .zf-ah-3 { fill: var(--z3); }
.zones-figure .zf-sym { font-family: var(--font-serif); font-style: italic; font-size: 17px; fill: var(--text-strong); }
.zones-figure .zf-sub { font-size: 11px; }
.zones-figure .zf-rel { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.zones-figure .zf-rel-1 { fill: var(--z1); }
.zones-figure .zf-rel-2 { fill: var(--z2); }
.zones-figure .zf-rel-3 { fill: var(--z3); }
.zones-figure .zf-badge-1 { fill: var(--z1); }
.zones-figure .zf-badge-2 { fill: var(--z2); }
.zones-figure .zf-badge-3 { fill: var(--z3); }
.zones-figure .zf-badge-text { font-family: var(--font-mono); font-size: 13px; font-weight: 700; fill: #fff; }
.zones-figure .zf-tag { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.zones-figure .zf-tag-text { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; fill: var(--text-strong); }
.zones-figure .zf-note { font-family: var(--font-mono); font-size: 11.5px; fill: var(--muted); }

.methods {
  list-style: none;
  display: grid;
  gap: 14px;
}

.method {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--zone, var(--accent));
}

.method-1 { --zone: var(--z1); }
.method-2 { --zone: var(--z2); }
.method-3 { --zone: var(--z3); }

.method-icon {
  width: 64px;
  height: 64px;
}

.method h4 {
  font-size: 1.02rem;
  line-height: 1.35;
}

.zone-badge {
  display: inline-grid;
  vertical-align: 1px;
  margin-right: 8px;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--zone, var(--accent));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.method p {
  margin-top: 5px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.method .where {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.mi-line { fill: none; stroke: var(--text-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mi-dark { fill: var(--steel-dark); }
.mi-steel { fill: var(--steel); }
.mi-water { fill: var(--z3); fill-opacity: 0.35; }
.mi-swirl { fill: none; stroke: var(--z3); stroke-width: 1.6; stroke-linecap: round; }
.mi-grain { fill: var(--glauc-1); }
.mi-grain-soft { fill: var(--glauc-2); }
.mi-ball { fill: var(--steel); stroke: var(--steel-dark); stroke-width: 1; }
.mi-specimen { fill: var(--glauc-2); stroke: var(--glauc-1); stroke-width: 1; }

.findings-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.finding {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--zone, var(--accent));
  font-size: 0.9rem;
  line-height: 1.55;
}

.finding b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zone-ink, var(--accent));
}

.finding-1 { --zone: var(--z1); --zone-ink: var(--z1-ink); }
.finding-2 { --zone: var(--z2); --zone-ink: var(--z2-ink); }
.finding-3 { --zone: var(--z3); --zone-ink: var(--z3-ink); }

.takeaway {
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-strong);
}

.figures-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* CPTu configurations */
.configs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.config {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}

.config svg {
  width: 100%;
  max-width: 80px;
  height: auto;
}

.config-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-strong);
}

.outcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  margin-top: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.outcome-ok { background: var(--ok-soft); color: var(--ok); }
.outcome-no { background: var(--no-soft); color: var(--no); }
.outcome-ref { background: var(--chip-bg); color: var(--chip-text); }

.cf-soil { fill: var(--glauc-bg); }
.cf-ground { stroke: var(--text-strong); stroke-width: 1.5; }
.cf-hatch { stroke: var(--muted); stroke-width: 1; }
.cf-rod { fill: var(--steel); }
.cf-body { fill: var(--steel-dark); }
.cf-cone { fill: var(--steel-dark); }
.cf-reducer { fill: var(--accent); }
.cf-water { fill: none; stroke: var(--z3); stroke-width: 1.8; stroke-linecap: round; }
.cf-drop { fill: var(--z3); }

.findings {
  list-style: none;
  display: grid;
  gap: 10px;
}

.findings li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.findings li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin: 8px 0 0 6px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--sand) 0 33%, var(--glauconite) 33% 66%, var(--maroon) 66%);
}

/* Calibration chamber */
.chamber-figure {
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline: auto;
}

.chamber-figure .ch-wall { fill: var(--steel); }
.chamber-figure .ch-wall-dark { fill: var(--steel-dark); }
.chamber-figure .ch-sand { fill: var(--soil-a); }
.chamber-figure .ch-sand-dot { fill: var(--glauc-3); }
.chamber-figure .ch-clay { fill: var(--kaolin); }
.chamber-figure .ch-layer { stroke: var(--kaolin-line); stroke-width: 1; }
.chamber-figure .ch-plate { fill: var(--steel-dark); }
.chamber-figure .ch-pile { fill: var(--steel); stroke: var(--steel-dark); stroke-width: 1; }
.chamber-figure .ch-sg { fill: var(--z1); stroke: var(--steel-dark); stroke-width: 0.8; }
.chamber-figure .ch-pts { fill: var(--z3); stroke: var(--steel-dark); stroke-width: 0.8; }
.chamber-figure .ch-arrow { stroke: var(--accent); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chamber-figure .ch-dim { stroke: var(--muted); stroke-width: 1.1; fill: none; }
.chamber-figure .ch-dim-text { font-family: var(--font-mono); font-size: 11.5px; fill: var(--muted); }
.chamber-figure .ch-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; fill: var(--text-strong); }
.chamber-figure .ch-label-muted { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
.chamber-figure .ch-leader { stroke: var(--muted); stroke-width: 1; fill: none; }
.chamber-figure .ch-strong { font-family: var(--font-mono); font-size: 12px; font-weight: 700; fill: var(--accent); }

.figure-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Research-card illustration additions */
.illus .i-pellet { fill: var(--glauc-1); stroke: var(--text-strong); stroke-width: 1.4; stroke-linejoin: round; }
.illus .i-pellet-soft { fill: var(--glauc-2); stroke: var(--text-strong); stroke-width: 1.2; stroke-linejoin: round; }
.illus .i-crack { fill: none; stroke: var(--text-strong); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }
.illus .i-shine { fill: #fff; opacity: 0.35; }
.illus .i-platelet { fill: var(--soil-c); stroke: var(--text-strong); stroke-width: 0.9; }
.illus .i-sand { fill: var(--soil-a); }
.illus .i-wall { fill: var(--steel); }
.illus .i-sg { fill: var(--z1); }
.illus .i-pts { fill: var(--z3); }
.illus .i-dim { stroke: var(--muted); stroke-width: 1; fill: none; }
.illus .i-eye { fill: none; stroke: var(--text-strong); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.illus .i-view { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }

/* Gentle reveal for the stress-zone figure (motion-safe only) */
@media (prefers-reduced-motion: no-preference) {
  .js .zones-figure .zf-zone,
  .js .zones-figure .zf-element {
    opacity: 0;
    transition: opacity 0.7s ease;
  }

  .js .is-visible .zones-figure .zf-zone,
  .js .is-visible .zones-figure .zf-element {
    opacity: 1;
  }

  .js .is-visible .zones-figure .zf-zone-1,
  .js .is-visible .zones-figure .zf-element-1 { transition-delay: 0.15s; }
  .js .is-visible .zones-figure .zf-zone-2,
  .js .is-visible .zones-figure .zf-element-2 { transition-delay: 0.55s; }
  .js .is-visible .zones-figure .zf-zone-3,
  .js .is-visible .zones-figure .zf-element-3 { transition-delay: 0.95s; }
}

@media (max-width: 1080px) {
  .zones-layout,
  .figures-pair,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .zones-figure {
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 820px) {
  .findings-row {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .news-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

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

@media (max-width: 600px) {
  .zones-figure .zf-tag-text { font-size: 15px; }
  .zones-figure .zf-rel-part { display: none; }
  .zones-figure .zf-sym { font-size: 21px; }
  .zones-figure .zf-sub { font-size: 14px; }
  .zones-figure .zf-note { font-size: 15px; }
  .zones-figure .zf-badge-text { font-size: 14px; }
  .zones-figure .zf-tag-3 { width: 172px; }
  .zones-figure .zf-tag-2 { width: 130px; }
  .zones-figure .zf-tag-1 { width: 156px; }
}

@media (max-width: 480px) {
  .method {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .method-icon {
    width: 48px;
    height: 48px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid > :last-child {
    grid-column: 1 / -1;
  }

  .figures-grid,
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-block: 56px 124px;
  }

  .portrait {
    order: -1;
    width: min(100%, 250px);
    padding-left: 24px;
  }

  .borehole {
    width: 10px;
  }

  .portrait-caption {
    font-size: 0.74rem;
    padding: 6px 12px;
  }

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

  .metric:nth-child(3) {
    border-left: 0;
  }

  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pub {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .pub-side {
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
  }

  .pub-year {
    font-size: 1.5rem;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 18px;
  }

  .section {
    padding-block: 72px;
  }

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

  .figure-card {
    padding: 22px 18px;
  }

  .pub {
    padding: 22px 20px;
  }

  .cv-sheet {
    padding: 30px 22px;
    margin-top: 16px;
    border-radius: 12px;
  }

  .cv-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .cv-contact {
    text-align: left;
  }

  .cv-skills {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .cv-skills dd {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .hero-kicker {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    padding: 6px 12px;
  }

  .metric {
    padding: 20px 18px;
  }

  .metric-label {
    font-size: 0.82rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .brand-sub {
    display: none;
  }

  .role {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  :root,
  :root[data-theme="dark"] {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #111;
    --text-strong: #000;
    --muted: #333;
    --line: #ccc;
    --accent: #881c1c;
    --link: #0b3a75;
  }

  @page {
    size: letter;
    margin: 14mm 14mm 16mm;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #fff;
    font-size: 10.5pt;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .no-print,
  .cv-toolbar,
  .menu-toggle {
    display: none !important;
  }

  .hero {
    background: #fff;
    color: #000;
  }

  .hero::before,
  .hero .strata-rule {
    display: none;
  }

  .hero h1,
  .hero-role,
  .hero-lead,
  .hero-advisers,
  .hero-lead strong,
  .hero-advisers strong {
    color: #000;
  }

  .card,
  .pub,
  .role,
  .tl-item,
  .skill-card,
  .contact-card,
  .figure-card,
  .metrics-grid {
    box-shadow: none;
    break-inside: avoid;
  }

  .cv-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .cv-section h2 {
    break-after: avoid;
    margin-bottom: 8px;
  }

  .cv-page body,
  body.cv-page {
    font-size: 9.6pt;
    line-height: 1.5;
  }

  .cv-header {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    padding-bottom: 14px;
  }

  .cv-header h1 {
    font-size: 24pt;
  }

  .cv-title {
    font-size: 11.5pt;
  }

  .cv-section {
    margin-top: 16px;
  }

  .cv-entry {
    margin-bottom: 9px;
  }

  .cv-refs {
    gap: 6px;
  }

  .cv-footnote {
    margin-top: 18px;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
