/* =============================================================================
   STUDIO3.SPACE — Ghost Theme CSS v2.0
   3-mode: Light (default) / Dark / Paper
   ============================================================================= */

/* ── LIGHT MODE (default) ────────────────────────────────── */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --bg-3: #ebebeb;
  --text: #0a0a0a;
  --text-muted: #666666;
  --text-dim: #aaaaaa;
  --border: #e0e0e0;
  --border-bright: #cccccc;
  --deco: #0a0a0a;
  --link: #0000ee;
  --link-visited: #551a8b;
  --link-hover: #0000cc;
  --link-active: #ff0000;
  --logo-invert: 0;
  --font-mono: 'Space Mono', 'Courier New', Courier, monospace;
  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --content-width: 720px;
  --wide-width: 1040px;
}

/* ── DARK MODE ───────────────────────────────────────────── */
html.dark-mode {
  --bg: #0a0a0a; --bg-2: #111111; --bg-3: #1a1a1a;
  --text: #e8e8e8; --text-muted: #888888; --text-dim: #555555;
  --border: #2a2a2a; --border-bright: #444444; --deco: #ffffff;
  --link: #4d4dff; --link-visited: #9a4dff; --link-hover: #6666ff; --link-active: #ff4444;
  --logo-invert: 1;
}

/* ── PAPER MODE ──────────────────────────────────────────── */
html.paper-mode {
  --bg: #FAF0DC; --bg-2: #F0E6CE; --bg-3: #E8DCC4;
  --text: #3B2F20; --text-muted: #6B5D4E; --text-dim: #9A8B7A;
  --border: #DDD0BA; --border-bright: #C8BBA5; --deco: #3B2F20;
  --link: #1a4d8f; --link-visited: #5e3a7e; --link-hover: #0d3a6e; --link-active: #8b2020;
  --logo-invert: 0;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.7;
  min-height: 100vh; transition: background .5s ease, color .5s ease;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:active { color: var(--link-active); }

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); transition: background .5s ease;
}
.site-header::after {
  content: ''; display: block; height: 1px;
  background: repeating-linear-gradient(90deg, var(--text-dim) 0px, var(--text-dim) 8px, transparent 8px, transparent 16px);
  opacity: .5;
}
.site-header-inner {
  max-width: var(--wide-width); margin: 0 auto; padding: 8px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
}

.site-logo-link { text-decoration: none; color: var(--text); flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.site-logo-link:visited, .site-logo-link:hover { color: var(--text); }
.logo-arch { height: 36px; width: auto; filter: invert(var(--logo-invert)); transition: filter .5s; }
.logo-text { height: 24px; width: auto; filter: invert(var(--logo-invert)); transition: filter .5s; }

.header-row-1-right { display: flex; align-items: center; gap: 10px; }
.header-row-2 { display: none; width: 100%; align-items: center; gap: 10px; justify-content: space-between; }
.header-row-2-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.desktop-search, .desktop-btn { display: flex; }

@media (max-width: 600px) {
  .desktop-search, .desktop-btn { display: none !important; }
  .header-row-2 { display: flex; }
  .site-header-inner { padding: 8px 16px; gap: 6px; }
}

/* Header buttons */
.header-btn {
  font-family: var(--font-mono); font-size: .78rem; text-transform: lowercase;
  padding: 4px 10px; border: 1px solid var(--text); text-decoration: none;
  color: var(--text) !important; transition: background .15s, color .15s;
  letter-spacing: .02em; white-space: nowrap; height: 30px; box-sizing: border-box;
  display: inline-flex; align-items: center;
}
.header-btn:visited { color: var(--text) !important; }
.header-btn:hover { background: var(--text); color: var(--bg) !important; }

/* ── SEARCH COMPONENT ────────────────────────────────────── */
.search-component {
  display: flex; align-items: center; border: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
  padding: 0; min-width: 0; overflow: hidden; box-sizing: border-box; height: 30px;
}
.search-component.open { border-color: var(--text-dim); background: var(--bg); }

.search-trigger {
  background: none; border: none; cursor: pointer; color: var(--text);
  padding: 0 5px; display: flex; align-items: center; flex-shrink: 0; height: 100%;
}
.search-trigger:hover { opacity: .6; }
.search-component.open .search-trigger { pointer-events: none; opacity: .5; }

.search-field {
  border: none; background: transparent; color: var(--text);
  font-family: var(--font-mono); font-size: .82rem; outline: none;
  width: 0; padding: 0; transition: width .3s ease, padding .3s ease; overflow: hidden;
}
.search-component.open .search-field { width: 180px; padding: 2px 0 2px 4px; }
.search-field::placeholder { color: var(--text-dim); }

.search-close {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-family: var(--font-mono); font-size: .9rem; padding: 0; width: 0;
  overflow: hidden; transition: width .2s ease, padding .2s ease, color .15s;
}
.search-component.open .search-close { width: auto; padding: 2px 6px; }
.search-close:hover { color: var(--text); }

@media (max-width: 600px) {
  .search-component { flex: 1; }
  .search-component.open .search-field { flex: 1; width: auto; }
}

/* ── MODE TOGGLE ─────────────────────────────────────────── */
.mode-toggle {
  background: none; border: none; cursor: pointer; padding: 2px;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0; position: relative;
}
.mode-icon { position: absolute; visibility: hidden; opacity: 0; transition: opacity .3s ease; }
.mode-icon.active { visibility: visible; opacity: 1; }

.icon-sun {
  width: 12px; height: 12px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 6px #f59e0b88;
}
.icon-sun::before {
  content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px;
  border-radius: 50%; border: 1.5px dashed #f59e0b55; animation: sun-spin 8s linear infinite;
}

.icon-glow {
  width: 4px; height: 18px; border-radius: 2px;
  background: #39ff14; box-shadow: 0 0 6px #39ff14, 0 0 12px #39ff1488, 0 0 18px #39ff1444;
  animation: glow-breathe 2s ease-in-out infinite;
}
.icon-glow::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); width: 8px; height: 22px;
  border-radius: 4px; border: 1px solid #39ff1433;
}

.icon-paper {
  width: 13px; height: 16px; background: var(--bg); border: 1.5px solid var(--text);
  border-radius: 1px; position: relative; box-shadow: 1px 1px 3px rgba(0,0,0,.15); overflow: hidden;
}
.icon-paper::before {
  content: ''; position: absolute; top: 3px; left: 2px; width: 0; height: 1px;
  background: var(--text-dim); animation: write-line1 3s ease-in-out infinite;
}
.icon-paper::after {
  content: ''; position: absolute; top: 6px; left: 2px; width: 0; height: 1px;
  background: var(--text-dim); box-shadow: 0 3px 0 var(--text-dim);
  animation: write-line2 3s ease-in-out infinite;
}

@keyframes sun-spin { to { transform: rotate(360deg); } }
@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 0 6px #39ff14, 0 0 12px #39ff1466, 0 0 20px #39ff1433; }
  50% { box-shadow: 0 0 12px #39ff14, 0 0 24px #39ff1488, 0 0 36px #39ff1455; }
}
@keyframes write-line1 { 0%,5% { width: 0; } 25% { width: 9px; } 80% { width: 9px; } 90%,100% { width: 0; } }
@keyframes write-line2 { 0%,20% { width: 0; } 40% { width: 7px; } 80% { width: 7px; } 90%,100% { width: 0; } }
@keyframes pop-in { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.mode-icon.animate { animation: pop-in .4s ease; }

/* ── DASH DIVIDER ────────────────────────────────────────── */
.deco-rule {
  margin: 32px 0; height: 1px; border: none;
  background: repeating-linear-gradient(90deg, var(--text-dim) 0px, var(--text-dim) 8px, transparent 8px, transparent 16px);
  opacity: .4;
}

/* ── MAIN ────────────────────────────────────────────────── */
.site-main { max-width: var(--wide-width); margin: 0 auto; padding: 0 24px 64px; }

/* ── TAG FILTERS ─────────────────────────────────────────── */
.tag-filters { margin: 0 0 32px; padding-top: 24px; }
.tag-filter-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-label { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); text-transform: lowercase; letter-spacing: .05em; margin-right: 4px; }
.tag-pill {
  font-family: var(--font-mono); font-size: .75rem; padding: 3px 10px;
  border: 1px solid var(--border-bright); text-decoration: none; color: var(--text-muted) !important;
  text-transform: lowercase; letter-spacing: .03em; transition: border-color .15s, color .15s, background .15s;
  background: var(--bg-2); cursor: pointer; user-select: none;
}
.tag-pill:hover { color: var(--text) !important; border-color: var(--text); }
.tag-pill.active { color: var(--bg) !important; background: var(--text); border-color: var(--text); }
.tag-clear {
  font-family: var(--font-mono); font-size: .75rem; padding: 3px 8px; background: none;
  border: 1px solid transparent; color: var(--text-dim); cursor: pointer;
  text-transform: lowercase; display: none; text-decoration: none;
}
.tag-clear.show { display: inline-block; }
.tag-clear:hover { color: var(--text); border-color: var(--border-bright); }

/* ── SORT ────────────────────────────────────────────────── */
.sort-wrap { position: relative; margin-left: auto; }
.sort-toggle {
  background: none; border: 1px solid var(--border-bright); cursor: pointer;
  color: var(--text-muted); padding: 3px 8px; display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: .75rem; transition: border-color .15s, color .15s;
}
.sort-toggle:hover { color: var(--text); border-color: var(--text); }
.sort-toggle .sort-arrows { font-size: .8rem; line-height: 1; }
.sort-toggle .sort-icon { font-size: .85rem; font-weight: 700; }
.sort-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--bg); border: 1px solid var(--border-bright); z-index: 50; min-width: 160px;
}
.sort-dropdown.open { display: block; }
.sort-option {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted);
  cursor: pointer; text-transform: lowercase; transition: background .1s, color .1s;
  border: none; background: none; width: 100%; text-align: left;
}
.sort-option:hover { background: var(--bg-2); color: var(--text); }
.sort-option.active { color: var(--text); font-weight: 700; }
.sort-option .sort-opt-icon { width: 16px; text-align: center; font-size: .85rem; font-weight: 700; }

/* ── POST FEED ───────────────────────────────────────────── */
.post-feed { display: grid; grid-template-columns: 1fr; gap: 0; }
.post-card { border-bottom: 1px solid var(--border); padding: 28px 0; }
.post-card:first-child { border-top: 1px solid var(--border); }
.post-card.hidden { display: none; }
.post-card-content { min-width: 0; }
.post-card-tags { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.post-card-tag {
  font-family: var(--font-mono); font-size: .7rem; text-transform: lowercase;
  letter-spacing: .06em; text-decoration: none; color: var(--text-muted) !important;
}
.post-card-title {
  font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.2; margin: 0 0 8px; font-weight: 400; font-style: italic;
}
.post-card-title-link { text-decoration: none; color: var(--text) !important; }
.post-card-title-link:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.post-card-subtitle {
  font-family: var(--font-body); font-size: .95rem; color: var(--text-muted);
  margin: 0 0 6px; font-style: italic; font-weight: 700; line-height: 1.3;
}
.post-card-body { overflow: hidden; }
.post-card-body::after { content: ""; display: table; clear: both; }
.post-card-image-link { float: left; margin: 0 16px 8px 0; overflow: hidden; }
.post-card-image-link .post-card-image,
.post-card-image-link .placeholder-img {
  height: calc(1.7em * 4.5); width: auto; object-fit: cover;
}
.placeholder-img {
  width: 160px; height: calc(1.7em * 4.5); background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .7rem; color: var(--text-dim); text-transform: lowercase;
}
.post-card-excerpt { font-size: .9rem; color: var(--text-muted); margin: 0 0 12px; line-height: 1.5; }
.post-card-footer { display: flex; align-items: center; gap: 8px; clear: both; }
.post-card-date, .post-card-reading-time, .post-card-sep {
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim);
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 32px 0 16px; flex-wrap: wrap; }
.page-btn {
  font-family: var(--font-mono); font-size: .78rem; text-transform: lowercase;
  padding: 4px 10px; border: 1px solid var(--border-bright); text-decoration: none;
  color: var(--text-muted) !important; transition: border-color .15s, color .15s, background .15s;
  height: 30px; display: inline-flex; align-items: center; box-sizing: border-box;
}
.page-btn:visited { color: var(--text-muted) !important; }
.page-btn:hover { color: var(--text) !important; border-color: var(--text); }
.page-btn.active { color: var(--bg) !important; background: var(--text); border-color: var(--text); font-weight: 700; }

/* ── POST ARTICLE ────────────────────────────────────────── */
.post-article { max-width: var(--wide-width); margin: 0 auto; padding-top: 48px; }
.post-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-tags { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.post-tag {
  font-family: var(--font-mono); font-size: .72rem; text-transform: lowercase;
  letter-spacing: .08em; text-decoration: none; color: var(--text-muted) !important;
  border-bottom: 1px solid var(--border-bright); padding-bottom: 1px;
}
.post-tag:hover { color: var(--text) !important; border-color: var(--text); }
.post-title {
  font-family: var(--font-display) !important; font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1; margin: 0 0 16px; font-weight: 400; font-style: italic;
}
.post-excerpt { font-size: 1.15rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 20px; font-style: italic; font-weight: 700; font-family: var(--font-body) !important; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.post-date, .post-reading-time, .post-meta-sep { color: var(--text-dim); }
.post-author { color: var(--text-muted); }
.post-feature-image { margin: 0 0 40px; }
.post-feature-image img { width: 100%; max-height: 520px; object-fit: cover; }
.post-feature-image figcaption { font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); margin-top: 8px; text-align: center; text-transform: lowercase; }

/* ── POST CONTENT ────────────────────────────────────────── */
.post-content { font-size: 1.05rem !important; line-height: 1.8 !important; color: var(--text) !important; max-width: var(--content-width); font-family: var(--font-body) !important; }
.post-content *, .post-content p, .post-content li, .post-content td, .post-content th, .post-content span, .post-content div { font-family: var(--font-body) !important; }
.post-content h1, .post-content h2 { font-family: var(--font-display) !important; }
.post-content h3, .post-content h4, .post-content h5, .post-content h6 { font-family: var(--font-mono) !important; }
.post-content code, .post-content pre, .post-content pre code { font-family: var(--font-mono) !important; }
.post-content figcaption { font-family: var(--font-mono) !important; }

/* Override Ghost's injected styles globally */
.gh-content, .gh-content *, .kg-card, .kg-card *, [class*="kg-"] { font-family: var(--font-body) !important; }
body, body * { --ghost-font-family: var(--font-body); }
.post-content p { margin: 0 0 1.5em; }
.post-content h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; font-style: italic; margin: 2em 0 .75em; line-height: 1.15; }
.post-content h3 { font-family: var(--font-mono); font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin: 2em 0 .75em; color: var(--text-muted); }
.post-content h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 1.5em 0 .5em; }
.post-content a { color: var(--link); }
.post-content a:visited { color: var(--link-visited); }
.post-content a:hover { color: var(--link-hover); }
.post-content blockquote { margin: 2em 0; padding: 0 0 0 24px; border-left: 3px solid var(--border-bright); color: var(--text-muted); font-style: italic; }
.post-content pre { background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--text-dim); padding: 20px; overflow-x: auto; margin: 1.5em 0; }
.post-content code { font-family: var(--font-mono); font-size: .87em; background: var(--bg-2); padding: 2px 6px; border: 1px solid var(--border); }
.post-content pre code { background: none; border: none; padding: 0; font-size: .85rem; line-height: 1.6; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }
.post-content ul, .post-content ol { padding-left: 1.5em; margin: 0 0 1.5em; }
.post-content li { margin-bottom: .4em; }
.post-content figure { margin: 2em 0; }
.post-content figure img { width: 100%; }
.post-content figcaption { font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); text-align: center; margin-top: 8px; text-transform: lowercase; }

/* Ghost card styles */
.kg-image-card { margin: 2em 0; }
.kg-image-card img { width: 100%; }
.kg-image-card.kg-width-wide { max-width: 960px; margin-left: calc(-1 * (960px - var(--content-width)) / 2); margin-right: calc(-1 * (960px - var(--content-width)) / 2); }
.kg-image-card.kg-width-full { max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }
.kg-width-full img { width: 100%; }
@media (max-width: 1000px) {
  .kg-image-card.kg-width-wide, .kg-image-card.kg-width-full { max-width: 100%; margin-left: 0; margin-right: 0; }
}
.kg-gallery-container { margin: 2em 0; }
.kg-gallery-row { display: flex; gap: 8px; margin-bottom: 8px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-video-card { margin: 2em 0; }
.kg-video-card video { width: 100%; }
.kg-embed-card { margin: 2em 0; }
.kg-embed-card iframe { max-width: 100%; border: none; }
.kg-callout-card { display: flex; gap: 16px; background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--text-dim); padding: 20px; margin: 2em 0; }
.kg-callout-emoji { font-size: 1.2rem; flex-shrink: 0; }
.kg-bookmark-card { border: 1px solid var(--border); margin: 2em 0; text-decoration: none; display: block; color: var(--text) !important; }
.kg-bookmark-card:hover { border-color: var(--border-bright); }
.kg-bookmark-container { padding: 16px; }
.kg-bookmark-title { font-family: var(--font-body); font-weight: 700; margin-bottom: 4px; color: var(--text); }
.kg-bookmark-description { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }
.kg-bookmark-metadata { display: flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); }
.kg-bookmark-icon { width: 16px; height: 16px; object-fit: contain; }
.kg-bookmark-thumbnail img { width: 100%; max-height: 200px; object-fit: cover; }

/* ── POST FOOTER ─────────────────────────────────────────── */
.post-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-tags-footer { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); margin-bottom: 32px; text-transform: lowercase; }
.post-nav { margin-top: 16px; }
.back-btn {
  font-family: var(--font-mono); font-size: .78rem; text-transform: lowercase;
  padding: 6px 16px; border: 1px solid var(--text); text-decoration: none;
  color: var(--text) !important; transition: background .15s, color .15s;
  letter-spacing: .02em; display: inline-flex; align-items: center; height: 30px; box-sizing: border-box;
}
.back-btn:visited { color: var(--text) !important; }
.back-btn:hover { background: var(--text); color: var(--bg) !important; }

/* ── TAG ARCHIVE ─────────────────────────────────────────── */
.tag-archive { padding-top: 48px; }
.tag-header { margin-bottom: 40px; }
.tag-label { font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); text-transform: lowercase; letter-spacing: .06em; display: block; margin-bottom: 8px; }
.tag-name { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 400; font-style: italic; margin: 0 0 12px; }
.tag-desc { font-size: 1rem; color: var(--text-muted); margin: 0 0 12px; max-width: 600px; }
.tag-count { font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); margin: 0; text-transform: lowercase; }

/* ── PAGE ARTICLE ────────────────────────────────────────── */
.page-article { max-width: var(--content-width); margin: 0 auto; padding-top: 48px; }
.page-header { margin-bottom: 32px; }
.page-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; font-style: italic; margin: 0 0 16px; }
.page-excerpt { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 16px; font-style: italic; }
.page-content { font-size: 1.05rem; line-height: 1.8; }
.page-feature-image { margin-bottom: 32px; }
.page-feature-image img { width: 100%; max-height: 400px; object-fit: cover; }

/* ── ERROR PAGE ──────────────────────────────────────────── */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 64px 24px; }
.error-code { display: block; font-family: var(--font-mono); font-size: 5rem; font-weight: 700; color: var(--text-dim); line-height: 1; margin-bottom: 16px; }
.error-title { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; margin: 0 0 12px; }
.error-desc { color: var(--text-muted); font-family: var(--font-mono); font-size: .85rem; margin: 0 0 24px; }
.error-back { font-family: var(--font-mono); font-size: .85rem; }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer { margin-top: 48px; padding: 0 0 12px; }
.site-footer::before {
  content: ''; display: block; height: 1px;
  background: repeating-linear-gradient(90deg, var(--text-dim) 0px, var(--text-dim) 8px, transparent 8px, transparent 16px);
  opacity: .5; margin: 0 0 16px 0;
}
.footer-inner { max-width: var(--wide-width); margin: 0 auto; text-align: center; padding: 0 24px; }
.footer-line { font-family: var(--font-body); color: var(--text-dim); margin: 0; line-height: 1.6; font-size: .75rem; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-main { padding: 0 16px 48px; }
}
@media (max-width: 480px) {
  .site-header-inner { padding: 8px 12px; }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .tag-filters, .sort-wrap { display: none; }
  a { color: #000; text-decoration: underline; }
  .post-article { max-width: 100%; }
}
