/* ===================== */
/* ROOT VARIABLES */
/* ===================== */
:root{
  --bg:#0f1220;
  --primary:#7c83ff;
  --accent:#22d3ee;
  --muted:#94a3b8;
  --text:#e5e7eb;
}

/* ===================== */
/* GLOBAL RESET */
/* ===================== */
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

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

/* ===================== */
/* BACKGROUND CANVAS */
/* ===================== */
#artCanvas{
  position:fixed;
  inset:0;
  z-index:-10;
  pointer-events:none;
  opacity:0.4;
}

/* ===================== */
/* CURSOR GLOW */
/* ===================== */
#cursor-glow{
  position:fixed;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(124,131,255,.2), transparent 60%);
  transform:translate(-50%,-50%);
  pointer-events:none;
  z-index:-1;
}

/* ===================== */
/* NAVBAR */
/* ===================== */
nav{
  position:sticky;
  top:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 60px;
  backdrop-filter:blur(12px);
  background:rgba(15,18,32,0.6);
  border-bottom:1px solid rgba(255,255,255,0.06);
  z-index:10;
}

nav ul{
  list-style:none;
  display:flex;
  gap:30px;
}

nav a{
  text-decoration:none;
  color:inherit;
  opacity:0.85;
}

nav a:hover{opacity:1}

.logo{
  font-weight:800;
  font-size:1.2rem;
}

/* ===================== */
/* SECTIONS */
/* ===================== */
section{
  padding:100px 80px;
  border-top:1px solid rgba(255,255,255,0.08);
  border-bottom:1px solid rgba(255,255,255,0.05);
}

/* Scroll reveal */
.reveal{
  opacity:0;
  transform:translateY(40px);
  transition:0.8s ease;
}

.reveal.active{
  opacity:1;
  transform:none;
}

/* ===================== */
/* HERO */
/* ===================== */
.hero h1{
  font-size:3.4rem;
  margin-bottom:10px;
}

.subtitle{
  letter-spacing:3px;
  color:var(--muted);
  margin-bottom:12px;
}

.typing{
  color:var(--accent);
  height:36px;
  margin-bottom:18px;
}

/* Gradient name */
.name-gradient{
  background:linear-gradient(
    270deg,
    #7c83ff,
    #22d3ee,
    #a78bfa,
    #7c83ff
  );
  background-size:600% 600%;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:gradientFlow 8s ease infinite;
  font-weight:800;
}

@keyframes gradientFlow{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* Intro text */
.intro-text{
  max-width:720px;
  font-size:1.05rem;
  line-height:1.7;
  color:#d1d5db;
}

/* Intro button */
.intro-btn{
  display:inline-block;
  margin-top:24px;
  padding:12px 24px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--primary),var(--accent));
  color:#000;
  font-weight:600;
  text-decoration:none;
  box-shadow:0 12px 30px rgba(124,131,255,.35);
  transition:0.35s ease;
}

.intro-btn:hover{
  transform:translateY(-4px) scale(1.03);
  box-shadow:0 18px 40px rgba(34,211,238,.45);
}

/* ===================== */
/* SKILL CATEGORY TITLE */
/* ===================== */
.skill-category{
  margin-top:50px;
  margin-bottom:12px;
  font-size:1.15rem;
  letter-spacing:1px;
  color:var(--muted);
}

.skill-category::after{
  content:"";
  display:block;
  width:60px;
  height:2px;
  margin-top:8px;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  border-radius:999px;
}

/* ===================== */
/* SKILLS MARQUEE */
/* ===================== */
.skills-marquee{
  overflow:hidden;
  padding:18px 0;
  margin-bottom:20px;
}

.skills-track{
  display:flex;
  gap:24px;
  width:max-content;
  animation:scrollSkills 28s linear infinite;
}

.skills-track span{
  padding:10px 18px;
  border-radius:999px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.14);
  white-space:nowrap;
  box-shadow:0 8px 20px rgba(0,0,0,0.25);
  transition:0.3s;
}

.skills-track span:hover{
  background:linear-gradient(135deg,var(--primary),var(--accent));
  color:#000;
  transform:translateY(-2px);
}

.skills-marquee:hover .skills-track{
  animation-play-state:paused;
}

@keyframes scrollSkills{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}

/* ===================== */
/* PROJECTS */
/* ===================== */
.projects{
  display:grid;
  gap:24px;
}

.project{
  position:relative;
  padding:22px;
  border-radius:14px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.14);
  backdrop-filter:blur(14px);
  box-shadow:0 20px 40px rgba(0,0,0,0.3);
  transition:0.4s ease;
}

.project::before{
  content:"";
  display:block;
  width:40px;
  height:3px;
  margin-bottom:12px;
  background:linear-gradient(90deg,var(--primary),var(--accent));
  border-radius:999px;
}

.project::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:14px;
  background:linear-gradient(
    120deg,
    transparent,
    rgba(124,131,255,0.15),
    transparent
  );
  opacity:0;
  transition:0.4s;
}

.project:hover{
  transform:translateY(-8px) scale(1.02);
  box-shadow:0 30px 60px rgba(0,0,0,0.45);
}

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

/* ===== PROJECT MICRO INTERACTIONS ===== */
.project h3{
  transition: color .3s ease;
}

.project p{
  transition: opacity .3s ease, transform .3s ease;
}

.project:hover h3{
  color: var(--accent);
}

.project:hover p{
  opacity: 0.95;
  transform: translateY(-2px);
}

/* glowing edge */
.project{
  position:relative;
}

.project::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:14px;
  background:linear-gradient(
    120deg,
    transparent,
    rgba(124,131,255,0.25),
    transparent
  );
  opacity:0;
  transition:.4s ease;
  pointer-events:none;
}

.project:hover::after{
  opacity:1;
}
.project-links{
  margin-top:14px;
  display:flex;
  gap:12px;
}

.project-links a{
  padding:8px 16px;
  border-radius:999px;
  border:1px solid var(--accent);
  color:var(--accent);
  text-decoration:none;
  font-size:.85rem;
  transition:.3s ease;
}

.project-links a:hover{
  background:var(--accent);
  color:#000;
  transform:translateY(-2px);
}

/* ===================== */
/* ASK BOT */
/* ===================== */
#askBtn{
  position:fixed;
  bottom:24px;
  right:24px;
  background:var(--primary);
  color:white;
  border:none;
  border-radius:999px;
  padding:12px 18px;
  cursor:pointer;
}

#askBot{
  position:fixed;
  bottom:90px;
  right:24px;
  width:300px;
  background:#020617;
  border:1px solid var(--primary);
  display:none;
  flex-direction:column;
}

#askLog{
  height:150px;
  overflow:auto;
  padding:10px;
  font-size:0.9rem;
}

#askInput{
  border:none;
  padding:10px;
  background:#020617;
  color:white;
}

/* ===================== */
/* MOBILE */
/* ===================== */
@media(max-width:768px){
  nav{
    padding:16px;
    flex-direction:column;
    gap:12px;
  }

  section{
    padding:80px 24px;
  }

  .hero h1{
    font-size:2.2rem;
  }
}

@media (prefers-reduced-motion: reduce){
  *{
    animation:none !important;
    transition:none !important;
  }
}
#artCanvas{
  width:100%;
  height:100%;
}