:root {
  --paper: #faf6ee;
  --paper-2: #f4eee1;
  --ink: #2e2a26;
  --ink-soft: #7a7268;
  --ink-faint: #a89e90;
  --line: #e7ddcb;
  --peach: #ffd9b8;
  --lavender: #d9cdf7;
  --mint: #c4e9cf;
  --sky: #c2dcf7;
  --blush: #f6c9d4;
  --butter: #fbe7a9;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(520px 380px at 8% 4%, rgba(217, 205, 247, 0.35), transparent 60%),
    radial-gradient(460px 340px at 95% 12%, rgba(255, 217, 184, 0.4), transparent 60%),
    radial-gradient(500px 420px at 50% 110%, rgba(196, 233, 207, 0.3), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- nav ---------- */
nav.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.monogram {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lavender), var(--peach));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(0, 0, 0, 0.05); }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 10px 0 8px; }
.stage-spacer { height: 440px; }
/* the 3D layer is a fixed fullscreen overlay — the badge roams free over
   the whole page. pointer-events none so text/buttons stay clickable;
   the badge itself is grabbed via window-level hit-testing in badge.js */
#badge-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
#badge-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-content { position: relative; z-index: 1; touch-action: pan-y; }
.badge-hint {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 8px 0 2px;
  letter-spacing: 0.02em;
}
.badge-fallback {
  display: none;
  width: 190px;
  height: 270px;
  margin: 120px auto 0;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--lavender), var(--peach));
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 40px;
  box-shadow: 0 24px 50px rgba(120, 100, 160, 0.25);
}
.hero h1 {
  font-size: clamp(32px, 6vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 18px 0 10px;
  font-weight: 800;
}
.hero .tagline {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 26px;
}
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 1px solid transparent;
}
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(46, 42, 38, 0.25); }
.btn-soft { background: rgba(0, 0, 0, 0.05); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { transform: translateY(-2px); background: rgba(0, 0, 0, 0.08); }

/* ---------- sections ---------- */
section.block { padding: 56px 0 0; }
.kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-bottom: 20px;
}
.about p { font-size: 16.5px; color: var(--ink-soft); max-width: 62ch; }
.about p strong { color: var(--ink); font-weight: 600; }

/* experience */
.job { padding: 22px 0; border-top: 1px solid var(--line); }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.job-co { font-weight: 700; font-size: 17px; }
.job-dates { font-size: 13px; color: var(--ink-faint); white-space: nowrap; }
.job-title { font-size: 14px; color: var(--ink-soft); font-weight: 500; margin: 2px 0 10px; }
.job ul { list-style: none; }
.job li {
  font-size: 14.5px;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
  margin-bottom: 7px;
}
.job li::before { content: "·"; position: absolute; left: 4px; font-weight: 800; color: var(--ink-faint); }
.job .techs { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; letter-spacing: 0.01em; }

/* projects */
.proj { padding: 20px 0; border-top: 1px solid var(--line); }
.proj h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.proj p { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  color: var(--ink);
}
.pill:nth-child(6n+1) { background: var(--peach); }
.pill:nth-child(6n+2) { background: var(--lavender); }
.pill:nth-child(6n+3) { background: var(--mint); }
.pill:nth-child(6n+4) { background: var(--sky); }
.pill:nth-child(6n+5) { background: var(--blush); }
.pill:nth-child(6n+6) { background: var(--butter); }

/* skills */
.skill-group { margin-bottom: 18px; }
.skill-group h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 10px;
  font-weight: 700;
}

/* education */
.edu { padding: 18px 0; border-top: 1px solid var(--line); }
.edu h3 { font-size: 16px; font-weight: 700; }
.edu .deg { font-size: 14px; color: var(--ink-soft); }
.edu .meta { font-size: 13px; color: var(--ink-faint); }

/* contact */
.contact { text-align: center; }
.contact h2 {
  font-size: clamp(26px, 5vw, 36px);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  font-weight: 800;
}
.contact p { color: var(--ink-soft); margin-bottom: 24px; }
.social-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

footer {
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.fade { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade.in { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .stage-spacer { height: 380px; }
  .nav-links { display: none; }
  section.block { padding-top: 44px; }
}
