:root {
  --deep-navy: #0a1f38;
  --pale-amber: #d69a2d;
  --cloud-white: #f4f5f7;
  --electric-blue: #38bdf8;
  --rich-brown: #5c4033;

  --bg: #ffffff;
  --text: #10263f;
  --muted: #52657a;
  --line: #d9e2ec;
  --link: #005ea5;
  --link-hover: #004a82;
  --header-bg: #ffffff;
  --header-text: #10263f;
  --toggle-bg: #ffffff;
  --toggle-text: #10263f;
}

[data-theme="dark"] {
  --bg: #0d1725;
  --text: #e7eef7;
  --muted: #b2c3d6;
  --line: #274260;
  --link: #7ccffb;
  --link-hover: #a8e1fb;
  --header-bg: #0d1725;
  --header-text: #e7eef7;
  --toggle-bg: #12243a;
  --toggle-text: #e7eef7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

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

.container {
  width: min(860px, 92%);
  margin: 0 auto;
}

.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.nav-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.menu-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.36rem 0.7rem;
  font-size: 0.9rem;
}

.menu-cta:hover {
  border-color: var(--electric-blue);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 2.3rem;
  height: 2.3rem;
  background: var(--toggle-bg);
  color: var(--toggle-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--electric-blue);
}

#theme-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--electric-blue);
}

.social-links svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.social-logo {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.social-logo--mvp {
  border-radius: 3px;
}

.hero {
  padding: 1.1rem 0 1.6rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pale-amber);
}

.hero h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.35rem, 2.9vw, 2rem);
  line-height: 1.25;
}

.tagline {
  margin: 0;
  max-width: 65ch;
  color: var(--muted);
}

.content {
  padding: 1.3rem 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
  color: var(--text);
}

code,
pre {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
}

pre {
  background: #0f2948;
  color: #f2f7fc;
  padding: 0.9rem;
  border-radius: 0.4rem;
  overflow-x: auto;
}

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

.post-hero {
  margin: -0.5rem 0 1.5rem;
  border-radius: 0.6rem;
  overflow: hidden;
}

.post-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.6rem;
}

.post-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.summary-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.post-card {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.summary-card {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.summary-card:last-child {
  border-bottom: 1px solid var(--line);
}

.summary-card a {
  font-size: 1.12rem;
  font-weight: 700;
  text-decoration: none;
}

.summary-card p {
  margin: 0.35rem 0 0;
}

.post-card:last-child {
  border-bottom: 1px solid var(--line);
}

.post-card a {
  font-size: 1.03rem;
  font-weight: 700;
  text-decoration: none;
}

.post-card p {
  margin: 0.35rem 0 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
  padding: 0.9rem 0 1.6rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 1.8fr);
  align-items: start;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.92rem;
}

.analytics-disclaimer {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
  text-align: right;
}

.pagination-nav {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pagination-nav a {
  font-weight: 600;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 740px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-panel {
    width: 100%;
    align-items: flex-start;
  }

  .site-nav,
  .social-links {
    justify-content: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .analytics-disclaimer {
    text-align: left;
  }
}
