/* Base CSS - General styling and variables */

:root {
  /* Dark mode (default) */
  --color-background: #0f0f0f;
  --color-text: #f0f0f0;
  --color-primary: #f0a030;
  --color-secondary: #000000;
  --color-accent: #f0a030;
  --color-gradient-start: #f0a030;
  --color-gradient-end: #f5c060;
  --color-text-muted: #a0a0a0;

  --color-card-bg: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-read-section: rgba(255, 255, 255, 0.03);
  --color-tag: rgba(255, 255, 255, 0.06);
  --color-shadow: rgba(0, 0, 0, 0.15);
  --color-shadow-hover: rgba(0, 0, 0, 0.25);
  --color-primary-subtle: rgba(240, 160, 48, 0.12);
  --color-primary-border: rgba(240, 160, 48, 0.2);

  /* Typography variables */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Space Grotesk', sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --font-serif: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing variables */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  scroll-behavior: smooth;
}

html,
body {
  padding-top: 0;
  overscroll-behavior: auto;
  background: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw; /* Ensure content doesn't exceed viewport width */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Responsive utilities */
@media screen and (max-width: 960px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 6rem;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 5rem;
  }
}

@media screen and (max-width: 480px) {
  :root {
    --spacing-sm: 0.75rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
  }
}
