:root {
  --green: #0d491f;
  --green-dark: #083416;
  --green-pale: #e9f1eb;
  --ink: #172019;
  --muted: #5c675f;
  --paper: #fbfcfa;
  --white: #fff;
  --line: #d9e0da;
  --shadow: 0 20px 55px rgba(14, 31, 19, .12);
  --radius: 22px;
  --shell: min(1120px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
code { font-size: .9em; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1000; padding: .75rem 1rem; background: var(--white); border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,252,250,.92); border-bottom: 1px solid rgba(13,73,31,.12); backdrop-filter: blur(14px); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { color: var(--green); font-weight: 800; font-size: 1.12rem; text-decoration: none; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 650; font-size: .94rem; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--green); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px; background: var(--ink); }

.hero { min-height: 660px; display: grid; align-items: center; position: relative; color: var(--white); background: url('../img/hero.jpg') center 54% / cover no-repeat; isolation: isolate; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,21,10,.9) 0%, rgba(5,21,10,.74) 48%, rgba(5,21,10,.24) 100%); }
.hero-content { padding-block: 90px; }
.eyebrow { margin: 0 0 14px; color: #9bc8a7; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.hero h1 { max-width: 820px; margin: 0; font-size: clamp(3rem, 7vw, 6.7rem); line-height: .96; letter-spacing: -.055em; }
.hero-copy { max-width: 720px; margin: 28px 0 0; color: rgba(255,255,255,.84); font-size: clamp(1.08rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font-weight: 750; }
.button-primary { background: var(--white); color: var(--green-dark); }
.button-secondary { color: var(--white); border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }
.button:hover { transform: translateY(-1px); }

.section { padding-block: clamp(76px, 10vw, 132px); scroll-margin-top: 72px; }
.section-tinted { background: var(--green-pale); }
.section-heading { max-width: 790px; margin-bottom: 48px; }
.section-heading h2, .contact-section h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: 1.02; letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; }
.about-grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(40px, 8vw, 100px); align-items: start; }
.portrait-card { margin: 0; }
.portrait-card img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(-1.25deg); }
.portrait-card figcaption { margin-top: 16px; color: var(--muted); font-size: .82rem; }
.prose { font-size: 1.12rem; }
.prose p:first-child { margin-top: 0; font-size: 1.35rem; line-height: 1.55; }
.link-row { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 30px; }
.link-row a, .text-link { color: var(--green); font-weight: 780; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.experience-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.experience-card, .project-card, .contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(14,31,19,.05); }
.experience-card { padding: 32px; }
.card-kicker { margin: 0 0 8px; color: var(--green); font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.experience-card h3, .project-card h3 { margin: 0 0 12px; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.025em; }
.experience-card p:last-child, .project-card p { color: var(--muted); }
.centered-action { margin: 36px 0 0; text-align: center; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.project-card { display: grid; grid-template-columns: 112px 1fr; gap: 24px; padding: 28px; align-items: center; }
.project-card.featured { grid-column: 1 / -1; grid-template-columns: 180px 1fr; padding: 38px; }
.project-logo { min-height: 100px; display: grid; place-items: center; padding: 14px; border-radius: 16px; background: #102f1a; }
.project-logo img { max-height: 90px; object-fit: contain; }
.project-card.featured .project-logo { min-height: 160px; }

.contact-section { color: var(--white); background: var(--green-dark); }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 70px; align-items: center; }
.contact-grid > div:first-child > p:last-child { max-width: 650px; color: rgba(255,255,255,.72); font-size: 1.08rem; }
.contact-card { padding: 34px; color: var(--ink); }
.contact-label { margin: 0 0 10px; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.contact-card > a { color: var(--green); font-weight: 850; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.contact-note { color: var(--muted); font-size: .84rem; }
.footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .9rem; }
.footer a { color: var(--green); font-weight: 700; }

.project-card .project-logo,
.project-card .card-kicker,
.project-card h3,
.project-card p,
.project-card .text-link {
    opacity: 0;
    transform: translateY(12px);
}

.project-card.visible .project-logo {
    opacity: 1;
    transform: none;
    transition: .45s ease;
}

.project-card.visible .card-kicker {
    opacity: 1;
    transform: none;
    transition: .45s ease .08s;
}

.project-card.visible h3 {
    opacity: 1;
    transform: none;
    transition: .45s ease .16s;
}

.project-card.visible p {
    opacity: 1;
    transform: none;
    transition: .45s ease .24s;
}

.project-card.visible .text-link {
    opacity: 1;
    transform: none;
    transition: .45s ease .32s;
}

:focus-visible { outline: 3px solid #7cb88a; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media (max-width: 780px) {
  :root { --shell: min(100% - 28px, 680px); }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 22px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .hero { min-height: 620px; background-position: 62% center; }
  .hero-scrim { background: rgba(5,21,10,.78); }
  .about-grid, .contact-grid, .experience-grid, .project-grid { grid-template-columns: 1fr; }
  .portrait-card { max-width: 360px; }
  .project-card, .project-card.featured { grid-column: auto; grid-template-columns: 88px 1fr; padding: 22px; }
  .project-card.featured .project-logo { min-height: 100px; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 3.2rem; }
  .hero-actions .button { width: 100%; }
  .project-card, .project-card.featured { grid-template-columns: 1fr; }
  .project-logo { min-height: 120px; }
  .footer-inner { flex-direction: column; }
}
