:root {
  color-scheme: dark;
  --page-max: 1600px;
  --bg: #111310;
  --surface: #181b16;
  --text: #f1f3ec;
  --muted: #a3aa9a;
  --line: #343930;
  --accent: #c7f36b;
  --display: "Space Grotesk", sans-serif;
  --body: "DM Sans", sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 74px;
  background: #0a0c09;
}
body {
  width: 100%;
  max-width: var(--page-max);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: 66px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; }
button, a, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
::selection { background: var(--accent); color: var(--bg); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
}
.skip-link:focus { top: 10px; }

.site-header {
  position: fixed;
  inset: 0 auto auto 50%;
  z-index: 20;
  width: min(100%, var(--page-max));
  height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-inline: max(5%, calc((min(100%, var(--page-max)) - 1200px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(17 19 16 / 94%);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  transition: background 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.site-header.is-scrolled {
  background: rgb(17 19 16 / 98%);
  border-color: #3d4338;
  box-shadow: 0 12px 32px rgb(0 0 0 / 24%);
}
.wordmark {
  width: fit-content;
  font: 600 28px/1 var(--display);
  letter-spacing: -1.8px;
}
.wordmark span { color: var(--accent); }
.desktop-nav { display: flex; gap: 34px; }
.desktop-nav a, .nav-contact, .social-links a {
  color: #c3c8bb;
  font-size: 14px;
  transition: color 160ms ease;
}
.desktop-nav a[aria-current] { color: var(--accent); }
.header-actions { justify-self: end; display: flex; align-items: center; }
.nav-contact { color: var(--text); }
.menu-toggle, .mobile-nav { display: none; }

.hero, .section, .site-footer {
  width: min(1200px, 90%);
  margin-inline: auto;
}
.hero { padding: 60px 0 0; }
.eyebrow, .section-label, .skills-grid > article > span, .education > div:first-child > span {
  color: var(--muted);
  font: 13px/1.4 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; }
/* Keep each phrase intact so a narrow screen breaks at the separator, not mid-phrase. */
.eyebrow > span:not(.status-dot) { white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr);
  gap: clamp(56px, 6vw, 96px);
  align-items: end;
  padding: 60px 0 70px;
}
.intro { margin-bottom: 18px; color: var(--muted); }
h1 {
  max-width: 850px;
  font-size: clamp(54px, 7.4vw, 108px);
  line-height: .97;
  letter-spacing: -.065em;
}
.hero-aside { padding-bottom: 8px; }
.hero-aside > p { color: #b8beb0; font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
/* Let the row wrap instead of squeezing a link narrower than its own text. */
.hero-actions > * { flex-shrink: 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #18200e;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.text-link { padding-block: 10px; border-bottom: 1px solid #5b6352; font-size: 14px; }
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  color: #8f9787;
  font: 12px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hero-meta span:nth-child(2) { text-align: center; }
.hero-meta span:last-child { text-align: right; }

.section { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.section-label { margin-bottom: 32px; color: var(--accent); }
.about-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); gap: clamp(36px, 9vw, 120px); align-items: start; }
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 1536;
  object-fit: cover;
  object-position: center top;
  filter: saturate(.84) contrast(1.02) brightness(.94);
  border: 1px solid var(--line);
  clip-path: inset(0);
}
.portrait figcaption { margin-top: 12px; color: #858d7c; font: 12px/1.5 var(--mono); text-transform: uppercase; }
h2 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.about-copy .lead { margin: 32px 0 16px; color: var(--text); font-size: 20px; }
.about-copy > p:not(.lead) { max-width: 720px; margin-top: 14px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.facts dt { font: 500 42px/1 var(--display); letter-spacing: -.05em; }
.facts dd { margin-top: 10px; color: #8e9685; font: 12px/1.5 var(--mono); text-transform: uppercase; }

.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 8vw, 104px); align-items: end; margin-bottom: 38px; }
.section-intro h2 { max-width: 750px; }
.section-intro p { color: var(--muted); }
#experience { padding-bottom: 0; border-bottom: 0; }
.career { border-top: 1px solid var(--line); }
.career:last-child { border-bottom: 1px solid var(--line); }
.career summary {
  list-style: none;
  display: grid;
  grid-template-columns: 42px 1fr 190px 42px;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 24px 0;
  cursor: pointer;
}
.career summary::-webkit-details-marker { display: none; }
.career-index, .career-date { color: #858e7b; font: 12px/1.5 var(--mono); }
.career summary strong { display: block; font: 500 24px/1.25 var(--display); }
.career summary small { display: block; margin-top: 7px; color: #939b8c; font-size: 14px; }
.career-date { text-align: right; }
.expand-icon {
  position: relative;
  justify-self: end;
  width: 40px;
  height: 40px;
  border: 1px solid #4a5144;
  border-radius: 50%;
  color: #a8b09e;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.expand-icon::before, .expand-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.expand-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.career[open] .expand-icon { transform: rotate(45deg); background: var(--accent); color: var(--bg); border-color: var(--accent); }
.career[open] summary strong { color: var(--accent); }
.career-body { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(32px, 8vw, 104px); padding: 6px 52px 42px 60px; }
.career-body h3 { font-size: 24px; line-height: 1.25; }
.career-body p, .career-body li { color: #a4ac9a; font-size: 15px; }
.career-body ul { margin: 16px 0 22px; padding-left: 18px; }
.career-body li { margin: 7px 0; padding-left: 4px; }
.career-body li::marker { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { padding: 5px 9px; border: 1px solid #41483b; color: #aeb6a3; font-size: 12px; line-height: 1.45; }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skills-grid article { min-height: 210px; padding: 28px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skills-grid h3 { margin: 34px 0 10px; font-size: 27px; letter-spacing: -.025em; }
.skills-grid p { max-width: 480px; color: var(--muted); }
.adaptability {
  display: grid;
  grid-template-columns: .42fr 1fr 1fr;
  gap: 44px;
  align-items: start;
  margin-top: 16px;
  padding: 30px;
  border: 1px solid #465039;
  background: linear-gradient(115deg, rgb(199 243 107 / 8%), transparent 60%);
}
.adaptability > span { color: var(--accent); font: 13px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.adaptability h3 { max-width: 430px; font-size: 29px; line-height: 1.2; letter-spacing: -.025em; }
.adaptability p { max-width: 500px; color: #b4bcaa; }
.education { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 8vw, 104px); margin-top: 72px; }
.education h2 { margin-top: 16px; font-size: 40px; }
.education article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.education article:first-child { padding-top: 0; }
.education article strong, .education article small { display: block; }
.education article strong { font-size: 17px; }
.education article small { margin-top: 4px; color: var(--muted); font-size: 14px; }
.education time { color: #8e9685; font: 12px/1.5 var(--mono); white-space: nowrap; }

.contact {
  margin: 0;
  padding: 72px max(5%, calc((100% - 1200px) / 2));
  border-block: 1px solid #3d5030;
  background: #22301b;
  color: var(--text);
}
.contact .section-label { color: var(--accent); margin-bottom: 34px; }
.contact h2 { max-width: 900px; }
.contact > p { max-width: 560px; margin: 22px 0 30px; color: #b4bea9; font-size: 18px; }
.contact .button { background: var(--accent); border-color: var(--accent); color: #18200e; }
.contact-email { display: block; width: fit-content; margin-top: 22px; color: #c0cbb7; font-size: 14px; border-bottom: 1px solid #657b51; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 34px; align-items: center; padding: 44px 0 28px; }
.social-links { display: flex; gap: 28px; }
.site-footer > p { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); color: #808878; font: 12px/1.5 var(--mono); }
#local-clock { margin-left: 8px; color: #aab2a0; }

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms ease,
    transform 680ms cubic-bezier(.2, .7, .2, 1);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.motion-ready .hero-layout > div[data-reveal] { transition-delay: 70ms; }
.motion-ready .hero-aside[data-reveal] { transition-delay: 140ms; }
.motion-ready .hero-meta[data-reveal] { transition-delay: 190ms; }
.motion-ready .skills-grid article:nth-child(2) { transition-delay: 55ms; }
.motion-ready .skills-grid article:nth-child(3) { transition-delay: 110ms; }
.motion-ready .skills-grid article:nth-child(4) { transition-delay: 165ms; }

@media (hover: hover) and (pointer: fine) {
  .desktop-nav a:hover, .nav-contact:hover, .social-links a:hover, .text-link:hover { color: var(--accent); }
  .button:hover { background: #d8ff89; border-color: #d8ff89; transform: translateY(-2px); }
  .career summary:hover strong { color: #d9e0d2; }
  .career[open] summary:hover strong { color: var(--accent); }
  .contact .button:hover { background: #d8ff89; border-color: #d8ff89; }
}

@media (hover: none), (pointer: coarse) {
  .button:active { transform: scale(.985); }
  .career summary:active .expand-icon { border-color: var(--accent); }
}

@media (max-width: 820px) {
  body { padding-top: 62px; }
  html { scroll-padding-top: 70px; }
  .site-header { height: 62px; grid-template-columns: 1fr auto; padding-inline: 5%; }
  .desktop-nav { display: none; }
  .header-actions { gap: 14px; }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
  .menu-toggle span { width: 16px; height: 1px; background: var(--text); transition: transform 160ms ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .mobile-nav { position: absolute; inset: 62px 0 auto; flex-direction: column; padding: 12px 5% 18px; border-bottom: 1px solid var(--line); background: #151712; }
  .mobile-nav:not([hidden]) { display: flex; }
  .mobile-nav a { padding: 12px 0; border-bottom: 1px solid #2d3129; }
  .mobile-nav a:last-child { color: var(--accent); border: 0; }
  .hero { padding-top: 52px; }
  .hero-layout { grid-template-columns: 1fr; gap: 36px; padding: 50px 0 64px; }
  h1 { font-size: clamp(40px, 8vw, 62px); }
  .hero-aside { max-width: 560px; }
  .hero-meta { grid-template-columns: 1fr; gap: 6px; }
  .hero-meta span:nth-child(2), .hero-meta span:last-child { text-align: left; }
  .section { padding: 56px 0 44px; }
  .section-label { margin-bottom: 28px; }
  .about-layout, .section-intro, .career-body, .education { grid-template-columns: 1fr; }
  .about-layout { gap: 30px; }
  .portrait { max-width: 430px; }
  .section-intro { gap: 16px; margin-bottom: 32px; }
  .section-intro p { max-width: 520px; }
  .career-body { gap: 18px; padding-left: 60px; padding-right: 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .adaptability { grid-template-columns: 1fr; gap: 16px; }
  .adaptability h3, .adaptability p { max-width: 650px; }
  .education { gap: 38px; margin-top: 66px; }
}

@media (max-width: 560px) {
  .nav-contact { display: none; }
  .hero, .section, .site-footer { width: min(90%, 1200px); }
  .section { padding: 44px 0 34px; }
  .section-label { margin-bottom: 22px; }
  .hero { padding-top: 32px; }
  h1 { font-size: clamp(34px, 10.5vw, 46px); }
  h2 { font-size: 30px; }
  .wordmark { font-size: 24px; letter-spacing: -1.4px; }
  /* 48 chars of letter-spaced uppercase mono needs ~406px; a 390px phone has ~334px. */
  .eyebrow { font-size: 11px; letter-spacing: 0; column-gap: 8px; }
  .hero-layout { gap: 24px; padding: 32px 0 38px; }
  .hero-actions { gap: 18px; margin-top: 24px; }
  .hero-meta { padding-block: 16px; }
  .hero-aside > p { font-size: 17px; }
  .about-copy .lead { margin-top: 24px; }
  .facts { gap: 10px; margin-top: 30px; padding-top: 22px; }
  .facts dt { font-size: 30px; }
  .facts dd { font-size: 10px; }
  .career summary { grid-template-columns: 28px 1fr 44px; gap: 10px; min-height: 92px; padding-block: 18px; }
  .career summary strong { font-size: 19px; }
  .career-date { grid-column: 2; grid-row: 2; text-align: left; }
  .expand-icon { grid-column: 3; grid-row: 1; }
  .career-body { gap: 12px; padding: 0 0 28px 38px; }
  .career-body ul { margin-block: 12px 18px; }
  .skills-grid article { min-height: 0; padding: 24px; }
  .skills-grid h3 { margin-top: 28px; }
  .adaptability { padding: 24px; }
  .adaptability h3 { font-size: 26px; }
  .education { gap: 28px; margin-top: 50px; }
  .education article { align-items: flex-start; padding-block: 18px; }
  .contact { padding-block: 52px; }
  .contact h2 { font-size: 32px; }
  .education h2 { font-size: 26px; }
  .site-footer { grid-template-columns: 1fr; padding-top: 34px; }
  .social-links { flex-wrap: wrap; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
  .button:hover { transform: none; }
}
