/* Color scheme from the "Humanity In Mundanity" deck: mint, green, fern, teal, charcoal on near-black. */
:root {
  --mint: #D9ECCE; --green: #4F9658; --fern: #467A5A; --teal: #3A615F; --char: #484646;
  --bg: #0c0e0d; --bg-alt: #121614; --surface: #171c19; --line: #242b27;
  --fg: #ecf2e8; --muted: #9aa69f; --soft: #c7d3c2;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.65 var(--sans); }
img { display: block; max-width: 100%; }
a { color: var(--mint); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
p { margin: 0 0 14px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
       backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { font-weight: 650; color: var(--fg); text-decoration: none; white-space: nowrap; }
.nav nav { display: flex; gap: 22px; overflow-x: auto; }
.nav nav a { font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav nav a:hover { color: var(--mint); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-block; padding: 11px 20px; border-radius: 8px; border: 1px solid var(--fern);
          color: var(--mint); text-decoration: none; font-weight: 600; font-size: 15px; transition: background .15s, border-color .15s; }
.button:hover { background: color-mix(in srgb, var(--green) 14%, transparent); border-color: var(--green); }
.button.primary { background: var(--green); border-color: var(--green); color: #07130b; }
.button.primary:hover { background: #5aa864; border-color: #5aa864; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 11vw, 140px) 0; border-bottom: 1px solid var(--line); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.portrait { width: clamp(220px, 24vw, 300px); height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius);
            border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
/* The title slide's stripes, as a static wavy band running across the bottom of the intro */
.hero-wave { position: absolute; left: 0; bottom: 0; width: 100%; height: 120px; pointer-events: none; }
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: calc(clamp(40px, 5vw, 64px) + 120px); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 0 0 18px; }
.intro { font-size: clamp(17px, 1.6vw, 20px); color: var(--soft); max-width: 46ch; margin-bottom: 28px; }

/* Sections */
.section { padding: clamp(64px, 8vw, 100px) 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; margin: 0 0 24px; }
h3 { font-size: 19px; line-height: 1.35; margin: 0 0 4px; }
.lede { color: var(--muted); margin: -10px 0 28px; }

.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about p { color: var(--soft); max-width: 66ch; }
.facts { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts div + div { margin-top: 16px; }
.facts dt { font-size: 13px; font-weight: 600; color: var(--green); }
.facts dd { margin: 2px 0 0; font-size: 15px; color: var(--soft); }

/* Experience */
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs > li { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.jobs > li:first-child { border-top: 0; padding-top: 4px; }
.when { font-size: 14px; color: var(--muted); padding-top: 3px; }
.where { font-size: 15px; color: var(--green); margin: 0 0 10px; }
.jobs ul { margin: 0; padding-left: 20px; }
.jobs ul li { margin-bottom: 6px; color: var(--soft); max-width: 72ch; }
.jobs ul li::marker { color: var(--green); }

/* Projects */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--radius); transition: border-color .15s; }
.card:hover { border-color: var(--fern); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15.5px; color: var(--soft); flex: 1; }
.tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 45%, transparent); color: var(--mint); }
.subhead { margin: 48px 0 16px; }
.skills { display: grid; gap: 8px 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.skills h4 { margin: 0 0 4px; font-size: 14px; color: var(--green); }
.skills p { font-size: 15px; color: var(--soft); }

/* Second ribbon: flipped, it closes off the main content and opens the film section.
   The background splits behind it so each section keeps its own color. */
.wave-divider { height: 120px; background: linear-gradient(var(--bg) 50%, var(--bg-alt) 50%); }
.wave-divider svg { display: block; width: 100%; height: 100%; transform: scaleY(-1); }
.section.after-wave { border-top: 0; }

/* Film */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }

/* Contact */
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.contact h2 { margin-bottom: 8px; }
.contact p { color: var(--soft); margin: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p { margin: 0; font-size: 14px; color: var(--muted); }

/* Photo viewer */
.viewer { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(6, 8, 7, .96); color: var(--fg); }
.viewer::backdrop { background: rgba(6, 8, 7, .96); }
.viewer img { width: 100%; height: 100%; object-fit: contain; padding: 56px 16px; }
.viewer button { position: absolute; border: 0; border-radius: 50%; background: rgba(217, 236, 206, .1); color: var(--mint);
                 width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer; }
.viewer button:hover { background: rgba(217, 236, 206, .22); }
.viewer .close { top: 12px; right: 12px; }
.viewer .prev { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer .next { right: 12px; top: 50%; transform: translateY(-50%); }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .jobs > li { grid-template-columns: 1fr; gap: 4px; }
  .brand { display: none; }
  .nav nav { gap: 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait { width: min(190px, 52vw); grid-row: 1; justify-self: center; }
  .hero { padding-top: 24px; padding-bottom: 114px; }
  .intro { margin: 0 auto; }
  .hero-grid { text-align: center; }
  .hero-wave, .wave-divider { height: 90px; }
}
