:root {
  --ink: #0f1420;
  --ink-2: #161d2c;
  --ink-3: #1d2536;
  --paper: #f7f5f0;
  --paper-2: #ffffff;
  --text: #1a2030;
  --text-soft: #5a6478;
  --text-invert: #e7ebf2;
  --text-invert-soft: #9aa3b5;
  --gold: #c79a4b;
  --gold-soft: #e3c889;
  --line: #e3ddd1;
  --line-dark: #2a3344;
  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 20px 60px -20px rgba(15, 20, 32, 0.35);
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.1; font-weight: 600; }

a { color: inherit; text-decoration: none; }

em { font-style: italic; }

.inline-link {
  color: #a8761b;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.inline-link:hover {
  color: var(--gold);
  text-decoration-color: #a8761b;
}
.inline-link::after {
  content: " ↗";
  font-size: 0.8em;
  text-decoration: none;
  display: inline-block;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 32, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-invert);
  letter-spacing: 0.02em;
}
.brand-dot { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-invert-soft);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-invert); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--gold-soft);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold); }

/* ---------- HERO ---------- */
.hero {
  background: radial-gradient(120% 120% at 80% -10%, #233049 0%, var(--ink) 55%);
  color: var(--text-invert);
  padding: 80px 24px 96px;
}
.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-soft);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 5.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.lede {
  font-size: 1.18rem;
  color: var(--text-invert-soft);
  max-width: 38ch;
  margin-bottom: 28px;
}
.lede strong { color: var(--text-invert); }
.principles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--gold-soft);
  margin-bottom: 36px;
  padding-left: 16px;
  border-left: 2px solid var(--gold);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost { border: 1px solid var(--line-dark); color: var(--text-invert); }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

.hero-photo { position: relative; }
.photo-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-dark);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 20, 32, 0.35) 100%);
}
.photo-frame img { display: block; width: 100%; height: auto; }
.photo-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--paper-2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* ---------- STATS ---------- */
.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--gold);
}
.stat-label {
  font-size: 0.88rem;
  color: var(--text-soft);
  font-weight: 500;
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px;
}
.section-alt { background: var(--paper-2); max-width: none; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 32px; }
.section-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.01em; }
.section-intro {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: 48px;
}

/* ---------- STRENGTHS ---------- */
.strengths {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 72px;
}
.strength {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  transition: transform 0.2s, border-color 0.2s;
}
.strength:hover { transform: translateY(-4px); border-color: var(--gold-soft); }
.strength h3 { font-size: 1.05rem; margin-bottom: 8px; }
.strength p { font-size: 0.92rem; color: var(--text-soft); }

/* ---------- TIMELINE ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.job {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.job:last-child { border-bottom: 1px solid var(--line); }
.job-meta { display: flex; flex-direction: column; gap: 4px; }
.job-dates {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--gold);
}
.job-co { font-weight: 700; font-size: 1.05rem; }
.job-sub { font-size: 0.85rem; color: var(--text-soft); }
.job-body h3 { font-size: 1.3rem; margin-bottom: 14px; }
.job-body ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.job-body li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 0.96rem;
}
.job-body li strong { color: var(--text); }
.job-body li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- PROJECTS ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 0.2s, box-shadow 0.2s;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.project-lang {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-soft);
}
.project-gh {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}
.project-gh:hover { color: var(--text); }
.project h3 { font-size: 1.3rem; margin-bottom: 12px; }
.project p { font-size: 0.94rem; color: var(--text-soft); margin-bottom: 18px; flex: 1; }
.project-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags li {
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(199, 154, 75, 0.12);
  color: #9a7426;
}
.projects-foot { margin-top: 32px; font-size: 0.95rem; color: var(--text-soft); }
.projects-foot a { color: var(--gold); font-weight: 600; }

/* ---------- NOVEL ---------- */
.novel {
  background: radial-gradient(130% 120% at 15% 0%, #1c2438 0%, var(--ink) 60%);
  color: var(--text-invert);
  max-width: none;
}
.novel > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.novel .section-kicker { color: var(--gold-soft); }
.novel-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
}
.novel-cover { display: flex; justify-content: center; }
.cover-art {
  position: relative;
  width: 280px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background:
    linear-gradient(165deg, #2b3550 0%, transparent 40%),
    linear-gradient(180deg, #141a28 0%, #0a0e16 100%);
  background-color: #0c111c;
  border: 1px solid #2a3344;
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(199, 154, 75, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
  text-align: center;
  overflow: hidden;
}
.cover-series {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: auto;
  padding-top: 12px;
}
.cover-title {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.85rem;
  line-height: 1.15;
  color: #f3ead4;
  text-shadow: 0 0 24px rgba(227, 200, 137, 0.35);
}
.cover-author {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-invert-soft);
  margin-top: auto;
  padding-bottom: 8px;
}
.cover-glow {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 140px; height: 140px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(227, 200, 137, 0.28) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}
.novel-copy p { color: var(--text-invert-soft); margin-bottom: 18px; font-size: 1.02rem; }
.novel-copy em { color: #f3ead4; }
.novel-tag {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.3rem !important;
  color: #f3ead4 !important;
  margin-bottom: 28px !important;
  line-height: 1.4;
}
.novel-theme { color: var(--text-invert) !important; }
.novel-theme strong {
  color: var(--gold-soft);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 500;
}

/* ---------- INTERESTS ---------- */
.interests {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.interest {
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.interest:hover { transform: translateY(-4px); border-color: var(--gold-soft); }
.interest-icon { font-size: 2.4rem; display: block; margin-bottom: 14px; }
.interest h3 { font-size: 1.25rem; margin-bottom: 8px; }
.interest p { font-size: 0.95rem; color: var(--text-soft); }

/* ---------- CONTACT ---------- */
.contact {
  text-align: center;
}
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 12px 0 18px; }
.contact-lede { font-size: 1.1rem; color: var(--text-soft); margin-bottom: 32px; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--ink);
  color: var(--text-invert-soft);
  text-align: center;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.footer-quote {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--gold-soft);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo { max-width: 360px; margin: 0 auto; width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .strengths { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr; }
  .interests { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 16px; }
  .novel-grid { grid-template-columns: 1fr; gap: 40px; }
  .novel-cover { order: -1; }
}
@media (max-width: 560px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .strengths { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
}
