/* ==========================================
   COSMIC DARK / AURORA — Portfolio Design v2
   All 12 Advanced Features Styled
   ========================================== */

/* ---------- CSS Variables ---------- */
:root,
[data-theme="dark"] {
  --bg-deep: #0a0a0f;
  --bg-surface: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --violet: #7c3aed;
  --violet-glow: rgba(124, 58, 237, 0.4);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.35);
  --aurora-pink: #f0abfc;
  --text-primary: #e8e6f0;
  --text-secondary: rgba(232, 230, 240, 0.55);
  --text-muted: rgba(232, 230, 240, 0.35);
  --border-glass: rgba(255, 255, 255, 0.08);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Space Grotesk', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --gh-color: #7c3aed;
}

/* Light theme */
[data-theme="light"] {
  --bg-deep: #f0eef5;
  --bg-surface: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.06);
  --text-primary: #1a1a2e;
  --text-secondary: rgba(26, 26, 46, 0.6);
  --text-muted: rgba(26, 26, 46, 0.35);
  --border-glass: rgba(0, 0, 0, 0.08);
  --gh-color: #7c3aed;
}

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

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
  transition: background-color 0.5s ease, color 0.5s ease;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--aurora-pink));
  z-index: 10001;
  transition: width 0.05s linear;
  box-shadow: 0 0 10px var(--violet-glow);
}

/* ---------- Custom Cursor ---------- */
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
  opacity: 0.6;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--violet);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
}

/* ---------- Trail Canvas ---------- */
#trailCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Particle / Matrix Canvas ---------- */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Boot Loader ---------- */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.boot-loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.terminal-window {
  width: 520px;
  max-width: 90vw;
  background: #0d0d14;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(124, 58, 237, 0.15);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass);
}

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

.terminal-dot.red {
  background: #ff5f57;
}

.terminal-dot.yellow {
  background: #febc2e;
}

.terminal-dot.green {
  background: #28c840;
}

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

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  min-height: 180px;
}

.terminal-body .term-line {
  margin-bottom: 6px;
  opacity: 0;
  animation: termFade 0.3s forwards;
}

@keyframes termFade {
  to {
    opacity: 1;
  }
}

/* ---------- Command Palette ---------- */
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 99000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  animation: fadeIn 0.15s ease;
}

.cmd-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.cmd-palette {
  width: 560px;
  max-width: 92vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.cmd-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.cmd-icon {
  font-size: 1.2rem;
  opacity: 0.5;
}

.cmd-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
}

.cmd-search input::placeholder {
  color: var(--text-muted);
}

.cmd-search kbd {
  padding: 3px 8px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  color: var(--text-muted);
}

.cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.cmd-item:hover,
.cmd-item.active {
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-primary);
}

.cmd-emoji {
  font-size: 1.1rem;
}

.cmd-item.hidden {
  display: none;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  height: 64px;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-glass);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(240, 238, 245, 0.9);
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-bracket {
  color: var(--violet);
}

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--violet);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--cyan);
  padding: 6px 14px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.06);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--cyan-glow);
  }

  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.theme-toggle,
.matrix-toggle,
.cmd-trigger {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  padding: 0;
}

.matrix-toggle {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
  padding: 0;
}

.cmd-trigger {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.cmd-trigger kbd {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  padding: 0;
}

.theme-toggle:hover,
.matrix-toggle:hover,
.cmd-trigger:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--violet);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  padding: 1.5rem 2rem;
  display: none;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 999;
  border-bottom: 1px solid var(--border-glass);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 1rem;
  color: var(--text-secondary);
}

.mobile-nav a:hover {
  color: var(--violet);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
  z-index: 1;
}

.hero-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 50%, rgba(124, 58, 237, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 50% 80%, rgba(240, 171, 252, 0.08) 0%, transparent 60%);
  animation: auroraShift 12s ease-in-out infinite alternate;
  z-index: 0;
}

[data-theme="light"] .hero-aurora {
  background:
    radial-gradient(ellipse 70% 50% at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
}

@keyframes auroraShift {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.1) rotate(3deg);
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--violet) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--aurora-pink);
  min-height: 2rem;
  margin-bottom: 1.5rem;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--violet);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Buttons */
.btn-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--violet), #9333ea);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 24px var(--violet-glow);
  text-decoration: none;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--violet-glow);
}

.btn-full {
  width: 100%;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--violet);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn-small {
  padding: 4px 14px;
  font-size: 0.75rem;
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.hero-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  animation: fadeInUp 1.5s ease 2.5s both;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
  }

  50% {
    transform: rotate(45deg) translate(5px, 5px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* ---------- Spotify Widget ---------- */
.spotify-widget {
  position: fixed;
  bottom: 80px;
  left: 24px;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  max-width: 280px;
  transition: var(--transition);
  cursor: pointer;
}

.spotify-widget:hover {
  border-color: #1db954;
  box-shadow: 0 0 20px rgba(29, 185, 84, 0.15);
  transform: translateY(-2px);
}

.spotify-album-art {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1db954, #191414);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.spotify-widget:hover .spotify-album-art {
  transform: scale(1.05);
}

.spotify-info {
  flex: 1;
  min-width: 0;
}

.spotify-label {
  font-size: 0.65rem;
  color: #1db954;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.spotify-track {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-artist {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.spotify-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}

.spotify-bars span {
  width: 3px;
  background: #1db954;
  border-radius: 2px;
  height: 4px;
  /* default paused height */
  transition: height 0.3s ease;
}

.spotify-bars.playing span {
  animation: barBounce 0.8s ease-in-out infinite;
}

.spotify-bars.playing span:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}

.spotify-bars.playing span:nth-child(2) {
  height: 14px;
  animation-delay: 0.15s;
}

.spotify-bars.playing span:nth-child(3) {
  height: 10px;
  animation-delay: 0.3s;
}

.spotify-bars.playing span:nth-child(4) {
  height: 16px;
  animation-delay: 0.45s;
}

@keyframes barBounce {

  0%,
  100% {
    transform: scaleY(0.4);
  }

  50% {
    transform: scaleY(1);
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 3rem;
}

.title-number {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--violet);
  margin-right: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: -2rem;
  margin-bottom: 2rem;
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.08);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text-primary);
}

.about-card {
  padding: 2rem;
  text-align: center;
}

.about-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--violet);
  box-shadow: 0 0 30px var(--violet-glow);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-quick-facts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ---------- Experience / Enhanced Timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--violet), var(--cyan));
  border-radius: 999px;
}

.timeline-item {
  padding: 1.8rem;
  position: relative;
  cursor: pointer;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 2rem;
  width: 16px;
  height: 16px;
  background: var(--violet);
  border: 3px solid var(--bg-deep);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--violet-glow);
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}

.timeline-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.expand-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-block;
  transition: var(--transition);
}

.timeline-item.expanded .expand-hint {
  transform: rotate(180deg);
}

.timeline-item.expanded .expand-hint::after {
  content: '';
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.timeline-item.expanded .timeline-details {
  max-height: 400px;
  opacity: 1;
  margin-top: 1rem;
}

.timeline-details ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.timeline-details li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.timeline-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1rem;
}

.timeline-tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  color: var(--aurora-pink);
}

/* ---------- Project Filters ---------- */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 0 15px var(--violet-glow);
}

/* Hide filtered projects */
.project-card.hide {
  display: none;
}

/* ---------- Projects Grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}

.project-card:hover h3 {
  color: var(--violet);
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  color: var(--aurora-pink);
}

.project-link-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.project-card:hover .project-link-arrow {
  color: var(--violet);
  transform: translate(4px, -4px);
}

/* ---------- Code Playground ---------- */
.playground-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
}

.playground-editor,
.playground-output {
  display: flex;
  flex-direction: column;
}

.playground-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
}

.playground-file {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.playground-run {
  padding: 6px 18px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.playground-clear {
  padding: 4px 12px;
  font-size: 0.72rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
}

.playground-clear:hover {
  border-color: var(--violet);
  color: var(--text-primary);
}

#playgroundCode {
  flex: 1;
  min-height: 240px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  line-height: 1.7;
  resize: none;
  border-right: 1px solid var(--border-glass);
}

#playgroundConsole {
  flex: 1;
  min-height: 240px;
  padding: 16px;
  margin: 0;
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  overflow-y: auto;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.output-muted {
  color: var(--text-muted);
}

.output-error {
  color: #ff5f57;
}

.output-log {
  color: var(--cyan);
}

/* ---------- GitHub Heatmap ---------- */
.github-heatmap-wrapper {
  padding: 2rem;
}

.github-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.github-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.github-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--violet);
}

.github-username {
  font-weight: 600;
  font-size: 1.05rem;
}

.github-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.github-heatmap {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 3px;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 8px;
}

.heatmap-cell {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gh-color);
  border-radius: 2px;
  transition: opacity 0.3s;
}

.github-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.legend-cell {
  width: 12px;
  height: 12px;
  background: var(--gh-color);
  border-radius: 2px;
}

.github-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.gh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gh-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--violet);
}

.gh-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Skills ---------- */
.skills-constellation {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  font-size: 0.82rem;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.skill-tag:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--violet);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

/* ---------- Achievements ---------- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  padding: 2rem;
  text-align: center;
}

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.achievement-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.achievement-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cube-timer {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ---------- Testimonials Carousel ---------- */
.testimonials-carousel {
  position: relative;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-slide {
  min-width: 100%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid var(--violet);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  background: rgba(124, 58, 237, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.testimonial-author strong {
  font-size: 0.95rem;
}

.testimonial-author span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.testimonial-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-btn:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--violet);
  color: var(--text-primary);
}

.testimonial-dots {
  display: flex;
  gap: 8px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.testimonial-dot.active {
  background: var(--violet);
  transform: scale(1.3);
}

/* ---------- Visitor Globe ---------- */
.globe-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

#globeCanvas {
  max-width: 420px;
  width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(124, 58, 237, 0.08), transparent 60%);
}

.globe-info {
  max-width: 360px;
}

.globe-info p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.globe-stats {
  display: flex;
  gap: 2rem;
}

.globe-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.globe-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--violet);
  font-family: var(--font-heading);
}

.globe-stat span:last-child {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link svg {
  flex-shrink: 0;
}

.social-link:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--violet);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.contact-form {
  padding: 2rem;
}

.contact-form .form-group {
  margin-bottom: 1.2rem;
}

.contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form textarea {
  background: rgba(0, 0, 0, 0.03);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form textarea {
  resize: vertical;
}

.form-status {
  font-size: 0.85rem;
  margin-top: 0.8rem;
  text-align: center;
  min-height: 1.2rem;
}

.form-status.success {
  color: var(--cyan);
}

.form-status.error {
  color: #ff5f57;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.footer-hint kbd {
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
}

/* ---------- Chatbot ---------- */
.chatbot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--violet), #9333ea);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--violet-glow);
  transition: var(--transition);
}

.chatbot-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 36px var(--violet-glow);
}

.chatbot-fab-icon {
  font-size: 1.2rem;
}

.chatbot-panel {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 901;
  width: 380px;
  max-height: 530px;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: opacity 0.3s, transform 0.3s;
}

.chatbot-panel.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass);
}

.chatbot-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
}

.chatbot-close:hover {
  color: var(--text-primary);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 300px;
}

.chat-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.chat-message.bot {
  align-self: flex-start;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.chat-message.user {
  align-self: flex-end;
  background: var(--violet);
  color: #fff;
}

.chat-message p {
  margin: 0;
}

.chatbot-chips {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  border-top: 1px solid var(--border-glass);
}

.chip {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.chip:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--violet);
  color: var(--text-primary);
}

.chatbot-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-glass);
}

.chatbot-input input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
}

.chatbot-input input:focus {
  border-color: var(--violet);
}

.chatbot-input button {
  padding: 10px 16px;
  background: var(--violet);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.chatbot-input button:hover {
  background: #9333ea;
}

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

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

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {

  .nav-links,
  .nav-status,
  .cmd-trigger {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .playground-container {
    grid-template-columns: 1fr;
  }

  .globe-wrapper {
    flex-direction: column;
  }

  .spotify-widget {
    bottom: 70px;
    left: 12px;
    max-width: 240px;
  }
}

@media (max-width: 600px) {
  .hero-name {
    font-size: 2.2rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 1.4rem;
    margin-bottom: 2rem;
  }

  .chatbot-panel {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 80px;
  }

  .chatbot-fab {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px;
    font-size: 0.82rem;
  }

  .cursor-ring,
  .cursor-dot {
    display: none;
  }

  body,
  a {
    cursor: auto;
  }

  .skills-constellation {
    grid-template-columns: 1fr 1fr;
  }

  .achievements-grid {
    grid-template-columns: 1fr 1fr;
  }

  .spotify-widget {
    display: none;
  }

  .nav-right .theme-toggle,
  .nav-right .matrix-toggle {
    display: none;
  }
}

@media (max-width: 400px) {

  .skills-constellation,
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}