:root {
  --bg: #0b0e14;
  --bg-alt: #10141d;
  --ink: #eef1f6;
  --ink-dim: #9aa4b5;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #c9a86a;
  --cyan: #5ecbd8;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 0.9rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
}

h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { color: var(--ink-dim); margin: 0 0 1rem; }

#net-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 14, 20, 0.7);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.nav-mark {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--line);
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0; padding: 0;
  align-items: center;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--gold); color: var(--bg) !important; }

.nav-toggle {
  display: none;
  background: none; border: none;
  width: 2.2rem; height: 2.2rem;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--ink); border-radius: 2px;
}

/* ---------- Layout helpers ---------- */
main { position: relative; z-index: 1; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6.5rem 1.5rem;
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
  padding-left: 0; padding-right: 0;
}
.section-alt > * {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.5rem; padding-right: 1.5rem;
}

.section-head { max-width: 720px; margin-bottom: 3.5rem; }
.section-lede { font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
}

.eyebrow { }

.hero-name {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--gold);
  color: #1a1305;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.hero-portrait { position: relative; }

.portrait-frame {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(201,168,106,0.15), 0 30px 80px -20px rgba(0,0,0,0.6);
  max-width: 380px;
  margin-left: auto;
  animation: float 7s ease-in-out infinite;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px; height: 8px;
  background: var(--gold);
  border-radius: 4px;
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Stats ---------- */
.stats {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat { text-align: left; }

.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  color: var(--gold);
}

.stat-label {
  font-size: 0.88rem;
  color: var(--ink-dim);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-line {
  position: absolute;
  left: 0.3rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--line);
}
.timeline-line-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(var(--gold), var(--cyan));
  transition: height 0.2s ease-out;
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.3rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}

.timeline-year {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.timeline-body h3 { margin-bottom: 0.4rem; }
.timeline-body p { max-width: 60ch; }

/* ---------- Framework ---------- */
.framework-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.node-diagram {
  position: relative;
  aspect-ratio: 300 / 260;
}
.node-diagram svg {
  width: 100%; height: 100%;
}
.node-diagram line {
  stroke: var(--line);
  stroke-width: 1;
}
.node-diagram .pulse-line {
  stroke: var(--cyan);
}
.node {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px 2px rgba(201,168,106,0.5);
  animation: pulse 3s ease-in-out infinite;
}
.node.n1 { top: 12%; left: 18%; animation-delay: 0s; }
.node.n2 { top: 12%; left: 76%; background: var(--cyan); box-shadow: 0 0 18px 2px rgba(94,203,216,0.5); animation-delay: 0.6s; }
.node.n3 { top: 47%; left: 47%; animation-delay: 1.2s; }
.node.n4 { top: 82%; left: 10%; background: var(--cyan); box-shadow: 0 0 18px 2px rgba(94,203,216,0.5); animation-delay: 1.8s; }
.node.n5 { top: 82%; left: 84%; animation-delay: 2.4s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold); }

.card-icon {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.finance-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}
.finance-cta p { color: var(--ink); font-size: 1.1rem; margin: 0; font-family: var(--serif); }

/* ---------- Books ---------- */
.books {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.book {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
}

.book-cover-wrap {
  perspective: 800px;
}

.book-cover {
  border-radius: 6px;
  box-shadow: 0 20px 45px -15px rgba(0,0,0,0.7);
  transition: transform 0.3s ease;
  will-change: transform;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}
.badge-muted { color: var(--cyan); border-color: var(--cyan); }

.book-subtitle {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-size: 0.95rem;
  margin-top: -0.5rem;
}

/* ---------- Mission ---------- */
.mission-inner {
  max-width: 720px;
}
.mission-text { font-size: 1.1rem; color: var(--ink); }
.mission-text strong { color: var(--gold); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-dim);
  font-size: 0.85rem;
}
.footer-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.footer-linkedin:hover { color: var(--gold); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: left; padding-top: 7rem; }
  .hero-portrait { order: -1; max-width: 240px; }
  .portrait-frame { max-width: 220px; margin: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .framework-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .books { grid-template-columns: 1fr; }
  .book { grid-template-columns: 120px 1fr; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 1.5rem 1.6rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.is-open { display: flex; }
}

@media (max-width: 600px) {
  .book { grid-template-columns: 1fr; }
  .book-cover { max-width: 160px; }
}

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