:root {
  --ink: #18221f;
  --paper: #f2efe7;
  --paper-deep: #e6e1d5;
  --accent: #1f6f58;
  --muted: #68736e;
  --line: rgba(24, 34, 31, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, h3, p { text-wrap: pretty; }

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px clamp(24px, 5vw, 76px) 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 24%, rgba(31, 111, 88, 0.13), transparent 24rem),
    var(--paper);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.wordmark { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; }
.wordmark span, .eyebrow { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.nav-link, .text-link { font-size: 0.9rem; font-weight: 650; text-underline-offset: 5px; }
.nav-link { text-decoration: none; }
.nav-link:hover, .nav-link:focus-visible { text-decoration: underline; }
.hero-copy { width: min(980px, 100%); align-self: center; padding: 72px 0; }
.eyebrow, .section-label {
  margin: 0 0 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.section-label { color: var(--accent); }
h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 7.5rem);
  font-weight: 570;
  letter-spacing: -0.065em;
  line-height: 0.94;
}
.intro {
  max-width: 670px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.65;
}
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 36px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); background: var(--accent); }
.status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.84rem; }
.status span {
  width: 8px; height: 8px; border-radius: 50%; background: #2a9d6f;
  box-shadow: 0 0 0 5px rgba(42, 157, 111, 0.12);
}

.profile-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 clamp(24px, 5vw, 76px);
  background: var(--ink);
  color: var(--paper);
}
.profile-strip > div { min-height: 190px; padding: 44px 5vw 40px 0; border-right: 1px solid rgba(242, 239, 231, 0.16); }
.profile-strip > div + div { padding-left: 5vw; }
.profile-strip > div:last-child { border-right: 0; }
.profile-strip strong { display: block; margin-bottom: 16px; font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 540; letter-spacing: -0.06em; }
.profile-strip span { display: block; max-width: 220px; color: rgba(242, 239, 231, 0.64); font-size: 0.9rem; line-height: 1.55; }

.work-section, .experience-section, .toolbox-section, .contact-section {
  padding: clamp(80px, 11vw, 150px) clamp(24px, 5vw, 76px);
}
.work-section { background: var(--paper-deep); }
.section-heading { display: grid; grid-template-columns: minmax(180px, 0.6fr) minmax(320px, 1.4fr) minmax(240px, 0.75fr); gap: 5vw; align-items: end; }
.section-heading h2, .toolbox-section h2, .contact-section h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  font-weight: 550;
  letter-spacing: -0.06em;
  line-height: 0.98;
}
.section-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.7; }
.project-list { margin-top: 90px; border-top: 1px solid var(--line); }
.project { display: grid; grid-template-columns: 80px minmax(280px, 1fr) minmax(200px, 0.55fr); gap: 24px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.project-number, .years { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.project h3, .timeline h3 { margin: 0 0 12px; font-size: clamp(1.4rem, 2.4vw, 2.1rem); font-weight: 580; letter-spacing: -0.035em; }
.project p, .timeline p { margin: 0; color: var(--muted); line-height: 1.65; }
.project > div p { max-width: 620px; }
.project .stack { justify-self: end; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }

.experience-section { background: var(--paper); }
.section-heading.compact { grid-template-columns: minmax(180px, 0.6fr) minmax(320px, 2.2fr); }
.timeline { margin-top: 82px; margin-left: min(24vw, 360px); border-top: 1px solid var(--line); }
.timeline article { display: grid; grid-template-columns: 145px 1fr; gap: 28px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.timeline article p:last-child { max-width: 670px; }

.toolbox-section { display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(340px, 1.1fr); gap: 10vw; background: var(--accent); color: var(--paper); }
.toolbox-section .section-label { color: rgba(242, 239, 231, 0.66); }
.tool-list { display: flex; flex-wrap: wrap; align-content: start; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tool-list li { padding: 11px 15px; border: 1px solid rgba(242, 239, 231, 0.28); border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }

.contact-section { min-height: 65vh; display: flex; flex-direction: column; justify-content: center; background: var(--ink); color: var(--paper); }
.contact-section h2 { max-width: 1020px; }
.contact-link { width: fit-content; margin-top: 48px; padding-bottom: 8px; border-bottom: 1px solid rgba(242, 239, 231, 0.45); color: rgba(242, 239, 231, 0.76); font-size: clamp(1rem, 2vw, 1.35rem); text-decoration: none; }
.contact-link span { margin-left: 10px; }
.contact-link:hover, .contact-link:focus-visible { color: var(--paper); border-color: var(--paper); }

footer { display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: center; padding: 28px clamp(24px, 5vw, 76px); border-top: 1px solid rgba(242, 239, 231, 0.12); background: var(--ink); color: rgba(242, 239, 231, 0.58); font-size: 0.78rem; }
footer .wordmark { color: var(--paper); }
footer p { margin: 0; }

:focus-visible { outline: 3px solid #e7a84b; outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button { transition: none; } }

@media (max-width: 820px) {
  .section-heading, .section-heading.compact { grid-template-columns: 1fr; align-items: start; }
  .section-heading > p:last-child { max-width: 620px; }
  .project { grid-template-columns: 50px 1fr; }
  .project .stack { grid-column: 2; justify-self: start; }
  .timeline { margin-left: 0; }
  .toolbox-section { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero { min-height: 92vh; }
  .nav-links .nav-link:not(:last-child) { display: none; }
  .hero-copy { padding: 64px 0; }
  h1 { font-size: clamp(3rem, 14vw, 4.2rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .profile-strip { grid-template-columns: 1fr; }
  .profile-strip > div, .profile-strip > div + div { min-height: 0; padding: 28px 0; border-right: 0; border-bottom: 1px solid rgba(242, 239, 231, 0.16); }
  .profile-strip > div:last-child { border-bottom: 0; }
  .profile-strip strong { font-size: 3rem; }
  .project { grid-template-columns: 1fr; gap: 12px; }
  .project .stack { grid-column: auto; }
  .timeline article { grid-template-columns: 1fr; gap: 12px; }
  footer { grid-template-columns: 1fr; gap: 10px; }
}
