:root {
  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.2s;
  --dur-medium: 0.35s;
  --dur-slow: 0.6s;

  --bg: #080810;
  --card: #0e0e1a;
  --card-hover: #13131f;
  --border: #1e1e30;
  --border-bright: #2e2e50;
  --text: #f0f0ff;
  --muted: #7070a0;
  --accent: #7c6ff7;
  --accent2: #f97316;
  --accent-glow: rgba(124, 111, 247, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 7%;
  background: rgba(8, 8, 16, 0.7);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(124, 111, 247, 0.08);
  transition: padding var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.navbar.scrolled {
  padding: 14px 7%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.navbar nav {
  display: flex;
  gap: 36px;
}

.navbar nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--dur-fast) ease;
  position: relative;
}

.navbar nav a:hover { color: var(--text); }

.navbar nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--dur-medium) var(--ease-apple);
}

.navbar nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: all var(--dur-fast) ease;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7%;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,111,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,111,247,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(124, 111, 247, 0.12);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(249, 115, 22, 0.06);
  bottom: 50px;
  left: -50px;
}

.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-bright);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
  background: rgba(124,111,247,0.05);
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-apple) 0.1s forwards;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-apple) 0.2s forwards;
}

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

.cursor {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero .subtitle {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 40px;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-apple) 0.3s forwards;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-apple) 0.4s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-medium) var(--ease-apple);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 0 30px var(--accent-glow);
}
.btn-primary:hover {
  background: #9185f8;
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(124,111,247,0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(124,111,247,0.07);
  transform: translateY(-2px);
}

/* scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ── SECTIONS ── */
.section {
  padding: 110px 7%;
}

.section-header {
  margin-bottom: 64px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ── ABOUT ── */
.about-layout {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 60px;
  max-width: 1000px;
  align-items: start;
}

.about-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  padding-top: 8px;
}

.about-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.about-content h2 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-content p strong { color: var(--text); font-weight: 500; }

.stat-row {
  display: flex;
  gap: 48px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat span {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  display: block;
}

.stat p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  max-width: 1000px;
}

.skill-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: default;
  transition: all var(--dur-medium) var(--ease-apple);
}

.skill-item:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124,111,247,0.15);
}

.skill-icon {
  font-size: 1.8rem;
}

.skill-item span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.skill-item:hover span { color: var(--text); }

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--dur-medium) var(--ease-apple);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(124,111,247,0.06), transparent 60%);
  transition: opacity var(--dur-fast) ease;
  pointer-events: none;
}

.project-card:hover::after { opacity: 1; }

.project-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.project-card.featured {
  border-color: rgba(124,111,247,0.3);
  background: linear-gradient(135deg, var(--card), rgba(124,111,247,0.04));
}

.project-card.featured:hover {
  border-color: var(--accent);
  box-shadow: 0 24px 60px rgba(124,111,247,0.15);
}

.project-card.more-card {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 180px;
}

.project-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(124,111,247,0.15);
  border: 1px solid rgba(124,111,247,0.3);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: fit-content;
}

.project-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tags span {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.link-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--dur-fast) ease;
  padding: 6px 0;
}

.link-btn:hover { color: var(--text); }
.link-btn.live { color: var(--accent); }
.link-btn.live:hover { color: #a78bfa; }

/* ── CONTACT ── */
.contact-section {
  padding: 110px 7%;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124,111,247,0.08), transparent 60%);
  pointer-events: none;
}

.contact-inner {
  max-width: 640px;
  position: relative;
}

.contact-inner h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
}

.contact-inner p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--dur-medium) var(--ease-apple);
}

.contact-btn:hover {
  border-color: var(--accent);
  background: rgba(124,111,247,0.08);
  transform: translateY(-2px);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 7%;
  display: flex;
  justify-content: center;
  align-items: center;
}

footer p {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .navbar nav { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 0 5%; text-align: center; }
  .hero .subtitle { margin: 0 auto 40px; }
  .hero-buttons { justify-content: center; }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-label { display: none; }
  .stat-row { gap: 28px; flex-wrap: wrap; }

  .section { padding: 80px 5%; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .projects-grid { grid-template-columns: 1fr; }

  .contact-links { flex-direction: column; }
  .contact-btn { width: 100%; justify-content: center; }
}