/* Base styles for dark theme horizontal gallery */

/* CSS Custom Properties for Dark Theme */
:root {
  /* Dark Theme Colors */
  --bg-primary: #121212;
  /* Main dark background */
  --bg-secondary: #1e1e1e;
  /* Slightly lighter dark */
  --bg-tertiary: #2d2d2d;
  /* Card/container backgrounds */

  /* Text Colors */
  --text-primary: #ffffff;
  /* Main text */
  --text-secondary: #f0f0f0;
  /* Secondary text */
  --text-muted: #b3b3b3;
  /* Muted text */

  /* Link and Accent Colors */
  --accent-primary: #4fc3f7;
  /* Light blue for links */
  --accent-hover: #29b6f6;
  /* Darker blue for hover */
  --accent-active: #0288d1;
  /* Even darker for active */

  /* Status Colors */
  --success: #4caf50;
  /* Success/loaded state */
  --error: #f44336;
  /* Error state */
  --warning: #ff9800;
  /* Warning state */

  /* Focus and Interactive */
  --focus-color: #81c784;
  /* Bright green for focus */
  --focus-shadow: 0 0 0 2px var(--focus-color);

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

  /* Typography - Roboto Mono Nerd Font */
  --font-family: 'Roboto Mono', 'RobotoMono Nerd Font', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Consolas', monospace;
  --font-size-xs: 0.7rem;
  --font-size-sm: 1rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 1.75rem;

  /* Border radius */
  --border-radius: 0.375rem;
  --border-radius-lg: 0.5rem;
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;

  /* Prevent horizontal scroll on body */
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  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);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

/* Links */
a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:active {
  color: var(--accent-active);
}

/* Focus indicators for accessibility (WCAG compliant) */
a:focus,
button:focus,
input:focus,
[tabindex]:focus {
  outline: none;
  box-shadow: var(--focus-shadow);
  border-radius: var(--border-radius);
}

/* Button base styles */
button {
  font-family: inherit;
  font-size: var(--font-size-base);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
  border-radius: var(--border-radius);
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  /* Touch-friendly minimum */
}

button:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

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

/* Selection */
::selection {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --accent-primary: #ffffff;
    --focus-color: #ffffff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
