@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;600&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,300&family=Oxanium:wght@700;800&display=swap');

@import 'variables.css';
@import 'components/hamburger.css';
@import 'components/header.css';
@import 'components/footer.css';
@import 'components/hero.css';
@import 'components/card.css';
@import 'components/feed.css';
@import 'components/timeline.css';
@import 'components/article-hero.css';
@import 'components/share-sidebar.css';
@import 'components/lightbox.css';
@import 'components/404.css';
@import 'components/code.css';
@import 'components/progress-bar.css';

/* Base Styles */
html {
  font-size: 17px;
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.95;
  transition: background-color 0.2s, color 0.2s;
  position: relative;
}

/* Dot grid background (shared across all pages) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-matrix);
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(168, 85, 247, 0.07) 1px, transparent 1px);
  background-size: 30px 30px;
}

html.theme-light body::before {
  background-image: radial-gradient(circle, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
}

/* Typography */
h1 {
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

h2 {
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.1;
  margin: 2rem 0 1rem;
}

h3 {
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1.2;
  margin: 1.5rem 0 0.75rem;
}

h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  margin: 1rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent2);
}

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

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section layout helpers */
.section-header   { margin-bottom: 3rem; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

/* Scroll-reveal base states (used by scroll-reveal.js) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

main {
  min-height: calc(100vh - 200px);
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  margin-bottom: 1rem;
  overflow-x: auto;
}

pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

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

button:focus,
a:focus {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
