/* ========================================
   CSS Variables & Design System
   ======================================== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d0d14;
  --bg-card: rgba(15, 15, 25, 0.8);
  --text-primary: #e0e0e0;
  --text-muted: #7a7a8a;
  --accent-violet: #b347d9;
  --accent-cyan: #00f0ff;
  --accent-violet-dim: rgba(179, 71, 217, 0.3);
  --accent-cyan-dim: rgba(0, 240, 255, 0.3);
  --glow-violet: 0 0 10px rgba(179, 71, 217, 0.5), 0 0 30px rgba(179, 71, 217, 0.2);
  --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 30px rgba(0, 240, 255, 0.2);
  --glow-text-violet: 0 0 8px rgba(179, 71, 217, 0.6), 0 0 20px rgba(179, 71, 217, 0.3);
  --glow-text-cyan: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #fff;
  text-shadow: var(--glow-text-cyan);
}

::selection {
  background: var(--accent-violet);
  color: #fff;
}

/* ========================================
   Boot Sequence Overlay
   ======================================== */
#boot-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#boot-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#boot-text {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--accent-cyan);
}

.boot-line {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-bottom: 0.5rem;
}

.boot-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.boot-ready {
  color: var(--accent-violet);
  font-weight: 700;
  text-shadow: var(--glow-text-violet);
}

/* ========================================
   Custom Cursor
   ======================================== */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease-out, opacity 0.3s ease;
  opacity: 0;
  mix-blend-mode: difference;
}

#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--accent-violet);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

#custom-cursor.active {
  opacity: 1;
}

#cursor-dot.active {
  opacity: 1;
}

@media (pointer: coarse) {
  #custom-cursor,
  #cursor-dot {
    display: none !important;
  }

  body {
    cursor: auto;
  }
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.05);
  transition: background 0.3s ease, border-color 0.3s ease;
}

#navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  border-bottom-color: rgba(0, 240, 255, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-cyan) !important;
  letter-spacing: 2px;
  text-shadow: var(--glow-text-cyan);
  animation: neonFlicker 3s infinite;
}

@keyframes neonFlicker {
  0%, 100% {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
  }
  30% {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
  }
  32% {
    color: #ff2d95;
    text-shadow: 0 0 10px rgba(255, 45, 149, 0.8), 0 0 30px rgba(255, 45, 149, 0.4);
    opacity: 0.85;
  }
  34% {
    color: var(--accent-cyan);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
    opacity: 1;
  }
  36% {
    color: #ff2d95;
    text-shadow: 0 0 12px rgba(255, 45, 149, 0.9), 0 0 35px rgba(255, 45, 149, 0.5);
    opacity: 0.9;
  }
  38% {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
    opacity: 1;
  }
  70% {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
  }
  71% {
    color: #e040a0;
    text-shadow: 0 0 8px rgba(224, 64, 160, 0.7), 0 0 25px rgba(224, 64, 160, 0.3);
    opacity: 0.88;
  }
  73% {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
    opacity: 1;
  }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: clamp(4px, 1vw, 12px);
  color: #fff;
  text-shadow:
    0 0 10px rgba(0, 240, 255, 0.4),
    0 0 40px rgba(179, 71, 217, 0.3),
    0 0 80px rgba(179, 71, 217, 0.15);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent-cyan);
  min-height: 2rem;
  text-shadow: var(--glow-text-cyan);
}

.typing-cursor {
  animation: blink 0.8s infinite;
  color: var(--accent-violet);
  font-weight: 700;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-cta {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-cyan) !important;
  border: 1px solid var(--accent-cyan);
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.hero-cta:hover {
  box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0, 240, 255, 0.1);
  color: #fff !important;
  text-shadow: var(--glow-text-cyan);
}

.hero-cta:hover::before {
  left: 100%;
}

/* ========================================
   Shared Section Styles
   ======================================== */
.section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
}

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

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--accent-violet);
  text-shadow: var(--glow-text-violet);
  letter-spacing: 2px;
  margin-bottom: 3rem;
  text-transform: uppercase;
}

/* Scroll Reveal */
.reveal-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   About Section
   ======================================== */
.about-text {
  max-width: 700px;
}

.about-text p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

/* ========================================
   Tech Stack Section
   ======================================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.tech-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.12);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.tech-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  background: rgba(0, 240, 255, 0.04);
}

.tech-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--accent-violet);
  text-shadow: var(--glow-text-violet);
  font-family: var(--font-mono);
}

.tech-card h3 {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* ========================================
   Philosophy Section
   ======================================== */
.philosophy-statements {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.statement {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.statement .highlight {
  color: var(--accent-cyan);
  text-shadow: var(--glow-text-cyan);
}

/* Stagger animations */
.statement:nth-child(1) { transition-delay: 0s; }
.statement:nth-child(2) { transition-delay: 0.15s; }
.statement:nth-child(3) { transition-delay: 0.3s; }

/* ========================================
   Terminal Section
   ======================================== */
.terminal-window {
  max-width: 700px;
  background: #0c0c14;
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(15, 15, 25, 0.9);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 1rem;
  max-height: 350px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  line-height: 1.7;
}

.terminal-body::-webkit-scrollbar {
  width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: var(--accent-violet-dim);
  border-radius: 2px;
}

.terminal-output .terminal-line {
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-output .cmd-highlight {
  color: var(--accent-cyan);
}

.terminal-output .cmd-response {
  color: var(--accent-violet);
}

.terminal-output .cmd-user {
  color: var(--accent-cyan);
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

.terminal-prompt {
  color: var(--accent-cyan);
  white-space: nowrap;
  flex-shrink: 0;
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: inherit;
  width: 100%;
  caret-color: var(--accent-violet);
}

/* ========================================
   Contact Section
   ======================================== */
#contact {
  text-align: center;
}

.contact-sub {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 2rem;
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  color: var(--text-primary) !important;
  border: 1px solid rgba(179, 71, 217, 0.3);
  background: var(--bg-card);
  transition: all 0.4s ease;
  min-width: 280px;
  justify-content: center;
}

.contact-btn:hover {
  border-color: var(--accent-violet);
  box-shadow: var(--glow-violet);
  color: #fff !important;
  text-shadow: none;
}

.contact-icon {
  font-size: 1.1rem;
  color: var(--accent-violet);
}

/* ========================================
   Footer
   ======================================== */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(0, 240, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ========================================
   Responsive — Tablet (768px+)
   ======================================== */
@media (min-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-links {
    flex-direction: row;
    justify-content: center;
  }

  .nav-links {
    gap: 2rem;
  }
}

/* ========================================
   Responsive — Desktop (1024px+)
   ======================================== */
@media (min-width: 1024px) {
  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
