/* Google Fonts — Inter loaded via <link> in layout head */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --accent:      #23476F;
  --accent-soft: #E9EEF5;
  --ink:         #16202C;
  --bg:          #FFFFFF;
  --card:        #FFFFFF;
  --line:        #E8ECF1;
  --muted:       #5A6470;
  --radius:      14px;
  --radius-sm:   10px;
}

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

/* ── Base ─────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Header ───────────────────────────────────────────── */
.blog-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.blog-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.blog-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.blog-icon-wrap {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.blog-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.blog-nav a:hover { color: var(--ink); }

.blog-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
  color: var(--ink);
}

/* ── Shared wrappers ──────────────────────────────────── */
.blog-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog-wrap--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section header row ───────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 40px 0 20px;
}

.section-heading {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.section-all:hover { opacity: 0.75; }

/* ── Shared thumbnail wrapper ─────────────────────────── */
.thumb-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--accent-soft);
}

.thumb-wrap--16-9 { padding-top: 56.25%; }
.thumb-wrap--3-2  { padding-top: 66.67%; }

.thumb-wrap > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.thumb-wrap > img { object-fit: cover; }

/* ── Shared badge & meta accents ─────────────────────── */
.post-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 5px;
}

.meta-time {
  color: var(--accent);
  font-weight: 600;
}

/* ── Featured 2-up row ────────────────────────────────── */
.featured-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.featured-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.featured-card:hover,
.featured-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(35,71,111,0.09);
}

.featured-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.featured-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.featured-card__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 8px 0 8px;
}

.featured-card__excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.featured-card__meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

/* ── Posts grid ───────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 52px;
}

.grid-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.grid-card:hover,
.grid-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 3px 12px rgba(35,71,111,0.07);
}

.grid-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.grid-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.grid-card__title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin: 8px 0 auto;
  padding-bottom: 10px;
}

.grid-card__meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: auto;
}

/* ── Post show ────────────────────────────────────────── */
.post {
  padding: 36px 0 64px;
}

.post-header-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.post__title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 10px 0 10px;
}

.post__meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s;
}

.back-link:hover { color: var(--ink); }

/* ── Author box ───────────────────────────────────────── */
.author-box {
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 32px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.author-bio {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Article body ─────────────────────────────────────── */
.post-body {
  font-size: 16.5px;
  line-height: 1.77;
  color: var(--ink);
}

.post-body h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 42px 0 12px;
  line-height: 1.3;
}

.post-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 10px;
  line-height: 1.35;
}

.post-body p { margin-bottom: 20px; }

.post-body ul,
.post-body ol {
  margin: 0 0 20px 22px;
}

.post-body li { margin-bottom: 7px; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(35,71,111,0.3);
  text-underline-offset: 3px;
}

.post-body a:hover { text-decoration-color: var(--accent); }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 6px 0 6px 20px;
  color: var(--muted);
  font-style: italic;
}

/* Disclosure fine print — rendered at the bottom of the post */
.post-disclosure {
  margin-top: 40px;
}

.post-disclosure__rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 14px;
}

.post-disclosure__text {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
  opacity: 0.75;
}

/* ── Email signup ─────────────────────────────────────── */
.email-signup {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin: 40px 0;
}

.email-signup__icon {
  font-size: 20px;
  margin-bottom: 10px;
}

.email-signup__headline {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}

.email-signup__sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.email-signup__form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.email-signup__input {
  flex: 1;
  min-width: 220px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.email-signup__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35,71,111,0.1);
}

.email-signup__input::placeholder { color: var(--muted); }

.email-signup__btn {
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  letter-spacing: 0.01em;
}

.email-signup__btn:hover { opacity: 0.88; }

.email-signup__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.email-signup__zero-spam {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.email-signup__micro {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}

.email-signup__micro a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── About page ───────────────────────────────────────── */
.about-page {
  padding-top: 48px;
}

.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 40px;
}

.about-hero__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-hero__name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.about-hero__subtitle {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.about-lead {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .about-hero__name   { font-size: 22px; }
  .about-lead         { font-size: 17px; }
}

/* ── Footer ───────────────────────────────────────────── */
.blog-footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.blog-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.blog-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.blog-footer a:hover { color: var(--ink); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .blog-header__inner { padding: 12px 16px; gap: 12px; }
  .blog-nav { gap: 16px; }
  .blog-wrap        { padding: 0 16px; }
  .blog-wrap--wide  { padding: 0 16px; }
  .featured-row     { grid-template-columns: 1fr; }
  .posts-grid       { grid-template-columns: 1fr; }
  .section-header   { padding: 28px 0 16px; }
  .post__title      { font-size: 24px; }
  .email-signup     { padding: 22px 16px; }
  .email-signup__form      { flex-direction: column; }
  .email-signup__btn       { width: 100%; text-align: center; }
}
