/* ============================================
   Gopi Sharma Portfolio — Cinematic Red Theme
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Bebas+Neue&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg:          #050505;
  --bg-2:        #0a0a0a;
  --bg-3:        #111111;
  --red:         #cc0000;
  --red-dark:    #8b0000;
  --red-glow:    rgba(204, 0, 0, 0.35);
  --red-subtle:  rgba(204, 0, 0, 0.12);
  --white:       #f5f5f5;
  --muted:       #888888;
  --border:      rgba(255,255,255,0.08);
  --border-red:  rgba(204,0,0,0.3);
  --glass:       rgba(8, 8, 8, 0.88);
}

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

html { scroll-behavior: smooth; }

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

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

/* ─── Custom Cursor ──────────────────────────── */
#cursor {
  position: fixed;
  width: 24px; height: 24px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
  box-shadow: 0 0 14px var(--red-glow);
}
#cursor.active {
  width: 48px; height: 48px;
  background: var(--red-subtle);
  box-shadow: 0 0 30px var(--red-glow);
}
.cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  box-shadow: 0 0 8px var(--red);
}

/* ─── Typography ─────────────────────────────── */
.font-display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
.font-impact {
  font-family: 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.04em;
}

/* ─── Noise / Grain Overlay ──────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 99997;
  opacity: 0.6;
}

/* ─── Glass Panels ───────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}
.glass-red {
  background: rgba(10, 4, 4, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-red);
}

/* ─── Navbar ─────────────────────────────────── */
nav {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease,
              border-color 0.4s ease, box-shadow 0.4s ease;
}
nav.scrolled {
  background: rgba(5, 5, 5, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom-color: var(--border-red);
  box-shadow: 0 4px 30px rgba(204,0,0,0.12);
}

/* Fix logo overlap with menu items */
nav .nav-logo-img {
  max-width: 220px;
}
nav > .hidden.md\:flex {
  position: relative;
  z-index: 50;
}

/* ─── Hero / Landing ─────────────────────────── */
#landing-hero {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Scanline effect on hero */
#landing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.12) 2px,
    rgba(0,0,0,0.12) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Red glow radial on hero */
#landing-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(204,0,0,0.18) 0%, transparent 70%);
  animation: glow-pulse 6s ease-in-out infinite;
  z-index: 1;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Floating Orbs */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float-orb 20s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}
.orb-1 { width: 500px; height: 500px; background: rgba(204,0,0,0.09); top: -10%; left: -5%; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: rgba(139,0,0,0.07); top: 50%; right: 5%; animation-delay: -7s; }
.orb-3 { width: 200px; height: 200px; background: rgba(204,0,0,0.05); bottom: 10%; left: 30%; animation-delay: -14s; }

@keyframes float-orb {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  33%  { transform: translate(30px,-40px) rotate(4deg); }
  66%  { transform: translate(-25px, 35px) rotate(-4deg); }
}

/* ─── Red Accent Line ────────────────────────── */
.red-line {
  display: inline-block;
  width: 48px; height: 2px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  vertical-align: middle;
  margin-right: 12px;
}

/* ─── Neon Text ──────────────────────────────── */
.neon-text-red {
  text-shadow:
    0 0 6px rgba(204,0,0,0.7),
    0 0 20px rgba(204,0,0,0.4);
}

/* ─── Scroll Reveal ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.85s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.85s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.85s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Buttons ────────────────────────────────── */
.btn-red {
  position: relative;
  padding: 14px 36px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--red);
  color: var(--white);
  border-radius: 3px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: none;
}
.btn-red::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 0;
}
.btn-red span, .btn-red i { position: relative; z-index: 1; }
.btn-red:hover { color: #fff; box-shadow: 0 0 30px var(--red-glow); }
.btn-red:hover::before { transform: translateX(0); }

/* Alias for legacy .btn-neon used across pages */
.btn-neon {
  position: relative;
  padding: 13px 32px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--red);
  color: var(--white);
  border-radius: 3px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: none;
  text-decoration: none;
}
.btn-neon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 0;
}
.btn-neon span, .btn-neon i { position: relative; z-index: 1; }
.btn-neon:hover { color: #fff; box-shadow: 0 0 30px var(--red-glow); }
.btn-neon:hover::before { transform: translateX(0); }

.btn-secondary {
  padding: 13px 28px;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.25);
}

/* ─── Cards ──────────────────────────────────── */
.card {
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}
.card:hover::after {
  border-color: var(--border-red);
  box-shadow: 0 0 30px rgba(204,0,0,0.1), inset 0 0 30px rgba(204,0,0,0.04);
}
.card:hover { transform: translateY(-6px); }

/* ─── Hover Lift ─────────────────────────────── */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px -10px rgba(204,0,0,0.2);
}

/* ─── Skill Pill ─────────────────────────────── */
.skill-pill {
  transition: all 0.25s ease;
  cursor: default;
}
.skill-pill:hover {
  border-color: var(--border-red) !important;
  color: var(--red);
  box-shadow: 0 0 18px rgba(204,0,0,0.15);
}

/* ─── Stat Counter ───────────────────────────── */
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--red);
  line-height: 1;
}

/* ─── Timeline ───────────────────────────────── */
.timeline-item {
  position: relative;
  padding-left: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 20px;
  bottom: -32px;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-red), transparent);
}
.timeline-item:last-child::after { display: none; }

/* ─── Section Label ──────────────────────────── */
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1.5px;
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

/* ─── Marquee / Ticker ───────────────────────── */
.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee 22s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track:hover { animation-play-state: paused; }

/* ─── Progress Bar ───────────────────────────── */
.skill-bar-wrap {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  box-shadow: 0 0 10px var(--red-glow);
  border-radius: 2px;
  width: 0%;
  transition: width 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ─── Admin Input ────────────────────────────── */
.admin-input {
  background: #0c0c0c;
  border: 1px solid #222;
  color: var(--white);
}
.admin-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.15);
  outline: none;
}

/* ─── Typed Text Caret ───────────────────────── */
#typed-text {
  border-right: 2px solid var(--red);
  animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--red); }
}

/* ─── Corner Bracket ─────────────────────────── */
.bracket {
  position: relative;
}
.bracket::before, .bracket::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--red);
  border-style: solid;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.bracket::before {
  top: -4px; left: -4px;
  border-width: 1.5px 0 0 1.5px;
}
.bracket::after {
  bottom: -4px; right: -4px;
  border-width: 0 1.5px 1.5px 0;
}
.bracket:hover::before,
.bracket:hover::after { opacity: 1; }

/* ─── Testimonial / Quote Block ──────────────── */
.quote-block {
  border-left: 2px solid var(--red);
  padding-left: 20px;
  box-shadow: -8px 0 20px rgba(204,0,0,0.1);
}

/* ─── Tab System ─────────────────────────────── */
.tab-btn {
  padding: 10px 22px;
  border-bottom: 2px solid transparent;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: none;
  color: var(--muted);
}
.tab-btn.active, .tab-btn:hover {
  color: var(--white);
  border-bottom-color: var(--red);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Accordion ──────────────────────────────── */
.accordion-item {
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}
.accordion-item.open {
  border-bottom-color: var(--border-red);
}
.accordion-btn {
  width: 100%;
  text-align: left;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s;
}
.accordion-btn:hover { color: var(--red); }
.accordion-icon {
  width: 20px; height: 20px;
  position: relative;
  flex-shrink: 0;
}
.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  transition: transform 0.3s ease;
}
.accordion-icon::before {
  width: 12px; height: 1.5px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.accordion-icon::after {
  width: 1.5px; height: 12px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.accordion-item.open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}
.accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              padding 0.3s ease;
  padding-bottom: 0;
}
.accordion-item.open .accordion-body {
  max-height: 400px;
  padding-bottom: 20px;
}

/* ─── Tooltip ────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #111;
  border: 1px solid var(--border-red);
  color: var(--white);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ─── Toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  border: 1px solid var(--border-red);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 3px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 40px rgba(204,0,0,0.2);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Particles ──────────────────────────────── */
#particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ─── Section Divider ────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-red), transparent);
  margin: 0 auto;
  max-width: 800px;
}

/* ─── Footer ─────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.5;
}

/* ============================================
   MOBILE MENU — hamburger & drawer
   ============================================ */

/* Hamburger — hidden on desktop */
#mobile-burger {
  display: none;
}

/* Mobile drawer — hidden on desktop */
#mobile-drawer {
  display: none;
}

/* ============================================
   MOBILE RESPONSIVE  ≤ 767px
   (Desktop layout is fully preserved)
   ============================================ */
@media (max-width: 767px) {

  /* ── Hamburger button ── */
  #mobile-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    border-radius: 2px;
  }
  #mobile-burger span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--white);
    transition: all 0.28s ease;
    transform-origin: center;
  }
  #mobile-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  #mobile-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  #mobile-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* ── Mobile drawer ── */
  #mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 65px;
    left: 0; right: 0;
    background: rgba(5,5,5,0.97);
    border-bottom: 1px solid transparent;
    padding: 0;
    z-index: 49;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(12px);
  }
  #mobile-drawer.open {
    max-height: 420px;
    padding: 12px 0 20px;
    border-bottom-color: var(--border-red);
  }
  #mobile-drawer a {
    display: block;
    padding: 14px 28px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: color 0.2s, background 0.2s;
  }
  #mobile-drawer a:last-child { border-bottom: none; }
  #mobile-drawer a:hover,
  #mobile-drawer a:active { color: #fff; background: rgba(204,0,0,0.08); }

  /* ── Nav ── */
  nav { padding: 14px 20px; }
  nav .btn-neon,
  nav a.btn-neon { display: none; }   /* hide CTA on very small screens */

  /* ── Hero ── */
  #landing-hero {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 60px;
    align-items: flex-end;
  }
  #landing-hero .hero-content { padding-left: 0; padding-right: 0; }
  #landing-hero .stat-num { font-size: 2.5rem !important; }

  /* ── General section padding ── */
  section,
  .max-w-6xl { padding-left: 20px !important; padding-right: 20px !important; }

  /* ── Cards grid: stack on mobile ── */
  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3,
  .grid.md\:grid-cols-4,
  .grid.md\:grid-cols-5,
  .grid.md\:grid-cols-12 {
    grid-template-columns: 1fr !important;
  }
  .grid.lg\:grid-cols-3 { grid-template-columns: 1fr !important; }

  /* Keep 2-col stats grids on mobile */
  .grid.grid-cols-2.md\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid.grid-cols-3  { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Quote block ── */
  .quote-block p { font-size: 1.2rem !important; }

  /* ── Timeline items ── */
  .timeline-item { padding-left: 0; }

  /* ── Skill bar wrap ── */
  .skill-bar-wrap { width: 100%; }

  /* ── Contact form ── */
  #contact-form .grid { grid-template-columns: 1fr !important; }

  /* ── Blog grid ── */
  #blog-grid { grid-template-columns: 1fr !important; }

  /* ── Funnel steps ── */
  .md\:grid-cols-5 { grid-template-columns: 1fr !important; }

  /* ── Education timeline layout ── */
  .md\:col-span-4,
  .md\:col-span-5,
  .md\:col-span-7,
  .md\:col-span-8 {
    grid-column: span 1 / span 1 !important;
  }

  /* ── Sticky sidebar: un-stick on mobile ── */
  .sticky { position: relative !important; top: auto !important; }

  /* ── Scroll prompt: hide on mobile ── */
  .absolute.bottom-10.right-10 { display: none !important; }

  /* ── Flame: smaller height on mobile ── */
  #flame-canvas { height: 140px !important; opacity: 0.4 !important; }

  /* ── Cursor: disable on touch ── */
  #cursor, .cursor-dot { display: none !important; }
  body { cursor: auto !important; }

  /* ── Section labels ── */
  .section-label { font-size: 9px; }

  /* ── Buttons: full width on mobile forms ── */
  .btn-red, .btn-neon { min-height: 44px; }

  /* ── Tool grid: 3 col on mobile ── */
  .grid.grid-cols-4 { grid-template-columns: repeat(3, 1fr) !important; }

  /* ── Interest buttons: 2-col on mobile ── */
  #interest-btns.grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Brand war hero text ── */
  .font-impact { letter-spacing: 0.01em; }
}