:root {
  --bg: #0a0b0f;
  --bg-alt: #0f1117;
  --surface: #14161e;
  --surface-hover: #191c26;
  --border: #23262f;
  --text: #eef0f4;
  --text-dim: #9a9fac;
  --text-faint: #62667a;
  --accent: #7c9eff;
  --accent-2: #66e6c1;
  --accent-soft: rgba(124, 158, 255, 0.12);
  --radius: 14px;
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* background glow */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(124,158,255,0.10), transparent 60%),
    radial-gradient(500px circle at 85% 30%, rgba(102,230,193,0.08), transparent 60%);
  pointer-events: none;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 15, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color .2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { white-space: nowrap; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #0a0b0f;
  box-shadow: 0 8px 24px -8px rgba(124,158,255,0.6);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px rgba(124,158,255,0.75); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
}
.hero-inner {
  padding-top: 40px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-photo { flex: 0 0 auto; }
.hero-photo-ring {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 20px 60px -20px rgba(124, 158, 255, 0.45);
}
.hero-photo-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px dashed rgba(124, 158, 255, 0.25);
}
.hero-photo-ring img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: var(--bg);
}
.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 900px;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-dim);
  max-width: 680px;
  line-height: 1.6;
  margin: 0 0 42px;
}
.hl { color: var(--text); font-weight: 600; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 720px;
  margin-bottom: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--accent-2);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-faint);
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* SECTIONS */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }
.section-tag {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 40px;
  letter-spacing: -0.01em;
  font-weight: 700;
}

/* ABOUT */
.about-text {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 0 48px;
}
.about-text strong { color: var(--text); font-weight: 600; }
.about-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-label { font-size: 0.75rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-value { font-size: 0.95rem; font-weight: 500; }
.meta-value.link { transition: color .2s ease; }
.meta-value.link:hover { color: var(--accent); }

/* 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: 26px;
  transition: border-color .2s ease, transform .2s ease;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-card h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--accent-2);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 56px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.timeline-head h3 { margin: 0; font-size: 1.2rem; }
.timeline-date {
  font-size: 0.82rem;
  color: var(--text-faint);
  white-space: nowrap;
}
.timeline-company {
  color: var(--accent-2);
  font-size: 0.92rem;
  margin: 0 0 4px;
  font-weight: 500;
}
.timeline-stack {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 0 0 14px;
}
.timeline-content ul { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.timeline-content li {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}
.timeline-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.project-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--surface), var(--surface-hover));
}
.project-index {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 12px;
}
.project-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.project-subtitle {
  color: var(--accent-2);
  font-size: 0.85rem;
  margin: 0 0 14px;
  font-weight: 500;
}
.project-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 18px;
  flex-grow: 1;
}

/* EDUCATION / CERTS */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.edu-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.edu-school { color: var(--accent-2); font-size: 0.9rem; margin: 0 0 4px; }
.edu-date { color: var(--text-faint); font-size: 0.8rem; margin: 0 0 14px; }
.edu-desc { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin: 0; }

.cert-list { display: flex; flex-direction: column; gap: 12px; }
.cert-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.92rem;
}
.cert-list li small { color: var(--text-faint); font-size: 0.78rem; white-space: nowrap; }

/* CONTACT */
.section-cta { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-text {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 0 36px;
}
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 36px; }
  .hero-photo-ring { width: 200px; height: 200px; }
  .hero-actions { justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0,1fr)); text-align: left; }
  .about-meta { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 80px 0; }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10,11,15,0.98);
    border-bottom: 1px solid var(--border);
    padding: 20px 28px;
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .about-meta { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}
