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

:root {
  --bg: #07070f;
  --bg2: #0d0d1a;
  --accent: #00c8ff;
  --accent2: #7b5ea7;
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --radius: 16px;
  --font: 'Inter', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

/* ── Background Orbs ── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #00c8ff33, transparent 70%);
  top: -200px; left: -100px;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7b5ea733, transparent 70%);
  top: 40%; right: -150px;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #00c8ff22, transparent 70%);
  bottom: 0; left: 30%;
}

/* ── Shared ── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(0, 200, 255, 0.15);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(7, 7, 15, 0.85);
  border-color: var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
}
.logo-dot { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  color: var(--accent) !important;
  border: 1px solid rgba(0, 200, 255, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s !important;
}
.btn-nav:hover {
  background: rgba(0, 200, 255, 0.1) !important;
  color: var(--accent) !important;
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  gap: 4rem;
}
.hero-content { flex: 1; }

.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid rgba(0, 200, 255, 0.2);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 460px;
}

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

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: #07070f;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-ghost {
  display: inline-block;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.hero-visual { flex: 0 0 auto; }

.hero-card {
  padding: 1.5rem;
  min-width: 320px;
}
.card-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}
.card-dot.green { background: #3fb950; }
.card-dot.yellow { background: #d29922; }
.card-dot.red { background: #f85149; }

.code-lines { margin-top: 1.25rem; font-size: 0.85rem; font-family: 'Courier New', monospace; }
.code-line { padding: 0.2rem 0; }
.kw { color: #79c0ff; }
.fn { color: #d2a8ff; }
.str { color: #a5d6ff; }

/* ── Projects ── */
.projects {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}
.section-header {
  margin-bottom: 3rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.project-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.project-name {
  font-size: 1.2rem;
  font-weight: 700;
}
.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.stack-pill {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.link-live, .link-code {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.link-live { color: var(--accent); }
.link-code { color: var(--text-muted); }
.link-live:hover { color: #66d9ff; }
.link-code:hover { color: var(--text); }

.coming-soon { opacity: 0.6; }
.cs-indicator {
  display: flex;
  gap: 6px;
  margin-top: 0.5rem;
}
.cs-indicator span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
.cs-indicator span:nth-child(2) { animation-delay: 0.2s; }
.cs-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ── About ── */
.about {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}
.about-inner {
  display: flex;
  gap: 4rem;
  align-items: center;
  flex-wrap: wrap;
}
.about-text {
  flex: 1;
  min-width: 280px;
}
.about-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 200px;
}
.stat-card {
  padding: 1.25rem 1.75rem;
  text-align: center;
}
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Contact ── */
.contact {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}
.contact-inner {
  display: flex;
  justify-content: center;
}
.contact-card {
  padding: 3.5rem;
  text-align: center;
  max-width: 580px;
  width: 100%;
}
.contact-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 2rem 0;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.github-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.github-link:hover { color: var(--text); }

/* ── Fade-in animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Nav */
  .nav-inner { padding: 0 1.25rem; }
  .nav-links { gap: 0.75rem; }
  .nav-links li:not(:last-child) { display: none; }

  /* Hero */
  .hero {
    flex-direction: column;
    padding: 6rem 1.25rem 3rem;
    text-align: center;
    gap: 2rem;
    min-height: unset;
  }
  .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-sub { margin: 0 auto 2rem; font-size: 1rem; }
  .hero-actions { justify-content: center; }
  .hero-visual { width: 100%; }
  .hero-card { min-width: unset; width: 100%; }

  /* Sections */
  .section-inner { padding: 0 1.25rem; }
  .projects { padding: 4rem 0; }
  .about { padding: 4rem 0; }
  .contact { padding: 4rem 0; }
  .projects-grid { grid-template-columns: 1fr; }

  /* About */
  .about-inner { flex-direction: column; gap: 2rem; }
  .about-stats { flex-direction: row; flex-wrap: wrap; justify-content: center; width: 100%; }
  .stat-card { flex: 1; min-width: 120px; padding: 1rem; }

  /* Contact */
  .contact-card { padding: 2rem 1.5rem; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }

  /* Orbs — reduce on mobile for performance */
  .orb-1 { width: 300px; height: 300px; }
  .orb-2 { width: 250px; height: 250px; }
  .orb-3 { width: 200px; height: 200px; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.9rem; }
  .btn-primary, .btn-ghost { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; }
}
