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

:root {
  --text: #333;
  --text-light: #666;
  --link: #0073aa;
  --link-hover: #005177;
  --bg: #f7f6f3;
  --border: #ddd;
  --max-width: 720px;
}

html { font-size: 17px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header-image {
  width: 100%;
  max-height: 320px;
  overflow: hidden;
}
.header-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.site-branding {
  text-align: center;
  padding: 2rem 1rem 0.5rem;
}
.site-title {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.site-title a {
  color: var(--text);
  text-decoration: none;
}
.site-title a:hover { color: var(--link); }
.site-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Navigation */
nav {
  text-align: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.menu-toggle-checkbox { display: none; }
.menu-toggle-label { display: none; cursor: pointer; font-size: 1rem; }
.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--link); }

/* Mobile nav */
@media (max-width: 600px) {
  .menu-toggle-label {
    display: block;
    color: var(--text-light);
    padding: 0.5rem;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
  }
  .menu-toggle-checkbox:checked ~ .nav-menu { display: flex; }
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

article h1 {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

/* Prose */
article p { margin-bottom: 1rem; text-align: justify; }
article h2 { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.75rem; }
article h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.75rem; }

article a { color: var(--link); text-decoration: none; }
article a:hover { color: var(--link-hover); text-decoration: underline; }

article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

article blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

article ul, article ol {
  margin: 0.5rem 0 1rem 1.5rem;
}
article li { margin-bottom: 0.35rem; }

article em { font-style: italic; }
article strong { font-weight: 600; }

/* Footer */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
}
footer p { margin-bottom: 0.5rem; }
