:root {
  --ink: #20231f;
  --muted: #666960;
  --cream: #f5f1e9;
  --paper: #fbfaf6;
  --taupe: #c8beb5;
  --taupe-dark: #8d8178;
  --sage: #90a17c;
  --sage-dark: #526149;
  --line: rgba(32, 35, 31, 0.18);
  --shadow: 0 24px 70px rgba(42, 41, 36, 0.13);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
}
.site-header.scrolled {
  padding-top: 11px;
  padding-bottom: 11px;
  background: rgba(251, 250, 246, .93);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 13px;
}
.brand-text { font-size: 14px; }
.main-nav { display: flex; gap: 30px; }
.main-nav a {
  position: relative;
  text-decoration: none;
  font-size: 14px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transition: right .25s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }
.menu-toggle { display: none; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 130px clamp(24px, 8vw, 120px) 90px;
  background: #dfe7d8;
}
.map-pattern {
  position: absolute;
  inset: -8%;
  opacity: .72;
  background:
    linear-gradient(26deg, transparent 44%, rgba(255,255,255,.88) 45%, rgba(255,255,255,.88) 47%, transparent 48%),
    linear-gradient(112deg, transparent 44%, rgba(255,255,255,.72) 45%, rgba(255,255,255,.72) 47%, transparent 48%),
    linear-gradient(163deg, transparent 43%, rgba(255,255,255,.62) 44%, rgba(255,255,255,.62) 46%, transparent 47%),
    repeating-linear-gradient(12deg, transparent 0 74px, rgba(255,255,255,.62) 75px 78px),
    repeating-linear-gradient(102deg, transparent 0 100px, rgba(255,255,255,.5) 101px 104px),
    radial-gradient(circle at 15% 30%, #b8d2a7 0 13%, transparent 13.5%),
    radial-gradient(circle at 78% 15%, #b9d9a6 0 10%, transparent 10.5%),
    radial-gradient(circle at 72% 78%, #a9c996 0 14%, transparent 14.5%),
    #d8ded5;
  transform: rotate(-4deg) scale(1.06);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(245,241,233,.92), rgba(245,241,233,.65) 48%, rgba(245,241,233,.12));
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
}
.eyebrow, .section-kicker {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 10vw, 145px);
  line-height: .82;
  letter-spacing: -.055em;
  font-weight: 400;
}
.hero h1 span { margin-left: clamp(28px, 8vw, 120px); }
.hero-subtitle {
  width: fit-content;
  margin: 34px 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  font-family: Georgia, serif;
  font-size: clamp(18px, 2vw, 27px);
}
.hero-intro { max-width: 580px; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 23px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn-secondary { background: rgba(255,255,255,.35); }
.scroll-indicator {
  position: absolute;
  right: clamp(24px, 5vw, 70px);
  bottom: 32px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  text-decoration: none;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(7px); } }

.section { padding: 110px clamp(22px, 7vw, 110px); }
.section-light { background: var(--paper); }
.section-taupe { background: #d7d0c9; }
.section-heading { max-width: 860px; margin-bottom: 56px; }
.section-heading h2, .contact-card h2 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -.035em;
}
.section-heading > p:last-child { max-width: 720px; color: var(--muted); font-size: 17px; }
.profile-grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: clamp(36px, 7vw, 110px); align-items: start; }
.profile-copy { max-width: 780px; }
.lead { font-family: Georgia, serif; font-size: clamp(23px, 3vw, 34px); line-height: 1.38; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.profile-meta span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.inline-cv-link { display: inline-block; margin-top: 24px; font-weight: 700; text-underline-offset: 5px; }
.skills-panel { padding: 32px; background: var(--taupe); box-shadow: var(--shadow); }
.skills-panel h3 { margin: 0 0 20px; font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.skills-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.skills-panel li { padding: 15px 17px; border: 1px solid rgba(32,35,31,.28); background: rgba(251,250,246,.72); font-size: 14px; }

.journey-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.timeline { padding: clamp(25px, 4vw, 45px); background: rgba(251,250,246,.66); border: 1px solid rgba(32,35,31,.12); }
.timeline h3 { margin-top: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.timeline-item { position: relative; padding: 24px 0 24px 28px; border-left: 1px solid var(--taupe-dark); }
.timeline-item::before { content: ""; position: absolute; left: -5px; top: 31px; width: 9px; height: 9px; border-radius: 50%; background: var(--sage-dark); }
.timeline-item + .timeline-item { border-top: 1px solid rgba(32,35,31,.10); }
.timeline-item .date { color: var(--sage-dark); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.timeline-item h4 { margin: 6px 0; font-size: 18px; }
.timeline-item p { margin: 0; color: var(--muted); }
.toolbox { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border: 1px solid rgba(32,35,31,.18); background: rgba(251,250,246,.45); }
.toolbox div { padding: 25px; }
.toolbox div + div { border-left: 1px solid rgba(32,35,31,.18); }
.toolbox strong, .toolbox span { display: block; }
.toolbox strong { margin-bottom: 8px; font-family: Georgia, serif; font-size: 20px; }
.toolbox span { color: var(--muted); font-size: 14px; }

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 42px;
}
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 54px;
  padding: 8px 12px 8px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.filter-label {
  text-transform: uppercase;
  letter-spacing: .115em;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.filter-count {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(32, 35, 31, .07);
  font-size: 12px;
  font-weight: 800;
}
.filter-button:hover { transform: translateY(-1px); border-color: var(--ink); }
.filter-button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-button.active .filter-count { background: rgba(255, 255, 255, .18); }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project-card {
  position: relative;
  min-height: 410px;
  padding: clamp(28px, 4vw, 48px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background .25s ease, transform .25s ease;
}
.project-card:hover { background: var(--cream); }
.project-card.featured { background: #dfe7d8; }
.project-card.hidden { display: none; }
.project-number { position: absolute; top: 28px; right: 30px; color: var(--taupe-dark); font-family: Georgia, serif; font-size: 38px; }
.project-type { margin: 0 55px 22px 0; color: var(--sage-dark); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
.project-card h3 { max-width: 520px; margin: 0 0 18px; font-family: Georgia, serif; font-size: clamp(26px, 3vw, 39px); line-height: 1.15; font-weight: 400; }
.project-card p { color: var(--muted); }
.project-card ul { margin: 18px 0; padding-left: 18px; color: var(--muted); }
.project-link { display: inline-block; margin-top: 18px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.project-link-unavailable { color: var(--taupe-dark); font-weight: 600; cursor: default; }

.contact-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(245,241,233,.94), rgba(245,241,233,.68)),
    repeating-linear-gradient(33deg, #b9cda9 0 55px, #eef0ea 56px 61px, #d6ddd0 62px 106px);
}
.contact-card { max-width: 820px; padding: clamp(35px, 6vw, 74px); background: rgba(251,250,246,.92); box-shadow: var(--shadow); }
.contact-card > p:not(.section-kicker) { max-width: 620px; color: var(--muted); font-size: 17px; }
.contact-links { display: flex; flex-direction: column; gap: 7px; margin: 27px 0; }
.contact-links a { width: fit-content; font-size: clamp(17px, 2vw, 23px); text-underline-offset: 5px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(22px, 7vw, 110px); background: var(--ink); color: var(--paper); font-size: 13px; }
.site-footer a { text-underline-offset: 4px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: rgba(251,250,246,.72);
    cursor: pointer;
  }
  .menu-toggle span { display: block; height: 1px; background: currentColor; transition: transform .25s ease, opacity .25s ease; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: grid;
    place-content: center;
    gap: 25px;
    background: rgba(245,241,233,.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .menu-open .main-nav { opacity: 1; pointer-events: auto; }
  .main-nav a { font-family: Georgia, serif; font-size: 38px; }
  .profile-grid, .journey-grid, .projects-grid { grid-template-columns: 1fr; }
  .toolbox { grid-template-columns: 1fr; }
  .toolbox div + div { border-left: 0; border-top: 1px solid rgba(32,35,31,.18); }
  .projects-grid { border-left: 0; }
  .project-card { border-left: 1px solid var(--line); min-height: auto; }
}

@media (max-width: 560px) {
  .brand-text { display: none; }
  .hero { padding-left: 22px; padding-right: 22px; }
  .hero h1 span { margin-left: 20px; }
  .hero-overlay { background: rgba(245,241,233,.72); }
  .section { padding-top: 82px; padding-bottom: 82px; }
  .project-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  .filter-button { flex: 0 0 auto; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
