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

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #161616;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.18);
  --text: #f0f0f0;
  --muted: #666;
  --muted2: #444;
  --accent: #e8e8e8;
  --accent2: #c0c0c0;
  --glow: rgba(255,255,255,0.04);
  --card-bg: rgba(255,255,255,0.03);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  overflow-x: hidden;
  cursor: none;
}

/* CURSOR */
.cursor {
  width: 10px; height: 10px;
  background: white;
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease;
  mix-blend-mode: difference;
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94), width 0.3s, height 0.3s, border-color 0.3s;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
nav.scrolled {
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px; background: white;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: white; }
.nav-links a:hover::after { transform: scaleX(1); }

/* HERO */
#hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 40px;
  max-width: 900px;
}
.hero-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: white;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s forwards;
}
.hero-title .line2 { color: var(--muted2); }
.hero-sub {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
  opacity: 0;
  animation: fadeUp 0.9s 0.7s forwards;
}
.hero-ctas {
  margin-top: 40px;
  display: flex; gap: 14px; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.9s forwards;
}
.btn {
  padding: 13px 28px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.25s;
  cursor: none;
  display: inline-block;
}
.btn-primary {
  background: white; color: black; border: 1px solid white;
}
.btn-primary:hover { background: transparent; color: white; }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border-hover);
}
.btn-ghost:hover { color: white; border-color: white; }

.scroll-hint {
  position: absolute; bottom: 36px; left: 40px;
  z-index: 2;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted2);
  display: flex; align-items: center; gap: 10px;
  opacity: 0;
  animation: fadeIn 1s 1.4s forwards;
}
.scroll-line {
  width: 40px; height: 1px; background: var(--muted2);
  animation: scrollAnim 2s 1.6s infinite;
}

/* SECTIONS */
section {
  padding: 120px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after {
  content: '';
  height: 1px;
  width: 40px;
  background: var(--muted2);
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: white;
  margin-bottom: 48px;
}

/* ABOUT */
#about .about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: start;
}
.about-text p {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 20px;
}
.about-text p span { color: var(--accent2); }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 28px 24px;
  transition: border-color 0.25s, background 0.25s;
}
.stat-card:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
}
.stat-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: white;
}
.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* SKILLS */
#skills .skills-wrap {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.skill-tag {
  padding: 8px 16px;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-radius: 2px;
  transition: all 0.2s;
  cursor: none;
}
.skill-tag:hover {
  border-color: white;
  color: white;
  background: rgba(255,255,255,0.04);
}
.skill-group {
  margin-bottom: 36px;
}
.skill-group-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 12px;
}

/* PROJECTS — 3D CARDS */
#projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
  transform-style: preserve-3d;
  perspective: 600px;
  cursor: none;
}
.project-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { border-color: var(--border-hover); }
.project-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--muted2);
  margin-bottom: 20px;
}
.project-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  margin-bottom: 12px;
  line-height: 1.3;
}
.project-desc {
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 24px;
}
.project-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 24px;
}
.project-tag {
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-radius: 2px;
}
.project-link {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s, gap 0.2s;
  cursor: none;
}
.project-link:hover { color: white; gap: 12px; }
.project-card.featured {
  grid-column: span 2;
  border-color: rgba(255,255,255,0.1);
}

/* GSOC HIGHLIGHT */
.gsoc-banner {
  margin: 0 0 80px 0;
  padding: 32px 36px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  margin-bottom: 0px;
}
.gsoc-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}
.gsoc-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 10px;
}
.gsoc-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  margin-bottom: 8px;
}
.gsoc-sub {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
}
.gsoc-metrics {
  display: flex; flex-direction: column; gap: 8px;
  text-align: right;
}
.gsoc-metric {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}
.gsoc-metric-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted2);
}

/* CONTACT */
#contact {
  max-width: 1100px;
}
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-big {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 1.05;
  color: white;
  margin-bottom: 28px;
}
.contact-big span { color: var(--muted2); }
.contact-text {
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 36px;
}
.contact-links {
  display: flex; flex-direction: column; gap: 14px;
}
.contact-link {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all 0.25s;
  cursor: none;
}
.contact-link:hover {
  color: white;
  border-color: var(--border-hover);
  background: var(--glow);
  padding-left: 24px;
}
.contact-link-icon { font-size: 1rem; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 100%;
}
footer p {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted2);
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scrollAnim {
  0%   { transform: scaleX(1); transform-origin: left; }
  50%  { transform: scaleX(0.3); transform-origin: left; }
  51%  { transform: scaleX(0.3); transform-origin: right; }
  100% { transform: scaleX(1); transform-origin: right; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* MOBILE */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-links { display: none; }
  section { padding: 80px 20px; }
  .hero-content { padding: 0 20px; }
  #about .about-grid { grid-template-columns: 1fr; gap: 40px; }
  #projects .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .gsoc-banner { grid-template-columns: 1fr; }
  .gsoc-metrics { text-align: left; flex-direction: row; gap: 24px; }
  footer { flex-direction: column; gap: 10px; text-align: center; }
  .scroll-hint { left: 20px; }
}
