/* =============================================
   GLOBALDEETS - Premium Portfolio Showcase
   A magnificent window into exclusive capabilities
   ============================================= */

:root {
  /* Premium Color Palette */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --accent: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;

  /* Advanced Backgrounds */
  --bg-void: #050911;
  --bg-deep: #0a0e1a;
  --bg-surface: #0f1629;
  --bg-elevated: #151b2e;

  /* Glass Morphism */
  --glass: rgba(20, 30, 50, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(30, 45, 70, 0.5);

  /* Text Hierarchy */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-faded: #475569;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.6);
  --glow-primary: 0 0 40px rgba(59, 130, 246, 0.3);
  --glow-accent: 0 0 40px rgba(139, 92, 246, 0.25);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --gradient-aurora: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

  /* ---- Deep Space Neon (Phase 2) ---- */
  --neon-cyan: #00f5ff;
  --neon-purple: #a855f7;
  --neon-orange: #ff6b35;
  --neon-green: #39ff14;
  --neon-pink: #ff0090;

  /* Globe-specific */
  --globe-land: #1a2744;
  --globe-atmo: #2255ff;

  /* Neon glows */
  --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.4);
  --glow-orange: 0 0 20px rgba(255, 107, 53, 0.5);
}

/* =============================================
   GLOBE HERO
   ============================================= */

.globe-hero-section {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: #000;
}

/* ── Neon landscape cinematic band ─────────────────────────────────────────── */
.neon-landscape-band {
  position: relative;
  width: 100%;
  height: 340px;
  background: url('assets/neon-landscape-web.jpg') center / cover no-repeat;
  overflow: hidden;
}

.neon-landscape-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    #000 0%,
    rgba(0, 0, 0, 0.25) 30%,
    rgba(0, 0, 0, 0.25) 70%,
    #000 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.neon-landscape-tagline {
  display: flex;
  gap: 2.5rem;
  align-items: baseline;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0;
  -webkit-user-select: none;
  user-select: none;
}

.nlb-word {
  animation: nlbPulse 3s ease-in-out infinite;
}

.nlb-word:nth-child(2) {
  animation-delay: 0.4s;
}
.nlb-word:nth-child(3) {
  animation-delay: 0.8s;
}

.nlb-cyan {
  color: #00f5ff;
  text-shadow:
    0 0 18px #00f5ff,
    0 0 40px rgba(0, 245, 255, 0.5);
}
.nlb-purple {
  color: #a855f7;
  text-shadow:
    0 0 18px #a855f7,
    0 0 40px rgba(168, 85, 247, 0.5);
}
.nlb-orange {
  color: #ff6b35;
  text-shadow:
    0 0 18px #ff6b35,
    0 0 40px rgba(255, 107, 53, 0.5);
}

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

@media (max-width: 480px) {
  .neon-landscape-band {
    height: 200px;
  }
  .neon-landscape-tagline {
    gap: 1.2rem;
  }
}
/* ────────────────────────────────────────────────────────────────────────────── */

#globe-hero-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#globe-hero-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.globe-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8vw;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.3) 55%,
    transparent 100%
  );
}

.globe-hero-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.globe-hero-title span {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.globe-hero-tagline {
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
  max-width: 480px;
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.globe-hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  pointer-events: all;
}

.btn-globe-primary {
  padding: 0.65rem 1.4rem;
  background: var(--neon-cyan);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  box-shadow: var(--glow-cyan);
}

.btn-globe-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.7);
}

.btn-globe-secondary {
  padding: 0.65rem 1.4rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.btn-globe-secondary:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.08);
}

.globe-pin-hint {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: rgba(255, 107, 53, 0.7);
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ---- News pin overlay ---- */
#news-pin-overlay {
  position: fixed;
  bottom: 80px;
  right: 1.5rem;
  width: min(360px, calc(100vw - 3rem));
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
  z-index: 100;
  display: none;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    var(--glow-cyan);
}

#news-pin-overlay.visible {
  display: block;
  animation: fadeInUp 0.25s ease;
}

#news-overlay-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

#news-overlay-close:hover {
  color: var(--neon-cyan);
}

#news-overlay-source {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon-orange);
  margin-bottom: 0.4rem;
}

#news-overlay-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

#news-overlay-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

#news-overlay-link {
  font-size: 0.8rem;
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 600;
}

#news-overlay-link:hover {
  text-decoration: underline;
}

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

/* =============================================
   NEWS TICKER BAR
   ============================================= */

.news-ticker-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(0, 245, 255, 0.18);
  overflow: hidden;
  z-index: 20;
  display: flex;
  align-items: center;
}

.ticker-label {
  flex-shrink: 0;
  padding: 0 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neon-orange);
  border-right: 1px solid rgba(255, 107, 53, 0.3);
  white-space: nowrap;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}

#ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 320px;
  max-width: 320px;
  overflow: hidden;
  transition: background 0.15s;
}

.ticker-item:hover {
  background: rgba(0, 245, 255, 0.06);
}

.ticker-source {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
}

.ticker-headline {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =============================================
   NEWS FEED PAGE  (news.html)
   ============================================= */

.news-page-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.news-page-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.news-page-title span {
  color: var(--neon-cyan);
}

.news-page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.news-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Region tab bar */
.region-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0 1.5rem;
  justify-content: center;
}

.region-tab {
  padding: 0.4rem 1rem;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}

.region-tab:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.region-tab.active {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #000;
  font-weight: 700;
}

.news-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 0 auto 1.25rem;
}

.news-search-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(13, 17, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font: inherit;
}

.news-search-input:focus {
  outline: none;
  border-color: rgba(0, 245, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.news-tools-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 0;
}

/* News grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

.news-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition:
    border-color 0.2s,
    transform 0.18s;
}

.news-card:hover {
  border-color: rgba(0, 245, 255, 0.25);
  transform: translateY(-2px);
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.news-source-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.news-mt-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: help;
}

.news-mt-badge--failed {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.news-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.news-headline {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.news-headline a {
  color: var(--text-primary);
  text-decoration: none;
}

.news-headline a:hover {
  color: var(--neon-cyan);
}

.news-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-region-tag {
  font-size: 0.67rem;
  color: var(--text-faded);
  text-transform: capitalize;
}

.news-read-link {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.news-read-link:hover {
  text-decoration: underline;
}

/* Skeleton loaders */
.news-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface) 25%,
    var(--bg-elevated) 50%,
    var(--bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 12px;
  height: 180px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.news-error,
.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.news-error button {
  margin-top: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--neon-cyan);
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

/* Load more button */
.load-more-btn {
  display: block;
  margin: 2.5rem auto 0;
  padding: 0.7rem 2rem;
  background: transparent;
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 8px;
  color: var(--neon-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: rgba(0, 245, 255, 0.08);
  border-color: var(--neon-cyan);
}

@media (max-width: 760px) {
  .news-tools {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   FOUNDATIONS
   ============================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  body::before,
  body::after {
    animation: none !important;
  }
  .project-card:hover,
  .stat-item:hover {
    transform: none !important;
  }
  .scroll-to-top:hover {
    transform: none !important;
  }
}

/* Skip Link (moved from inline pages) */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.js-hidden {
  display: none;
}
.analytics-footer-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--primary-dark);
  color: #fff;
  border-radius: 0.5rem;
  z-index: 1000;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Accessibility: Visually hidden but screen reader visible */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

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

/* Floating Particles */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.05), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.08), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.06), transparent);
  background-size: 200% 200%;
  background-position: 35% 20%;
  pointer-events: none;
  z-index: 0;
}

@keyframes drift {
  0%,
  100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* =============================================
   HEADER - FLOATING GLASS
   ============================================= */

header {
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.5rem 0;
  box-shadow:
    var(--shadow-md),
    0 0 60px rgba(59, 130, 246, 0.1);
  transition:
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  padding: 0.75rem 0;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.05) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(236, 72, 153, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

header.scrolled {
  background: rgba(10, 14, 26, 0.92);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  backdrop-filter: blur(32px) saturate(200%);
  box-shadow:
    var(--shadow-xl),
    0 0 80px rgba(59, 130, 246, 0.15);
}

header.scrolled::before {
  opacity: 1;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1,
.site-logo-text {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    #60a5fa 0%,
    #8b5cf6 25%,
    #ec4899 50%,
    #f59e0b 75%,
    #10b981 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 10s ease infinite;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* Site logo mark (GD globe image) */
.site-logo-link,
.logo-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1rem;
  min-width: 112px;
  background:
    radial-gradient(circle at 50% 50%, rgba(14, 24, 42, 0.45) 0%, rgba(0, 0, 0, 0.98) 68%), #000;
  border: 1px solid rgba(95, 238, 255, 0.18);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 30px rgba(0, 245, 255, 0.14),
    0 0 60px rgba(139, 92, 246, 0.12);
  text-decoration: none;
  overflow: visible;
  isolation: isolate;
}

.site-logo-link::before,
.logo-link::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 16% 28%, rgba(0, 245, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 76%, rgba(0, 245, 255, 0.55) 0 1.5px, transparent 3px),
    radial-gradient(circle at 78% 18%, rgba(139, 92, 246, 0.75) 0 1.4px, transparent 3px),
    radial-gradient(circle at 88% 62%, rgba(0, 245, 255, 0.5) 0 1.2px, transparent 3px),
    radial-gradient(circle at 64% 82%, rgba(139, 92, 246, 0.55) 0 1px, transparent 2px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

.site-logo-link::after,
.logo-link::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  box-shadow:
    0 0 22px rgba(0, 245, 255, 0.18),
    0 0 38px rgba(139, 92, 246, 0.12);
  pointer-events: none;
  z-index: 0;
}

.site-logo-mark {
  position: relative;
  z-index: 1;
  height: 84px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 18px rgba(0, 245, 255, 0.38))
    drop-shadow(0 0 34px rgba(139, 92, 246, 0.22));
  transition:
    height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.25s ease,
    box-shadow 0.25s ease;
}

header.scrolled .site-logo-mark {
  height: 54px;
}

.site-logo-link:hover .site-logo-mark,
.logo-link:hover .site-logo-mark {
  filter: drop-shadow(0 0 24px rgba(0, 245, 255, 0.55))
    drop-shadow(0 0 44px rgba(139, 92, 246, 0.3));
}

/* Navigation Icon Buttons */
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-secondary);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav-icon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 16px;
}

.nav-icon-btn svg {
  position: relative;
  z-index: 1;
  transition: all 0.4s ease;
  filter: drop-shadow(0 0 8px currentColor);
}

.nav-icon-btn img {
  position: relative;
  z-index: 1;
  transition: filter 0.2s ease;
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.55)) brightness(1.05);
}

.nav-icon-btn:hover {
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.22);
  border-color: var(--primary);
}

.nav-icon-btn:hover::before {
  opacity: 0.1;
}

.nav-icon-btn:hover svg {
  filter: drop-shadow(0 0 16px currentColor);
  transform: scale(1.1);
}

.nav-icon-btn:hover img {
  filter: drop-shadow(0 0 16px rgba(0, 245, 255, 0.8)) brightness(1.15);
}

.nav-icon-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: var(--glow-primary);
}

.nav-icon-btn.active::before {
  opacity: 0;
}

.nav-icon-btn.active svg,
.nav-icon-btn.active img {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
}

.nav-icon-btn:active {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.18);
}

/* =============================================
   CONTROLS - MODERN INPUTS
   ============================================= */

.controls {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  animation: slideInUp 0.6s ease-out;
}

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

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-input,
.filter-select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.search-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(30, 45, 70, 0.5);
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.filter-select {
  min-width: 150px;
  cursor: pointer;
}

/* View Toggle Buttons */
.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.9rem 1.2rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.view-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.view-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

/* =============================================
   STATS - PREMIUM METRICS
   ============================================= */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
  animation: slideInUp 0.6s ease-out 0.2s both;
}

.stat-item {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: var(--shadow-lg), var(--glow-primary);
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    #60a5fa 0%,
    #8b5cf6 25%,
    #ec4899 50%,
    #f59e0b 75%,
    #10b981 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
  animation: gradientShift 12s ease infinite;
}

.stat-item:hover .stat-number {
  transform: scale(1.15);
  animation-duration: 3s;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* =============================================
   PROJECT CARDS - 3D GLASS MORPHISM
   ============================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  animation: slideInUp 0.6s ease-out 0.3s both;
}

.project-card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  contain: layout style paint;
}

/* Card Glow Effect */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(59, 130, 246, 0.15) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

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

/* Top Gradient Border */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02) perspective(1000px) rotateX(2deg);
  transform-style: preserve-3d;
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.4),
    var(--glow-primary),
    0 0 60px rgba(59, 130, 246, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
}

.project-card:hover .project-title {
  color: var(--primary-light);
  transform: translateX(4px);
}

.project-url {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.project-url:hover {
  opacity: 1;
  text-decoration: underline;
}

.status-badge {
  padding: 0.4rem 1rem;
  border-radius: 24px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.status-badge::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.project-card:hover .status-badge {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

.status-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(52, 211, 153, 0.25));
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.status-active::before {
  background: #6ee7b7;
  box-shadow: 0 0 10px #6ee7b7;
  animation: pulse 2s ease-in-out infinite;
}

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

.status-beta {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.25));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.status-beta::before {
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
}

.status-maintenance {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.25), rgba(148, 163, 184, 0.25));
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.6);
  box-shadow: 0 4px 16px rgba(100, 116, 139, 0.2);
}

.status-maintenance::before {
  background: #94a3b8;
  box-shadow: 0 0 10px #94a3b8;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

.project-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1;
}

.tag {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-light);
  padding: 0.4rem 1rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-card:hover .tag {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.last-updated {
  font-weight: 500;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.btn-feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-feedback:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-feedback:active {
  transform: translateY(0);
}

.view-link,
.view-details {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-size: 0.9rem;
}

.view-link:hover,
.view-details:hover {
  gap: 0.8rem;
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  transform: translateX(4px);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  margin: 4rem 0 2rem;
  text-align: center;
}

.footer p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-links button {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--primary-light);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.footer-links button:hover,
.footer-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

.footer-links button:focus-visible,
.footer-links a:focus-visible,
.view-details:focus-visible,
.nav-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   MODAL
   ============================================= */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 9, 17, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  margin: 5% auto;
  padding: 2.5rem;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  width: 90%;
  max-width: 700px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideInUp 0.4s ease-out;
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  color: var(--text-muted);
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

/* =============================================
   UTILITIES
   ============================================= */

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Smooth Stagger Animations */
.stagger-animation {
  animation: staggerFadeIn 0.6s ease-out backwards;
}

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

/* Button Press Effect */
.btn-press {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-press:active {
  transform: scale(0.95);
}

/* Smooth Color Transitions */
* {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

/* Scroll to Top */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
  color: white;
  font-size: 1.5rem;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl), var(--glow-primary);
}

/* Selection */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

/* Focus */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Theme-specific focus refinement */
:root[data-theme='dark'] *:focus-visible {
  outline-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
}

:root[data-theme='light'] {
  --bg-deep: #f5f7fa;
  --bg-surface: #ffffff;
  --text-primary: #0f1629;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.85);
}

:root[data-theme='light'] *:focus-visible {
  outline-color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .logo h1 {
    font-size: 1.8rem;
  }

  .controls {
    flex-direction: column;
  }

  .search-box {
    min-width: 100%;
  }

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

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 2rem;
  }

  .project-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .view-toggle {
    width: 100%;
  }

  .view-btn {
    flex: 1;
  }
}

/* =============================================
   THEME TOGGLE (if needed)
   ============================================= */

.theme-toggle {
  padding: 0.9rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

/* =============================================
   LIST VIEW VARIANT
   ============================================= */

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

.projects-grid.list-view .project-card {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.projects-grid.list-view .card-header {
  margin-bottom: 0;
}

.projects-grid.list-view .project-description {
  margin-bottom: 0;
}

.projects-grid.list-view .card-footer {
  border-top: none;
  padding-top: 0;
  flex-direction: column;
  align-items: flex-end;
}

@media (max-width: 968px) {
  .projects-grid.list-view .project-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .projects-grid.list-view .card-header {
    margin-bottom: 1rem;
  }

  .projects-grid.list-view .project-description {
    margin-bottom: 1rem;
  }

  .projects-grid.list-view .card-footer {
    flex-direction: row;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* =============================================
   LOADING & TOAST
   ============================================= */

.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 9, 17, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.loading-indicator.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  z-index: 1001;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90%;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.info {
  border-left: 4px solid var(--primary);
}

/* =============================================
   PWA INSTALL BANNER
   ============================================= */

.install-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow-lg), var(--glow-primary);
  z-index: 999;
  animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-banner.hidden {
  display: none;
}

.install-content strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.install-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.install-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.install-actions button {
  white-space: nowrap;
  min-width: 80px;
}

@media (max-width: 640px) {
  .install-banner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .install-actions {
    width: 100%;
    justify-content: center;
  }
}

/* ==============================================
   Contact Form Styles
   ============================================= */

.contact-hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl) 0;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease;
}

.contact-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.1s backwards;
}

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

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  padding: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.form-group {
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  font-size: 1rem;
}

.required {
  color: var(--danger);
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.form-input.error {
  border-color: var(--danger);
  animation: shake 0.3s ease;
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 3rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select option {
  background: #1a1a2e;
  color: white;
  padding: var(--spacing-sm);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

.form-hint {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
}

.form-error {
  display: block;
  font-size: 0.875rem;
  color: var(--danger);
  margin-top: var(--spacing-xs);
  min-height: 1.25rem;
  font-weight: 500;
}

.checkbox-label {
  display: flex;
  align-items: start;
  gap: var(--spacing-sm);
  cursor: pointer;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  line-height: 1.5;
}

.checkbox-label:hover {
  color: var(--primary);
}

.checkbox-label input[type='checkbox'] {
  margin-top: 0.25rem;
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.btn-submit {
  width: 100%;
  position: relative;
  font-size: 1.1rem;
  padding: 1.25rem var(--spacing-xl);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.contact-info {
  padding: var(--spacing-xl);
  height: fit-content;
  animation: fadeInUp 0.6s ease 0.2s backwards;
  margin-top: calc(var(--spacing-xl) * 2);
}

.info-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-xl);
}

.info-list li {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.info-list li:hover {
  background: rgba(37, 99, 235, 0.05);
  transform: translateX(4px);
}

.info-list svg {
  color: var(--primary);
  flex-shrink: 0;
}

.privacy-notice {
  padding: var(--spacing-md);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.privacy-notice h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-sm);
  color: var(--primary);
}

.privacy-notice p {
  font-size: 0.875rem;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.success-message {
  text-align: center;
  padding: var(--spacing-xxl);
  max-width: 600px;
  margin: var(--spacing-xxl) auto;
  animation: fadeInUp 0.6s ease;
}

.success-message svg {
  color: var(--success);
  margin-bottom: var(--spacing-lg);
  animation: checkmark 0.6s ease;
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.success-message h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.success-message p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 1200px) {
  .contact-wrapper {
    grid-template-columns: 2fr 1fr;
    max-width: 1400px;
  }

  .contact-info {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
  }
}

@media (max-width: 768px) {
  .contact-title {
    font-size: 2rem;
  }

  .contact-subtitle {
    font-size: 1rem;
  }

  .form-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Section transition (bb-content) */
.section {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
.section.active {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .section {
    transition: none !important;
  }
}

/* =============================================
   Ecosystem Spheres Section
   ============================================= */

.spheres-section {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, #000 0%, rgba(5, 9, 17, 0.95) 50%, #000 100%);
}

.spheres-heading {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.spheres-heading-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-cyan, #00f5ff);
  opacity: 0.75;
  margin-bottom: 0.4rem;
}

.spheres-subhead {
  text-align: center;
  color: var(--text-muted, #64748b);
  font-size: 1rem;
  margin: 0 0 3rem;
}

.spheres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.sphere-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sphere-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.sphere-card[data-color='green']::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(57, 255, 20, 0.06) 0%, transparent 70%);
}
.sphere-card[data-color='pink']::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 0, 144, 0.06) 0%, transparent 70%);
}
.sphere-card[data-color='purple']::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
}
.sphere-card[data-color='cyan']::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 245, 255, 0.06) 0%, transparent 70%);
}

.sphere-card:hover {
  transform: translateY(-5px);
}
.sphere-card:hover::before {
  opacity: 1;
}

.sphere-card[data-color='green']:hover {
  border-color: var(--neon-green, #39ff14);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.18);
}
.sphere-card[data-color='pink']:hover {
  border-color: var(--neon-pink, #ff0090);
  box-shadow: 0 0 30px rgba(255, 0, 144, 0.18);
}
.sphere-card[data-color='purple']:hover {
  border-color: var(--neon-purple, #a855f7);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.18);
}
.sphere-card[data-color='cyan']:hover {
  border-color: var(--neon-cyan, #00f5ff);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.18);
}

.sphere-orb {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sphere-card[data-color='green'] .sphere-orb {
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.2);
}
.sphere-card[data-color='pink'] .sphere-orb {
  box-shadow: 0 0 24px rgba(255, 0, 144, 0.2);
}
.sphere-card[data-color='purple'] .sphere-orb {
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.2);
}
.sphere-card[data-color='cyan'] .sphere-orb {
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.2);
}

.sphere-orb-icon {
  width: 32px;
  height: 32px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.4));
}

.sphere-card[data-color='green'] .sphere-orb-icon {
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.5));
}
.sphere-card[data-color='pink'] .sphere-orb-icon {
  filter: drop-shadow(0 0 8px rgba(255, 0, 144, 0.5));
}
.sphere-card[data-color='purple'] .sphere-orb-icon {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}
.sphere-card[data-color='cyan'] .sphere-orb-icon {
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.5));
}

.sphere-info h3 {
  color: var(--text-primary, #f0f4ff);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.sphere-tagline {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.sphere-domain {
  font-size: 0.72rem;
  color: var(--neon-cyan, #00f5ff);
  opacity: 0.65;
  letter-spacing: 0.04em;
}

.spheres-explore-link {
  text-align: center;
  margin-top: 2rem;
}

.spheres-all-link {
  color: var(--neon-cyan, #00f5ff);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.spheres-all-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Full-screen globe page */
.globe-page body,
body.globe-page {
  overflow: hidden;
}

.globe-full-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.globe-full-ui {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
}

.globe-full-ui > * {
  pointer-events: auto;
}

.globe-controls-panel {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.5rem;
  background: rgba(5, 9, 17, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  pointer-events: auto;
}

.globe-filter-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.globe-filter-btn:hover,
.globe-filter-btn.active {
  background: rgba(0, 245, 255, 0.12);
  border-color: var(--neon-cyan, #00f5ff);
  color: var(--neon-cyan, #00f5ff);
}

.globe-news-count {
  position: fixed;
  top: 5.5rem;
  right: 1.5rem;
  z-index: 20;
  background: rgba(5, 9, 17, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  color: #ff6b35;
  font-weight: 500;
}

@media (max-width: 480px) {
  .spheres-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .sphere-card {
    padding: 1.25rem 1rem;
  }
  .sphere-orb {
    width: 48px;
    height: 48px;
  }
  .sphere-orb-icon {
    width: 24px;
    height: 24px;
  }
  .globe-controls-panel {
    padding: 0.4rem 0.6rem;
    gap: 0.3rem;
  }
  .globe-filter-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
}
