:root {
  --bg: #0a0a0f;
  --bg-soft: #111119;
  --card: #15151f;
  --border: #24242f;
  --text: #f2f2f6;
  --text-dim: #9797a8;
  --accent: #7c5cff;
  --accent-2: #ff5c8a;
  --accent-3: #5cf0d0;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --radius: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  position: relative;
}

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: radial-gradient(circle at 20% 20%, rgba(124,92,255,0.10), transparent 40%),
                     radial-gradient(circle at 80% 60%, rgba(255,92,138,0.08), transparent 45%);
}

.cursor-glow {
  position: fixed; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,0.10), transparent 70%);
  pointer-events: none; z-index: 0; transition: transform 0.15s ease-out;
  transform: translate(-50%, -50%);
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 6vw; backdrop-filter: blur(12px);
  background: rgba(10,10,15,0.6); border-bottom: 1px solid var(--border);
}
.logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 10px 20px; border-radius: 100px; background: var(--text); color: var(--bg);
  text-decoration: none; font-weight: 600; font-size: 14px; transition: transform 0.2s, opacity 0.2s;
}
.nav-cta:hover { transform: translateY(-2px); opacity: 0.9; }
.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.menu-btn span { width: 24px; height: 2px; background: var(--text); }
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0; z-index: 99;
  background: var(--bg-soft); border-bottom: 1px solid var(--border); flex-direction: column; padding: 20px 6vw;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--border); }

/* Hero */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 6vw; position: relative; z-index: 2;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--accent-3); font-size: 13px; font-weight: 500;
  margin-bottom: 28px; width: fit-content; background: rgba(92,240,208,0.05);
}
.hero h1 {
  font-size: clamp(38px, 7vw, 88px); line-height: 1.05; font-weight: 700; max-width: 900px;
}
.hero-sub { color: var(--text-dim); font-size: 19px; max-width: 560px; margin-top: 24px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 15px 30px;
  border-radius: 100px; text-decoration: none; font-weight: 600; font-size: 15px; transition: all 0.25s;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(124,92,255,0.35); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-3); }
.btn-lg { padding: 20px 40px; font-size: 17px; }

.scroll-hint { position: absolute; bottom: 40px; left: 6vw; display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 13px; }
.scroll-line { width: 1px; height: 40px; background: var(--border); position: relative; overflow: hidden; }
.scroll-line::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--accent-3); animation: scrollDown 1.8s infinite; }
@keyframes scrollDown { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }

/* Marquee */
.marquee { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 24px 0; overflow: hidden; background: var(--bg-soft); position: relative; z-index: 2; }
.marquee-track { display: flex; gap: 60px; white-space: nowrap; animation: marquee 18s linear infinite; }
.marquee-track span { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; color: var(--border); }
.marquee-track span:nth-child(4n+1) { color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Sections */
.section { padding: 120px 6vw; position: relative; z-index: 2; }
.section-head { margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; }
.section-head p { color: var(--text-dim); margin-top: 10px; font-size: 17px; }
.num { color: var(--accent); font-size: 18px; margin-right: 10px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.3s, border-color 0.3s; cursor: pointer;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.project-thumb { height: 220px; }
.thumb-1 { background: linear-gradient(135deg, #7c5cff, #5c8aff); }
.thumb-2 { background: linear-gradient(135deg, #ff5c8a, #ff9c5c); }
.thumb-3 { background: linear-gradient(135deg, #5cf0d0, #5cb8ff); }
.thumb-4 { background: linear-gradient(135deg, #ffd15c, #ff5c5c); }
.project-info { padding: 28px; }
.project-info h3 { font-size: 21px; margin-bottom: 10px; }
.project-info p { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span { font-size: 12px; padding: 5px 12px; border-radius: 100px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 60px; align-items: center; }
.about-text p { color: var(--text-dim); font-size: 17px; line-height: 1.75; margin-bottom: 20px; }
.stats { display: flex; gap: 40px; margin-top: 32px; }
.stat strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 34px; color: var(--accent-3); }
.stat span { color: var(--text-dim); font-size: 14px; }
.about-visual { display: flex; justify-content: center; }
.avatar-ring {
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--grad); position: relative;
  animation: rotateGlow 8s linear infinite;
}
.avatar-ring::before {
  content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg);
}
@keyframes rotateGlow { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color 0.3s, transform 0.3s; }
.skill-card:hover { border-color: var(--accent-3); transform: translateY(-4px); }
.skill-card h4 { color: var(--accent-3); margin-bottom: 10px; font-size: 18px; }
.skill-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }

/* Contact */
.contact-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.contact h2 { font-size: clamp(30px, 5vw, 52px); font-weight: 700; margin-bottom: 40px; line-height: 1.2; }
.socials { display: flex; gap: 28px; justify-content: center; margin-top: 40px; }
.socials a { color: var(--text-dim); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.socials a:hover { color: var(--accent-3); }

/* Footer */
.footer { display: flex; justify-content: space-between; padding: 40px 6vw; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 14px; position: relative; z-index: 2; }
.back-top { color: var(--text-dim); text-decoration: none; }
.back-top:hover { color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: flex; }
  .projects { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-visual { order: -1; }
}
@media (max-width: 520px) {
  .skills-grid { grid-template-columns: 1fr; }
  .stats { flex-wrap: wrap; gap: 24px; }
  .footer { flex-direction: column; gap: 10px; }
}
