/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: rgba(237, 232, 219, 0.18); color: var(--ink); }

:root {
  --bg: #1a1814;
  --bg-elev: #25221b;
  --ink: #ede8db;
  --ink-soft: #b0a896;
  --ink-faint: #847d6f;
  --rule: #322e26;
  --rule-strong: #423c32;
  --max: 1200px;
  --pad: clamp(1.5rem, 5vw, 4rem);
}

/* ---------- Film grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain-breathe 7s ease-in-out infinite;
}
@keyframes grain-breathe {
  0%, 100% { opacity: 0.035; }
  50%      { opacity: 0.062; }
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  line-height: 1.04;
  margin-bottom: 2rem;
}
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--ink-soft); }
h2 {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 2rem;
}
h3 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
p { margin: 0 0 1.25rem; max-width: 62ch; }

/* Word-stagger fade-in for [data-stagger] headings */
[data-stagger] .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.42em);
  animation: word-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 60ms + 250ms);
  will-change: transform, opacity;
}
@keyframes word-rise {
  to { opacity: 1; transform: none; }
}

/* ---------- Scroll progress hairline ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 100;
  pointer-events: none;
}

/* ---------- Hero canvas: fixed-viewport, persists through scroll ---------- */
.hero-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
  will-change: opacity;
}
.hero-canvas-vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(26, 24, 20, 0.5) 65%, rgba(26, 24, 20, 0.92) 100%);
  will-change: opacity;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad);
  background: rgba(26, 24, 20, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--rule); }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--ink);
}
.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  text-indent: 0.36em;
}

.site-nav {
  display: flex;
  gap: 2.4rem;
  font-size: 0.88rem;
  font-weight: 400;
}
.site-nav a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { width: 100%; }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { width: 100%; background: var(--rule-strong); }

.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: var(--ink);
  transition: transform 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--bg);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
}
.mobile-nav[hidden] { display: none; }

/* ---------- Layout ---------- */
main { display: block; position: relative; z-index: 1; }
.section {
  position: relative;
  z-index: 1;
  padding: clamp(6rem, 12vw, 11rem) var(--pad);
}
.section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 1px;
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}
.section.in::before { transform: scaleX(1); }

.section-body {
  max-width: var(--max);
  margin: 0 auto;
}
.section-body-narrow {
  max-width: 720px;
}
.section-label {
  max-width: var(--max);
  margin: 0 auto 3rem;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.section-cta-block { padding-top: clamp(4rem, 8vw, 7rem); }
.section-cta .cta { margin-top: 1rem; }

/* ---------- Immersive Hero (homepage) ---------- */
.hero-immersive {
  position: relative;
  z-index: 1;
  padding: clamp(6rem, 10vw, 8rem) var(--pad) clamp(3rem, 6vw, 4.5rem);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.hero-immersive h1 {
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 2.25rem;
}
.hero-immersive h1 em {
  display: inline-block;
}
.hero-content {
  will-change: transform;
}

/* ---------- Split editorial hero (atmospheric image, right column) ---------- */
.hero-immersive { overflow: hidden; }
.hero-immersive .hero-content {
  max-width: none;
  margin: 0;
  padding-right: clamp(320px, 47vw, 800px);
}
.hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: clamp(300px, 44vw, 760px);
  z-index: 0;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: grayscale(1) contrast(1.05) brightness(0.52);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 1%, rgba(26, 24, 20, 0.5) 34%, rgba(26, 24, 20, 0.04) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(26, 24, 20, 0) 22%);
}
@media (max-width: 860px) {
  .hero-immersive .hero-content {
    max-width: 100%;
    padding-right: 0;
  }
  .hero-bg {
    width: 100%;
  }
  .hero-bg img { object-position: 50% 40%; }
  .hero-bg::after {
    background:
      linear-gradient(180deg, rgba(26, 24, 20, 0.5) 0%, rgba(26, 24, 20, 0.82) 55%, var(--bg) 90%);
  }
}

.hero .lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 2rem;
}

.hero-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  max-width: 56ch;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
}
.hero-scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, var(--ink-faint) 0%, transparent 100%);
  animation: scroll-hint 2.6s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-hint {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ---------- Page hero (About / Contact) ---------- */
.page-hero {
  position: relative;
  z-index: 1;
  padding: clamp(8rem, 14vw, 12rem) var(--pad) clamp(1.5rem, 3vw, 2.5rem);
  max-width: var(--max);
  margin: 0 auto;
}
.page-eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2rem;
}
.page-lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* ---------- CTA ---------- */
.cta {
  display: inline-block;
  padding: 0.95rem 0;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.2s ease, letter-spacing 0.3s ease;
}
.cta:hover { letter-spacing: 0.06em; }

/* ---------- Inline body links ---------- */
.section-body p a {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}
.section-body p a:hover { border-bottom-color: var(--ink); }

/* ---------- About page ---------- */
.about-intro { padding-top: clamp(2.25rem, 4vw, 3.25rem); }

.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-portrait { display: flex; flex-direction: column; gap: 1rem; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  background: linear-gradient(135deg, #322e26 0%, #1f1c16 100%);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portrait-initials {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 5.5rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.portrait-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait-caption {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.about-bio p { font-size: 1.05rem; color: var(--ink); }
.about-bio p em { color: var(--ink-soft); font-style: italic; font-weight: 500; }

/* ---------- CV list ---------- */
.cv-list {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
}
.cv-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
/* last timeline item has no closing border — the next section's hairline divides */
.cv-date {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  padding-top: 4px;
}
.cv-detail h3 { margin-top: 0; }
.cv-org {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0.25rem 0 1rem;
}
.cv-detail p:last-child { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- Facts grid ---------- */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}
.fact h3 {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.fact p { margin: 0; color: var(--ink); }
.fact p a {
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.2s ease;
}
.fact p a:hover { border-bottom-color: var(--ink); }

.languages-line {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}

.section-tight {
  padding-top: clamp(2rem, 4vw, 2.75rem);
  padding-bottom: clamp(2rem, 4vw, 2.75rem);
}
.section-tight .section-label { margin-bottom: 0.8rem; }
.section-flush-bottom { padding-bottom: clamp(2rem, 4vw, 2.75rem); }

/* ---------- About — narrative story ---------- */
.story { max-width: 760px; }
.story h2 { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.chapter {
  padding: clamp(2.5rem, 5.5vw, 4rem) 0;
  border-top: 1px solid var(--rule);
}
.chapter:first-of-type { border-top: none; padding-top: 0; }
.chapter:last-of-type { padding-bottom: 0; }
.chapter-year {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}
.chapter h3 {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}
.chapter p {
  font-size: 1.12rem;
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 64ch;
}
.chapter p:last-child { margin-bottom: 0; }
.chapter p em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Value list (homepage — what I bring) ---------- */
.value-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  max-width: 66ch;
}
.value-list li {
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}
.value-list li:last-child { border-bottom: 1px solid var(--rule); }
.value-list strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Process list ---------- */
.process-list {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  counter-reset: step;
}
.process-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 80px 1fr;
  column-gap: 2rem;
  row-gap: 0.5rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
.process-list li:last-child { border-bottom: 1px solid var(--rule); }
.process-list li::before {
  content: counter(step, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--ink-faint);
  font-style: italic;
}
.process-list li h3 {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
}
.process-list li p {
  grid-column: 2;
  grid-row: 2;
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */
.contact-form {
  max-width: 560px;
  margin: 3rem 0;
}
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.75rem;
}
.form-row label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}
.optional {
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}
.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  outline: none;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus { border-bottom-color: var(--ink); }
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--ink-faint); }

.form-status {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-height: 1.4em;
}
.form-status.error { color: #d8a39a; }
.form-status.success { color: #a4c7a6; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-privacy {
  margin: 1.5rem 0 0;
  max-width: 52ch;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.direct-contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.direct-contact p {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}
.direct-contact a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.direct-contact a:hover { border-bottom-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 4rem var(--pad) 3rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 2rem;
}
.footer-brand .brand-name {
  font-size: 0.92rem;
}
.footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-faint);
}
.footer-clock {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.footer-clock .clock-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  margin-right: 0.5rem;
  vertical-align: 1px;
  animation: clock-pulse 2.4s ease-in-out infinite;
}
@keyframes clock-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
.footer-follow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.footer-follow-label {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-align: center;
}
.footer-social {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
}
.footer-social a {
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-social a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.footer-meta {
  margin: 0;
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-portrait { max-width: 320px; }

  .cv-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .cv-date { padding-top: 0; }

  .facts-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 800px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }

  .process-list li {
    grid-template-columns: 50px 1fr;
    column-gap: 1rem;
    row-gap: 0.4rem;
    padding: 1.75rem 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 2.5rem;
  }
  .footer-meta { text-align: left; }
  .footer-follow { align-items: flex-start; }

  .hero-scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  [data-stagger] .word { opacity: 1; transform: none; }
  .section::before { transform: scaleX(1); }
}
