@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Color System */
  --bg-primary: #060B16;
  --bg-secondary: #0A1120;
  --bg-tertiary: #0F172A;
  --bg-card: rgba(15, 23, 42, 0.6);
  --accent-gold: #C4973A;
  --accent-gold-dim: #8A6A28;
  --accent-gold-glow: #E8B84B;
  --accent-blue: #3B82F6;
  --accent-blue-dim: rgba(59, 130, 246, 0.15);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-gold: rgba(196, 151, 58, 0.25);
  --glow-gold: rgba(196, 151, 58, 0.08);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-headline: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Type Scale */
  --text-xs: 0.6875rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;
  --text-5xl: 4.5rem;

  /* Spacing */
  --space-section: 120px;
  --space-inner: 64px;
  --max-width: 1120px;
  --gutter: 48px;
  --gutter-mobile: 20px;
  --nav-height: 72px;
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  position: relative;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(196, 151, 58, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
}

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

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

h4 {
  font-size: var(--text-xl);
}

p {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-gold-glow);
}

ul,
ol {
  list-style: none;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

section {
  padding: var(--space-section) 0;
  position: relative;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --space-section: 80px;
    --space-inner: 40px;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.5rem;
  }

  .container {
    padding: 0 var(--gutter-mobile);
  }
}

/* ==================== LIGHT MODE ==================== */
[data-theme="light"] {
  --bg-primary: #FAFBFC;
  --bg-secondary: #F1F3F5;
  --bg-tertiary: #E9ECEF;
  --bg-card: rgba(255, 255, 255, 0.8);
  --accent-gold: #B08825;
  --accent-gold-dim: #C9A84C;
  --accent-gold-glow: #9A7520;
  --accent-blue: #2563EB;
  --accent-blue-dim: rgba(37, 99, 235, 0.1);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-gold: rgba(176, 136, 37, 0.3);
  --glow-gold: rgba(176, 136, 37, 0.06);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37, 99, 235, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(176, 136, 37, 0.03) 0%, transparent 50%);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Show correct icon */
.theme-toggle .icon-moon {
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

/* Transition for theme switching */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}