/* 1. Modern Reset & System Fonts */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
}

:root {
  /* Adapts to system Dark/Light mode automatically */
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #1a1a1a);
  --text: light-dark(#222222, #eeeeee);
  --accent: #0066cc;
  --faded: light-dark(#666, #aaa);
  
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  interpolate-size: allow-keywords; /* Modern 2026 feature for animations */
}

/* 2. Layout */
body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* 3. Typography */
h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  text-wrap: balance; /* Prevents awkward single-word lines */
  margin-bottom: 1.5rem;
}

header {
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--faded);
  padding-bottom: 1rem;
  margin-bottom: 3rem;
}

/* 4. Main Content Area */
main {
  padding: 1rem 0;
}

/* 5. Footer & Links */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--faded);
  font-size: 0.9rem;
  color: var(--faded);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.7;
}

/* 6. Responsive Tweaks */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }
  h1 {
    font-size: 1.8rem;
  }
}
