:root {
  --ink: #112a22;
  --ink-soft: #42564f;
  --green: #0e5b39;
  --green-deep: #073d29;
  --green-mid: #3d7d62;
  --green-soft: #dfece5;
  --mint: #edf5f0;
  --paper: #fbfcfa;
  --white: #ffffff;
  --line: rgba(14, 91, 57, 0.17);
  --shadow: 0 18px 46px rgba(17, 42, 34, 0.08);
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  background: var(--green-deep);
  color: white;
  padding: .7rem 1rem;
  border-radius: .4rem;
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(calc(100% - 2.5rem), var(--shell)); margin-inline: auto; }
.section { padding: 5.8rem 0; }
.section-white { background: var(--white); }
.section-tint { background: linear-gradient(180deg, #f2f8f4 0%, #edf5f0 100%); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 250, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--green-deep);
  letter-spacing: -.09em;
  font-style: italic;
}
.brand-name { text-transform: uppercase; letter-spacing: .17em; font-size: .72rem; font-weight: 650; }
.primary-nav { display: flex; align-items: center; gap: 1.7rem; font-size: .91rem; }
.primary-nav a { text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible, .text-link:hover, .text-link:focus-visible { color: var(--green); }
.nav-resume, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .82rem 1.15rem;
  border-radius: .35rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-resume { background: var(--green-deep); color: white; }
.menu-toggle { display: none; border: 0; background: transparent; width: 44px; height: 44px; padding: 10px; }
.menu-toggle span:not(.sr-only) { display: block; width: 100%; height: 2px; background: var(--ink); margin: 5px 0; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 6.7rem 0 6rem;
  background:
    radial-gradient(circle at 85% 15%, rgba(61,125,98,.13), transparent 26rem),
    linear-gradient(180deg, #fbfdfb 0%, #f7faf8 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(430px, 1.06fr); align-items: center; gap: 4rem; }
.eyebrow {
  margin: 0 0 .85rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 800;
  color: var(--green-mid);
}
h1, h2, h3 { color: var(--ink); margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
h1 { font-size: clamp(3rem, 6vw, 5.4rem); line-height: .98; margin-bottom: 1rem; }
h2 { font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1.05; margin-bottom: 1.35rem; }
h3 { font-size: 1.12rem; line-height: 1.25; }
.hero-kicker { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.3; margin: 0 0 1.4rem; color: #1d3b31; }
.hero-summary { max-width: 640px; font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 1.75rem; }
.hero-actions { display: flex; align-items: center; gap: 1.45rem; flex-wrap: wrap; }
.button-primary { background: var(--green-deep); color: white; box-shadow: 0 8px 22px rgba(7,61,41,.16); }
.button-primary:hover, .button-primary:focus-visible { background: var(--green); }
.text-link { font-weight: 750; text-decoration: none; }

.hero-visual { position: relative; min-height: 370px; color: var(--green); }
.network { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .95; }
.network-nodes circle { opacity: .72; }
.network-caption {
  position: absolute;
  right: 1rem;
  bottom: .3rem;
  margin: 0;
  display: flex;
  gap: .65rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .66rem;
  font-weight: 800;
  color: var(--green-mid);
}

.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 5rem; align-items: start; }
.portrait-wrap { position: sticky; top: 108px; }
.portrait-wrap::before {
  content: "";
  position: absolute;
  width: 62px;
  height: 118px;
  left: -28px;
  top: 28px;
  background-image: radial-gradient(var(--green-mid) 1.25px, transparent 1.25px);
  background-size: 9px 9px;
  opacity: .5;
}
.portrait-wrap picture { position: relative; display: block; z-index: 1; }
.portrait-wrap img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 38%; border-radius: .2rem; box-shadow: var(--shadow); }
.about-copy { max-width: 720px; }
.about-copy p { color: var(--ink-soft); font-size: 1.02rem; }
.about-copy h2 { font-size: clamp(2.1rem, 3.4vw, 3.15rem); line-height: 1.08; max-width: 760px; }

.split-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 5rem; align-items: end; margin-bottom: 2.5rem; }
.split-heading > p { margin: 0 0 1.3rem; color: var(--ink-soft); max-width: 480px; }
.skill-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.skill-group { background: rgba(255,255,255,.76); border: 1px solid rgba(14,91,57,.08); padding: 1.6rem; border-radius: .35rem; }
.skill-group h3 { margin-bottom: 1rem; }
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .62rem; }
.chip-list li { background: white; border: 1px solid var(--line); border-radius: 100px; padding: .58rem .82rem; font-size: .88rem; color: #28483c; }

.experience-intro { max-width: 700px; margin-bottom: 2.5rem; }
.impact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.impact-card { position: relative; background: white; padding: 2rem; min-height: 265px; }
.impact-card h3 { max-width: 470px; font-size: 1.28rem; padding-right: 2rem; }
.impact-card p { margin: 0; color: var(--ink-soft); }
.impact-number { position: absolute; right: 1.6rem; top: 1.5rem; font-family: Georgia, serif; font-size: 1.6rem; color: rgba(14,91,57,.24); }

.tools-strip { background: var(--green-deep); color: white; padding: 2.3rem 0; }
.tools-strip .eyebrow { color: #b7d6c6; }
.tools-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .7rem .85rem; }
.tools-list li { border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .48rem .72rem; font-size: .82rem; color: #eff8f3; }

.contact-section { background: linear-gradient(135deg, #0b4d34 0%, #073d29 70%); color: white; }
.contact-section h2 { color: white; }
.contact-section p { color: #d8ebe0; max-width: 620px; }
.eyebrow-light { color: #b9ddc8; }
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 5rem; }
.contact-card { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 1rem; text-decoration: none; border: 1px solid rgba(255,255,255,.22); padding: 1.2rem; border-radius: .35rem; background: rgba(255,255,255,.05); }
.contact-card:hover, .contact-card:focus-visible { background: rgba(255,255,255,.09); }
.linkedin-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: .3rem; background: white; color: var(--green-deep); font-weight: 900; font-size: 1.2rem; }
.contact-card strong, .contact-card small { display: block; }
.contact-card small { color: #d8ebe0; margin-top: .18rem; }
.contact-arrow { font-size: 1.5rem; }

.site-footer { background: #062e20; color: #cfe2d7; border-top: 1px solid rgba(255,255,255,.11); }
.footer-inner { min-height: 84px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 2rem; font-size: .78rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-inner a { text-decoration: none; }
.back-to-top { font-size: 1.1rem; }

.error-page { min-height: 100vh; background: linear-gradient(145deg, #f7fbf8, #eaf3ed); }
.error-main { min-height: 100vh; display: grid; place-items: center; padding: clamp(1.25rem, 4vw, 3rem); }
.error-card { width: min(980px, 100%); background: rgba(255,255,255,.94); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(1.5rem, 5vw, 3.75rem); }
.error-brand { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.error-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.error-copy h1 { margin-bottom: 1.25rem; font-size: clamp(2.75rem, 7vw, 5rem); }
.error-copy > p:not(.eyebrow) { max-width: 62ch; color: var(--ink-soft); }
.error-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.error-nav .button { width: auto; }
.button-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .75rem 1rem; border: 1px solid var(--line-strong); color: var(--green); background: transparent; text-decoration: none; font-weight: 700; }
.button-secondary:hover { background: var(--green-pale); }
.error-media { min-width: 0; }
.error-media img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; }

:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green-deep);
}

@media (max-width: 900px) {
  .section { padding: 4.4rem 0; }
  .menu-toggle { display: block; }
  .primary-nav {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    top: calc(100% + 1px);
    display: none;
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: .72rem .5rem; }
  .nav-resume { margin-top: .4rem; }
  .brand-name { display: none; }
  .hero { padding-top: 4.6rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { min-height: 270px; }
  .about-grid { grid-template-columns: 240px 1fr; gap: 2.6rem; }
  .portrait-wrap { position: static; }
  .portrait-wrap img { aspect-ratio: 4 / 3; }
  .split-heading { grid-template-columns: 1fr; gap: .5rem; }
  .skill-columns, .impact-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; padding: 1.2rem 0; }
  .footer-inner nav { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 760px) {
  .error-layout { grid-template-columns: 1fr; }
  .error-media { order: -1; width: min(100%, 360px); }
  .error-brand { margin-bottom: 2rem; }
}

@media (max-width: 640px) {
  .shell { width: min(calc(100% - 1.5rem), var(--shell)); }
  .header-inner { min-height: 64px; }
  .hero { padding-top: 3.6rem; padding-bottom: 3.3rem; }
  h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  h2 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .hero-summary { font-size: 1rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button-primary { width: 100%; }
  .hero-visual { min-height: 220px; margin-inline: -1rem; }
  .network-caption { left: 1rem; right: auto; gap: .45rem; font-size: .55rem; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait-wrap { width: min(100%, 320px); }
  .portrait-wrap img { aspect-ratio: 1 / 1; }
  .skill-columns { grid-template-columns: 1fr; }
  .impact-card { min-height: 0; }
  .tools-strip { padding: 2rem 0; }
  .contact-card { grid-template-columns: 48px 1fr auto; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-inner nav { gap: .8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Comparison build refinements */
.portrait-wrap picture { display: block; }
.portrait-wrap img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; object-position: center; }
.hero-visual-force { overflow: hidden; }
.crawl-map { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--green); opacity: .92; }
.crawl-links { opacity: .28; }
.crawl-nodes { opacity: .72; }
.crawl-nodes .node-hub { opacity: .86; }
.crawl-nodes .node-root { opacity: .96; filter: drop-shadow(0 8px 14px rgba(22, 78, 55, .14)); }

.crawl-map-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.hero-visual-force picture { display:block; width:100%; height:100%; }

/* V1.8 hero graphic blend refinement */
.hero-visual-force {
  overflow: hidden;
  isolation: isolate;
}
.hero-visual-force::before {
  content: "";
  position: absolute;
  inset: -6% -4%;
  background:
    radial-gradient(circle at 56% 44%, rgba(255,255,255,.24), rgba(255,255,255,0) 40%),
    linear-gradient(90deg, rgba(247,250,248,1) 0%, rgba(247,250,248,0) 12%, rgba(247,250,248,0) 88%, rgba(247,250,248,1) 100%),
    linear-gradient(180deg, rgba(251,253,251,1) 0%, rgba(251,253,251,0) 12%, rgba(251,253,251,0) 88%, rgba(247,250,248,1) 100%);
  z-index: 2;
  pointer-events: none;
}
.hero-visual-force picture {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.crawl-map-image {
  position: absolute;
  inset: -2% -1%;
  width: calc(100% + 2%);
  height: calc(100% + 4%);
  object-fit: contain;
  object-position: center;
  opacity: .88;
  filter: saturate(.88) contrast(.96) brightness(1.015);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 54%, rgba(0,0,0,.92) 66%, rgba(0,0,0,.65) 78%, rgba(0,0,0,.2) 90%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 54%, rgba(0,0,0,.92) 66%, rgba(0,0,0,.65) 78%, rgba(0,0,0,.2) 90%, rgba(0,0,0,0) 100%);
}

/* V1.9 keep crawl caption crisp above the blended graphic */
.hero-visual-force .network-caption {
  z-index: 3;
  opacity: 1;
  color: var(--green-mid);
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}

/* V2.0 native inline-SVG crawl map for comparison hero */
.hero-visual-force::before { display: none; }
.hero-visual-force picture { display: none; }
.crawl-map-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--green);
  overflow: visible;
}
.crawl-bg-links { stroke-width: .8; opacity: .11; }
.crawl-bg-nodes { opacity: .11; }
.crawl-main-links { stroke-width: 1; opacity: .23; }
.crawl-cross-links { stroke-width: .85; opacity: .12; }
.crawl-main-nodes { opacity: .74; }
.hero-visual-force .network-caption { z-index: 2; }

.crawl-home-node { opacity: .94; filter: drop-shadow(0 7px 12px rgba(22,78,55,.10)); }
