:root {
  --bg: #F4F1EA;
  --surface: #FFFCF7;
  --ink: #1C1916;
  --muted: #5E5850;
  --line: #D9D2C6;
  --accent: #8F1D2C;
  --accent-soft: #F3E4E6;
  --max: 1040px;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  z-index: 80;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, white);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-links {
  display: flex;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { background: var(--surface); text-decoration: none; }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: #000; color: var(--bg); }
.btn-small { min-height: 36px; padding: 0.3rem 0.85rem; font-size: 0.88rem; }

section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
}
.hero { border-top: 0; padding-top: clamp(3.5rem, 10vw, 7rem); }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: end;
}
.hero-grid { max-width: 42rem; }
.headshot {
  width: min(280px, 42vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 10vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.lede {
  margin: 1.1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.3;
}
.headline-full {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.section-label {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-intro { max-width: 36rem; margin-bottom: 2.25rem; }
.section-intro h2,
.split h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-note { color: var(--muted); margin: 0.75rem 0 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2.5rem;
}
.prose p { margin: 0 0 1rem; }
.proof-list {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.proof-list li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline > li {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.when {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.timeline h3,
.edu-grid h3,
.project h3,
.skill-groups h3 {
  margin: 0;
  font-size: 1.15rem;
}
.org, .meta {
  margin: 0.2rem 0 0.75rem;
  color: var(--muted);
}
.timeline ul,
.edu-grid ul {
  margin: 0;
  padding-left: 1.1rem;
}
.timeline li li,
.edu-grid li { margin-bottom: 0.35rem; }

.project {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}
.project.featured {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: stretch;
}
.tag {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.project-copy p { margin: 0.6rem 0 0; color: var(--muted); }
.project-visual { margin: 0; }
.project-visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.edu-photo { margin: 1.1rem 0 0; }
.edu-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
}
.edu-photo figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.diagrams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}
.diagrams.three { grid-template-columns: 1fr 1fr 1fr; }
.diagrams figure { margin: 0; }
.diagrams img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
}
.diagrams figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.degree {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-weight: 600;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.skill-groups p { margin: 0.5rem 0 0; color: var(--muted); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.connect-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.connect-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 8.5rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.connect-card:hover {
  border-color: var(--ink);
  text-decoration: none;
}
.connect-card .platform,
.modal .platform {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.connect-card span:last-child { color: var(--muted); font-size: 0.92rem; }

.footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer a { color: inherit; margin-right: 0.85rem; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 25, 22, 0.45);
}
.modal.open { display: flex; }
.modal-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.35rem;
}
.modal-panel h3 { margin: 0.2rem 0 0.45rem; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.modal-panel p { margin: 0 0 1rem; color: var(--muted); }
.modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .split,
  .timeline > li,
  .project.featured,
  .edu-grid,
  .skill-groups,
  .diagrams,
  .diagrams.three,
  .connect-grid,
  .hero-layout {
    grid-template-columns: 1fr;
  }
  .timeline > li { gap: 0.35rem; }
  .headshot { width: 200px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem 1rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 0.7rem; }
  .site-nav .btn { width: fit-content; }
}
