@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --paper: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c2b24;
  --ink-2: #47564e;
  --ink-3: #7c8a82;
  --line: rgba(28, 43, 36, 0.14);
  --line-soft: rgba(28, 43, 36, 0.08);
  --forest: #1f6f54;
  --forest-deep: #185640;
  --brass: #b4924f;
  --brass-soft: rgba(180, 146, 79, 0.16);
  --shadow: 0 18px 50px -24px rgba(28, 43, 36, 0.35);
  color-scheme: light;
}

html[data-mode="evening"] {
  --paper: #14211c;
  --surface: #1b2a24;
  --ink: #ece7dc;
  --ink-2: #b3c1b8;
  --ink-3: #7f8f86;
  --line: rgba(236, 231, 220, 0.16);
  --line-soft: rgba(236, 231, 220, 0.08);
  --forest: #5fb894;
  --forest-deep: #7cc9a8;
  --brass: #d8b877;
  --brass-soft: rgba(216, 184, 119, 0.16);
  --shadow: 0 20px 60px -28px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-mode]) {
    --paper: #14211c;
    --surface: #1b2a24;
    --ink: #ece7dc;
    --ink-2: #b3c1b8;
    --ink-3: #7f8f86;
    --line: rgba(236, 231, 220, 0.16);
    --line-soft: rgba(236, 231, 220, 0.08);
    --forest: #5fb894;
    --brass: #d8b877;
    --brass-soft: rgba(216, 184, 119, 0.16);
    color-scheme: dark;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  margin: 0;
}

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

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

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

::selection { background: var(--brass-soft); }

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.skip:focus { left: 20px; }

/* reading thread — a thin vertical gold line on the left margin */
.thread {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line-soft);
  z-index: 60;
}
.thread-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(var(--brass), var(--forest));
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(24px, 5vw, 72px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: padding 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}
.masthead.shrunk {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom-color: var(--line);
}

.wordmark { display: flex; align-items: baseline; gap: 12px; }
.wordmark .mono {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--forest);
}
.wordmark-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.nav { display: flex; gap: 28px; }
.nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding-bottom: 3px;
  transition: color 0.25s ease;
}
.nav a i {
  font-style: normal;
  font-size: 10px;
  color: var(--brass);
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--forest);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

#mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.25s ease;
}
#mode-toggle:hover { border-color: var(--brass); }
.mode-sep { width: 5px; height: 5px; border-radius: 999px; background: var(--brass); }
html[data-mode="evening"] .mode-day { color: var(--ink-3); }
html[data-mode="evening"] .mode-eve { color: var(--ink); }
html:not([data-mode="evening"]) .mode-day { color: var(--ink); }
html:not([data-mode="evening"]) .mode-eve { color: var(--ink-3); }

/* ---------- layout primitives ---------- */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(48px, 6.5vh, 88px) clamp(24px, 5vw, 72px);
}

.sec-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 28px;
}
.sec-kicker i {
  font-style: normal;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.sec-kicker span { position: relative; }
.sec-kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sec-title {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.12;
  max-width: 24ch;
  margin-bottom: 34px;
}
#practice .sec-title {
  max-width: none;
}

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

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 88px) clamp(24px, 5vw, 72px) clamp(56px, 9vh, 110px);
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 22px;
}
.eyebrow .tick {
  width: 22px; height: 1.5px;
  background: var(--brass);
}

.display {
  font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 30px;
}
.display em {
  display: block;
  margin-top: 0.1em;
  padding-bottom: 0.1em;
  color: var(--forest);
  font-style: italic;
  font-weight: 600;
}

.lede {
  font-size: clamp(16.5px, 1.5vw, 18px);
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 34px;
  text-align: justify;
  hyphens: auto;
}

.bi { width: 16px; height: 16px; flex: none; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn-primary { background: var(--forest); color: #fdfdfb; }
html[data-mode="evening"] .btn-primary { color: #10201a; }
.btn-primary:hover { background: var(--forest-deep); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brass); transform: translateY(-2px); }

/* hero figure */
.hero-figure { position: relative; }
.curve { width: 100%; height: auto; overflow: visible; }
.curve text { font-family: var(--sans); }
.c-cap { font-size: 11px; letter-spacing: 0.1em; font-weight: 600; }
.c-axis text { font-size: 11px; }
.c-legend text { font-size: 10.5px; }
.figure-card {
  position: absolute;
  right: 4%;
  bottom: 14%;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 14px 20px;
  box-shadow: var(--shadow);
}
.figure-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.figure-value {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}

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

.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.band > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 68px);
  align-items: start;
}
.about-grid h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.22;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}
.about-body p { margin: 0 0 18px; color: var(--ink-2); text-align: justify; hyphens: auto; }
.about-body strong { color: var(--ink); font-weight: 600; }

/* ---------- practice ---------- */

.practice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.practice-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(26px, 3vw, 40px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.practice-block:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pb-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.pb-head h3 { font-size: 24px; }
.pb-org { font-size: 13px; color: var(--forest); font-weight: 500; white-space: nowrap; }
.practice-block p { margin: 0 0 20px; color: var(--ink-2); font-size: 15.5px; text-align: justify; hyphens: auto; }
.practice-block strong { color: var(--ink); font-weight: 600; }
.pb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.pb-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.pb-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 8px; height: 8px;
  border: 1.5px solid var(--brass);
  border-radius: 999px;
}

/* ---------- record / stats ---------- */

.record { text-align: center; }
.record .sec-kicker { justify-content: center; }
.record .sec-kicker::after { display: none; }
.record .sec-title { margin-left: auto; margin-right: auto; text-align: center; max-width: 20ch; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 44px);
  border-top: 1px solid var(--line);
  padding-top: 44px;
}
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat-value {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  line-height: 1;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  position: relative;
  display: inline-block;
}
.stat-value::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--brass);
  margin: 14px auto 0;
  transform: scaleX(0);
  transition: transform 0.6s ease 0.3s;
}
.stat.in .stat-value::after { transform: scaleX(1); }
.stat-label {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
  max-width: 22ch;
  margin: 0 auto;
}

/* ---------- timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: clamp(20px, 4vw, 56px);
  padding: 0 0 40px 34px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 13px; height: 13px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--brass);
  transition: background-color 0.3s ease;
}
.tl-item:hover::before { background: var(--brass); }
.tl-year {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--brass);
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.tl-body h3 { font-size: 20px; margin-bottom: 4px; }
.tl-org { font-size: 14px; color: var(--forest); margin: 0 0 8px; font-weight: 500; }
.tl-body p { margin: 0; font-size: 15px; color: var(--ink-2); }
.tl-extra {
  position: relative;
  margin: 8px 0 0 !important;
  padding-left: 17px;
  font-size: 14px;
  color: var(--ink-3);
}
.tl-extra::before {
  content: "+";
  position: absolute;
  left: 0; top: -0.5px;
  color: var(--brass);
  font-weight: 700;
}

/* ---------- expertise ---------- */

.expertise .sec-kicker i { display: none; }
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.exp-col h3 { font-size: 21px; margin-bottom: 10px; }
.exp-col p { margin: 0; color: var(--ink-2); font-size: 15px; text-align: justify; hyphens: auto; }
.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 52px);
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.cred-k {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 10px;
}
.credentials p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.9; }

/* ---------- closing ---------- */

.closing { text-align: center; }
.closing .sec-kicker { justify-content: center; }
.closing .sec-kicker::after { display: none; }
.closing-title {
  font-size: clamp(32px, 5.5vw, 60px);
  line-height: 1.16;
  padding-bottom: 0.2em;
  max-width: 18ch;
  margin: 0 auto 24px;
  font-style: italic;
}
.closing-lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 auto 36px;
  text-align: justify;
  text-align-last: center;
  hyphens: auto;
}
.contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-loc {
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

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

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}
.foot-note { font-family: var(--serif); font-style: italic; }

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

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

.js .curtain {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.2, 1);
}
.js .curtain.in { clip-path: inset(0 0 0 0); }

.js .curve-line { stroke-dasharray: 640; stroke-dashoffset: 640; }
.js .curve-line.drawn { transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1); stroke-dashoffset: 0; }
.js .curve-area { opacity: 0; }
.js .curve-area.drawn { transition: opacity 1.2s ease 0.6s; opacity: 1; }
.js .curve-dot, .js .curve-end { opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .curve-dot.drawn { transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1); opacity: 1; }
.js .curve-dot { transform: scale(0); }
.js .curve-dot.drawn { transform: scale(1); }
.js .curve-end.drawn { transition: opacity 0.5s ease 1.5s; opacity: 1; }

.js .grid line {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
}
.js .grid line.drawn {
  transition: transform 0.7s ease calc(var(--g) * 0.1s), opacity 0.5s ease calc(var(--g) * 0.1s);
  opacity: 1;
  transform: scaleX(1);
}

.curve-pulse { opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .curve-pulse.drawn { animation: pulse-ring 2.6s ease-out 1.7s infinite; }
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

.curve-bench { opacity: 0.45; }
.js .curve-bench { opacity: 0; }
.js .curve-bench.drawn { transition: opacity 1s ease 0.9s; opacity: 0.45; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .curtain, .js .curve-line, .js .curve-area, .js .curve-dot,
  .js .curve-end, .js .grid line, .js .curve-pulse {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    stroke-dashoffset: 0 !important;
    transition: none !important;
    animation: none !important;
  }
  .js .curve-pulse { opacity: 0 !important; }
  .js .curve-bench { opacity: 0.45 !important; }
  .stat-value::after { transform: scaleX(1); }
  .btn:hover, .practice-block:hover { transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 440px; }
  .about-grid, .practice, .exp-grid, .credentials { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wordmark-name { display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  .tl-year { padding-top: 0; }
  .stats { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}
