:root {
  --bg: #08090d;
  --bg-alt: #0d0f16;
  --surface: #12141c;
  --border: #1f222d;
  --text: #eef0f5;
  --text-muted: #9aa0ae;
  --accent-1: #7c5cff;
  --accent-2: #29d3c8;
  --accent-3: #ff6b9d;
  --gradient: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --font-body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --nav-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

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

section { scroll-margin-top: var(--nav-h); }

/* Background glow */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(700px 500px at 85% 30%, rgba(41, 211, 200, 0.12), transparent 60%),
    radial-gradient(600px 400px at 50% 90%, rgba(255, 107, 157, 0.08), transparent 60%);
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 9, 13, 0.85);
}
.nav-inner {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo-home {
  display: flex;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.logo-home:hover { color: var(--accent-2); opacity: 1; }
.logo-home svg { width: 100%; height: 100%; }
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.logo .dot { color: var(--accent-2); }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.nav-links a { position: relative; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gradient);
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { flex-shrink: 0; }
.burger { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #05060a;
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.5); }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent-1); transform: translateY(-2px); }
.btn-ghost {
  padding: 10px 20px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--accent-2); }

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 32px 80px;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.9rem;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-role {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text-muted);
  min-height: 1.6em;
}
.cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent-1);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-desc {
  margin-top: 26px;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.hero-status { margin-top: 22px; }
.status-badge { border-radius: 12px; display: inline-block; }
.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 32px;
  width: 26px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-hint span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  animation: scrollDown 1.6s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  70% { opacity: 0.3; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 110px 32px;
}
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-tag {
  font-family: var(--font-mono);
  color: var(--accent-1);
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 50px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-text { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; }
.about-text + .about-text { margin-top: 16px; }
.stats { display: flex; flex-direction: column; gap: 26px; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.stat-num-sm { font-size: 1.3rem; }

/* Status list (used on project detail pages) */
.status-list { display: flex; flex-direction: column; }
.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.status-item-name { font-size: 1rem; }
.status-item-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  background: rgba(41, 211, 200, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.text-center { text-align: center; }

/* Flow steps (used on project detail pages) */
.flow-summary {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* Skills */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.skill-badge {
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--surface);
  transition: all 0.25s ease;
}
.skill-badge:hover {
  color: var(--text);
  border-color: var(--accent-1);
  transform: translateY(-3px);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, 0.4); }
.project-glow {
  height: 130px;
  position: relative;
  overflow: hidden;
}
.project-glow::before {
  content: '';
  position: absolute;
  inset: -40%;
  filter: blur(30px);
  opacity: 0.55;
}
.project-glow.p1::before { background: radial-gradient(circle, var(--accent-1), transparent 65%); }
.project-glow.p2::before { background: radial-gradient(circle, var(--accent-2), transparent 65%); }
.project-glow.p3::before { background: radial-gradient(circle, var(--accent-3), transparent 65%); }
.project-body { padding: 26px; }
.post-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 10px;
}
.project-body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.project-body p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 18px; }
.project-tags { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent-1);
}
.project-links { display: flex; gap: 20px; font-size: 0.85rem; }
.project-links a { color: var(--text-muted); transition: color 0.2s ease; }
.project-links a:hover { color: var(--accent-2); }
.project-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Contact */
.contact-desc { color: var(--text-muted); max-width: 50ch; margin-top: -20px; margin-bottom: 40px; }
.contact-links { display: flex; flex-direction: column; gap: 4px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.contact-link:hover { color: var(--accent-2); padding-left: 16px; }
.contact-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
}
.contact-icon svg { width: 100%; height: 100%; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

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

/* Responsive */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats { flex-direction: row; flex-wrap: wrap; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-menu { display: none; }
  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .burger span {
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav.open .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-alt);
    padding: 24px 32px;
    gap: 22px;
    border-bottom: 1px solid var(--border);
  }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .nav.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .burger span:nth-child(2) { opacity: 0; }
  .nav.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .hero { padding-top: calc(var(--nav-h) + 20px); }
  .section { padding: 80px 24px; }
  .nav-inner { padding: 0 20px; }
}
