:root {
  --bg: #eeeeee;
  --surface: #ffffff;
  --text: #333333;
  --muted: #666666;
  --brand: #333333;
  --link: #009eb8;
  --link-hover: #007a8f;
  --header-bg: #f3f3f3;
  --radius: 10px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand__title a {
  color: #555;
  text-decoration: none;
}

.brand__tagline {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.site-nav a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a[aria-current="page"] {
  color: var(--link);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.site-main {
  padding-bottom: 3rem;
}

.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: #555;
  font-weight: 600;
}

.hero__lead {
  margin: 0;
  font-size: 1.15rem;
  max-width: 42rem;
}

.hero__sub {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.posts-section {
  padding: 1rem 0 2rem;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.post-card__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.post-card__title a {
  color: var(--text);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--link);
}

.post-card__date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.98rem;
  color: #444;
}

.post-card__link {
  font-weight: 600;
  text-decoration: none;
}

.post {
  padding: 2rem 0 1rem;
}

.post__header {
  margin-bottom: 1.5rem;
}

.post-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.post__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.2;
  color: #333;
}

.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.prose {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
  box-shadow: var(--shadow);
}

.prose p {
  margin: 0 0 1rem;
}

.prose .archive-note {
  padding: 1rem 1.1rem;
  border-left: 4px solid #b38f00;
  background: #fff9e8;
  border-radius: 6px;
}

.post-back {
  margin: 1.5rem 0 0;
}

.site-footer {
  background: var(--header-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 2.5rem 0 1rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.site-footer h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.profile__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.profile__card img {
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.06);
}

.profile__card p {
  margin: 0;
}

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.35rem);
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
    min-width: 12rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-header__inner {
    position: relative;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .profile__card {
    grid-template-columns: 1fr;
  }
}
