

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #4f46e5;
  --accent-soft:  rgba(79,70,229,0.08);
  --accent-border:rgba(79,70,229,0.2);
  --bg:           #ffffff;
  --surface:      #f8f8f7;
  --border:       #ebebea;
  --text:         #1a1916;
  --text2:        #6b6960;
  --text3:        #a8a59e;
  --heading:      'Syne', sans-serif;
  --body:         'DM Sans', sans-serif;
  --max:          720px;
  --radius:       12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.82;
  -webkit-font-smoothing: antialiased;
}

/* ── PROGRESS BAR ── */
#progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--accent);
  width: 0%; z-index: 999;
  transition: width .08s linear;
}

/* ── ARTICLE WRAPPER ── */
.post-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 100px;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text3);
  margin-bottom: 30px;
  font-family: var(--body);
}
.breadcrumb a { color: var(--text3); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { font-size: 10px; }

/* ── CATEGORY BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--body);
  font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 4px 13px; border-radius: 100px;
  text-decoration: none; margin-bottom: 20px;
  transition: background .15s;
}
.badge::before { content: '·'; font-size: 14px; }
.badge:hover { background: rgba(79,70,229,0.14); }

/* ── H1 ── */
h1.post-title {
  font-family: var(--heading);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 26px;
}

/* ── META ── */
.post-meta {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 36px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading);
  font-size: 13px; font-weight: 700;
  color: var(--accent); flex-shrink: 0;
}
.meta-text { flex: 1; min-width: 0; }
.meta-author { font-size: 14px; font-weight: 500; color: var(--text); }
.meta-date   { font-size: 13px; color: var(--text3); }
.meta-chips  { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12px; color: var(--text2);
  padding: 4px 11px; border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; gap: 5px;
  font-family: var(--body);
}

/* ── FEATURED IMAGE ── */
.featured-wrap {
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.featured-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.featured-caption {
  font-size: 13px; color: var(--text3);
  text-align: center; font-style: italic;
  margin-bottom: 44px;
}

/* ── CONTENT ── */
.post-content { color: var(--text); }

.post-content p {
  font-size: 17px; line-height: 1.85;
  color: #3a3830;
  margin-bottom: 1.5em;
}

.post-content h2 {
  font-family: var(--heading);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700; line-height: 1.2;
  color: var(--text); letter-spacing: -.015em;
  margin: 2.6em 0 .75em;
}

.post-content h3 {
  font-family: var(--heading);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700; line-height: 1.3;
  color: var(--text);
  margin: 2em 0 .65em;
}

/* Blockquote */
.post-content blockquote {
  margin: 2em 0;
  padding: 20px 24px 20px 28px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  font-size: 18px; line-height: 1.65;
  color: var(--text2);
}

/* Inline images */
.post-content figure { margin: 2em 0; }
.post-content figure img {
  width: 100%; border-radius: var(--radius);
  display: block; object-fit: cover;
  max-height: 480px;
  border: 1px solid var(--border);
}
.post-content figcaption {
  font-size: 13px; color: var(--text3);
  text-align: center; margin-top: 8px;
  font-style: italic;
}

/* Code */
.post-content code {
  background: var(--accent-soft);
  padding: 2px 7px; border-radius: 5px;
  font-size: 14px; font-family: 'Courier New', monospace;
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.post-content pre {
  background: var(--surface);
  padding: 20px 22px; border-radius: var(--radius);
  overflow-x: auto; margin: 2em 0;
  border: 1px solid var(--border);
}
.post-content pre code { background: none; padding: 0; border: none; color: var(--text2); }

/* Lists */
.post-content ul, .post-content ol { padding-left: 22px; margin-bottom: 1.5em; }
.post-content li { margin-bottom: .45em; color: #3a3830; }
.post-content ul li::marker { color: var(--accent); }
.post-content ol li::marker { color: var(--accent); font-weight: 600; }

/* Links */
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
}
.post-content a:hover { text-decoration-color: var(--accent); }

/* ── DIVIDER ── */
.section-line {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0;
}

/* ── TAGS & SHARE ── */
.tags-row {
  display: flex; align-items: center;
  gap: 7px; flex-wrap: wrap; margin-bottom: 20px;
}
.tag-label { font-size: 13px; color: var(--text3); font-weight: 500; }
.tag {
  font-size: 12px; color: var(--text2);
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid var(--border);
  text-decoration: none; transition: all .15s;
}
.tag:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }

.share-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.share-label { font-size: 13px; color: var(--text3); font-weight: 500; }
.share-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text2); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.share-btn:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft); }

/* ── AUTHOR BOX ── */
.author-box {
  margin-top: 44px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; gap: 18px; align-items: flex-start;
}
.author-box-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading);
  font-size: 18px; font-weight: 800;
  color: var(--accent); flex-shrink: 0;
}
.author-box-name {
  font-family: var(--heading);
  font-size: 16px; font-weight: 700;
  color: var(--text); margin-bottom: 2px;
}
.author-box-role {
  font-size: 12px; color: var(--accent);
  font-weight: 500; margin-bottom: 8px;
  letter-spacing: .04em; text-transform: uppercase;
}
.author-box-bio {
  font-size: 14px; color: var(--text2); line-height: 1.65;
}

/* ── RELATED POSTS ── */
.related { margin-top: 64px; }
.related-heading {
  font-family: var(--heading);
  font-size: 20px; font-weight: 700;
  color: var(--text); margin-bottom: 20px;
  display: flex; align-items: center; gap: 14px;
}
.related-heading::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; text-decoration: none;
  display: block; transition: border-color .2s, transform .2s;
  background: var(--bg);
}
.related-card:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.related-thumb { aspect-ratio: 16/9; background: var(--surface); overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-info { padding: 14px; }
.related-cat {
  font-size: 11px; font-weight: 500; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 5px;
}
.related-title {
  font-family: var(--heading);
  font-size: 14px; font-weight: 700;
  color: var(--text); line-height: 1.3; margin-bottom: 6px;
}
.related-date { font-size: 12px; color: var(--text3); }

/* ── SCROLL TO TOP ── */
#scrollTop {
  position: fixed; bottom: 28px; right: 28px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--text); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .2s;
  z-index: 100;
}
#scrollTop.show { opacity: 1; pointer-events: auto; }
#scrollTop:hover { transform: translateY(-3px); background: var(--accent); }
#scrollTop svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── RESPONSIVE ── */
@media(max-width:580px) {
  .post-wrap { padding: 36px 18px 80px; }
  .author-box { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .meta-chips { display: none; }
}
