:root {
  --navy: #0d1b2e;
  --navy-2: #13253d;
  --navy-3: #1b3150;
  --gold: #c9a24a;
  --gold-2: #e8c877;
  --ink: #e9edf3;
  --muted: #94a3b8;
  --line: rgba(201, 162, 74, 0.25);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--navy);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* scroll progress */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  z-index: 100;
}

/* NAV */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 64px);
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(13, 27, 46, .82);
  backdrop-filter: blur(12px);
  padding-block: 12px;
  border-color: var(--line);
}
.brand { font: 700 24px var(--serif); letter-spacing: 1px; }
.brand span { color: var(--gold); }
.nav nav { display: flex; gap: 32px; }
.nav nav a {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  position: relative; transition: color .2s;
}
.nav nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--gold); transition: width .3s;
}
.nav nav a:hover, .nav nav a.active { color: var(--ink); }
.nav nav a:hover::after, .nav nav a.active::after { width: 100%; }

/* BUTTONS */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 2px;
  font: 600 13px var(--sans); letter-spacing: 2px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--navy); border: 1px solid var(--gold);
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.btn::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transition: left .6s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(201,162,74,.6); }
.btn:hover::before { left: 140%; }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: rgba(201,162,74,.08); }
.btn-small { padding: 10px 18px; font-size: 11px; }
.btn-big { padding: 18px 40px; }

/* HERO */
.hero {
  position: relative; min-height: 100vh; display: grid; place-items: center;
  padding: 120px clamp(16px, 5vw, 64px) 80px;
  background: radial-gradient(ellipse at 70% 30%, var(--navy-3) 0%, var(--navy) 60%);
  overflow: hidden;
}
#chart { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero-inner {
  position: relative; display: flex; align-items: center; gap: clamp(32px, 6vw, 80px);
  max-width: 1100px; width: 100%;
}
.portrait {
  flex: none; width: clamp(180px, 24vw, 280px); aspect-ratio: 1; border-radius: 50%;
  padding: 6px; position: relative;
  background: conic-gradient(from 0deg, var(--gold), transparent 30%, var(--gold-2) 50%, transparent 80%, var(--gold));
  animation: spin 8s linear infinite;
}
.portrait img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--navy);
  animation: spin 8s linear infinite reverse;
}
.portrait::after {
  content: ""; position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,74,.25), transparent 70%); z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { font-size: 13px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); }
h1 {
  font: 700 clamp(48px, 9vw, 104px)/1 var(--serif); margin: 14px 0 22px;
}
h1 em {
  font-style: normal;
  background: linear-gradient(110deg, var(--gold) 20%, #fff3cf 40%, var(--gold) 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine { 0%,100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.tagline { font-size: clamp(16px, 2vw, 20px); color: var(--muted); min-height: 2em; }
#typed { color: var(--ink); }
.caret { color: var(--gold); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid var(--gold); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--gold); border-radius: 2px; animation: drop 1.8s infinite;
}
@keyframes drop { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* SECTIONS */
.section { max-width: 1100px; margin: 0 auto; padding: 120px clamp(16px, 5vw, 64px) 40px; }
.section-title {
  display: flex; align-items: center; gap: 18px;
  font: 500 clamp(32px, 5vw, 48px) var(--serif); margin-bottom: 48px;
}
.section-title span { font: 500 14px var(--sans); color: var(--gold); letter-spacing: 2px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.lead { font-size: clamp(17px, 2vw, 20px); font-weight: 300; max-width: 820px; color: #cbd5e1; }
.lead strong { color: var(--gold-2); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 56px; }
.stat {
  padding: 28px; background: linear-gradient(160deg, var(--navy-2), var(--navy));
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  transition: transform .3s, border-color .3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--gold); }
.stat-num { font: 700 28px var(--serif); color: var(--ink); }
.stat-label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* TIMELINE */
.timeline { list-style: none; position: relative; padding-left: 36px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--gold), var(--line), transparent);
}
.job { position: relative; padding: 0 0 48px; }
.job::before {
  content: ""; position: absolute; left: -36px; top: 8px; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--navy);
}
.job.current::before { background: var(--gold); box-shadow: 0 0 0 0 rgba(201,162,74,.7); animation: pulse 2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 14px rgba(201,162,74,0); } }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.job h3 { font: 600 24px var(--serif); }
.job time { font-size: 13px; font-weight: 600; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.role { font-style: italic; color: var(--muted); margin: 4px 0 14px; }
.job ul { list-style: none; }
.job ul li { position: relative; padding-left: 22px; margin-bottom: 6px; color: #cbd5e1; }
.job ul li::before { content: ""; position: absolute; left: 0; top: 13px; width: 10px; height: 1px; background: var(--gold); }
.note { color: var(--muted); font-size: 14px; font-style: italic; }

/* SKILLS */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
  padding: 32px; background: rgba(19, 37, 61, .55); border: 1px solid var(--line);
  position: relative; overflow: hidden; transition: border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(201,162,74,.12), transparent 50%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card:hover { border-color: rgba(201,162,74,.6); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.card h3.mt { margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span {
  padding: 7px 14px; font-size: 14px; border: 1px solid var(--line); border-radius: 2px;
  transition: background .2s, color .2s;
}
.chips span:hover { background: rgba(201,162,74,.12); }
.chips .hot { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; }
.langs { list-style: none; display: grid; gap: 18px; }
.langs li { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; }
.langs small { color: var(--muted); }
.langs i { grid-column: 1 / -1; height: 3px; background: var(--navy-3); position: relative; overflow: hidden; }
.langs i::after {
  content: ""; position: absolute; inset: 0; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.card.in .langs i::after { width: var(--w); }
.edu { color: #cbd5e1; }
.edu small { color: var(--gold); letter-spacing: 1px; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 48px 0; }
.contact-item {
  display: flex; align-items: center; gap: 18px; padding: 22px;
  border: 1px solid var(--line); background: rgba(19,37,61,.4);
  transition: transform .25s, border-color .25s, background .25s;
}
.contact-item:not(.static):hover { transform: translateY(-3px); border-color: var(--gold); background: rgba(201,162,74,.06); }
.contact-item svg {
  flex: none; width: 44px; height: 44px; padding: 11px; border-radius: 50%;
  border: 1px solid var(--gold); fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.contact-item span { display: flex; flex-direction: column; word-break: break-word; }
.contact-item small { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.center { text-align: center; padding-bottom: 40px; }

footer { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 80px; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 820px) {
  .nav nav { display: none; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-cta { justify-content: center; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .hero-cta .btn { flex: 1 1 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
