:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #3b82f6;
  --accent: #0ea5e9;
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --success: #10b981;
  --error: #ef4444;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-dark: #60a5fa;
  --secondary: #60a5fa;
  --accent: #38bdf8;
  --bg-color: #0b1120;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: #1e293b;
  --border-color: #334155;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image: radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:hover, a:focus-visible {
  color: var(--primary);
}

/* Accessibility Focus States */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 1.125rem; }

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 0.5rem;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--bg-color);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover, .btn-icon:focus-visible {
  background: var(--border-color);
  color: var(--primary);
}

.text-error { color: var(--error); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, padding 0.3s ease;
  padding: 1rem 0;
}

.header.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .header.scrolled {
  background: rgba(30, 41, 59, 0.9);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--primary);
}

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

@media (min-width: 992px) {
  .nav-links {
    display: flex;
    align-items: center;
  }
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle:hover, #theme-toggle:focus-visible {
  color: var(--primary);
  background: var(--border-color);
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 992px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Premium Hero */
.premium-hero {
  padding: 8rem 0 6rem;
  overflow: hidden;
  position: relative;
}
.hero-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 992px) {
  .hero-content-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }
  .hero-text {
    flex: 1;
    max-width: 600px;
  }
  .hero-illustration {
    flex: 1;
    max-width: 550px;
    perspective: 1000px;
  }
}
.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
}
[data-theme="dark"] .badge {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-dark);
}
.hero-text h1 {
  margin-bottom: 1.5rem;
  line-height: 1.1;
}
.hero-text .lead {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-trust p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Code Window Illustration */
.code-window {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
}
.code-window:hover {
  transform: rotateY(0) rotateX(0);
}
.window-header {
  background: var(--bg-color);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.window-body {
  padding: 1.5rem;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
}
.window-body pre { margin: 0; }
.window-body .comment { color: #64748b; }
.window-body .selector { color: #a78bfa; }
.window-body .property { color: #38bdf8; }
.window-body .value { color: #a3e635; }

/* Trusted By */
.trusted-by {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}
.section-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-transform: uppercase;
}
.logos-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: var(--transition);
}
.logos-grid:hover {
  opacity: 1;
  filter: grayscale(0%);
}
.logo-placeholder {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Stats Section */
.stats-section {
  padding: 6rem 0;
  background: var(--bg-color);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1.125rem;
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section-header h2 {
  margin-bottom: 1rem;
}
.section-header p {
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* Features */
.features-premium {
  padding: 8rem 0;
}
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card.featured {
    grid-column: span 2;
  }
}
.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  transition: var(--transition);
  height: 100%;
}
.bento-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}
.bento-icon {
  width: 64px;
  height: 64px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
[data-theme="dark"] .bento-icon {
  background: rgba(37, 99, 235, 0.2);
}
.bento-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Comparison Section */
.comparison-section {
  padding: 8rem 0;
  background: var(--bg-color);
}
.comparison-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 992px) {
  .comparison-container {
    flex-direction: row;
    align-items: stretch;
  }
}
.code-panel {
  flex: 1;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
  box-shadow: var(--shadow-md);
  border: 1px solid #1e293b;
}
.code-panel .panel-header {
  background: #1e293b;
  color: #94a3b8;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.code-panel pre {
  padding: 1.5rem;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin: 0;
  overflow-x: auto;
}
.code-panel.minified pre {
  color: #a3e635;
  white-space: pre-wrap;
  word-break: break-all;
}
.comparison-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 50%;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
@media (min-width: 992px) {
  .comparison-arrow {
    transform: rotate(0deg);
  }
}
@media (max-width: 991px) {
  .comparison-arrow {
    transform: rotate(90deg);
  }
}

/* How It Works */
.how-it-works-alt {
  padding: 8rem 0;
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step-card {
  position: relative;
  padding: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: left;
}
.step-number {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(37, 99, 235, 0.1);
  line-height: 1;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}
[data-theme="dark"] .step-number {
  color: rgba(255, 255, 255, 0.05);
}
.step-card h3 {
  margin-top: 1rem;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}
.step-card p {
  position: relative;
  z-index: 1;
}

/* Testimonials */
.testimonials {
  padding: 8rem 0;
  background: var(--bg-color);
}
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.review-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.stars {
  color: #f59e0b;
  letter-spacing: 2px;
}
.review-text {
  font-style: italic;
  flex: 1;
  color: var(--text-main);
}
.reviewer {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.reviewer .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}
.reviewer .info h4 {
  margin: 0;
  font-size: 1rem;
}
.reviewer .info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FAQ Preview */
.faq-preview {
  padding: 8rem 0;
}
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.accordion-header {
  width: 100%;
  text-align: left;
  padding: 1.5rem 2rem;
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}
.accordion-content {
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.accordion-header[aria-expanded="true"] + .accordion-content {
  padding-bottom: 1.5rem;
  max-height: 500px;
}

/* Newsletter Subscription */
.newsletter-section {
  padding: 4rem 0;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}
.newsletter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.newsletter-container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.newsletter-form {
  display: flex;
  width: 100%;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.newsletter-form input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text-main);
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

/* Final CTA */
.final-cta {
  padding: 8rem 0;
}
.cta-box {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
[data-theme="dark"] .cta-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
}
.cta-box h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.cta-box p {
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
}

/* Tool Page Specifics */
.page-header {
  padding: 6rem 0 4rem;
  text-align: center;
}
.tool-section {
  padding-bottom: 8rem;
}
.tool-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--border-color);
}
@media (min-width: 992px) {
  .tool-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tool-panel:first-child {
    border-right: 1px solid var(--border-color);
  }
}
.tool-panel {
  display: flex;
  flex-direction: column;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}
.panel-header h2 {
  font-size: 1.125rem;
  margin: 0;
}
.panel-actions {
  display: flex;
  gap: 0.5rem;
}
textarea {
  width: 100%;
  height: 500px;
  min-height: 200px;
  padding: 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  line-height: 1.6;
}
.panel-footer {
  padding: 0.75rem 1.5rem;
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  font-family: var(--font-mono);
}
.tool-controls {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .tool-controls {
    flex-direction: row;
    justify-content: space-between;
    padding: 2rem 3rem;
  }
}
.compression-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat-box {
  display: flex;
  flex-direction: column;
}
.stat-box .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.stat-box .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}
.toast {
  background: var(--card-bg);
  color: var(--text-main);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--success);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.toast.error {
  border-left-color: var(--error);
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-col a {
  color: var(--text-muted);
}
.footer-col a:hover, .footer-col a:focus-visible {
  color: var(--primary);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}
#back-to-top {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
#back-to-top:hover, #back-to-top:focus-visible {
  background: var(--border-color);
  color: var(--primary);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 73px;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  z-index: 99;
}
.mobile-nav.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav a {
  display: block;
  padding: 0.5rem 0;
  font-weight: 500;
  color: var(--text-muted);
}
.mobile-nav a:hover, .mobile-nav a.active {
  color: var(--text-main);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
