/* ============ Reset & tokens ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b0e14;
  --bg-alt: #10141d;
  --surface: #151a26;
  --surface-hover: #1a2131;
  --border: #232b3d;
  --text: #e8ecf3;
  --text-dim: #a7b0c2;
  --text-faint: #6b7490;
  --accent: #5b9dff;
  --accent-soft: rgba(91, 157, 255, 0.12);
  --green: #3ddc84;
  --green-soft: rgba(61, 220, 132, 0.12);
  --radius: 14px;
  --nav-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ============ Nav ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1060px; margin: 0 auto; padding: 0 24px;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
}
.logo { font-weight: 800; font-size: 1.35rem; color: var(--text); letter-spacing: -0.5px; }
.logo-dot { color: var(--accent); }
.nav-links { display: flex; gap: 6px; }
.nav-link {
  color: var(--text-dim); font-size: 0.92rem; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }

/* ============ Hero ============ */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 64px;
  background:
    radial-gradient(640px 340px at 15% 20%, rgba(91, 157, 255, 0.10), transparent 60%),
    radial-gradient(560px 320px at 88% 82%, rgba(61, 220, 132, 0.06), transparent 60%);
}
.hero-inner { max-width: 1060px; margin: 0 auto; padding: 0 24px; width: 100%; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.95rem; color: var(--accent); margin-bottom: 10px;
}
.hero-name {
  font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -2px; line-height: 1.05;
}
.hero-tagline { font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 600; color: var(--text-dim); margin-top: 14px; }
.accent { color: var(--accent); }
.hero-summary { max-width: 640px; color: var(--text-dim); margin-top: 16px; font-size: 1.02rem; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #08111f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(91, 157, 255, 0.35); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-sm { padding: 9px 20px; font-size: 0.88rem; }

.hero-stats { display: flex; gap: 44px; margin-top: 52px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--text); font-family: var(--mono); }
.stat-label { font-size: 0.85rem; color: var(--text-faint); }

/* ============ Sections ============ */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-eyebrow {
  font-family: var(--mono); font-size: 0.85rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px;
}
.section-title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 36px; }

/* ============ About ============ */
.about-text { max-width: 760px; font-size: 1.08rem; color: var(--text-dim); }

/* ============ Timeline ============ */
.timeline { position: relative; padding-left: 30px; max-width: 860px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border); border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
  position: absolute; left: -28px; top: 26px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 28px; transition: border-color .2s, transform .2s;
}
.timeline-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.timeline-head h3 { font-size: 1.15rem; font-weight: 700; }
.timeline-org { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.timeline-date { display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); margin: 6px 0 14px; }
.timeline-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.timeline-card li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: 0.96rem; }
.timeline-card li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

/* ============ Projects ============ */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s, transform .2s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.project-featured { border-color: rgba(61, 220, 132, 0.35); }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-top h3 { font-size: 1.2rem; font-weight: 700; }
.project-desc { color: var(--text-dim); font-size: 0.96rem; flex: 1; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span {
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-dim);
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
}
.project-links { display: flex; gap: 12px; flex-wrap: wrap; }

.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--green); background: var(--green-soft);
  border: 1px solid rgba(61, 220, 132, 0.35); border-radius: 999px; padding: 5px 13px;
  white-space: nowrap;
}
.live-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* ============ Skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s;
}
.skill-card:hover { border-color: var(--accent); }
.skill-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--accent); }

/* ============ Education ============ */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.edu-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color .2s;
}
.edu-card:hover { border-color: var(--accent); }
.edu-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.edu-org { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.edu-date { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); margin-top: 6px; }
.edu-cert { border-style: dashed; }

/* ============ Contact & footer ============ */
.contact-inner { text-align: center; max-width: 640px; }
.contact-inner .section-eyebrow { margin-bottom: 10px; }
.contact-text { color: var(--text-dim); margin-bottom: 30px; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { text-align: center; color: var(--text-faint); font-size: 0.85rem; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .live-pulse { animation: none; }
}

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 12px 16px 20px; gap: 2px;
    transform: translateY(-120%); transition: transform .28s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: block; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 72px 0; }
  .hero-stats { gap: 28px; }
  .timeline { padding-left: 22px; }
  .timeline::before { left: 5px; }
  .timeline-marker { left: -22px; }
  .timeline-card { padding: 20px; }
  .project-card { padding: 22px; }
}
