/* =====================================================================
   Anil Ailani · site styles
   Palette: paper ivory, deep ink, brass. Type: Instrument Serif + Hanken Grotesk.
   ===================================================================== */

/* ---------- fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
}

:root {
  --bg: #f5f1e8;
  --bg-tint: #ede6d8;
  --surface: #fbf8f2;
  --ink: #14171c;
  --text: #2b2f36;
  --muted: #5d6067;
  --accent: #8a5d1a;
  --accent-soft: rgba(138, 93, 26, 0.1);
  --line: rgba(20, 23, 28, 0.12);
  --line-strong: rgba(20, 23, 28, 0.26);
  --ph-line: rgba(138, 93, 26, 0.45);
  --ph-bg: rgba(138, 93, 26, 0.05);
  --header-bg: rgba(245, 241, 232, 0.82);

  /* The dark "ink" band used for the Expertise section */
  --band-bg: #15181d;
  --band-ink: #f3eee4;
  --band-text: #cfc9bd;
  --band-muted: #9d978c;
  --band-accent: #d4a85a;
  --band-line: rgba(243, 238, 228, 0.14);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(84px, 11vw, 152px);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #111316;
  --bg-tint: #16191d;
  --surface: #1a1d22;
  --ink: #f1ebdf;
  --text: #d6d0c4;
  --muted: #a29c91;
  --accent: #d4a85a;
  --accent-soft: rgba(212, 168, 90, 0.12);
  --line: rgba(241, 235, 223, 0.11);
  --line-strong: rgba(241, 235, 223, 0.24);
  --ph-line: rgba(212, 168, 90, 0.42);
  --ph-bg: rgba(212, 168, 90, 0.05);
  --header-bg: rgba(17, 19, 22, 0.8);
  --band-bg: #1a1d22;
  --band-line: rgba(243, 238, 228, 0.1);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111316;
    --bg-tint: #16191d;
    --surface: #1a1d22;
    --ink: #f1ebdf;
    --text: #d6d0c4;
    --muted: #a29c91;
    --accent: #d4a85a;
    --accent-soft: rgba(212, 168, 90, 0.12);
    --line: rgba(241, 235, 223, 0.11);
    --line-strong: rgba(241, 235, 223, 0.24);
    --ph-line: rgba(212, 168, 90, 0.42);
    --ph-bg: rgba(212, 168, 90, 0.05);
    --header-bg: rgba(17, 19, 22, 0.8);
    --band-bg: #1a1d22;
    --band-line: rgba(243, 238, 228, 0.1);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; font-weight: 600;
  transition: top 0.2s ease;
}
.skip:focus { top: 12px; }

.noscript { padding: 40px var(--gutter); text-align: center; }
.noscript a { text-decoration: underline; }

/* Hide the empty page frame until main.js has filled it, so nothing jumps */
.js:not(.rendered) main,
.js:not(.rendered) .site-footer { visibility: hidden; }

/* ---------- placeholders ---------- */
.ph {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1.5px dashed var(--ph-line);
  border-radius: var(--radius);
  background: var(--ph-bg);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.ph-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--ph-line);
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}
.ph-small { padding: 10px 14px; font-size: 0.85rem; }
.ph-inline {
  display: inline-flex;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  font-size: 0.82rem;
  margin-top: 8px;
}
.ph-inline .ph-icon { width: 18px; height: 18px; font-size: 13px; }
.ph-quote {
  justify-content: center;
  min-height: 132px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled,
.site-header.nav-open {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--ink);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.brand:hover .brand-mark { border-color: var(--accent); color: var(--accent); }
.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.brand-mark.small { width: 28px; height: 28px; font-size: 12px; margin-right: 12px; }

.nav-list {
  display: flex;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav-list a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-list a:hover,
.nav-list a[aria-current] { color: var(--ink); }
.nav-list a:hover::after,
.nav-list a[aria-current]::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-left: clamp(4px, 1.5vw, 18px);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.4s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(-18deg); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

@media (max-width: 860px) {
  .nav { order: 3; }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before {
    display: block;
    width: 16px; height: 1.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease);
  }
  .nav-toggle-bars { position: relative; transform: translateY(-3px); }
  .nav-toggle-bars::before { content: ""; position: absolute; top: 6px; left: 0; }
  .nav-open .nav-toggle-bars { transform: translateY(0) rotate(45deg); }
  .nav-open .nav-toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }

  .nav-list {
    position: absolute;
    left: 0; right: 0; top: 68px;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.25);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .nav-open .nav-list {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease);
  }
  .nav-list li { border-top: 1px solid var(--line); }
  .nav-list li:first-child { border-top: 0; }
  .nav-list a {
    display: block;
    padding: 15px 0;
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--ink);
  }
  .nav-list a::after { display: none; }
  .theme-toggle { margin-left: 0; }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-ghost:hover .arrow { transform: translate(2px, -2px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary:hover { color: #15181d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary:hover { color: #15181d; }
}
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.4s var(--ease), color 0.3s ease;
}
.text-link:hover,
a:hover > .text-link { background-size: 100% 1px; color: var(--accent); }
.text-link .arrow { transition: transform 0.35s var(--ease); }
.text-link:hover .arrow,
a:hover > .text-link .arrow { transform: translate(2px, -2px); }

/* ---------- section scaffolding ---------- */
.section { padding-block: var(--section-pad); }
.section-tint { background: var(--bg-tint); }

.section-head {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
  margin-bottom: clamp(44px, 6vw, 80px);
}
.kicker {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 1.6rem + 3.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 17ch;
  text-wrap: balance;
}
.mini-title {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(36px, 7vw, 96px);
  padding-bottom: clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  /* faint brass glow behind the portrait */
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60vw;
  height: 60vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(48px, 6vw, 88px);
  align-items: center;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(18px, 2.5vw, 28px);
}
.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 1.6rem + 9vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-left: -0.04em;
}
.hero-statement {
  margin-top: clamp(22px, 3vw, 34px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem);
  line-height: 1.18;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.hero-intro {
  margin-top: 22px;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3.5vw, 40px);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: clamp(32px, 4vw, 48px);
  font-size: 0.82rem;
  color: var(--muted);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 10px; }
.hero-facts li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-portrait { position: relative; width: min(100%, 360px); justify-self: center; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background:
    linear-gradient(160deg, var(--surface), var(--bg-tint));
  display: grid;
  place-items: center;
  overflow: visible;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.monogram {
  display: flex;
  align-items: baseline;
  font-family: var(--serif);
  font-size: clamp(8rem, 22vw, 12.5rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.06em;
  user-select: none;
}
.monogram span:last-child {
  font-style: italic;
  color: var(--accent);
  margin-left: -0.12em;
}
.portrait-corner {
  position: absolute;
  width: 26px; height: 26px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}
.portrait-corner.tl { top: -9px; left: -9px; border-top-width: 1px; border-left-width: 1px; }
.portrait-corner.br { bottom: -9px; right: -9px; border-bottom-width: 1px; border-right-width: 1px; }
.hero-portrait figcaption { margin-top: 22px; }
.hero-now { margin-top: clamp(40px, 5vw, 64px); }
.hero-now .ph { max-width: 520px; }

@media (min-width: 720px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .hero-portrait { justify-self: end; width: min(100%, 360px); margin-left: 0; }
}
@media (min-width: 900px) {
  .hero { min-height: min(calc(100svh - 68px), 920px); display: flex; flex-direction: column; justify-content: center; }
}

/* career strip at the bottom of the hero */
.career-strip {
  display: grid;
  gap: 14px 40px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.career-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.career-list { display: flex; flex-wrap: wrap; gap: 14px clamp(28px, 5vw, 64px); }
.career-list li { display: grid; gap: 2px; }
.career-name { font-family: var(--serif); font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); line-height: 1.1; color: var(--ink); }
.career-note { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .career-strip { grid-template-columns: 160px 1fr; align-items: center; }
}

/* headshot */
.portrait-frame.has-photo { background: var(--bg-tint); }
.portrait-frame.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.92) contrast(1.02);
}

/* ---------- at a glance band ---------- */
.glance {
  padding-block: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.glance-title { margin-bottom: 22px; }
.glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0 clamp(24px, 3vw, 40px);
  margin: 0;
}
.glance-item { padding: 16px 0; border-top: 1px solid var(--line); }
.glance-item dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.glance-item dd { margin: 0; color: var(--ink); font-size: 0.98rem; line-height: 1.45; }
.glance-ph { margin-top: 18px; max-width: 640px; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: clamp(48px, 6vw, 96px); }
.about-story { display: grid; gap: 22px; max-width: 64ch; }
.about-story p { color: var(--text); }
.about-story .lede {
  font-size: clamp(1.18rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink);
}
.about-story .ph { margin-top: 10px; }
.about-aside { display: grid; gap: 48px; align-content: start; }
.aside-block { padding-top: 20px; border-top: 1px solid var(--line); }

.known-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.3;
  color: var(--ink);
}
.known-list li:last-child { border-bottom: 0; }
.known-list li::before {
  content: "";
  position: absolute;
  left: 0; top: calc(12px + 0.68em);
  width: 14px; height: 1px;
  background: var(--accent);
}

.journey { position: relative; display: grid; gap: 18px; padding-left: 26px; }
.journey::before {
  content: "";
  position: absolute;
  left: 5px; top: 10px; bottom: 10px;
  width: 1px;
  background: var(--line-strong);
}
.journey li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.journey li::before {
  content: "";
  position: absolute;
  left: -26px; top: 0.55em;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
}
.journey li:last-child::before { background: var(--accent); }
.journey-place { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); line-height: 1.2; }
.journey-note { font-size: 0.85rem; color: var(--muted); }

@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}

/* ---------- highlights ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 0 clamp(24px, 3vw, 40px);
}
.stat {
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-strong);
}
.stat-value {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 2.4rem + 3.4vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-label {
  margin-top: 14px;
  font-weight: 600;
  color: var(--ink);
}
.stat-detail { margin-top: 6px; font-size: 0.9rem; color: var(--muted); max-width: 30ch; }

.achievements { margin-top: clamp(56px, 7vw, 96px); }
.ach-list { border-top: 1px solid var(--line-strong); }
.ach {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease;
}
.ach-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent);
  line-height: 1.5;
}
.ach-body h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.85rem);
  line-height: 1.15;
  color: var(--ink);
}
.ach-body p { margin-top: 6px; color: var(--muted); max-width: 64ch; font-size: 0.97rem; }
.ach-tag {
  grid-column: 2;
  justify-self: start;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ach-ph { display: block; }
@media (min-width: 900px) {
  .ach { grid-template-columns: 64px minmax(0, 1fr) 190px; align-items: baseline; padding: 30px 0; }
  .ach-tag { grid-column: 3; justify-self: end; }
}

/* ---------- experience timeline ---------- */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 12px; bottom: 12px;
  width: 1px;
  background: var(--line-strong);
}
.co {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 0 0 clamp(56px, 7vw, 88px) 36px;
}
.co:last-child { padding-bottom: 0; }
.co-dot {
  position: absolute;
  left: 0; top: 9px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  transition: background-color 0.6s ease 0.2s, box-shadow 0.6s ease 0.2s;
}
.co.is-in .co-dot { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.co-ph .co-dot,
.co-ph.is-in .co-dot { border-style: dashed; background: var(--bg); box-shadow: none; }
.co-tenure, .role-dates {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.co-place { margin-top: 4px; font-size: 0.88rem; color: var(--muted); }
.co-length { margin-top: 2px; font-size: 0.82rem; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1rem; }
.co-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.co-roles { display: grid; gap: 0; }
.role { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.role:last-child { border-bottom: 0; padding-bottom: 0; }
.co-roles.is-multi .role { position: relative; padding-left: 22px; }
.co-roles.is-multi .role::before {
  content: "";
  position: absolute;
  left: 0; top: 33px;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--accent);
}
.role-dates { margin-bottom: 8px; }
.role-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.12rem, 1.02rem + 0.4vw, 1.3rem);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.role-summary { margin-top: 10px; max-width: 66ch; }
.role-impact { margin-top: 14px; display: grid; gap: 9px; max-width: 66ch; }
.role-impact li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.96rem;
}
.role-impact li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.8em;
  width: 10px; height: 1px;
  background: var(--accent);
}
.role-tags { margin-top: 18px; }
.role-tags li { font-size: 0.74rem; color: var(--muted); padding: 4px 11px; }
.co-ph .co-body .ph { max-width: 62ch; }

@media (min-width: 900px) {
  .timeline::before { left: calc(220px + 36px); }
  .co {
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 72px;
    padding-left: 0;
  }
  .co-dot { left: calc(220px + 36px - 5px); top: 16px; }
  .co-meta { text-align: right; padding-top: 12px; position: sticky; top: 96px; align-self: start; }
}

/* ---------- expertise (ink band) ---------- */
.section-ink {
  border-block: 1px solid var(--band-line);
  background: var(--band-bg);
  color: var(--band-text);
  --ink: var(--band-ink);
  --text: var(--band-text);
  --muted: var(--band-muted);
  --accent: var(--band-accent);
  --line: var(--band-line);
  --line-strong: rgba(243, 238, 228, 0.26);
}
.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.area {
  position: relative;
  padding: clamp(28px, 3vw, 40px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s ease;
}
.area::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.area:hover { background: rgba(243, 238, 228, 0.03); }
.area:hover::after { transform: scaleX(1); }
.area-num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 26px;
}
.area h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.35rem + 0.8vw, 2rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}
.area p { font-size: 0.96rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--ink);
}
.groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 32px clamp(24px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 72px);
}
.group { padding-top: 18px; border-top: 1px solid var(--line); }
.group p { font-family: var(--serif); font-size: 1.4rem; line-height: 1.35; color: var(--ink); }
.group .sep { color: var(--accent); }
.group .item { white-space: nowrap; }

/* ---------- perspectives ---------- */
.persp-grid { display: grid; gap: clamp(32px, 5vw, 72px); align-items: start; }
.feature {
  display: grid;
  gap: 16px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.45s var(--ease), border-color 0.3s ease, box-shadow 0.45s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 60px -40px rgba(20, 23, 28, 0.35);
}
.feature-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.feature-title {
  text-wrap: balance;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.04;
  color: var(--ink);
}
.feature-text { color: var(--muted); max-width: 42ch; }
.feature .text-link { margin-top: 10px; justify-self: start; }
.themes { display: grid; gap: 0; }
.theme { padding: 22px 0; border-top: 1px solid var(--line); }
.theme:first-child { border-top: 0; padding-top: 0; }
.theme h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 6px;
}
.theme p { color: var(--muted); font-size: 0.96rem; max-width: 52ch; }
.themes > .text-link { margin-top: 18px; justify-self: start; }
.testimonial-ph { margin-top: clamp(40px, 5vw, 64px); }

@media (min-width: 900px) {
  .persp-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

/* ---------- education ---------- */
.edu-grid { display: grid; gap: clamp(40px, 6vw, 96px); }
.edu-list { display: grid; }
.edu { padding: 26px 0; border-top: 1px solid var(--line-strong); }
.edu:first-child { padding-top: 0; border-top: 0; }
.edu h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 1.35rem + 1.2vw, 2.3rem);
  line-height: 1.1;
  color: var(--ink);
}
.edu-school { margin-top: 8px; color: var(--text); }
.edu-dates {
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.edu-side { display: grid; gap: 40px; align-content: start; }
.langs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
}
.lang-level { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); align-self: center; }

@media (min-width: 900px) {
  .edu-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: clamp(48px, 6vw, 96px); }
.contact-copy .section-head { margin-bottom: 28px; }
.contact-text { max-width: 44ch; font-size: 1.08rem; color: var(--text); }
.contact-lines { margin-top: 36px; display: grid; }
.contact-line {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.contact-line:last-child { border-bottom: 1px solid var(--line); }
.contact-line .ph-inline { margin-top: 0; justify-self: start; }
.contact-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
a.contact-line .arrow { transition: transform 0.35s var(--ease); color: var(--accent); }
a.contact-line:hover .contact-value { color: var(--accent); }
a.contact-line:hover .arrow { transform: translate(2px, -2px); }

.contact-form {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: clamp(24px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  transition: border-color 0.3s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.contact-form .btn { justify-self: start; margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 0.92rem; min-height: 1.4em; }
.form-status.is-ok { color: var(--ink); }
.form-status.is-error { color: var(--accent); }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

.reach-card {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: start;
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.reach-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem);
  line-height: 1.05;
  color: var(--ink);
}
.reach-text { color: var(--muted); margin-bottom: 10px; }

.open-to { margin-top: 32px; }
.open-list li { font-size: 1.2rem; padding-top: 10px; padding-bottom: 10px; }
.open-list li::before { top: calc(10px + 0.66em); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 28px; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 28px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.footer-id { display: flex; align-items: center; gap: 14px; }
.footer-name { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; color: var(--ink); }
.footer-line { font-size: 0.85rem; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 0.9rem; }
.footer-nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: color 0.25s ease; }
.footer-nav a:hover { color: var(--ink); }
.footer-nav .arrow { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.footer-bottom a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* ---------- notes view banner (?notes) ---------- */
.notes-banner {
  position: relative;
  z-index: 60;
  padding: 10px var(--gutter);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- reveal motion ---------- */
.motion .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.motion .reveal.is-in { opacity: 1; transform: none; }

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

/* ---------- print ---------- */
@media print {
  .site-header, .contact-form, .ph, .theme-toggle { display: none !important; }
  .section-ink { background: none; --ink: #000; --text: #222; --muted: #444; }
  .motion .reveal { opacity: 1; transform: none; }
}

/* ---------- small-screen refinements ---------- */
@media (max-width: 719px) {
  .hero-portrait { justify-self: start; width: min(66%, 270px); margin-left: 9px; }
  .monogram { font-size: clamp(7rem, 30vw, 9.5rem); }
}
@media (max-width: 600px) {
  .hero-ctas .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .stat { padding: 20px 0 26px; }
  .stat-value { font-size: clamp(2.4rem, 11vw, 3rem); }
  .stat-detail { font-size: 0.84rem; }
  .areas { border-left: 0; }
  .area { padding: 28px 0; border-right: 0; }
  .area-num { margin-bottom: 14px; }
  .contact-line { grid-template-columns: 84px minmax(0, 1fr); }
  .contact-form { padding: 24px 20px; }
}
