:root {
  --bg: #0b1512;
  --bg-2: #0f1d19;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(200, 235, 215, 0.12);
  --text: #e7efe9;
  --muted: #9fb3a9;
  --accent: #7fd1a8;
  --accent-2: #f2c879;

  --sky-top: #0a1424;
  --sky-mid: #1b2f45;
  --sky-low: #3d5560;
  --forest-far: #22383a;
  --forest-mid: #15282a;
  --forest-near: #0b1512;
  --band-far: #1a2e2b;
  --band-near: #0b1512;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
svg { display: block; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }

.eyebrow {
  font: 600 0.78rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  transition: background 0.3s, backdrop-filter 0.3s, padding 0.3s;
}
.nav--solid {
  background: rgba(11, 21, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  font: 600 1.25rem/1 var(--serif);
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.04em;
}
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; }

@media (max-width: 720px) {
  .nav__toggle {
    display: grid;
    gap: 6px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
  }
  .nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: transform 0.25s; }
  .nav--open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav--open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 21, 18, 0.96);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav--open .nav__links { display: flex; }
  .nav__links a { padding: 0.9rem var(--gutter); font-size: 1rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}
.hero > * { will-change: transform; }

.hero__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
}
.hero__stars { position: absolute; inset: 0 0 35% 0; }
.hero__stars svg { width: 100%; height: 100%; }

.hero__moon {
  position: absolute;
  top: 14%;
  right: 16%;
  width: clamp(70px, 9vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fff8e6, #f2d9a0 60%, #d8b878);
  box-shadow: 0 0 60px 20px rgba(242, 200, 121, 0.18), 0 0 160px 60px rgba(242, 200, 121, 0.08);
}

.layer { position: absolute; left: 0; right: 0; bottom: 0; }
.layer svg { width: 100%; height: 100%; }
/* Tall pines can poke above the viewBox; let them draw instead of clipping flat. */
.layer svg, .band__layer svg, .contact__layer svg { overflow: visible; }
.layer--far { height: 55%; }
.layer--mid { height: 50%; bottom: -2%; }
.layer--near { height: 42%; bottom: -4%; z-index: 3; }

.hero__fog {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 12%;
  height: 30%;
  background: radial-gradient(ellipse at center, rgba(180, 210, 205, 0.16), transparent 70%);
  filter: blur(10px);
}

.hero__content {
  position: absolute;
  inset: 0;
  z-index: 4; /* above the near tree row so text and buttons stay readable on wide screens */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter) 18vh;
  max-width: 1100px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(3rem, 10vw, 7.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.15em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}
.hero__headline { font-size: clamp(1.05rem, 2.2vw, 1.4rem); color: #cfdcd5; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(231, 239, 233, 0.35);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn--primary { background: var(--accent); color: #0b1512; border-color: var(--accent); }
.btn--primary:hover { background: #9be0bd; }

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 4;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(231, 239, 233, 0.5);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--text);
  animation: cue 1.8s infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(5rem, 12vw, 9rem); position: relative; }
#about { background: var(--bg); }
#experience, #education { background: var(--bg-2); }

.about__text { font-size: clamp(1.1rem, 2vw, 1.3rem); color: #cfdcd5; }

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.chips li {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.card__sub { color: var(--accent-2); font-weight: 500; margin-top: -0.3rem; }
.card p:last-of-type { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tags li {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  background: rgba(127, 209, 168, 0.1);
  color: var(--accent);
}

/* Timeline */
.timeline { position: relative; margin-top: 3rem; }
.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 210px;
  width: 1px;
  background: linear-gradient(var(--accent), transparent);
}
.timeline__item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 205px;
  top: 0.55rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(127, 209, 168, 0.15);
}
.timeline__meta { text-align: right; font-size: 0.88rem; color: var(--muted); padding-right: 1.5rem; }
.timeline__period { display: block; color: var(--text); font-weight: 600; margin-bottom: 0.2rem; }

@media (max-width: 760px) {
  .timeline::before { left: 5px; }
  .timeline__item { grid-template-columns: 1fr; gap: 0.7rem; padding-left: 2rem; }
  .timeline__item::before { left: 0; }
  .timeline__meta { text-align: left; padding: 0; }
}

/* Grid */
.grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.certs li, .langs li {
  display: flex;
  flex-direction: column;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.certs li:last-child, .langs li:last-child { border-bottom: 0; }
.certs span, .langs span { color: var(--muted); font-size: 0.92rem; }
.certs small { color: var(--accent-2); font-size: 0.8rem; margin-top: 0.15rem; }
.link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.link:hover { text-decoration: underline; }

.edu h2 { margin-bottom: 0.3em; }
.edu__degree { font-size: 1.15rem; color: #cfdcd5; }
.edu__note { color: var(--accent-2); }

/* ---------- Parallax bands ---------- */

.band {
  position: relative;
  height: clamp(280px, 55vh, 520px);
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, #1c3337 45%, #35504f 100%);
  display: grid;
  place-items: center;
}
.band--dawn { background: linear-gradient(180deg, var(--bg-2) 0%, #3a3a46 45%, #b0805a 100%); }
.band--dawn { --band-far: #2d2c36; }
.band__layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20%;
  height: 85%;
  will-change: transform;
}
.band__layer svg { width: 100%; height: 100%; }
.band__layer--2 { height: 70%; bottom: -12%; }
.band__quote {
  position: relative;
  z-index: 1;
  margin: 0 var(--gutter) 22%;
  font: 600 clamp(1.3rem, 3.5vw, 2.4rem)/1.2 var(--serif);
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.band__layer--2 { z-index: 2; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
  padding-block: clamp(6rem, 14vw, 10rem) clamp(9rem, 20vw, 14rem);
  background: linear-gradient(180deg, var(--bg-2), #18302c);
  text-align: center;
}
.contact__layer { position: absolute; left: 0; right: 0; bottom: -15%; height: 60%; opacity: 0.8; }
.contact__layer svg { width: 100%; height: 100%; }
.contact__inner { position: relative; z-index: 1; }
.contact .hero__actions { justify-content: center; margin-top: 1.5rem; }
.contact p:not(.eyebrow) { color: var(--muted); }

.footer {
  background: var(--forest-near);
  text-align: center;
  padding: 2rem var(--gutter);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer p { margin: 0; }

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
}
