/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Reset + theme */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root{
  --bg-1:#0d0417;
  --bg-2:#160b2e;
  --accent:#a78bfa;        /* purple glow */
  --mint:#64ffda;
  --text:#ffffff;
  --muted:#c8c8d6;
  --card:#ffffff0f;
  --card-border:#ffffff20;
  --card-hover:#ffffff17;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
}
body{
  font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(60% 80% at 70% 10%, #2a0a5a55 0%, transparent 60%),
              radial-gradient(40% 50% at 20% 80%, #5b21b655 0%, transparent 60%),
              linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none; /* hide system cursor */
}

/* Premium glow helpers */
.glow{
  box-shadow:
    0 0 0 1px var(--card-border),
    0 10px 40px rgba(87,0,180,.25),
    inset 0 0 40px rgba(167,139,250,.08);
}

/* Custom cursor (cube) */
.custom-cursor{
  position: fixed; inset: 0 auto auto 0;
  width: 14px; height: 14px;
  background: var(--mint);
  transform: translate(-50%,-50%) rotate(45deg);
  border-radius: 3px;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  transition: transform .12s ease, background .2s ease, width .12s, height .12s;
}

/* Three.js canvas layer */
#canvas-container{
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
}

/* Main content */
.content{ position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section{ min-height: 100vh; display: grid; place-items: center; padding: 80px 0; }
.section-header{ text-align:center; max-width: 820px; margin: 0 auto 32px; }
.section-header h2{ font-size: clamp(28px,4.8vw,48px); font-weight:700; letter-spacing:-.02em; }
.section-header p{ margin-top:10px; color: var(--muted); }

/* HERO */
.hero{ text-align:center; }
.hero .stack{ display:grid; gap: 18px; }
.hero h1{ font-size: clamp(42px,8vw,84px); letter-spacing:-.03em; font-weight:700; }
.subtitle{ color: var(--muted); opacity:.9; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--card-border);
  text-decoration:none; color: var(--text); font-weight:600; letter-spacing:.2px;
  backdrop-filter: blur(6px);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn + .btn{ margin-left: 12px; }
.btn-primary{
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 30px rgba(124,58,237,.35);
  border-color: transparent;
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 36px rgba(124,58,237,.5); }
.btn-ghost{ background: #ffffff12; }
.btn-ghost:hover{ background:#ffffff22; transform: translateY(-2px); }

/* Projects */
.project-grid{
  display:grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 22px; width: 100%;
}
.project-card{
  padding: 24px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(8px); box-shadow: var(--shadow); position: relative; overflow:hidden;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.project-card::before{
  content:""; position:absolute; top:0; left:-120%; width: 120%; height:100%;
  background: linear-gradient(90deg, transparent, #a78bfa22, transparent);
  transition: left .6s ease;
}
.project-card:hover{ transform: translateY(-4px); background: var(--card-hover); border-color: #a78bfa44; }
.project-card:hover::before{ left:100%; }
.project-card h3{ color:#c4b5fd; font-size: 20px; margin-bottom: 8px; }
.project-card p{ color: var(--muted); margin-bottom: 12px; line-height:1.6; }
.link{ color:#c4b5fd; font-weight:600; text-decoration:none; border-bottom:1px solid #a78bfa55; }
.link:hover{ opacity:.85; }

/* About + More */
.about-content{ max-width: 840px; margin: 0 auto; display:grid; gap:18px; }
.about-content .muted{ color: var(--muted); font-style: italic; }

/* Skills */
.skills-grid{
  display:grid; gap: 14px; grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  width:100%; max-width: 900px; margin: 0 auto;
}
.skill{
  text-align:center; padding: 12px 16px; border-radius: 999px;
  background: #a78bfa18; color:#e9d5ff; border: 1px solid #a78bfa44;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.skill:hover{ transform: translateY(-2px); background: #a78bfa28; border-color:#a78bfa88; }

/* Contact */
.contact .contact-row{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:10px; }
.footer{ text-align:center; color: var(--muted); margin-top: 28px; }

/* Reveal on scroll */
.fade-target{ opacity:0; transform: translateY(16px); }
.fade-in{ opacity:1 !important; transform: translateY(0) !important; transition: opacity .7s ease, transform .7s ease; }

/* Nav dots */
.nav-dots{
  position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
  display:flex; flex-direction:column; gap: 12px; z-index: 3;
}
.nav-dot{
  width:10px; height:10px; border-radius:50%; border:none; cursor:pointer;
  background:#ffffff30; transition: transform .15s ease, background .2s ease;
}
.nav-dot:hover{ transform: scale(1.2); background:#ffffff60; }
.nav-dot.active{ background: #c4b5fd; box-shadow: 0 0 0 6px #c4b5fd22; }

/* Responsive */
@media (max-width: 760px){
  .nav-dots{ display:none; }
  .btn + .btn{ margin-left: 0; margin-top: 10px; }
  .hero .stack{ gap: 14px; }
}
