/* ==========================================================================
   Global — Variables, Reset, Typography, Theme System
   ========================================================================== */

/* --- Theme Variables --- */
:root {
  /* Dark theme (default) */
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --border: #262626;
  --shadow: rgba(0, 0, 0, 0.4);

  /* Brand accents (shared) */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-ocean: #06b6d4;
  --accent-ocean-hover: #0891b2;
  --accent-warm: #f59e0b;
  --accent-warm-hover: #d97706;
  --accent-green: #10b981;
  --accent-green-hover: #059669;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
  --section-padding: 6rem 1.5rem;
  --border-radius: 12px;
  --border-radius-sm: 8px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding);
}

.section__header {
  text-align: center;
  margin-bottom: 4rem;
}

.section__title {
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Scroll Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Selection --- */
::selection {
  background-color: var(--accent-blue);
  color: #fff;
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* --- Skip to content (a11y) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-blue);
  color: #fff;
  border-radius: var(--border-radius-sm);
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}
