/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f1;
  --ink: #1a1a1a;
  --ink-soft: #565654;
  --line: #e6e6e1;
  --accent: #1f4b3f;        /* deep green */
  --accent-dark: #143028;
  --accent-ink: #ffffff;
  --warm: #d2703a;          /* burnt orange accent */
  --warm-soft: #e9a06f;
  --max: 1080px;
  --max-prose: 720px;
  --space: clamp(4rem, 9vw, 7.5rem);
  --radius: 14px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--warm);
  border-radius: 2px;
  flex: none;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand-mark { height: 26px; width: 26px; flex: none; display: block; }
.brand-word {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.brand-sub {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--accent);
  color: var(--accent-ink) !important;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.nav-cta:hover { opacity: 0.9; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- Hero (text-led) ---------- */
.hero {
  padding-top: clamp(4rem, 10vw, 7rem);
  padding-bottom: var(--space);
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  margin-bottom: 1.5rem;
  max-width: 17ch;
}
.lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------- About layout with portrait ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}
.about-portrait { margin: 0; position: sticky; top: 92px; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent-dark);
  box-shadow: 0 18px 50px rgba(20, 48, 40, 0.18);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.02) saturate(1.02);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 72%, rgba(20,48,40,0.22));
  pointer-events: none;
}
.about-content .section-head { margin-bottom: 2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--warm); color: var(--warm); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space); border-top: 1px solid var(--line); }
.section-head { max-width: 52ch; margin-bottom: 3rem; }
.section h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section-intro { margin-top: 1rem; color: var(--ink-soft); font-size: 1.1rem; }

.prose { max-width: var(--max-prose); display: grid; gap: 1.25rem; font-size: 1.12rem; color: #333331; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose-link a { color: var(--warm); font-weight: 600; }
.prose-link a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Feature / pull-quote band ---------- */
.section-feature {
  background: var(--accent);
  color: #eef3f0;
  border-top: 0;
}
.section-feature .eyebrow { color: #9fc4b6; }
.pull {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.25;
  max-width: 24ch;
  color: #fff;
  margin-bottom: 2rem;
}
.prose-on-feature { color: #d6e3dd; }
.prose-on-feature p { font-size: 1.12rem; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  border-top: 3px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  border-top-color: var(--warm);
}
.card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.card p { color: var(--ink-soft); }
.card-wide { grid-column: 1 / -1; }

/* ---------- Commitments (How I work) ---------- */
.commitments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.commitments li {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(1rem, 5vw, 3rem);
  align-items: start;
}
.commitments li:last-child { border-bottom: 1px solid var(--line); }
.commitments h3 { font-size: 1.25rem; }
.commitments p { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { max-width: 54ch; }
.contact-details { margin-top: 2rem; display: grid; gap: 1.5rem; justify-items: start; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-icon { display: inline-flex; align-items: center; gap: 0.55rem; }
.btn-icon svg { flex: none; }
.contact-meta { color: var(--ink-soft); font-size: 0.98rem; }
.contact-meta a { color: var(--accent); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding-block: 2rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-inner a:hover { color: var(--ink); }

/* ---------- CV page ---------- */
.cv-hero {
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.cv-hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 0.75rem; }
.cv-tagline { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }
.cv-contact { margin-top: 0.75rem; color: var(--ink-soft); font-size: 0.98rem; }
.cv-contact a { color: var(--accent); font-weight: 500; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.cv { max-width: 820px; padding-bottom: var(--space); }
.cv-block { padding-top: 2.75rem; margin-top: 2.75rem; border-top: 1px solid var(--line); }
.cv-block > h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}
.cv-block > p { color: #333331; font-size: 1.05rem; max-width: var(--max-prose); }

.cv-skills, .cv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.cv-skills li, .cv-list li { color: var(--ink-soft); font-size: 1.02rem; padding-left: 1.1rem; position: relative; }
.cv-skills li::before, .cv-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warm);
}
.cv-skills strong, .cv-list strong { color: var(--ink); }
.cv-pubs li { font-size: 0.98rem; line-height: 1.55; }

.cv-role { margin-bottom: 2rem; }
.cv-role:last-child { margin-bottom: 0; }
.cv-role-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.cv-role-head h3 { font-size: 1.2rem; }
.cv-date { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; white-space: nowrap; }
.cv-org { color: var(--accent); font-weight: 500; font-size: 0.98rem; margin: 0.25rem 0 0.75rem; }
.cv-role ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.4rem; }
.cv-role li { color: var(--ink-soft); font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .commitments li { grid-template-columns: 1fr; gap: 0.5rem; }
  .about-layout { grid-template-columns: 1fr; }
  .about-portrait { position: static; order: -1; max-width: 420px; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 320px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.85rem clamp(1.25rem, 5vw, 2.5rem);
  }
  .nav-cta { border-radius: 0; background: none; color: var(--accent) !important; }
}
