/*
 * 44BITS — central stylesheet (faithful to the legacy 44bits.io design).
 * Dark GitHub-style header, teal (#20c997) accent, dark footer, GitHub-blue
 * body links, 768px reading column with a 300px sticky TOC rail on wide screens,
 * Mac-window code blocks, condensed body typography.
 */
:root {
  --color-text: #24292e;
  --color-muted: #586069;
  --color-faint: #6a737d;
  --color-border: #e1e4e8;
  --color-border-soft: #eaecef;
  --color-subtle: #f6f8fa;
  --color-background: #ffffff;
  --color-link: #0366d6;
  --color-accent: #20c997;
  --color-accent-dark: #1ba882;
  --color-header: #24292e;
  --color-footer: #1a1a1a;
  --content-width: 768px;
  /* Exactly the legacy 44bits stack — same font resolution (incl. Korean fallback). */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", SFMono-Regular, Consolas,
    "Liberation Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===================== Header (dark brand bar) ===================== */
.site-header {
  background-color: var(--color-header);
  color: #fff;
  padding: 12px 0;
  margin-bottom: 40px;
}
.site-header .header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.site-header .site-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
.site-header .site-title:hover { text-decoration: none; color: #fff; }
.site-header .site-nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.site-header .site-nav a { color: rgba(255, 255, 255, 0.8); font-size: 14px; }
.site-header .site-nav a:hover { color: #fff; text-decoration: none; }

/* ===================== Shared column ===================== */
.site-main { max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }

/* ===================== Home / Posts index ===================== */
.home-hero { margin: 8px 0 28px; }
.home-hero h1 { font-size: 28px; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 8px; }
.home-hero p { color: var(--color-muted); font-size: 16px; }
.section-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-muted); font-weight: 700; margin: 28px 0 20px;
}

/* Date-badge cards (signature 44bits list item) */
.post-card-link { display: block; text-decoration: none !important; color: inherit; margin-bottom: 28px; }
.post-card-link:last-child { margin-bottom: 0; }
.post-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid #e5e7eb; border-radius: 12px; background-color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.post-card.old-post, .post-card.old-post .post-card-content { background-color: #f9fafb; }
.post-card-color-strip {
  display: flex; height: 50px;
  background-color: var(--card-color, #d5e0e8);
  align-items: center; padding: 0 20px;
}
.post-card-color-strip .post-card-date {
  display: flex; align-items: center; gap: 8px;
  color: rgba(0, 0, 0, 0.7); font-size: 13px; font-weight: 500;
}
.post-card-content { flex: 1; padding: 24px; }
.post-card-link:hover .post-card {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}
.post-card-title {
  font-size: 20px; font-weight: 600; line-height: 1.4;
  margin: 0 0 10px 0; color: #0d0d0d; word-break: keep-all;
}
.post-card-meta { font-size: 14px; color: #6b7280; line-height: 1.6; }
.post-card-meta .post-card-time { color: #6b7280; }
.post-card-meta .post-author { color: #1f2937; font-weight: 600; margin-right: 10px; }
.post-card-meta .post-excerpt { color: #4b5563; display: block; margin-top: 6px; }
.post-card-meta .meta-separator { margin: 0 6px; color: #9ca3af; }

@media (min-width: 768px) {
  .post-card { flex-direction: row; }
  .post-card-color-strip { width: 20%; height: auto; padding: 0; justify-content: center; }
  .post-card-color-strip .post-card-date { flex-direction: column; gap: 0; text-align: center; }
  .post-card-color-strip .date-day { font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
  .post-card-color-strip .date-month { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 6px; }
  .post-card-color-strip .date-year { font-size: 12px; font-weight: 500; opacity: 0.7; }
  .post-card-content { padding: 28px; }
}

/* ===================== Post page grid (content + TOC rail) ===================== */
.post-grid { display: block; }
.post-main { max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }
.post-rail { display: none; }

.post { margin-bottom: 60px; }
.post-header {
  margin-top: 20px; margin-bottom: 40px;
  padding-bottom: 20px; border-bottom: 1px solid var(--color-border);
}
.post-title {
  font-size: 32px; font-weight: 600; line-height: 1.25;
  margin-bottom: 8px; color: var(--color-text); word-break: keep-all;
}
.post-meta { font-size: 14px; color: var(--color-muted); }
.post-meta a { color: var(--color-muted); }
.post-meta a:hover { color: var(--color-link); }
.post-meta .meta-separator { margin: 0 8px; }
.post-meta .post-author { font-weight: 600; color: #1f2937; }

/* ===================== Post content ===================== */
.post-content { font-size: 16px; line-height: 1.7; color: var(--color-text); overflow-wrap: break-word; }
/* 긴 URL/토큰(예: 본문 속 raw 링크)이 안 끊겨 모바일에서 가로 스크롤 유발하는 것 방지.
   pre/code 는 white-space: pre 라 영향 없음. */
.post-content a { overflow-wrap: break-word; word-break: break-word; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  margin-top: 48px; margin-bottom: 16px; font-weight: 600;
  line-height: 1.25; word-break: keep-all;
}
.post-content h1 { font-size: 1.76em; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-soft); }
.post-content h2 { font-size: 1.32em; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-soft); }
.post-content h3 { font-size: 1.1em; }
.post-content h4 { font-size: 0.88em; }
.post-content h5 { font-size: 0.77em; }
.post-content h6 { font-size: 0.75em; color: var(--color-faint); }

@media (min-width: 768px) {
  .post-content h2 { font-size: 1.452em; }
  .post-content h3 { font-size: 1.3em; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-soft); }
  .post-content h4 { font-size: 1.1em; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-soft); }
}

.post-content p {
  margin-bottom: 18px; font-size: 1.1em; line-height: 2.2rem;
  letter-spacing: -0.02em; font-kerning: normal; font-stretch: 85%;
  text-justify: inter-character;
}
@media (min-width: 768px) { .post-content p { word-break: keep-all; } }
@media (max-width: 767px) { .post-content p { font-size: 1.012em; line-height: 2.05rem; } }

.post-content blockquote {
  padding: 0 1em; color: var(--color-faint);
  border-left: 0.25em solid #dfe2e5; margin: 0 0 16px 0;
}
.post-content blockquote > :first-child { margin-top: 0; }
.post-content blockquote > :last-child { margin-bottom: 0; }

.post-content ul, .post-content ol { padding-left: 2em; margin-bottom: 16px; }
.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }
.post-content ul ul { list-style-type: circle; }
.post-content li { margin-bottom: 4px; }
.post-content li + li { margin-top: 0.25em; }

.post-content sup { color: var(--color-faint); font-size: 0.72em; }

/* Inline code */
.post-content code {
  padding: 0.2em 0.4em; margin: 0; font-size: 85%;
  background-color: rgba(27, 31, 35, 0.05); border-radius: 3px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* Code blocks — Mac window style */
.post-content pre {
  position: relative; overflow: hidden; font-size: 85%; line-height: 1.45;
  background-color: var(--color-subtle); border-radius: 8px;
  margin: 1.25rem auto; border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.post-content pre code {
  display: block; padding: 4rem 1.5rem 2rem; margin: 0; overflow-x: auto;
  line-height: 1.6; word-wrap: normal; background-color: transparent;
  border: 0; white-space: pre; font-family: var(--font-mono);
  font-size: 0.875rem; color: var(--color-text);
}
.post-content pre::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5rem;
  background: #e5e7eb; border-bottom: 1px solid #d1d5db;
}
.post-content pre::after {
  content: ""; position: absolute; top: 0.75rem; left: 1rem;
  width: 0.75rem; height: 0.75rem; border-radius: 50%;
  background: #ef4444; box-shadow: 1.25rem 0 0 #eab308, 2.5rem 0 0 #22c55e;
}
@media (max-width: 767px) {
  .post-content pre { margin: 1.25rem 0; font-size: 80%; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
  .post-content pre code { padding: 1rem 0.875rem; font-size: 0.8125rem; }
  .post-content pre::before, .post-content pre::after { display: none; }
  /* 모바일: 검정 헤더와 글 제목 사이 공백 축소 (40+20=60px -> 20+8=28px) */
  .site-header { margin-bottom: 20px; }
  .post-header { margin-top: 8px; }
}

/* Syntax highlighting — Pandoc/skylighting tokens, GitHub-light palette */
.post-content .sourceCode { background: transparent; }
.post-content code span.kw, .post-content code span.cf { color: #d73a49; }   /* keyword / control flow */
.post-content code span.dt { color: #e36209; }                              /* data type */
.post-content code span.dv, .post-content code span.bn, .post-content code span.fl { color: #005cc5; } /* numbers */
.post-content code span.st, .post-content code span.ch, .post-content code span.vs { color: #032f62; } /* strings */
.post-content code span.co { color: #6a737d; font-style: italic; }          /* comment */
.post-content code span.fu { color: #6f42c1; }                              /* function */
.post-content code span.bu { color: #e36209; }                              /* builtin */
.post-content code span.va { color: #e36209; }                              /* variable */
.post-content code span.at { color: #e36209; }                              /* attribute */
.post-content code span.pp { color: #d73a49; }                              /* preprocessor */
.post-content code span.op { color: var(--color-text); }                    /* operator */
.post-content code span.ot { color: #005cc5; }                              /* other / keyword-ish */
.post-content code span.ex { color: #6f42c1; }                              /* extension */
.post-content code span.er { color: #b31d28; }                              /* error */
.post-content code span.cn { color: #005cc5; }                              /* constant */

/* Tables — GitHub style */
.post-content table { display: block; width: 100%; overflow: auto; margin-bottom: 16px; border-collapse: collapse; }
.post-content table th { font-weight: 600; padding: 6px 13px; border: 1px solid #dfe2e5; background-color: var(--color-subtle); }
.post-content table td { padding: 6px 13px; border: 1px solid #dfe2e5; }
.post-content table tr { background-color: #fff; border-top: 1px solid #c6cbd1; }
.post-content table tr:nth-child(2n) { background-color: var(--color-subtle); }

.post-content img { max-width: 100%; box-sizing: content-box; background-color: #fff; }
.post-content hr { height: 0.25em; padding: 0; margin: 24px 0; background-color: var(--color-border); border: 0; }
.post-content figure { margin: 16px 0; text-align: center; }
.post-content figure img { display: inline-block; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border-radius: 4px; }
.post-content figcaption { font-size: 14px; color: var(--color-muted); margin-top: 8px; text-align: center; }
/* 원본 유실된 이미지 자리 — 캡션 텍스트만 노트로 표시(설명 보존). 자세한 내력: GitHub #109 */
.post-content figure.missing-image { margin: 1.25rem 0; }
.post-content figure.missing-image figcaption {
  margin: 0; text-align: left; font-size: 0.9em; color: var(--color-faint);
  padding: 0.7rem 0.95rem; background: var(--color-subtle);
  border: 1px dashed var(--color-border); border-radius: 6px;
}
.post-content iframe { max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 20px 0; border-radius: 6px; }

/* Legacy helpers: sidenote */
.post-content .sidenote {
  margin: 12px 0; padding: 10px 14px; background: #fffdf3;
  border-radius: 4px; color: #4a5568; font-size: 0.96em;
}
.post-content .sidenote p { font-size: inherit; line-height: inherit; }
.post-content .sidenote p:last-child { margin-bottom: 0; }
.post-content .sidenote .sidenote-symbol { margin-right: 6px; font-weight: 600; color: #b08900; }

/* Legacy helpers: admonition / callout */
.post-content .admonitionblock {
  margin: 28px 0; border: 1px solid #e5e7eb; border-left: 6px solid #9ca3af;
  background: var(--color-subtle); border-radius: 6px; padding: 14px 16px 0; font-size: 0.95em;
}
.post-content .admonitionblock .content { padding: 14px 16px 0; }
.post-content .admonitionblock p { font-size: inherit; line-height: inherit; }
.post-content .admonitionblock .content .title { font-weight: 800; font-size: 1.3em; margin-bottom: 8px; color: #1f2937; }
.post-content .admonitionblock.note { border-left-color: #2b6cb0; background: #ebf5ff; }
.post-content .admonitionblock.tip { border-left-color: #16a34a; background: #ecfdf5; }
.post-content .admonitionblock.warning, .post-content .admonitionblock.important { border-left-color: #f59e0b; background: #fff7ed; }

/* Inline post-card embeds inside content */
.post-content .post-card-wrapper { margin: 20px 0; }
.post-content .post-card-inline {
  padding: 16px 20px; border: 1px solid var(--color-border);
  border-radius: 8px; background: var(--color-subtle); transition: all 0.2s ease;
}
.post-content .post-card-link:hover .post-card-inline {
  border-color: #d1d5da; background: #fff; box-shadow: 0 1px 3px rgba(27, 31, 35, 0.12);
}
.post-content .post-card-inline-title { margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: var(--color-text); line-height: 1.3; }
.post-content .post-card-inline-meta { font-size: 14px; color: var(--color-muted); line-height: 1.5; }
.post-content .post-box { display: none; }

/* ===================== Language switch (translated posts) ===================== */
.lang-switch { display: flex; gap: 8px; margin: 24px 0 0; }
.lang-switch a {
  font-size: 13px; font-weight: 500; padding: 4px 14px; border-radius: 16px;
  border: 1px solid var(--color-border); color: var(--color-muted); background: #fff; line-height: 1.6;
}
.lang-switch a:hover { border-color: var(--color-border-soft); color: var(--color-text); text-decoration: none; }
.lang-switch a.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }

/* ===================== Comments (utterances) ===================== */
.post-comments { margin-top: 4rem; padding-top: 2rem; }
.comments-container { max-width: 100%; }

/* ===================== Table of contents ===================== */
.toc-wrapper { margin: 1.75rem 0 2.25rem; }
.toc-inline { display: block; padding: 1.25rem; background: #f8f9fa; border-radius: 8px; border: 1px solid #e9ecef; }
.toc-rail { display: none; }
.toc-title { font-size: 1.21rem; font-weight: 600; margin-bottom: 1rem; color: #343a40; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 0.4rem; line-height: 1.4; font-size: 1.01em; }
.toc-list li.toc-h3 { margin-left: 1.5rem; }
.toc-list li.toc-h4 { margin-left: 3rem; }
.toc-list a { color: #495057; text-decoration: none; }
.toc-list a:hover { color: var(--color-link); text-decoration: underline; }

/* Wide screens: two-column grid with sticky rail TOC */
@media (min-width: 1198px) {
  .post-grid {
    display: grid; grid-template-columns: 1fr 738px 50px 300px 1fr;
    column-gap: 0; align-items: start;
  }
  .post-main { grid-column: 2; max-width: 738px; margin: 0; padding: 0; }
  .post-header { margin-bottom: 8px; padding-bottom: 0; border-bottom: none; }
  .toc-inline { display: none; }
  .post-rail {
    grid-column: 4; display: block; position: sticky; top: 80px;
    max-height: calc(100vh - 100px); overflow: auto;
    border-radius: 8px; background: #fafbfc; border: 1px solid #e7eaf0;
  }
  .post-rail-inner { padding: 16px 12px; }
  .toc-rail { display: block; }
  .toc-rail-header { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); margin: 2px 4px 6px; }
  .toc-rail-list { list-style: none; margin: 0; padding: 0 4px 4px; }
  .toc-rail-item { margin: 4px 0; }
  .toc-rail-item a { color: #495057; text-decoration: none; font-size: 14px; line-height: 1.4; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toc-rail-item a:hover { text-decoration: underline; white-space: normal; overflow: visible; background: #f0f3f7; padding: 2px 6px; margin: -2px -6px; border-radius: 4px; }
  .toc-rail-item.toc-h3 { padding-left: 14px; }
  .toc-rail-item.toc-h4 { padding-left: 28px; }
  /* Currently-read section (set by scroll-spy in site.js): blue bold, exactly as live. */
  .toc-rail-item.is-current a { color: #1e40af; font-weight: 600; }
}

/* ===================== Pagination ===================== */
.pagination-wrapper {
  margin: 40px 0 30px; display: flex; justify-content: space-between;
  align-items: center; padding: 0 20px;
}
.pagination-btn {
  padding: 10px 20px; text-decoration: none; color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: 6px; font-size: 14px;
  font-weight: 500; transition: all 0.2s; background-color: #fff; display: inline-block;
}
a.pagination-btn:hover { background-color: var(--color-subtle); border-color: #d1d5da; text-decoration: none; }
.pagination-btn.disabled { color: #959da5; cursor: not-allowed; opacity: 0.4; background-color: var(--color-subtle); }
.page-info { font-size: 14px; color: var(--color-muted); font-weight: 500; }

/* ===================== Featured slider (home) ===================== */
.featured-container {
  margin: 8px 0 48px; width: 100%; display: flex; align-items: stretch;
  background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); overflow: hidden;
}
.featured-nav-section { width: 5%; display: flex; align-items: center; justify-content: center; background: #fff; }
.featured-nav-section:hover { background: #f9fafb; }
/* flex:1 로 남는 공간을 모두 채움 — 글이 1개라 좌우 화살표(featured-nav-section)가
   없을 때 90%/80% 고정폭이면 왼쪽으로 쏠려 보이던 문제 해결. */
.featured-content-section { flex: 1; min-width: 0; overflow: hidden; }
.featured-slider { width: 100%; height: 100%; }
.featured-slides { display: flex; transition: transform 0.4s ease-in-out; will-change: transform; }
.featured-slide { flex: 0 0 100%; display: flex; flex-direction: row; height: 280px; text-decoration: none !important; }
.featured-slide:hover { text-decoration: none !important; }
.featured-image { width: 40%; background: #fff; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.featured-article-image { width: 100%; height: 100%; object-fit: contain; }
.featured-content { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.featured-content h3 { font-size: 24px; font-weight: 700; margin: 0 0 12px 0; color: #1a202c; line-height: 1.3; word-break: keep-all; }
.featured-content .featured-meta { font-size: 13px; color: #718096; margin-bottom: 16px; font-weight: 500; }
.featured-content .featured-description {
  font-size: 15px; color: #4a5568; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
}
.featured-nav {
  background: transparent; border: none; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.3s ease; font-size: 32px; color: #4a5568; padding: 0;
}
.featured-nav:hover { color: #2d3748; }
.featured-nav:disabled { opacity: 0.3; cursor: not-allowed; }
@media (max-width: 768px) {
  .featured-container { margin-bottom: 40px; }
  .featured-nav-section { width: 10%; }
  .featured-slide { flex-direction: column; height: auto; }
  .featured-image { width: 100%; height: 180px; }
  .featured-content { padding: 24px; }
  .featured-content h3 { font-size: 20px; }
  .featured-nav { font-size: 20px; }
}

/* ===================== Post author box (bottom of post) ===================== */
.post-author-box { margin-top: 4rem; border-radius: 8px; overflow: hidden; }
.post-author-box .author-profile-header { margin: 0; padding: 2rem; border-radius: 8px; }
.post-author-box .author-name { font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; color: #24292e; }
.post-author-box .author-bio { font-size: 1rem; color: #586069; margin-bottom: 1rem; line-height: 1.6; }
.post-author-box .author-bio p { margin: 0 0 0.5rem 0; line-height: 1.6; color: #586069; }
.post-author-box .author-bio p:last-child { margin-bottom: 0; }
.post-author-box .author-links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 0; }
.post-author-box .author-link {
  color: #24292e; text-decoration: none; font-size: 0.9rem; padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 6px; transition: all 0.2s ease;
}
.post-author-box .author-link:hover {
  color: #0366d6; background: rgba(255, 255, 255, 0.95); border-color: rgba(3, 102, 214, 0.3); transform: translateY(-1px);
}

/* ===================== Author page ===================== */
.posts-list { padding: 0 0 32px 0; }

.author-profile-header {
  padding: 24px 28px; margin: 8px 0 50px; border: 1px solid #e9ecef; border-radius: 12px;
  background: linear-gradient(135deg, hsl(210, 35%, 90%) 0%, hsl(340, 35%, 90%) 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  position: relative; overflow: hidden;
}
.author-profile-header::before {
  content: ""; position: absolute; top: 0; right: 0; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
  border-radius: 50%; transform: translate(100px, -100px);
}
.author-name { font-size: 32px; font-weight: 700; margin-bottom: 10px; color: #1a1a1a; position: relative; z-index: 1; }
.author-bio { font-size: 15px; line-height: 1.65; color: #374151; margin-bottom: 14px; position: relative; z-index: 1; }
.author-bio p { margin-bottom: 8px; }
.author-bio p:last-child { margin-bottom: 0; }
.author-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; position: relative; z-index: 1; }
.author-link {
  display: inline-block; padding: 6px 14px; border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 18px; font-size: 13px; color: #374151; text-decoration: none;
  transition: all 0.2s; background: rgba(255, 255, 255, 0.6); font-weight: 500;
}
.author-link:hover {
  background: rgba(255, 255, 255, 0.9); border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); color: #1f2937; text-decoration: none;
}
.author-stats {
  font-size: 13px; color: #4b5563; font-weight: 600; position: relative; z-index: 1;
  padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, 0.1); letter-spacing: 0.3px;
}
@media (max-width: 768px) {
  .author-profile-header { padding: 18px; margin-bottom: 40px; }
  .author-profile-header::before { width: 200px; height: 200px; transform: translate(50px, -50px); }
  .author-name { font-size: 26px; }
  .author-bio { font-size: 14px; margin-bottom: 12px; }
}

/* ===================== Footer (faithful to legacy 44bits) ===================== */
.site-footer { background-color: var(--color-footer); color: #e0e0e0; padding: 3rem 0 2rem; margin-top: 5rem; font-size: 0.95rem; }
.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.newsletter-section { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid #333; }
.newsletter-form { text-align: center; max-width: 600px; margin: 0 auto; }
.newsletter-input {
  display: inline-block; width: calc(100% - 120px); max-width: 400px;
  padding: 0.75rem 1rem; font-size: 0.95rem; border: 1px solid #444;
  background-color: #2a2a2a; color: #fff; border-radius: 4px 0 0 4px;
  transition: all 0.3s ease; vertical-align: top; line-height: 1.5; height: 48px;
}
.newsletter-input:focus { outline: none; border-color: var(--color-accent); background-color: #333; }
.newsletter-input::placeholder { color: #888; font-size: 0.9rem; }
.newsletter-submit {
  display: inline-block; width: 100px; padding: 0 1rem; font-size: 0.95rem;
  background-color: var(--color-accent); color: #fff; border: 1px solid var(--color-accent);
  border-radius: 0 4px 4px 0; cursor: pointer; transition: all 0.3s ease;
  margin-left: -4px; font-weight: 500; vertical-align: top; height: 48px; line-height: 1.5;
}
.newsletter-submit:hover { background-color: var(--color-accent-dark); border-color: var(--color-accent-dark); transform: translateY(-1px); }

.footer-links { text-align: center; margin: 1.5rem 0; }
.footer-links.main-link { margin: 2rem 0; }
.footer-links.main-link a {
  color: var(--color-accent); text-decoration: none; font-size: 1rem; font-weight: 500;
  padding: 0.5rem 1rem; border: 1px solid var(--color-accent); border-radius: 4px;
  display: inline-block; transition: all 0.3s ease;
}
.footer-links.main-link a:hover { background-color: var(--color-accent); color: #fff; transform: translateY(-2px); }
.footer-links.social-links { margin: 2rem 0; }
.footer-links.social-links a { color: #b0b0b0; text-decoration: none; margin: 0 1rem; transition: all 0.3s ease; display: inline-block; }
.footer-links.social-links a:hover { color: var(--color-accent); transform: translateY(-2px); }

.footer-copyright { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #333; color: #888; font-size: 0.9rem; }
.footer-copyright a { color: var(--color-accent); text-decoration: none; font-weight: 500; }
.footer-copyright a:hover { color: var(--color-accent-dark); text-decoration: underline; }

.visually-hidden { 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: 767px) {
  .post-title { font-size: 26px; }
  .footer-content { padding: 0 1rem; }
  .footer-links.social-links a { display: block; margin: 0.5rem 0; }
}
@media (max-width: 400px) {
  .newsletter-input { width: 100%; max-width: none; margin-bottom: 0.5rem; border-radius: 4px; }
  .newsletter-submit { width: 100%; margin-left: 0; border-radius: 4px; }
}
@media (max-width: 480px) {
  .site-header .header-inner { padding: 0 15px; }
  .site-main, .post-main { padding: 0 15px; }
  .home-hero h1 { font-size: 24px; }
}
