:root {
  --ground: #0B0B0C;
  --text: #EDEDED;
  --body: #B6B6BD;
  --muted: #9B9BA3;
  --faint: #8A8A90;
  --meta: #6E6E76;
  --line: rgba(237, 237, 237, 0.12);
  --accent: #3E6A3C;
  --mint: #CBE9C0;
  --gutter: 120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--ground);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mint); color: var(--ground); }
/* on the mint band, flip to the deep green so the selection still shows */
.contact ::selection { background: var(--accent); color: #F3F7F9; }
a { color: var(--text); text-decoration: none; }
a:hover { color: #FFFFFF; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
img { display: block; }

.arrow { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }

/* page and background layers */
.page { position: relative; min-height: 100vh; }
.bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1500px 900px at 14% -14%, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0) 62%),
    linear-gradient(158deg, #1A1B1F 0%, #101113 38%, #0B0B0C 68%);
  box-shadow: inset 0 0 300px 80px rgba(0,0,0,0.55);
}
.page > *:not(.bg):not(.nav) { position: relative; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,11,12,0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav a {
  display: flex; align-items: center;
  padding: 0 28px;
  font-size: 13px; font-weight: 400; text-transform: uppercase;
  border-right: 1px solid var(--line);
  text-decoration-thickness: 6px; text-underline-offset: -3px;
  text-decoration-color: var(--accent); text-decoration-skip-ink: none;
}
.nav-name { flex-grow: 1.6; letter-spacing: 0.24em; }
.nav-link { flex-grow: 1; justify-content: center; letter-spacing: 0.12em; color: var(--muted); }
.nav-name.is-active, .nav-link.is-active { text-decoration-line: underline; }
.nav-link.is-active { color: var(--text); }
.nav-menu .nav-link:last-child { border-right: none; }
.nav-menu { display: contents; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 56px; height: 56px; padding: 0; border: none; border-left: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer;
}
.nav-toggle .bar { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; transform-origin: 10px 10px; transition: transform 200ms ease, opacity 150ms ease; }
.nav-toggle[aria-expanded="true"] .bar-top { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-mid { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar-bot { transform: translateY(-4px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .nav-toggle .bar { transition: none; } }

/* sections */
main { display: flex; flex-direction: column; }
.hero {
  padding: 88px var(--gutter);
  display: flex; flex-direction: column; gap: 36px;
}
.hero-id { display: flex; align-items: center; gap: 18px; }
.hero-id img {
  width: 76px; height: 76px; flex: none;
  border-radius: 6px; object-fit: cover; border: 1px solid var(--line);
}
.hero-meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.dim { color: var(--faint); }
.hero h1 { max-width: 1100px; font-size: 72px; line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; }
.lede { max-width: 720px; font-size: 21px; line-height: 1.55; color: var(--body); }

.section {
  border-top: 1px solid var(--line);
  padding: 48px var(--gutter) 96px;
  display: flex; flex-direction: column; gap: 32px;
}
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

.rows { display: flex; flex-direction: column; gap: 36px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; }
.row-head { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: baseline; }
.row h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.rows .row p { font-size: 17px; line-height: 1.6; color: var(--body); }

/* work */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 48px; }
.work-card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start;
  margin: -16px; padding: 16px; border-radius: 10px;
  transition: background-color 180ms ease;
}
.work-media {
  position: relative; height: 170px;
  border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line);
}
.work-media img, .work-video { width: 100%; height: 100%; object-fit: cover; }
.work-video { position: absolute; inset: 0; opacity: 0; transition: opacity 260ms ease; }
.work-text { display: flex; flex-direction: column; gap: 10px; }
.work-meta { font-size: 12px; color: var(--meta); }
.work-text h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.work-text p { font-size: 15px; line-height: 1.65; color: var(--muted); }
.inline-link {
  text-decoration-line: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: rgba(237,237,237,0.4);
}
@media (prefers-reduced-motion: reduce) {
  .work-card { transition: none; }
  .work-video { display: none; }
}

/* experience */
.timeline { position: relative; display: flex; flex-direction: column; gap: 44px; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px;
  width: 1px; background: rgba(237,237,237,0.16);
}
.when { position: relative; padding-left: 28px; font-size: 15px; color: var(--faint); white-space: nowrap; }
.when.current { color: var(--text); }
.dot {
  position: absolute; left: 0; top: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--ground); border: 1px solid rgba(237,237,237,0.45);
}
.current .dot { background: var(--text); border-color: var(--text); }
.role { display: flex; flex-direction: column; gap: 6px; }
.org { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.title { font-size: 16px; color: var(--muted); }
.timeline .row p { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* contact band */
.contact { position: relative; overflow: hidden; background: var(--mint); }
.contact-mesh {
  position: absolute; inset: -160px; filter: blur(60px);
  background:
    radial-gradient(520px 420px at 14% 18%, #F7FFF2 0%, rgba(247,255,242,0) 60%),
    radial-gradient(560px 440px at 38% 86%, #A6D98A 0%, rgba(166,217,138,0) 62%),
    radial-gradient(620px 460px at 66% 10%, #D4F0C2 0%, rgba(212,240,194,0) 62%),
    radial-gradient(520px 420px at 88% 72%, #78C79A 0%, rgba(120,199,154,0) 62%),
    radial-gradient(460px 380px at 58% 48%, #ECF8E4 0%, rgba(236,248,228,0) 60%),
    var(--mint);
}
.contact-grain { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; opacity: 0.28; pointer-events: none; }
.contact-inner { position: relative; padding: 88px var(--gutter); display: flex; flex-direction: column; gap: 40px; }
.contact h2 { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: #0D1114; }
.contact-cols { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.contact-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.contact-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #46545C; }
.contact-value {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: #0D1114;
  text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: transparent; transition: text-decoration-color 150ms;
}
.contact-value:hover { color: #0D1114; text-decoration-color: rgba(13,17,20,0.5); }
.arrow-sq { flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; stroke-linejoin: miter; }
.email-row { display: flex; align-items: center; gap: 4px; }
.copy-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border: none; border-radius: 4px; background: transparent; padding: 0; cursor: pointer;
  transition: background-color 150ms;
}
.copy-btn:hover, .copy-btn.copied { background: rgba(13,17,20,0.08); }
.copy-btn svg { fill: none; stroke: #0D1114; stroke-width: 1.4; stroke-linecap: square; stroke-linejoin: miter; }
/* kept for screen readers; sighted users see the tooltip change to "Copied" */
.copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tooltips on contact actions */
[data-tip] { position: relative; }
[data-tip]::before, [data-tip]::after {
  position: absolute; left: 50%; pointer-events: none; z-index: 5;
  opacity: 0; transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
}
[data-tip]::after {
  content: attr(data-tip); bottom: calc(100% + 10px);
  padding: 6px 9px; border-radius: 4px;
  background: #11161A; color: #F3F7F9;
  font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.3; white-space: nowrap;
}
[data-tip]::before {
  content: ""; bottom: calc(100% + 5px);
  border: 5px solid transparent; border-bottom: 0; border-top-color: #11161A;
}
@media (hover: hover) {
  [data-tip]:hover::before, [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }
}
[data-tip]:focus-visible::before, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  [data-tip]::before, [data-tip]::after { transition: none; transform: translate(-50%, 0); }
}

.footer {
  border-top: 1px solid var(--line);
  padding: 36px var(--gutter);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--meta);
}

/* responsive */
@media (max-width: 1200px) {
  :root { --gutter: 64px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .row-head { grid-template-columns: 200px minmax(0, 1fr); }
  .rows .spacer { display: none; }
  .rows .row-head { grid-template-columns: minmax(0, 1fr); }
  .timeline .row p { padding-left: 28px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 56px; }
  .nav { height: 56px; }
  .nav a { height: 56px; font-size: 12px; white-space: nowrap; }
  .nav .nav-name { flex: 1 1 auto; min-width: 0; padding: 0 16px; letter-spacing: 0.14em; border-right: none; }
  .nav-toggle { display: flex; border-left: none; border-right: 1px solid var(--line); }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: #0E0E10; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0,0,0,0.45);
  }
  .nav.is-open .nav-menu { display: flex; }
  .nav-menu .nav-link {
    justify-content: flex-start; padding: 0 16px; font-size: 13px; letter-spacing: 0.12em;
    border-right: none; border-top: 1px solid var(--line);
  }
  .nav-menu .nav-link:first-child { border-top: none; }
  .nav .nav-name.is-active { text-decoration-line: none; }
  .hero { padding-top: 56px; padding-bottom: 56px; gap: 28px; }
  .hero h1 { font-size: 44px; }
  .lede { font-size: 18px; }
  .section { padding-bottom: 72px; }
  .work-card { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; }
  .work-media { height: auto; aspect-ratio: 240 / 170; }
  .row-head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .timeline .row-head .role { padding-left: 28px; }
  /* contact: labelled links stacked */
  .contact-mesh {
    inset: -80px; filter: blur(40px);
    background:
      radial-gradient(260px 210px at 14% 18%, #F7FFF2 0%, rgba(247,255,242,0) 60%),
      radial-gradient(280px 220px at 38% 86%, #A6D98A 0%, rgba(166,217,138,0) 62%),
      radial-gradient(310px 230px at 66% 10%, #D4F0C2 0%, rgba(212,240,194,0) 62%),
      radial-gradient(260px 210px at 88% 72%, #78C79A 0%, rgba(120,199,154,0) 62%),
      radial-gradient(230px 190px at 58% 48%, #ECF8E4 0%, rgba(236,248,228,0) 60%),
      var(--mint);
  }
  .contact-inner { padding: 40px 20px 48px; gap: 28px; }
  .contact h2 { font-size: 28px; letter-spacing: -0.02em; }
  .contact-cols { flex-direction: column; gap: 20px; }
  .contact-value { font-size: 18px; padding: 10px 0; margin: -10px 0; }
  .copy-btn { width: 44px; height: 44px; margin: -6px 0; }
  .footer { flex-direction: column; gap: 8px; }
}
@media (max-width: 380px) {
  .nav .nav-name { padding: 0 12px; letter-spacing: 0.08em; font-size: 11px !important; }
  .nav-toggle { width: 48px; }
  .hero h1 { font-size: 38px; }
}
