:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --band: #eef2ef;
  --ink: #1d2a27;
  --muted: #5a6763;
  --line: #d9dfdb;
  --accent: #1f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #dcebe6;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111816;
    --surface: #18211f;
    --band: #151e1c;
    --ink: #e6ece9;
    --muted: #9aa8a3;
    --line: #2a3633;
    --accent: #5fc0a8;
    --accent-ink: #0c1412;
    --accent-soft: #1f3631;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.08rem; font-weight: 600; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.section { padding: 88px 0; }
.section-tight { padding: 80px 0; }
.band { background: var(--band); border-block: 1px solid var(--line); }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .7rem;
}

/* NAV */
.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; height: 60px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.nav-cta { color: var(--accent); }

/* HERO */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); max-width: 18ch; }
.hero h1 span { color: var(--accent); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 1.4rem 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid var(--accent);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--accent); background: transparent; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin: 64px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats div { background: var(--surface); padding: 22px 20px; }
.stats dt { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--accent); }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }

/* ABOUT */
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; padding: 88px 0; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin: 0; }

/* SKILLS */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.skill-group h3 { margin-bottom: 14px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: var(--accent-soft); color: var(--ink); border-radius: 999px;
  padding: 5px 12px; font-size: .86rem; font-weight: 500;
}
.chips.small li { font-size: .78rem; padding: 3px 10px; }

/* PROJECTS */
.section-intro { color: var(--muted); max-width: 62ch; margin: -0.4rem 0 2rem; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.project-head { display: flex; flex-direction: column; gap: 8px; }
.project h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.project p { margin: 0; color: var(--muted); font-size: .96rem; }
.tag { font-size: .76rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.project-points { margin: 0; padding-left: 1.1rem; font-size: .93rem; }
.project-points li { margin-bottom: 4px; }
.project .chips { margin-top: auto; }
.project-link { font-weight: 600; font-size: .92rem; text-decoration: none; }

/* TIMELINE */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li {
  display: grid; grid-template-columns: 180px 1fr; gap: 32px;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.when { color: var(--muted); font-size: .92rem; font-weight: 500; padding-top: 2px; }
.what h3 { font-size: 1.15rem; }
.where { color: var(--accent); font-size: .92rem; font-weight: 500; margin: 4px 0 10px; }
.what p { margin: 0; }
.what ul { margin: 0; padding-left: 1.1rem; }
.what li { margin-bottom: 5px; }

/* CREDENTIALS */
.split-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
.cred-list { list-style: none; padding: 0; margin: 0; }
.cred-list li {
  display: flex; flex-direction: column; padding: 14px 0; border-top: 1px solid var(--line);
}
.cred-list li:last-child { border-bottom: 1px solid var(--line); }
.cred-list strong { font-weight: 600; }
.cred-list span { color: var(--muted); font-size: .9rem; }
.lang-label { margin-top: 2.4rem; }

/* CONTACT */
.contact { text-align: left; }
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .88rem; }

/* RESPONSIVE */
@media (max-width: 860px) {
  .split, .split-cols { grid-template-columns: 1fr; gap: 24px; }
  .split-cols { gap: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .hero { padding: 64px 0 48px; }
  .section, .split { padding: 64px 0; }
  .section-tight { padding: 60px 0; }
  .projects { grid-template-columns: 1fr; }
}
