/*
  User Story: As a developer, I want a maintainable and scalable CSS architecture
  so that future design changes are easy to implement and the codebase remains organized.

  Acceptance Criteria:
  - CSS custom properties (variables) for consistent theming
  - Modular component-based styling
  - Responsive design with mobile-first approach
  - Performance optimized with minification
  - Well-documented with clear section comments
*/

/* Root tokens / design system */
:root{--color-bg:#071026;--color-bg-alt:#0b1826;--color-surface:#071026;--color-accent:#16a34a;--color-accent-soft:#34d399;--color-link:#60a5fa;--Color_text:#e6eef6;--color-text:#e6eef6;--color-muted:#9aa6b2;--radius-lg:0.9rem;--radius-full:999px;--shadow-soft:0 18px 35px rgba(2,6,23,0.6);--font-base:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji",sans-serif}

/* Light theme */
.light-theme{--color-bg:#f8fafc;--color-bg-alt:#ffffff;--color-surface:#ffffff;--color-accent:#16a34a;--color-accent-soft:#10b981;--color-link:#2563eb;--color-text:#0f172a;--color-muted:#64748b}

/*
  User Story: As a user, I want the website to look consistent across all devices
  so that I have a seamless experience regardless of screen size.

  Acceptance Criteria:
  - Box-sizing reset for consistent sizing
  - System font stack for optimal performance
  - Dark theme with proper contrast ratios
  - Smooth scrolling behavior
*/

/* Global reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body{min-height:100vh;display:flex;flex-direction:column;font-family:var(--font-base);background:linear-gradient(180deg,var(--color-bg) 0%,var(--color-bg-alt) 100%);color:var(--color-text);line-height:1.6;transition:background 0.3s ease,color 0.3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:var(--color-link);text-decoration:none}
a:hover,a:focus-visible{color:var(--color-accent-soft);text-decoration:underline}
h1,h2,h3,h4,h5,h6{color:var(--color-text);margin-top:0;font-weight:700;line-height:1.15}
h1{font-size:clamp(1.6rem,3.4vw,2.6rem)}

main {
  flex: 1;
}

.light-theme body {
  background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
}

/* Layout helpers */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

/* Header / Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.light-theme .site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
}

.brand{font-weight:700;font-size:1.125rem;text-decoration:none;color:var(--color-text);letter-spacing:0.02em;transition:color 0.2s ease,text-shadow 0.2s ease}

.light-theme .brand {
  color: var(--color-text);
}

.brand:hover {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

.site-nav {
  font-size: 0.95rem;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-list a{text-decoration:none;color:var(--color-muted);padding-block:0.2rem;position:relative;transition:color 0.16s ease-in-out}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--color-accent),
    var(--color-accent-soft)
  );
  transition: width 0.2s ease-in-out;
}

.nav-list a:hover,.nav-list a:focus-visible{color:var(--color-text)}

.light-theme .nav-list a:hover,
.light-theme .nav-list a:focus-visible {
  color: var(--color-text);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  width: 100%;
}

/* Hamburger Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
}

.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-list--open {
  display: flex !important;
}

/* Theme Toggle */
.theme-toggle{background:none;border:none;cursor:pointer;padding:0.5rem;border-radius:var(--radius-full);transition:background 0.16s ease;color:var(--color-text)}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.light-theme .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Hero / Showcase */
.hero {
  padding-block: 3.5rem 3rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-text{max-width:40rem;padding:2rem;border-radius:1.5rem;background:linear-gradient(180deg,rgba(22,163,74,0.06),rgba(7,16,38,0.6));box-shadow:var(--shadow-soft);border:1px solid rgba(148,163,184,0.12)}

.light-theme .hero-text {
  background: radial-gradient(circle at top left, #16a34a22, #ffffffdd);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.hero h1{font-size:clamp(2rem,4vw,2.6rem);margin-top:0;margin-bottom:0.5rem;letter-spacing:-0.01em}

.hero p {
  margin-bottom: 1.5rem;
  color: var(--color-muted);
}

.light-theme .hero p,
.light-theme .sidebar p,
.light-theme .service-card p,
.light-theme .section-subtitle,
.light-theme .project-info p {
  color: var(--color-text);
}

/* Button */
.btn-primary{display:inline-block;padding:0.7rem 1.6rem;border-radius:var(--radius-full);border:none;text-decoration:none;font-weight:600;font-size:0.95rem;letter-spacing:0.04em;text-transform:uppercase;background:linear-gradient(90deg,var(--color-accent),var(--color-accent-soft));color:#06201a;box-shadow:0 10px 30px rgba(6,24,22,0.12);transition:transform 0.12s ease,box-shadow 0.12s ease,filter 0.12s ease}
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-full);
  border: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(
    to right,
    var(--color-accent),
    var(--color-accent-soft)
  );
  color: #f0fdf4;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    filter 0.12s ease;
}

.btn-primary:hover{transform:translateY(-1px);filter:brightness(1.02);box-shadow:0 18px 48px rgba(6,24,22,0.14)}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
}

/* Main + Sidebar Section */
.content-section {
  padding-block: 2.5rem 3.5rem;
}

.layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Main content */
.main-content {
  flex: 2;
  background: rgba(15, 23, 42, 0.9);
  padding: 1.75rem 1.75rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
}

.light-theme .main-content {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.main-content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

/* Sidebar */
.sidebar {
  flex: 1;
  background: linear-gradient(
    145deg,
    rgba(22, 163, 74, 0.18),
    rgba(15, 23, 42, 0.98)
  );
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: var(--shadow-soft);
}

.light-theme .sidebar {
  background: linear-gradient(
    145deg,
    rgba(22, 163, 74, 0.1),
    rgba(255, 255, 255, 0.98)
  );
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.sidebar h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.sidebar p {
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  position: relative;
  bottom: 0;
  width: 100%;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-block: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-muted);
  background: #020617;
}

.light-theme .site-footer {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  padding: 0;
}

.footer-links a {
  color: var(--color-accent-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-text);
  text-decoration: underline;
}

.light-theme .footer-links a:hover,
.light-theme .footer-links a:focus-visible {
  color: var(--color-text);
}

/* Skip to Main Content Link for Accessibility */
a.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}

a.skip-to-main:focus {
  top: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(2, 6, 23, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding: 1rem;
    width: 100%;
  }

  .light-theme .nav-list {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .nav-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }

  .light-theme .nav-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
  }

  .hero {
    padding-block: 2.5rem 2.5rem;
  }

  .hero-text {
    padding: 1.5rem 1.3rem 1.7rem;
  }

  .layout {
    flex-direction: column;
  }

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

  .contact-form {
    padding: 1.5rem;
  }
}

/* Services Section */
.services-section {
  padding-block: 3.5rem;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.light-theme .services-section {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.services-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: #f9fafb;
}

.light-theme .services-section h2 {
  color: var(--color-text);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: rgba(15, 23, 42, 0.9);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.light-theme .service-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.5);
}

.service-card h3 {
  margin-top: 0;
  color: var(--color-accent-soft);
  font-size: 1.2rem;
}

.service-card p {
  color: var(--color-muted);
  line-height: 1.6;
}

/* Contact Section */
.contact-section {
  padding-block: 3.5rem;
}

.contact-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #f9fafb;
}

.light-theme .contact-section h2 {
  color: var(--color-text);
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.9);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
}

.light-theme .contact-form {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #f9fafb;
}

.light-theme .form-group label {
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.5rem;
  background: rgba(2, 6, 23, 0.8);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.light-theme .form-group input,
.light-theme .form-group textarea {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.contact-form button {
  width: 100%;
  margin-top: 1rem;
}

/* Inline form message */
.form-message {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  display: none;
}
.form-message.success {
  display: block;
  background: rgba(34,197,94,0.12);
  color: #bbf7d0;
  border: 1px solid rgba(34,197,94,0.25);
}
.form-message.error {
  display: block;
  background: rgba(248,113,113,0.08);
  color: #fecaca;
  border: 1px solid rgba(248,113,113,0.12);
}

/* Honeypot (hidden field used to trap bots) */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Scroll-triggered animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.fade-in,
.slide-up,
.service-card,
.main-content,
.sidebar {
  opacity: 0;
  animation: slideUp 0.6s ease-out forwards;
}

.fade-in.animate-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.slide-up.animate-in,
.service-card.animate-in,
.main-content.animate-in,
.sidebar.animate-in {
  animation: slideUp 0.6s ease-out forwards;
}

/* Stagger animations for multiple elements */
.service-card:nth-child(2),
.service-card:nth-child(2).animate-in {
  animation-delay: 0.1s;
}

.service-card:nth-child(3),
.service-card:nth-child(3).animate-in {
  animation-delay: 0.2s;
}

/* Projects Section */
.projects-section {
  padding-block: 3.5rem;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.light-theme .projects-section {
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.projects-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #f9fafb;
}

.light-theme .projects-section h2 {
  color: var(--color-text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.project-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.light-theme .project-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.5);
}

.project-header {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.12));
}

.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.4rem 0.9rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  border: 1px solid;
}

.project-badge--completed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.project-badge--progress {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.4);
}

.project-badge--upcoming {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.4);
}

.project-badge--beta {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
}

.project-info {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #f9fafb;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.light-theme .project-info h3 {
  color: var(--color-text);
}

.project-card:hover .project-info h3 {
  color: #22c55e;
}

.project-info p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: auto;
  margin-top: 0.5rem;
}

.project-link {
  display: inline-block;
  color: #22c55e;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
  margin-top: 1rem;
}

.project-link:hover {
  color: #16a34a;
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-image {
    height: 150px;
  }

  .project-info {
    padding: 1.25rem;
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-accent-soft));
  color: #062e16;
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.5);
  cursor: pointer;
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.2s ease, visibility 0.25s;
  z-index: 9999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:focus {
  outline: 3px solid rgba(34,197,94,0.18);
}

@media (max-width: 480px) {
  .back-to-top {
    right: 0.75rem;
    bottom: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* Work-In-Progress Animations */
@keyframes wip-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

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

.wip-pulse {
  animation: wip-pulse 2s infinite;
}

.project-overlay-wip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0) 0%,
    rgba(168, 85, 247, 0.1) 50%,
    rgba(168, 85, 247, 0) 100%
  );
  animation: shimmer 3s infinite;
  z-index: 1;
  pointer-events: none;
}

.project-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Beta Page */
.beta-page {
  padding-block: 3.5rem;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.light-theme .beta-page {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.beta-page h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #f9fafb;
}

.light-theme .beta-page h1 {
  color: var(--color-text);
}

.beta-page h2 {
  font-size: 1.8rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #22c55e;
}

.beta-page h3 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  color: #f9fafb;
}

.light-theme .beta-page h3 {
  color: var(--color-text);
}

.beta-page p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--color-text);
}

.beta-page ul,
.beta-page ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.beta-page li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.beta-page img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin: 1rem 0;
  box-shadow: var(--shadow-soft);
}

.beta-page .screenshot-card img,
.beta-page .container > img {
  max-width: 34rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.beta-page .container {
  max-width: 950px;
}

.beta-page figure {
  margin: 2rem auto;
  text-align: center;
  max-width: 900px;
}

.beta-page figure img {
  display: block;
  margin: 1rem auto;
}

.beta-page p,
.beta-page h3,
.beta-page h2,
.beta-page ul,
.beta-page ol {
  max-width: 75ch;
  margin-left: auto;
  margin-right: auto;
}

.beta-page ul,
.beta-page ol {
  padding-left: 2rem;
}

.beta-page em {
  color: var(--color-muted);
  font-style: italic;
}

.beta-page strong {
  color: #22c55e;
  font-weight: 600;
}

/* Table of Contents Navigation */
.toc-nav {
  background: var(--color-bg-alt);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 75ch;
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--color-accent-soft);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toc-list a {
  color: var(--color-accent-soft);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid transparent;
  display: block;
}

.toc-list a:hover {
  color: #fff;
  border-left-color: var(--color-accent-soft);
  padding-left: 1rem;
}

/* Section numbering */
.section-number {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  background: var(--color-accent-soft);
  color: #000;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 0.75rem;
  vertical-align: middle;
}

h2 {
  display: flex;
  align-items: center;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .toc-nav {
    padding: 1rem;
  }

  .toc-title {
    font-size: 1rem;
  }

  .section-number {
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
  }
}

.light-theme .section-number {
  background: var(--color-accent);
  color: #fff;
}

/* TestFlight and external links styling */
.install a,
.install strong a {
  color: var(--color-accent-soft);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.install a:hover {
  border-bottom-color: var(--color-accent-soft);
  text-decoration: underline;
}

.light-theme .install a,
.light-theme .install strong a {
  color: var(--color-accent);
}

.light-theme .install a:hover {
  border-bottom-color: var(--color-accent);
}

/* Legal Pages (Privacy Policy, Terms, etc.) */
.legal-page {
  padding: 3rem 0;
}

.legal-page h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #22c55e 0%, #84cc16 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-page .container {
  max-width: 850px;
}

.policy-content {
  background: var(--color-bg-alt);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  line-height: 1.8;
}

.policy-section {
  margin-bottom: 2.5rem;
}

.policy-section:last-child {
  margin-bottom: 0;
}

.policy-section h2 {
  font-size: 1.35rem;
  color: var(--color-accent-soft);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

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

.policy-section ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.policy-section ul li {
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.policy-section strong {
  color: var(--color-accent-soft);
  font-weight: 600;
}

.policy-link {
  color: var(--color-accent-soft);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.policy-link:hover {
  border-bottom-color: var(--color-accent-soft);
  text-decoration: underline;
}

.light-theme .policy-content {
  background: rgba(248, 250, 252, 0.9);
}

.light-theme .policy-section h2 {
  color: var(--color-accent);
}

.light-theme .policy-section strong {
  color: var(--color-accent);
}

.light-theme .policy-link {
  color: var(--color-accent);
}

.light-theme .policy-link:hover {
  border-bottom-color: var(--color-accent);
}

@media (max-width: 640px) {
  .legal-page h1 {
    font-size: 1.75rem;
  }

  .policy-content {
    padding: 1.5rem;
  }

  .policy-section h2 {
    font-size: 1.15rem;
  }
}
