@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #050505;
  --text-main: #f8fafc;
  --text-muted: #a1a1aa;

  /* 🔴 Red Theme */
  --accent-primary: #ef4444;   /* main red */
  --accent-secondary: #b91c1c; /* deep red */
  --accent-tertiary: #f87171;  /* light red */

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.7);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 24px;
  --radius-md: 16px;
}

/* --- Base & Scrollbar --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
  cursor: none; /* Hide default cursor for custom crosshair */
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

/* Custom Sliding Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--accent-tertiary), var(--accent-secondary));
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height:1.6;
  min-height: 100vh;
  position: relative;
}

/* --- Custom Cursor (Crosshair + Aura) --- */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(139, 92, 246, 0.5);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* --- Animated Backgrounds (Aurora + Canvas) --- */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-dark);
}

/* Particle Canvas Layer */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none; /* Let clicks pass through */
}

/* --- Cinematic Entrance Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger Delays for Grid Elements */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* --- Cyberpunk Text Glitch Effect --- */
.glitch-text {
  position: relative;
  display: inline-block;
  color: #fff;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  display: block;
}

.glitch-text::before {
  color: #0ff;
  z-index: -1;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
  color: #f0f;
  z-index: -2;
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

/* Disable Glitch when not hovered for subtlety */
.glitch-text:not(:hover)::before,
.glitch-text:not(:hover)::after {
  animation: none;
  opacity: 0;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
  20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
  60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
  80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
  100% { clip-path: inset(30% 0 50% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
  20% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 1px); }
  40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 2px); }
  60% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, -2px); }
  80% { clip-path: inset(50% 0 30% 0); transform: translate(1px, 1px); }
  100% { clip-path: inset(5% 0 80% 0); transform: translate(-1px, -1px); }
}

/* --- Layout & Typography --- */
section {
  padding: 10rem 5% 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.heading {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 4rem;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.heading span {
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Header / Fluent Nav --- */
.header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  padding: 1.5rem 3rem;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8);
  transition: var(--transition);
}

.logo {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -.5px;
}

.logo span {
  color: var(--accent-primary);
}

.navbar a {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 3rem;
  transition: var(--transition);
}

.navbar a:hover, .navbar a.active {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

#menu-icon {
  font-size: 3rem;
  display: none;
}

/* --- Bento Grid Layouts --- */

/* Hero Bento */
.hero-bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 5rem;
}

.bento-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 4rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.1s ease-out, border-color 0.3s;
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  overflow: hidden;
}

/* Shimmer Hover Effect */
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-main h3 { font-size: 2.4rem; color: var(--text-muted); font-weight: 500; }
.hero-main h1 { 
  font-size: 7rem; 
  font-weight: 900; 
  line-height: 1.1; 
  letter-spacing: -2px;
  margin: 1rem 0;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-main .text-animation { font-size: 2.8rem; font-weight: 600; margin-bottom: 3rem; color: var(--accent-secondary); }
.hero-main p { font-size: 1.8rem; color: var(--text-muted); max-width: 500px; }

.hero-img-card {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  /* 🖤 Glass Black Base */
  background: linear-gradient(145deg, rgba(0,0,0,0.6), rgba(20,20,20,0.3));

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255,255,255,0.08);

  /* subtle depth */
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.8),
    0 10px 40px rgba(0,0,0,0.6),
    0 0 25px rgba(239, 68, 68, 0.12); /* red glow */
}

.hero-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  opacity: 0.9;
  filter: contrast(1.1);
}

/* --- Marquee --- */
.marquee-container {
  width: 100%;
  overflow: hidden;
  background: rgba(139, 92, 246, 0.1);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 2rem 0;
  margin: 5rem 0;
  white-space: nowrap;
  display: flex;
  mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}
.marquee-group {
  display: flex;
  gap: 4rem;
}
.marquee-content {
  display: flex;
  gap: 4rem;
  width: max-content;              /* 🔥 important */
  animation: scroll-left 25s linear infinite;
}

.marquee-content span {
  font-size: 3rem;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.marquee-content span.filled {
  color: var(--accent-primary);
  -webkit-text-stroke: 0;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --- About Dense Bento Grid --- */
.about-bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: minmax(180px, auto);
  gap: 2rem;
}

/* Big main card */
.about-intro {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

/* 24/7 Playback (top right) */
.stats-card:nth-of-type(2) {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

/* 🔥 FIX: Bottom row equal layout */
.stats-card:nth-of-type(3),
.stats-card:nth-of-type(4) {
  grid-row: 2 / 3;
}

/* Custom Playlist (left) */
.stats-card:nth-of-type(3) {
  grid-column: 1 / 2;
}

/* Audio Filters (right) */
.stats-card:nth-of-type(4) {
  grid-column: 2 / 3;
}

/* Core Features full width */
.skills-card {
  grid-column: 1 / 3;
  grid-row: 3 / 4;
}

/* Card styling */
.stats-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 180px;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(239, 68, 68, 0.08));
  border-radius: var(--radius-lg);
}

/* Typography */
.about-intro h2 { 
  font-size: 3.5rem; 
  margin-bottom: 1rem; 
}

.about-intro p { 
  font-size: 1.8rem; 
  color: var(--text-muted); 
  margin-bottom: 2rem;
}

.stats-card i {
  font-size: 5rem;
  color: var(--accent-tertiary);
  margin-bottom: 1rem;
}

.stats-card h4 { 
  font-size: 2rem; 
}

/* Skills */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-tag {
  padding: 1rem 2.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-main);
  font-size: 1.6rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.skill-tag i {
  font-size: 2rem;
  color: var(--accent-secondary);
}

.skill-tag:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-primary);
  transform: translateY(-5px);
}
/* --- Socials Stack --- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* 🔥 About Muzix (full width top - centered + better spacing) */
.about-bot {
  grid-column: 1 / 4;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 5rem 3rem; /* 🔥 more breathing space */
}

/* Card base */
.social-card {
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  border-radius: var(--radius-lg);
}

/* Default center cards */
.social-card:not(.about-bot) {
  align-items: center;
  text-align: center;
}

/* 🔥 About text improved readability */
.about-bot p {
  font-size: 1.6rem;
  color: var(--text-muted);
  max-width: 700px;      /* 🔥 better width */
  margin: 0 auto;
  line-height: 1.8;      /* 🔥 key fix */
}

/* spacing between paragraphs */
.about-bot p + p {
  margin-top: 1.2rem;
}

/* spacing under heading */
.about-bot h4 {
  margin-top: 1rem;
}

/* Icons */
.social-card i.main-icon {
  font-size: 6rem;
  color: var(--accent-primary);
  transition: var(--transition);
}

/* Hover animation */
.social-card:hover i.main-icon {
  transform: scale(1.2) translateY(-10px);
  filter: drop-shadow(0 0 20px var(--accent-primary));
}

/* Typography */
.social-card h4 { 
  font-size: 2.4rem; 
  font-weight: 700; 
}

.social-card p { 
  font-size: 1.4rem; 
  color: var(--text-muted); 
}

/* Button */
.btn-icon {
  width: 50px; 
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin-top: 1rem;
  transition: var(--transition);
}

.social-card:hover .btn-icon {
  background: var(--accent-primary);
  color: #fff;
  transform: scale(1.1);
}
/* --- Footer --- */
.footer {
  text-align: center;
  padding: 4rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 5rem;
  font-size: 1.6rem;
  color: var(--text-muted);
}

/* Responsive */
@media(max-width: 1024px) {
  .hero-bento { grid-template-columns: 1fr; }
  .hero-img-card { height: 400px; }
  .about-bento { grid-template-columns: 1fr 1fr; }
  .about-intro { grid-column: span 2; }
  .skills-card { grid-column: span 2; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width: 768px) {
  .header { width: 95%; top: 10px; padding: 1.5rem 2rem; }
  #menu-icon { display: block; cursor: pointer; }
  .navbar {
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    flex-direction: column;
    display: none;
    gap: 2rem;
    border: 1px solid var(--glass-border);
  }
  .navbar.active { display: flex; }
  .navbar a { margin: 0; font-size: 2rem; }
  
  .hero-main h1 { font-size: 5rem; }
  .about-bento { grid-template-columns: 1fr; }
  .about-intro, .skills-card { grid-column: span 1; }
  .social-grid { grid-template-columns: 1fr; }
  section { padding: 12rem 5% 4rem; }
}

@media(pointer: coarse) {
  /* Hide custom cursor on touch devices */
  * { cursor: auto; }
  .cursor-dot, .cursor-outline { display: none; }
}


/* ================= MOBILE RESPONSIVE ================= */

@media (max-width: 1024px) {

  /* Hero */
  .hero-bento {
    grid-template-columns: 1fr;
  }

  .hero-img-card {
    height: 300px;
  }

  /* About Section */
  .about-bento {
    grid-template-columns: 1fr;
  }

  .about-intro,
  .stats-card,
  .skills-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  /* Social Section */
  .social-grid {
    grid-template-columns: 1fr;
  }

  .about-bot {
    grid-column: auto !important;
  }
}


/* ================= SMALL DEVICES ================= */

@media (max-width: 768px) {

  html {
    font-size: 55%; /* slightly smaller text */
  }

  /* Header */
  .header {
    width: 95%;
    padding: 1.2rem 2rem;
  }

  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    flex-direction: column;
    display: none;
    gap: 2rem;
    border: 1px solid var(--glass-border);
  }

  .navbar.active {
    display: flex;
  }

  .navbar a {
    font-size: 2rem;
    margin: 0;
  }

  /* Hero Text */
  .hero-main h1 {
    font-size: 4rem;
  }

  .hero-main .text-animation {
    font-size: 2rem;
  }

  .hero-main p {
    font-size: 1.6rem;
  }

  /* Buttons wrap nicely */
  .hero-main div[style*="flex"] {
    justify-content: center;
  }

  /* Marquee */
  .marquee-content span {
    font-size: 2rem;
  }

  /* Cards */
  .bento-card {
    padding: 2.5rem;
  }

  /* About text */
  .about-bot p {
    font-size: 1.5rem;
    line-height: 1.7;
  }

  /* Footer */
  .footer {
    font-size: 1.4rem;
    padding: 3rem 2rem;
  }
}


/* ================= EXTRA SMALL (PHONES) ================= */

@media (max-width: 480px) {

  html {
    font-size: 50%;
  }

  .hero-main h1 {
    font-size: 3.2rem;
  }

  .heading {
    font-size: 3rem;
  }

  .social-card i.main-icon {
    font-size: 4.5rem;
  }

  .btn-icon {
    width: 45px;
    height: 45px;
    font-size: 2rem;
  }

}
