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

:root {
  --bg: #121212;
  --bg2: #1a1a2e;
  --purple: #A855F7;
  --purple-light: #D8B4FE;
  --deep-blue: #1E1B4B;
  --glass-bg: rgba(255,255,255,0.03);
  --glass-border: rgba(168,85,247,0.2);
  --text: #e5e5e5;
  --muted: rgba(255,255,255,0.5);
  --radius: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  line-height: 1.6;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #D8B4FE, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================
   BACKGROUND SPHERES
============================================= */
.bg-sphere {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(64px);
  opacity: 0.15;
}
.s1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle at 30% 30%, #D8B4FE, #A855F7);
  top: -100px; left: -100px;
}
.s2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle at 70% 70%, #A855F7, #1E1B4B);
  top: 40%; right: -80px;
}
.s3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle at 50% 50%, #D8B4FE, #7C3AED);
  bottom: 10%; left: 20%;
}

/* =============================================
   NAV
============================================= */
nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1100px;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18,18,18,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
}
.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.nav-logo .dot { color: var(--purple); }
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.nav-links a:hover { color: white; }
.nav-cta {
  background: var(--purple);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.85; transform: scale(1.03); }

/* =============================================
   SECTION BASE
============================================= */
.section {
  position: relative;
  z-index: 1;
  padding: 7rem 0;
}

.section-label-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-label-row.centered { justify-content: center; }
.label-line {
  flex: 1;
  height: 1px;
  background: var(--glass-border);
  max-width: 60px;
}
.label-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--purple);
}
.section-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.section-heading.centered { text-align: center; }
.section-sub {
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 3rem;
}
.section-sub.centered { margin-left: auto; margin-right: auto; text-align: center; }

/* =============================================
   GLASS CARD
============================================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* =============================================
   HERO
============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding-top: 6rem;
}
.hero-container { text-align: center; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple-light);
  margin-bottom: 2rem;
}
.pulse-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  min-height: 1.8rem;
}
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--purple);
  font-weight: 400;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.btn-primary-white {
  background: white;
  color: #121212;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary-white:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,255,255,0.15); }
.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  transition: background 0.2s, transform 0.2s;
}
.btn-glass:hover { background: rgba(168,85,247,0.1); transform: translateY(-2px); }


/* =============================================
   ABOUT
============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}
.about-left { position: relative; }

.mascot-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  transform-style: preserve-3d;
  cursor: default;
}
.mascot-wrap { display: flex; justify-content: center; }
.mascot-float {
  position: relative;
  display: inline-block;
  animation: mascot-float 6s ease-in-out infinite;
}
@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}
.speech-bubble {
  position: absolute;
  top: -10px;
  right: -30px;
  background: white;
  color: #121212;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-5px) scale(0.9);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 20px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid white;
}
.mascot-card:hover .speech-bubble { opacity: 1; transform: translateY(0) scale(1); }

.years-badge {
  position: absolute;
  bottom: -1rem;
  right: 1.5rem;
  background: linear-gradient(135deg, #A855F7, #7C3AED);
  border-radius: 1rem;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.years-num { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.5rem; }
.years-label { font-size: 0.65rem; font-weight: 600; opacity: 0.85; }

.about-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.about-desc {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}
.about-cards { display: flex; flex-direction: column; gap: 1rem; }
.info-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transform-style: preserve-3d;
}
.info-icon { font-size: 1.5rem; flex-shrink: 0; }
.info-card h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.info-card p { font-size: 0.85rem; color: var(--muted); }

/* =============================================
   SKILLS
============================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.skill-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  transform-style: preserve-3d;
  transition: border-color 0.3s;
}
.skill-card:hover { border-color: rgba(168,85,247,0.4); }
.skill-icon-wrap {
  width: 4rem; height: 4rem;
  background: rgba(168,85,247,0.1);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.skill-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.skill-list li {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-dot {
  width: 5px; height: 5px;
  background: var(--purple);
  border-radius: 50%;
  flex-shrink: 0;
}
.tools-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.tools-pills span {
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--purple-light);
  font-weight: 600;
}

/* =============================================
   PROJECTS
============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.3s;
}
.project-card:hover { border-color: rgba(168,85,247,0.4); }
.project-wide { grid-column: 1 / -1; }

.project-visual {
  background: linear-gradient(135deg, rgba(30,27,75,0.8), rgba(124,58,237,0.1));
  padding: 2.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  min-width: 80px;
}
.node-icon { font-size: 1.5rem; }
.flow-node span { font-size: 0.7rem; font-weight: 600; color: var(--purple-light); }
.flow-arrow-svg { color: var(--purple); font-size: 1.25rem; opacity: 0.6; }
.stack-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 9999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--purple-light);
}
.project-info { padding: 2rem; }
.project-info h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.project-info p { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.logic-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.logic-tags span {
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
}

.project-result {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.result-icon-lg { font-size: 2rem; }
.project-result h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.05rem; }
.project-result p { font-size: 0.85rem; color: var(--muted); flex: 1; }
.impact-badge {
  display: inline-block;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  align-self: flex-start;
}

/* =============================================
   CONTACT
============================================= */
.contact-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.2;
}
.g1 { width: 400px; height: 400px; background: #A855F7; top: -100px; left: -100px; }
.g2 { width: 300px; height: 300px; background: #D8B4FE; bottom: -80px; right: -80px; }
.contact-inner { position: relative; z-index: 1; }
.contact-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.contact-sub { color: var(--muted); margin-bottom: 2.5rem; }

.email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
  margin-bottom: 2.5rem;
}
.email-btn:hover {
  transform: scale(1.05);
  background: rgba(168,85,247,0.1);
  border-color: rgba(168,85,247,0.5);
}
.email-arrow { color: var(--purple); font-size: 1.2rem; }

.social-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
}
.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  font-size: 0.75rem;
}
.social-link:hover { color: var(--purple-light); }

/* =============================================
   FOOTER
============================================= */
footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  z-index: 1;
}

/* =============================================
   REVEAL ANIMATIONS (pre-state)
============================================= */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

/* =============================================
   HAMBURGER MENU
============================================= */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18,18,18,0.97);
  backdrop-filter: blur(16px);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: white;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--purple-light); }

/* =============================================
   RESPONSIVE — TABLET (≤900px)
============================================= */
@media (max-width: 900px) {
  .section { padding: 5rem 0; }

  /* Nav */
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-left { max-width: 380px; margin: 0 auto; }
  .mascot-card { padding: 2rem 1.5rem; }

  /* Skills */
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  /* Projects */
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* =============================================
   RESPONSIVE — MOBILE (≤640px)
============================================= */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }

  /* Nav */
  .nav-inner { padding: 0.65rem 1.25rem; }
  .nav-logo { font-size: 1.1rem; }
  .nav-cta { display: none; }

  /* Hero */
  .hero { padding-top: 5rem; min-height: 100svh; }
  .hero-title {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
    letter-spacing: -0.03em;
  }
  .hero-sub { font-size: 0.95rem; }
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .btn-primary-white,
  .btn-glass {
    width: 100%;
    max-width: 280px;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.85rem 1.5rem;
  }

  /* About */
  .about-left { max-width: 100%; }
  .mascot-card {
    padding: 2rem 1.25rem;
    border-radius: 2rem;
  }
  .about-heading { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .about-desc { font-size: 0.9rem; }
  .info-card { padding: 1rem; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
  .skill-card { padding: 1.5rem; }
  .section-heading { font-size: clamp(1.6rem, 6vw, 2rem); }
  .section-sub { font-size: 0.9rem; margin-bottom: 2rem; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
  .project-wide { grid-column: auto; }

  /* Flow diagram — vertical on small screens */
  .flow-diagram {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
  .flow-arrow-svg { transform: rotate(90deg); font-size: 1rem; }
  .flow-node { min-width: 120px; width: 140px; }
  .stack-badge { position: static; margin-top: 1rem; display: inline-block; }
  .project-visual { padding: 1.5rem 1rem; }
  .project-info { padding: 1.25rem; }
  .project-info h3 { font-size: 1.1rem; }

  /* Contact */
  .contact-card { padding: 3rem 1.25rem; border-radius: var(--radius); }
  .contact-heading { font-size: clamp(1.5rem, 6vw, 2rem); }
  .email-btn {
    font-size: 0.78rem;
    padding: 0.85rem 1.25rem;
    word-break: break-all;
    text-align: center;
    width: 100%;
    justify-content: center;
  }
  .social-row { gap: 1.25rem; }

  /* Disable 3D tilt on touch — avoids stuck states */
  @media (hover: none) {
    .gs-hover-3d { transform: none !important; }
  }
}
