/*
Theme Name:  KlinikOng
Theme URI:   https://klinikong.com
Author:      Klinik Ong
Author URI:  https://klinikong.com
Description: A contemplative editorial theme for Dr. Ong's writings on Body, Mind & Spirit.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: klinikong
Tags:        blog, medical, wellness, minimal, serif, dark
*/

/* ─────────────────────────────────────────
   DESIGN SYSTEM
   Ink-on-parchment · contemplative editorial
   ───────────────────────────────────────── */
:root {
  /* Palette — warm parchment with deep ink */
  --ink:          #1a1410;
  --ink-soft:     #3d342a;
  --ink-faint:    #7a6e64;
  --parchment:    #f5f0e8;
  --parchment-2:  #ede7d9;
  --parchment-3:  #e0d8c8;
  --cream:        #faf7f2;
  --rule:         #d4c9b5;

  /* Accent — deep saffron / marigold  */
  --saffron:      #c4842a;
  --saffron-light:#e8a84a;
  --saffron-pale: #f5e8cc;

  /* Category colours */
  --cat-mind:     #4a7c6f;   /* teal-sage */
  --cat-spirit:   #7b5ea7;   /* violet */
  --cat-body:     #c4842a;   /* saffron */
  --cat-rel:      #b55a3a;   /* terracotta */

  /* Type */
  --font-display: 'Playfair Display', 'Book Antiqua', Georgia, serif;
  --font-body:    'Source Serif 4', 'Palatino Linotype', Georgia, serif;
  --font-ui:      'DM Sans', 'Helvetica Neue', sans-serif;

  /* Sizes */
  --max-prose:    700px;
  --max-wide:     1120px;
  --radius:       3px;
}

/* ─── Reset ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--saffron); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--saffron); }

/* ─── Typography ─────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.5rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--saffron);
  padding: .8rem 1.5rem;
  margin: 2.5rem 0;
  background: var(--saffron-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ─── Layout ─────────────────────────── */
.site-wrapper   { display: flex; flex-direction: column; min-height: 100vh; }
.container      { width: 100%; max-width: var(--max-wide); margin: 0 auto; padding: 0 1.75rem; }
.container--prose { max-width: calc(var(--max-prose) + 3.5rem); }

/* ─── Grain texture overlay ─────────────
   Pure CSS noise via SVG data URI          */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ─────────────────────────────────────────
   SITE HEADER
   ───────────────────────────────────────── */
.site-header {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--saffron);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
}

/* Brand */
.site-header__brand { display: flex; flex-direction: column; gap: .1rem; }
.site-header__brand:hover { text-decoration: none; }

.site-header__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--parchment);
  letter-spacing: .04em;
  line-height: 1;
}

.site-header__sub {
  font-family: var(--font-ui);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--saffron-light);
}

/* Nav */
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(245,240,232,.6);
  transition: color .2s;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-page-ancestor > a {
  color: var(--saffron-light);
  text-decoration: none;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: .35rem .7rem;
  color: var(--parchment);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

/* ─────────────────────────────────────────
   MASTHEAD (Blog home banner)
   ───────────────────────────────────────── */
.site-masthead {
  background: var(--ink);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Decorative mandala-like ring */
.site-masthead::after {
  content: '';
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(196,132,42,.15);
  box-shadow:
    0 0 0 30px rgba(196,132,42,.05),
    0 0 0 60px rgba(196,132,42,.03),
    0 0 0 100px rgba(196,132,42,.02);
  pointer-events: none;
}

.site-masthead__inner { position: relative; z-index: 1; }

.site-masthead__eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 1.2rem;
}

.site-masthead h1 {
  color: var(--parchment);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.15;
  max-width: 640px;
  margin-bottom: 1rem;
}

.site-masthead p {
  color: rgba(245,240,232,.55);
  font-family: var(--font-ui);
  font-size: .95rem;
  max-width: 480px;
  margin-bottom: 0;
  line-height: 1.7;
}

/* ─────────────────────────────────────────
   PAGE BANNER (archives, search, 404)
   ───────────────────────────────────────── */
.page-banner {
  background: var(--ink);
  padding: 3.5rem 0 2.8rem;
  border-bottom: 1px solid rgba(196,132,42,.3);
}

.page-banner__eyebrow {
  font-family: var(--font-ui);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: .75rem;
  display: block;
}

.page-banner h1 {
  color: var(--parchment);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  max-width: 680px;
}

/* ─────────────────────────────────────────
   MAIN & CONTENT LAYOUT
   ───────────────────────────────────────── */
.site-main { flex: 1; padding: 3.5rem 0 5rem; }

.content-area { min-width: 0; }

/* Two-column layout for index/archive */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

/* ─────────────────────────────────────────
   CATEGORY PILL
   ───────────────────────────────────────── */
.cat-pill {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: .2rem .75rem;
  color: #fff;
  margin-right: .35rem;
  margin-bottom: .25rem;
  background: var(--ink-faint);
  transition: opacity .2s;
}
.cat-pill:hover { opacity: .85; text-decoration: none; color: #fff; }
.cat-pill--mind   { background: var(--cat-mind); }
.cat-pill--spirit { background: var(--cat-spirit); }
.cat-pill--body   { background: var(--cat-body); }
.cat-pill--relationships { background: var(--cat-rel); }

/* ─────────────────────────────────────────
   POST CARDS (index / archive)
   ───────────────────────────────────────── */
.posts-list { display: flex; flex-direction: column; gap: 0; }

.post-card {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0;
  transition: background .2s;
}

.post-card:first-child { padding-top: 0; }

.post-card--has-thumb {
  grid-template-columns: 1fr 200px;
  gap: 2rem;
  align-items: start;
}

.post-card__body { min-width: 0; }

.post-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.post-card__date {
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--ink-faint);
}

.post-card__title {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: .75rem;
}

.post-card__title a { color: var(--ink); transition: color .2s; }
.post-card__title a:hover { color: var(--saffron); text-decoration: none; }

.post-card__excerpt {
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__readmore {
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--saffron);
}
.post-card__readmore:hover { color: var(--ink); text-decoration: none; }

.post-card__thumbnail {
  order: 2;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card__thumbnail img { transform: scale(1.03); }

/* ─────────────────────────────────────────
   FEATURED POST (first post, hero-style)
   ───────────────────────────────────────── */
.post-card--featured {
  grid-template-columns: 1fr;
  background: var(--parchment);
  border: 1px solid var(--parchment-3);
  border-radius: 4px;
  padding: 2rem;
  margin-bottom: 1rem;
}

.post-card--featured .post-card__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.post-card--featured .post-card__thumbnail {
  order: -1;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/7;
}

/* ─────────────────────────────────────────
   PAGINATION
   ───────────────────────────────────────── */
.pagination {
  display: flex;
  gap: .4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  font-family: var(--font-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 .6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: .82rem;
  color: var(--ink-soft);
  transition: all .2s;
}
.pagination a:hover { border-color: var(--saffron); color: var(--saffron); text-decoration: none; }
.pagination .current { background: var(--saffron); border-color: var(--saffron); color: #fff; }

/* ─────────────────────────────────────────
   SINGLE POST
   ───────────────────────────────────────── */
.single-article { max-width: var(--max-prose); }

.single-article__header { margin-bottom: 2.5rem; }

.single-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.25rem;
}

.single-article__date {
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--ink-faint);
}

.single-article__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.single-article__lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 0;
}

.single-article__thumbnail {
  margin: 2.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.single-article__thumbnail img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Article body */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

.entry-content > * + * { margin-top: 1.5rem; }
.entry-content h2 { color: var(--ink); margin-top: 3rem; }
.entry-content h3 { color: var(--ink); margin-top: 2.5rem; }
.entry-content h4 { color: var(--ink); margin-top: 2rem; }

.entry-content ul, .entry-content ol {
  padding-left: 1.5rem;
}
.entry-content li { margin-bottom: .4rem; }

.entry-content a {
  color: var(--saffron);
  text-decoration: underline;
  text-decoration-color: rgba(196,132,42,.4);
}
.entry-content a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.entry-content img {
  border-radius: var(--radius);
  margin: 2rem auto;
}

/* Drop cap on first paragraph */
.entry-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.8rem;
  line-height: .8;
  float: left;
  margin-right: .1rem;
  margin-top: .12rem;
  color: var(--saffron);
}

/* Article footer */
.entry-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.entry-footer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.entry-footer__label {
  font-family: var(--font-ui);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin-right: .25rem;
}

.tag-link {
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .07em;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: .15rem .65rem;
  transition: all .2s;
}
.tag-link:hover { border-color: var(--saffron); color: var(--saffron); text-decoration: none; }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.25rem;
  background: var(--parchment);
  border: 1px solid var(--parchment-3);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.post-nav__item:hover {
  border-color: var(--saffron);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  text-decoration: none;
}

.post-nav__direction {
  font-family: var(--font-ui);
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--saffron);
}
.post-nav__title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.35;
}
.post-nav__item--next { text-align: right; }

/* ─────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────── */
.site-sidebar { position: sticky; top: 4.5rem; }

.widget {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.widget:last-child { border-bottom: none; }

.widget-title {
  font-family: var(--font-ui);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 1.1rem;
}

.widget ul { list-style: none; }
.widget ul li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--parchment-3);
  font-size: .9rem;
  color: var(--ink-soft);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--ink-soft); }
.widget ul li a:hover { color: var(--saffron); }

/* About widget */
.widget--about { text-align: center; }
.widget--about img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 3px solid var(--parchment-3);
}
.widget--about p {
  font-size: .88rem;
  color: var(--ink-faint);
  line-height: 1.7;
}

/* CTA widget */
.widget--cta {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-bottom: none;
}
.widget--cta .widget-title { color: var(--saffron-light); }
.widget--cta p {
  font-size: .85rem;
  color: rgba(245,240,232,.6);
  margin-bottom: 1rem;
  line-height: 1.65;
}
.widget--cta .btn {
  display: inline-block;
  background: var(--saffron);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  transition: background .2s;
}
.widget--cta .btn:hover { background: var(--saffron-light); text-decoration: none; }

/* ─────────────────────────────────────────
   COMMENTS
   ───────────────────────────────────────── */
.comments-area { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--rule); }
.comments-title { font-size: 1.4rem; margin-bottom: 2rem; }

.comment-list { list-style: none; }
.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--parchment-3);
}
.comment__meta {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: .6rem;
}
.comment__author { font-weight: 600; font-size: .95rem; }
.comment__date { font-family: var(--font-ui); font-size: .72rem; color: var(--ink-faint); }
.comment__text { font-size: .95rem; color: var(--ink-soft); }

/* Comment form */
.comment-respond { margin-top: 2.5rem; }
.comment-respond h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }

.comment-form label {
  display: block;
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  display: block;
  width: 100%;
  padding: .65rem .9rem;
  background: var(--cream);
  border: 1px solid var(--parchment-3);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
  transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--saffron);
  background: var(--parchment);
}
.comment-form textarea { min-height: 130px; resize: vertical; }

.comment-form .submit, .btn-primary {
  background: var(--saffron);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .65rem 1.75rem;
  font-family: var(--font-ui);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.comment-form .submit:hover, .btn-primary:hover { background: var(--saffron-light); }

/* ─────────────────────────────────────────
   NO RESULTS / 404
   ───────────────────────────────────────── */
.no-results {
  max-width: var(--max-prose);
  padding: 4rem 0;
  text-align: center;
}
.no-results__ornament {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  opacity: .25;
}
.no-results h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.no-results p  { color: var(--ink-faint); margin-bottom: 1.5rem; }

/* ─────────────────────────────────────────
   SEARCH FORM
   ───────────────────────────────────────── */
.search-form {
  display: flex;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.search-form input[type="search"] {
  flex: 1;
  padding: .55rem .85rem;
  border: none;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--ink);
}
.search-form input:focus { outline: none; background: var(--parchment); }
.search-form button {
  background: var(--ink);
  color: var(--parchment);
  border: none;
  padding: 0 1rem;
  cursor: pointer;
  font-size: .85rem;
  transition: background .2s;
}
.search-form button:hover { background: var(--saffron); }

/* ─────────────────────────────────────────
   SITE FOOTER
   ───────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(245,240,232,.5);
  padding: 4rem 0 2rem;
  border-top: 2px solid var(--saffron);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.site-footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--parchment);
  margin-bottom: .35rem;
}
.site-footer__brand-sub {
  font-family: var(--font-ui);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 1rem;
  display: block;
}
.site-footer__about {
  font-size: .85rem;
  line-height: 1.7;
  color: rgba(245,240,232,.45);
}

.site-footer__col-title {
  font-family: var(--font-ui);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 1rem;
  display: block;
}

.site-footer__links { list-style: none; }
.site-footer__links li { margin-bottom: .5rem; }
.site-footer__links a {
  font-size: .85rem;
  color: rgba(245,240,232,.45);
  transition: color .2s;
}
.site-footer__links a:hover { color: var(--parchment); text-decoration: none; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-family: var(--font-ui);
  font-size: .72rem;
  color: rgba(245,240,232,.3);
}
.site-footer__bottom a { color: rgba(245,240,232,.4); }
.site-footer__bottom a:hover { color: var(--saffron); text-decoration: none; }

/* ─────────────────────────────────────────
   SCROLL-TO-TOP
   ───────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--ink);
  border: 1px solid var(--saffron);
  border-radius: 50%;
  color: var(--saffron);
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  z-index: 100;
  text-decoration: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--saffron); color: #fff; text-decoration: none; }

/* ─────────────────────────────────────────
   READING PROGRESS BAR
   ───────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--saffron);
  width: 0%;
  z-index: 999;
  transition: width .1s linear;
}

/* ─────────────────────────────────────────
   PAGE-IN ANIMATIONS
   ───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-card, .single-article__header, .entry-content {
  animation: fadeUp .5s ease both;
}

.posts-list .post-card:nth-child(2) { animation-delay: .07s; }
.posts-list .post-card:nth-child(3) { animation-delay: .14s; }
.posts-list .post-card:nth-child(4) { animation-delay: .21s; }

/* ─────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────── */
@media (max-width: 960px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .site-sidebar         { position: static; }
  .site-footer__grid    { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 660px) {
  .site-nav   { display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: .5rem;
                 padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.1); margin-top: .5rem; }
  .nav-toggle { display: block; }

  .post-card--has-thumb { grid-template-columns: 1fr; }
  .post-card__thumbnail { order: -1; aspect-ratio: 16/7; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav__item--next { text-align: left; }

  .site-footer__grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.9rem; }

  .entry-content > p:first-of-type::first-letter { font-size: 3rem; }

  .scroll-top { bottom: 1rem; right: 1rem; }
}
