/* ============================================
   SUPER NEUBRUTALISM CSS — THE AI IMPROVEMENT
   ============================================ */

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

:root {
  /* Dynamic Variables - will be changed by JS */
  --bg-color: #f4f0ea;
  --c-primary: #FFD93D;
  --c-secondary: #6BCB77;
  --c-accent: #4D96FF;
  --c-pink: #FF5C8A;
  --c-purple: #B28DFF;
  --c-orange: #FF8A5B;
  
  --text-dark: #000000;
  --text-light: #ffffff;
  
  --border-width: 4px;
  --border-bold: 6px;
  --shadow-base: 6px 6px 0px #000;
  --shadow-hover: 10px 10px 0px #000;
  --shadow-active: 0px 0px 0px #000;
  
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --transition: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ---------- Reset & Setup ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-x: hidden;
  transition: background-color 0.5s ease;
  /* Hide default cursor on desktop */
  cursor: none; 
}

/* Hide default cursor for interactables too */
a, button, .group-hover { cursor: none; }

/* ---------- Custom Cursor ---------- */
.cursor-dot {
  width: 12px;
  height: 12px;
  background-color: var(--text-dark);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 3px solid var(--text-dark);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  /* Smooth trailing */
  transition-duration: 0.1s; 
}

/* Hover state for cursor */
.cursor-hover .cursor-dot {
  background-color: transparent;
}
.cursor-hover .cursor-outline {
  width: 60px;
  height: 60px;
  background-color: rgba(0,0,0,0.1);
  backdrop-filter: blur(2px);
  border-color: var(--text-dark);
  border-width: 4px;
}

/* Disable custom cursor on mobile */
@media (max-width: 768px) {
  body, a, button, .group-hover { cursor: auto; }
  .cursor-dot, .cursor-outline { display: none; }
}

/* ---------- Background Pattern ---------- */
.bg-pattern {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 2px, transparent 2px);
  background-size: 30px 30px;
  z-index: -2;
  pointer-events: none;
}

.bg-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, var(--bg-color) 100%);
  z-index: -1;
  transition: background 0.5s ease;
}

/* Floating decorations */
.floating-element {
  position: fixed;
  font-size: 2rem;
  color: var(--text-dark);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}
.float-1 { top: 10%; left: 10%; animation: floaty 6s ease-in-out infinite; }
.float-2 { top: 70%; right: 15%; animation: floaty 8s ease-in-out infinite reverse; }
.float-3 { top: 20%; right: 10%; animation: floaty 7s ease-in-out infinite; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(15deg); }
}

/* ---------- Theme Switcher ---------- */
.theme-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--c-purple);
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 10px 16px;
  border: var(--border-width) solid #000;
  border-radius: 8px;
  box-shadow: var(--shadow-base);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.theme-switcher:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hover);
  background: var(--text-light);
}

.theme-switcher:active {
  transform: translate(6px, 6px);
  box-shadow: var(--shadow-active);
}

.tooltip {
  position: absolute;
  right: 100%;
  margin-right: 15px;
  background: #000;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: var(--transition);
}
.tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent #000;
}
.theme-switcher:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Main Container ---------- */
.main-container {
  width: 100%;
  max-width: 720px;
  background: var(--text-light);
  border: var(--border-bold) solid #000;
  border-radius: 16px;
  box-shadow: 16px 16px 0px #000;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
}

/* ---------- Hero Section ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Polaroid Photo */
.polaroid-wrapper {
  position: relative;
  flex-shrink: 0;
}

.polaroid {
  background: #fff;
  padding: 12px 12px 36px 12px;
  border: var(--border-width) solid #000;
  box-shadow: 8px 8px 0 #000;
  transform: rotate(-3deg);
  position: relative;
  transition: var(--transition);
  z-index: 2;
}

.polaroid:hover {
  transform: rotate(2deg) scale(1.05);
  box-shadow: 12px 12px 0 #000;
}

.polaroid img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 2px solid #000;
  background: var(--c-primary);
  filter: contrast(1.1) saturate(1.1);
}

.polaroid-caption {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'Comic Sans MS', cursive, var(--font-display);
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Tapes */
.tape {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.1);
  width: 60px;
  height: 20px;
  z-index: 3;
}
.tape-top-left {
  top: -10px;
  left: -20px;
  transform: rotate(-30deg);
}
.tape-bottom-right {
  bottom: 20px;
  right: -25px;
  transform: rotate(-45deg);
}

/* Spinning Badge */
.spin-badge {
  position: absolute;
  bottom: -20px;
  right: -30px;
  width: 80px;
  height: 80px;
  background: var(--c-pink);
  border: 3px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  animation: spin 10s linear infinite;
  box-shadow: 4px 4px 0 #000;
}
.spin-badge::after {
  content: "✨";
  position: absolute;
  font-size: 1.5rem;
  animation: counter-spin 10s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes counter-spin { 100% { transform: rotate(-360deg); } }

/* Hero Info */
.hero-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 2px solid #000;
  border-radius: 20px;
  box-shadow: 2px 2px 0 #000;
}
.pill-yellow { background: var(--c-primary); }
.pill-blue { background: var(--c-accent); color: #fff; }

.glitch-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  position: relative;
  text-shadow: 4px 4px 0 var(--c-secondary);
  transition: text-shadow 0.3s;
}
.glitch-title:hover {
  text-shadow: 6px 6px 0 var(--c-pink), -3px -3px 0 var(--c-accent);
}

.hero-desc {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  border-left: 4px solid var(--c-primary);
  padding-left: 12px;
}

/* ---------- Thick Divider ---------- */
.thick-divider {
  width: 100%;
  height: 8px;
  background: repeating-linear-gradient(
    45deg,
    #000,
    #000 10px,
    var(--c-primary) 10px,
    var(--c-primary) 20px
  );
  border: 3px solid #000;
  border-radius: 4px;
}

/* ---------- Skills Marquee ---------- */
.skills-section {
  width: 100%;
}

.marquee-box {
  background: var(--text-dark);
  color: var(--c-primary);
  border: var(--border-width) solid #000;
  padding: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-base);
  transform: rotate(1deg);
}

.marquee-content {
  display: flex;
  white-space: nowrap;
  animation: slide-left 15s linear infinite;
}

.marquee-content span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.marquee-content span i {
  color: var(--c-pink);
}

@keyframes slide-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Scrolls exactly half, creating infinite loop since duplicated */
}

/* ---------- Block Titles ---------- */
.block-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text-light);
  padding: 4px 16px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  transform: rotate(-1deg);
}
.block-title i {
  color: var(--c-accent);
}

/* ---------- Education Grid ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.edu-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: var(--border-width) solid #000;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-base);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-yellow { background: var(--c-primary); }
.card-pink { background: var(--c-pink); }

.edu-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hover);
}

.edu-img-wrap {
  width: 60px;
  height: 60px;
  border: 3px solid #000;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edu-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edu-text h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.edu-text p {
  font-size: 0.9rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid #000;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
}

.edu-icon {
  position: absolute;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.3;
  transition: var(--transition);
}
.edu-card:hover .edu-icon {
  opacity: 1;
  transform: translateX(5px) scale(1.2);
}

/* ---------- Social Section ---------- */
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.super-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-dark);
  border: var(--border-width) solid #000;
  border-radius: 12px;
  box-shadow: var(--shadow-base);
  transition: var(--transition);
}

.btn-insta { background: var(--c-secondary); }
.btn-github { background: var(--c-orange); }

.super-btn:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hover);
}
.super-btn:active {
  transform: translate(6px, 6px);
  box-shadow: var(--shadow-active);
}

.super-btn i {
  font-size: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.super-btn:hover i {
  transform: scale(1.3) rotate(-10deg);
}

/* ---------- Footer Quote ---------- */
.footer {
  margin-top: 10px;
}

.quote-box {
  background: var(--text-dark);
  color: #fff;
  border: var(--border-width) solid #000;
  border-radius: 8px;
  padding: 14px 0;
  overflow: hidden;
  box-shadow: var(--shadow-base);
  position: relative;
}

.quote-marquee {
  display: flex;
  white-space: nowrap;
  animation: slide-left 20s linear infinite;
}

.quote-marquee span {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  padding-left: 20px;
  text-transform: uppercase;
}
.spacer {
  display: inline-block;
  padding: 0 20px;
}

/* ---------- Entrance Animations ---------- */
.stagger-container {
  opacity: 0;
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.stagger-item {
  opacity: 0;
  animation: slideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Using CSS variables or nth-child for staggered delays */
.stagger-item:nth-child(1) { animation-delay: 0.2s; }
.stagger-item:nth-child(2) { animation-delay: 0.3s; }
.stagger-item:nth-child(3) { animation-delay: 0.4s; }
.stagger-item:nth-child(4) { animation-delay: 0.5s; }
.stagger-item:nth-child(5) { animation-delay: 0.6s; }
.stagger-item:nth-child(6) { animation-delay: 0.7s; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ---------- Responsive ---------- */
@media (max-width: 650px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .polaroid-wrapper {
    margin: 0 auto;
  }
  .badge-row {
    justify-content: center;
  }
  .hero-desc {
    border-left: none;
    border-top: 4px solid var(--c-primary);
    padding-left: 0;
    padding-top: 12px;
  }
  .glitch-title {
    font-size: 2.5rem;
  }
  .btn-grid {
    grid-template-columns: 1fr;
  }
  .main-container {
    padding: 24px;
  }
}
