/* ----------------------------------------------------------
   Root variables
---------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --bg: #f7f6f2;
  --bg-alt: #efede7;
  --bg-dark: #171614;
  --bg-dark-alt: #22211f;

  --text: #26231c;
  --text-muted: #6e6b64;
  --text-dark: #d4d2cf;

  --accent: #01696f;
  --border: #d5d1c9;

  --radius: 8px;
  --max-width: 64rem;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark);
    --bg-alt: var(--bg-dark-alt);
    --text: var(--text-dark);
    --text-muted: #8a8884;
    --border: #393734;
    --accent: #4f98a3;
  }
}

/* ----------------------------------------------------------
   Global resets & base elements
---------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* ----------------------------------------------------------
   Layout wrappers
---------------------------------------------------------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem;
}

main {
  padding-bottom: 3rem;
}

section {
  margin-top: 2.5rem;
}

/* ----------------------------------------------------------
   Header
---------------------------------------------------------- */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.site-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.site-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   Typography
---------------------------------------------------------- */
h1, h2, h3 {
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }

p {
  margin: 0 0 0.85rem;
  max-width: 70ch;
}

/* ----------------------------------------------------------
   Hero section
---------------------------------------------------------- */
.hero {
  padding-top: 1.5rem;
}

.hero-intro {
  max-width: 48rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ----------------------------------------------------------
   Buttons
---------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 600;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

/* ----------------------------------------------------------
   Grid layout
---------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ----------------------------------------------------------
   Cards
---------------------------------------------------------- */
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card small {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ----------------------------------------------------------
   Lists & metadata
---------------------------------------------------------- */
.meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.details {
  margin: 0.75rem 0;
  padding-left: 1.1rem;
}

.details li {
  margin-bottom: 0.35rem;
}

/* ----------------------------------------------------------
   Code blocks
---------------------------------------------------------- */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  code {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* ----------------------------------------------------------
   Footer
---------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
