/* =====================================================
   CINEMATIC 3D PORTFOLIO — STYLE SYSTEM
   ===================================================== */

/* — Design Tokens — */
:root {
  --bg-deep: #0D0917;
  --bg-primary: #1E1332;
  --bg-secondary: #2A1F4A;
  --atmo: #5B3F8C;
  --accent-pink: #FF4FA3;
  --accent-yellow: #FFE08A;
  --text-primary: #F4F1FA;
  --text-muted: #B9AFCB;
  --glass-bg: rgba(42, 31, 74, 0.45);
  --glass-border: rgba(255, 79, 163, 0.18);
  --glass-shadow: 0 8px 48px rgba(91, 63, 140, 0.35);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* — Reset & Base — */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  /* Lenis handles this */
  font-size: 16px;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* — Canvas Background — */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* — Scroll Container — */
#scroll-container {
  position: relative;
  z-index: 1;
}

/* =====================================================
   LOADER
   ===================================================== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-pink), var(--atmo), var(--accent-yellow), var(--accent-pink));
  animation: spin 1.4s linear infinite;
  box-shadow: 0 0 40px rgba(255, 79, 163, 0.5);
}

.loader-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  animation: pulse 1.6s ease-in-out infinite;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  background: linear-gradient(to bottom, rgba(13, 9, 23, 0.85) 0%, transparent 100%);
  backdrop-filter: blur(4px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-primary);
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-pink);
  box-shadow: 0 0 12px var(--accent-pink);
  animation: pulse 2s ease-in-out infinite;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-pink);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* =====================================================
   SECTIONS — SHARED
   ===================================================== */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 48px 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* — Gradient Accent — */
.accent-gradient {
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* Primary — Neon Pink */
.btn--primary {
  background: linear-gradient(135deg, var(--accent-pink), #c9246b);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 79, 163, 0.45), 0 4px 20px rgba(0, 0, 0, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 48px rgba(255, 79, 163, 0.7), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 79, 163, 0.3);
}

.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent-pink);
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.2);
  transform: translateY(-2px);
}

.btn--small {
  padding: 10px 22px;
  font-size: 0.8rem;
  background: rgba(255, 79, 163, 0.12);
  color: var(--accent-pink);
  border: 1px solid rgba(255, 79, 163, 0.25);
  border-radius: 50px;
}

.btn--small:hover {
  background: rgba(255, 79, 163, 0.22);
  box-shadow: 0 0 16px rgba(255, 79, 163, 0.3);
  transform: translateX(4px);
}

.btn--large {
  padding: 18px 48px;
  font-size: 1rem;
}

/* Glowing button aura */
.btn-glow {
  position: absolute;
  inset: -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 79, 163, 0.3) 0%, transparent 70%);
  animation: btnPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

/* =====================================================
   GLASSMORPHISM CARDS
   ===================================================== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(255, 79, 163, 0.5);
  box-shadow: 0 12px 64px rgba(255, 79, 163, 0.25), 0 0 0 1px rgba(255, 79, 163, 0.15);
  transform: translateY(-6px);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.section--hero {
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100vh;
}

.hero-content {
  max-width: 780px;
  animation: heroFadeIn 1.2s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero subtitle glass effect - subtle for readability */
.hero-subtitle.glass-card {
  background: rgba(31, 18, 66, 0.7);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 79, 163, 0.1);
  border-radius: 12px;
  padding: 20px 28px;
  box-shadow: 0 4px 24px rgba(91, 63, 140, 0.2);
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent-pink), transparent);
}

/* =====================================================
   SKILLS SECTION
   ===================================================== */
.section--skills {
  min-height: 100vh;
  padding-top: 120px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  width: 100%;
}

.skill-card {
  padding: 32px 28px;
  cursor: default;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(255, 79, 163, 0.4));
}

.skill-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.skill-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.skill-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(91, 63, 140, 0.35);
  border: 1px solid rgba(91, 63, 140, 0.5);
  color: var(--text-muted);
}

.tag--accent {
  background: rgba(255, 79, 163, 0.15);
  border-color: rgba(255, 79, 163, 0.35);
  color: var(--accent-pink);
}

/* =====================================================
   PROJECTS SECTION
   ===================================================== */
.section--projects {
  min-height: 100vh;
  padding-top: 120px;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
  width: 100%;
}

.project-panel {
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: start;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
}

.project-panel.in-view {
  animation: panelReveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.project-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(255, 79, 163, 0.25);
  line-height: 1;
}

.project-year {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  margin-top: 8px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-actions {
  display: flex;
  gap: 12px;
}

.project-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 79, 163, 0.08) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity var(--transition);
}

.project-panel:hover .project-glow {
  opacity: 2;
}

/* =====================================================
   CONTACT SECTION
   ===================================================== */
.section--contact {
  min-height: 100vh;
  text-align: center;
}

.contact-content {
  max-width: 680px;
}

.contact-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.contact-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
}

.contact-cta-group {
  margin-bottom: 48px;
}

.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 48px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 79, 163, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.35);
  transform: translateY(-3px);
}

.contact-footer {
  font-size: 0.78rem;
  color: rgba(185, 175, 203, 0.4);
  letter-spacing: 0.06em;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes btnPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }

  50% {
    transform: translateY(6px);
    opacity: 0.6;
  }
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  #nav {
    padding: 20px 24px;
  }

  .nav-links {
    gap: 24px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 100px 24px 60px;
  }
}

@media (max-width: 600px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .project-meta {
    flex-direction: row;
    align-items: center;
  }

  .nav-links {
    display: none;
  }
}