/* ==========================================================================
   Stromback Family - Unified Modern Style System
   ========================================================================== */

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

:root, [data-theme="dark"] {
  --bg: #0f131e;
  --panel: rgba(17, 24, 39, 0.85);
  --panel-hover: rgba(26, 36, 56, 0.95);
  --line: rgba(255, 255, 255, 0.12);
  --line-glow: rgba(56, 189, 248, 0.4);
  
  --text: #ecf1ff;
  --text-heading: #ffffff;
  --muted: #a5b2d8;
  --muted-dark: #677499;

  --nav-bg: rgba(15, 19, 30, 0.88);
  --card-bg: rgba(17, 24, 39, 0.85);
  --card-hover-bg: rgba(26, 36, 56, 0.95);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --card-hover-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --modal-overlay-bg: rgba(7, 10, 20, 0.88);
  --modal-bg: rgba(17, 24, 39, 0.96);
  --entry-bg: rgba(255, 255, 255, 0.03);
  --icon-box-bg: rgba(255, 255, 255, 0.05);

  --accent-green: #37d67a;
  --accent-green-strong: #28b567;
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-purple: #9d6fff;
  --accent-orange: #f47f3d;
  --accent-amber: #fbbf24;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-hover: rgba(255, 255, 255, 0.98);
  --line: rgba(15, 23, 42, 0.12);
  --line-glow: rgba(14, 165, 233, 0.5);
  
  --text: #1e293b;
  --text-heading: #0f172a;
  --muted: #64748b;
  --muted-dark: #94a3b8;

  --nav-bg: rgba(255, 255, 255, 0.9);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-hover-bg: #ffffff;
  --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --card-hover-shadow: 0 18px 40px rgba(14, 165, 233, 0.18);
  --modal-overlay-bg: rgba(15, 23, 42, 0.65);
  --modal-bg: #ffffff;
  --entry-bg: rgba(15, 23, 42, 0.03);
  --icon-box-bg: rgba(15, 23, 42, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', 'Trebuchet MS', sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, #2b3f88 0%, #0f131e 45%),
    radial-gradient(circle at 85% 10%, #733f2a 0%, transparent 45%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 20% 20%, #dbeafe 0%, #f1f5f9 45%),
    radial-gradient(circle at 85% 10%, #ffedd5 0%, transparent 45%),
    var(--bg);
  background-attachment: fixed;
}

body.page-loaded {
  opacity: 1;
  transform: translateY(0);
}

body.page-exit {
  opacity: 0;
  transform: translateY(-8px);
}

/* Background Ambient Orbs */
.bg-orb {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .bg-orb {
  opacity: 0.3;
}

.orb-a {
  width: 380px;
  height: 380px;
  background: #2db7d7;
  left: -80px;
  bottom: -70px;
}

.orb-b {
  width: 320px;
  height: 320px;
  background: #f47f3d;
  right: -70px;
  top: -50px;
}

.orb-c {
  width: 260px;
  height: 260px;
  background: #9d6fff;
  left: 45%;
  top: 40%;
  opacity: 0.25;
}

/* Particle Effects Canvas Overlay */
#click-particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* Button & Card Ripple Effects */
.btn, .card-item, .filter-pill, .nav-btn, .brand, .hero-badge, .card-footer button, .theme-toggle-btn {
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Navigation Bar (Full Frosted Sticky Header)
   ========================================================================== */
.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 12px 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text-heading);
  background: var(--icon-box-bg);
}

.nav-btn-changelog {
  color: var(--accent-cyan) !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
}

.nav-btn-changelog:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: var(--accent-cyan) !important;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-heading);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  padding: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  background: var(--panel-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

.theme-toggle-btn .theme-icon {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn:hover .theme-icon {
  transform: rotate(25deg) scale(1.15);
}

.nav-btn {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  cursor: pointer;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.45);
}

/* ==========================================================================
   Changelog Modal
   ========================================================================== */
.changelog-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.changelog-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.changelog-modal {
  background: var(--modal-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(56, 189, 248, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.changelog-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: var(--icon-box-bg);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.btn-close-modal:hover {
  color: var(--text-heading);
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.2);
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.changelog-entry {
  background: var(--entry-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.changelog-entry-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 6px;
}

.changelog-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.changelog-entry-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 40px auto 30px;
  padding: 20px 20px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text-heading);
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #f47f3d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.55);
}

.btn-secondary {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text-heading);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--panel-hover);
  border-color: var(--line-glow);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ==========================================================================
   Main Grid Showcase
   ========================================================================== */
.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  margin-top: 30px;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-heading);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ==========================================================================
   Interactive Cards (Spotlight Effect)
   ========================================================================== */
.card-item {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.card-item::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(56, 189, 248, 0.2),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

.card-item:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: var(--card-hover-shadow);
}

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

.card-item > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--icon-box-bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.pill-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-green {
  background: rgba(55, 214, 122, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(55, 214, 122, 0.3);
}

.badge-amber {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-orange {
  background: rgba(244, 127, 61, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(244, 127, 61, 0.3);
}

.badge-purple {
  background: rgba(157, 111, 255, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 111, 255, 0.3);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.card-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 24px;
}

.card-footer {
  margin-top: auto;
}

/* ==========================================================================
   Filter & Search Bar (Downloads Portal)
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--text-heading);
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-pill.active {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-top: 80px;
  padding: 35px 20px 25px;
  border-top: 1px solid var(--line);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--text-heading);
}

.footer-text {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .navbar {
    padding: 6px 0;
  }
  
  .nav-links .nav-link:not(.nav-btn-changelog) {
    display: none;
  }
}
