/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* Accent Colors */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;

  /* Light Theme */
  --bg-light: #ffffff;
  --bg-light-secondary: #f8fafc;
  --text-light: #1e293b;
  --text-light-secondary: #64748b;
  --border-light: #e2e8f0;

  /* Dark Theme */
  --bg-dark: #0f172a;
  --bg-dark-secondary: #0b1220;
  --text-dark: #f8fafc;
  --text-dark-secondary: #cbd5e1;
  --border-dark: #2a2a2a;

  --blue: #38bdf8;
  --blue-dim: rgba(56, 189, 248, 0.10);

  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.10);

  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.10);

  --orange: #fb923c;
  --orange-dim: rgba(251, 146, 60, 0.10);
}


/* ========================================
   BASE STYLES
   ======================================== */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-light) !important;
  color: var(--text-light) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark body {
  background-color: var(--bg-dark) !important;
  color: var(--text-dark) !important;
}


/* ========================================
   PAGE TRANSITIONS
   ======================================== */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

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


/* ========================================
   HEADER
   ======================================== */
header {
  background-color: var(--bg-light) !important;
  border-color: var(--border-light) !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

html.dark header {
  background-color: var(--bg-dark) !important;
  border-color: var(--border-dark) !important;
}

/* Header scroll states */
header.header-scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

html.dark header.header-scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

header.header-hidden {
  transform: translateY(-100%);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

html.dark .nav-link {
  color: var(--text-dark) !important;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--bg-light-secondary) !important;
  text-decoration: none;
}

html.dark .nav-link:hover,
html.dark .nav-link.active {
  background-color: var(--bg-dark-secondary) !important;
}


/* ========================================
   MOBILE NAVIGATION
   ======================================== */
.mobile-link {
  padding: 0.75rem 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.mobile-link:hover,
.mobile-link.active {
  background-color: var(--bg-light-secondary);
}

html.dark .mobile-link:hover,
html.dark .mobile-link.active {
  background-color: var(--bg-dark-secondary);
}

#mobile-menu {
  background-color: var(--bg-light) !important;
  border-color: var(--border-light) !important;
}

html.dark #mobile-menu {
  background-color: var(--bg-dark) !important;
  border-color: var(--border-dark) !important;
}


/* ========================================
   MOBILE MENU & BACK BUTTONS
   ======================================== */
#mobile-menu-button,
#mobile-back-button {
  color: var(--text-light) !important;
  background: transparent !important;
  border: none !important;
  transition: all 0.2s ease;
}

html.dark #mobile-menu-button,
html.dark #mobile-back-button {
  color: var(--text-dark) !important;
}

#mobile-menu-button:hover,
#mobile-back-button:hover {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
}

html.dark #mobile-menu-button:hover,
html.dark #mobile-back-button:hover {
  background-color: #2a2a2a !important;
  color: #f9fafb !important;
}

#mobile-menu-button .material-symbols-rounded,
#mobile-back-button .material-symbols-rounded {
  color: inherit !important;
}


/* ========================================
   BACK BUTTON
   ======================================== */
#back-button-desktop,
#back-button-mobile {
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
}

#back-button-desktop {
  color: var(--accent) !important;
}

html.dark #back-button-desktop {
  color: var(--accent) !important;
}

#back-button-desktop:hover {
  background-color: var(--bg-light-secondary) !important;
}

html.dark #back-button-desktop:hover {
  background-color: var(--bg-dark-secondary) !important;
}

/* Theme Toggle Button Styling */
#theme-toggle,
#theme-toggle-mobile {
  color: var(--text-light) !important;
  background: transparent !important;
  border: 1px solid var(--border-light) !important;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

html.dark #theme-toggle,
html.dark #theme-toggle-mobile {
  color: var(--text-dark) !important;
  border-color: var(--border-dark) !important;
}

#theme-toggle:hover,
#theme-toggle-mobile:hover {
  background-color: var(--bg-light-secondary) !important;
  border-color: var(--accent) !important;
  color: var(--text-light) !important;
}

html.dark #theme-toggle:hover,
html.dark #theme-toggle-mobile:hover {
  background-color: var(--bg-dark-secondary) !important;
  border-color: var(--accent) !important;
  color: var(--text-dark) !important;
}

#theme-toggle #theme-icon,
#theme-toggle #theme-text,
#theme-toggle-mobile #theme-icon-mobile,
#theme-toggle-mobile #theme-text-mobile {
  color: inherit !important;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 1rem;
  padding: 1rem 0;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.2;
}

html.dark .hero-title {
  color: var(--text-dark);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-light-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

html.dark .hero-description {
  color: var(--text-dark-secondary);
}

/* Content Containers */
.content-card {
  background-color: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

html.dark .content-card {
  background-color: var(--bg-dark-secondary);
  border-color: var(--border-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
}


/* ========================================
   FOOTER
   ======================================== */
footer {
  background-color: var(--bg-light) !important;
  border-color: var(--border-light) !important;
}

html.dark footer {
  background-color: var(--bg-dark) !important;
  border-color: var(--border-dark) !important;
}