/* Global CSS - CSS Custom Properties and Base Styles */

:root {
  /* Colors */
  --color-primary: #ffd700;
  --color-secondary: #1a1a2e;
  --color-background: #0f0f1a;
  --color-surface: #16213e;
  --color-text: #ffffff;
  --color-text-muted: #a0a0a0;
  --color-success: #4caf50;
  --color-error: #f44336;
  --color-warning: #ff9800;
  --color-info: #2196f3;

  /* Typography */
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Global link styles */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #ffed4a;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-2xl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Main content container */
main {
  min-height: calc(100vh - 200px);
}

/* Hero section */
.hero {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  background: transparent;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.hero p {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
}

/* Content sections */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
}

/* Footer */
footer {
  background: var(--color-secondary);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  margin-top: var(--spacing-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* ========================================
   Sidebar Styling
   ======================================== */

/* Sidebar */
#sidebar {
  position: fixed;
  top: 4rem;
  left: 0;
  width: 12rem;
  height: calc(100vh - 4rem);
  z-index: 950;
  background-color: #21262d;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 300ms ease-in-out;
}

#sidebar.open {
  transform: translateX(0);
}

/* On desktop (768px+), sidebar starts open via JS adding .open class */
/* Toggling is handled by hamburger button on all screen sizes */

#sidebar nav {
  position: static;
  display: block;
  padding: 1rem 0;
  background: none;
  box-shadow: none;
  height: auto;
}

#sidebar a {
  display: block;
  padding: 0.75rem 1rem;
  color: #f0f6fc;
  text-decoration: none;
  font-weight: 500;
  transition: all 150ms ease;
}

#sidebar a:hover {
  background-color: rgba(255, 215, 0, 0.1);
  color: #ffd700;
}

/* Backdrop */
#sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 900;
  display: none;
  opacity: 0;
  transition: opacity 300ms ease;
}
