@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ================================================================
   ONE-BUTTON HTML — SHARED SITE STYLES
   Common stylesheet linked by every page template.
   ----------------------------------------------------------------
   Design language: editorial elegance (serif display, generous
   whitespace, thin rules, a neutral near-white base with a muted
   navy accent) blended with clean SaaS-style cards (soft borders,
   rounded corners, subtle hover lift).

   SECTIONS
     1.  Design tokens
     2.  Reset & base elements
     3.  Layout helpers
     4.  Header / navigation / search   (shared)
     5.  Footer                         (shared)
     6.  Buttons & forms                (shared)
     7.  Author bio block              (shared)
     8.  Modals                        (shared)
     9.  HOME — hero
     10. HOME — article content (main)
     11. HOME — social share
     12. HOME — recent posts slider
     13. HOME — popular articles
     14. HOME — comments
     15. HOME — author aside
     16. Responsive
     17. Motion / print
   ================================================================ */


/* ================================================================
   1. DESIGN TOKENS
   ================================================================ */
:root {
  /* Palette — neutral editorial base + muted navy accent */
  --bg:            #F1F3F7;   /* page base (solid fallback for components) */
  --bg-gradient:   linear-gradient(122deg, #E7EBF2 0%, #EEF1F6 48%, #F5F7FA 100%);
  --surface:       #FFFFFF;   /* cards, header, footer top */
  --surface-alt:   #EDEFF3;   /* footer, muted bands */
  --ink:           #1B1D24;   /* primary text */
  --ink-soft:      #4A4E59;   /* body copy, secondary text */
  --ink-faint:     #878A93;   /* meta, timestamps */
  --line:          #E4E5E9;   /* hairline borders */
  --accent:        #2A3350;   /* muted navy */
  --accent-dark:   #1E2540;   /* link text, read-more */
  --accent-hover:  #3C4A70;   /* hover fills */
  --accent-tint:   #ECEEF4;   /* focus rings, hover wash */

  /* Typography */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Metrics */
  --wrap: 1180px;
  --wrap-narrow: 720px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  /* Hero / feature image: large rounded corners with one square corner */
  --radius-hero: clamp(1.75rem, 4vw, 2.75rem);
  --radius-hero-shape: var(--radius-hero) 6px var(--radius-hero) var(--radius-hero);

  --space-2xs: .5rem;
  --space-xs: .875rem;
  --space-sm: 1.25rem;
  --space-md: 2rem;
  --space-lg: clamp(3rem, 7vw, 5rem);
  --space-xl: clamp(4rem, 9vw, 7rem);

  --shadow-sm: 0 1px 2px rgba(28, 27, 25, .04);
  --shadow-md: 0 12px 30px -12px rgba(28, 27, 25, .18);

  --transition: .25s ease;
}


/* ================================================================
   2. RESET & BASE ELEMENTS
   ================================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Faint rounded-square lattice, fixed to the top-right, fading toward
   the centre so it never sits behind body text. Purely decorative. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Crect x='4' y='4' width='48' height='48' rx='16' fill='none' stroke='%232A3350' stroke-opacity='0.05' stroke-width='1.4'/%3E%3C/svg%3E");
  background-position: top right;
  -webkit-mask-image: linear-gradient(245deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 34%, transparent 60%);
          mask-image: linear-gradient(245deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 34%, transparent 60%);
}

img,
svg,
video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: .005em;
}

p { text-wrap: pretty; }

ul, ol { list-style-position: outside; }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: #fff;
}


/* ================================================================
   3. LAYOUT HELPERS
   ----------------------------------------------------------------
   Every top-level template section is centred with these widths.
   ================================================================ */
header,
.hero-section,
main,
.social-share-aside,
.recent-posts-aside,
.popular-posts-aside,
.comments-aside,
.author-aside,
footer {
  display: block;
}

/* Wide container */
.header-container,
.recent-posts-slider,
.popular-posts,
.footer-container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Narrow (reading) container.
   Class-less article bodies are detected by structure; the home page
   opts in explicitly with `.home-page-main`. Other page templates
   manage their own layout. */
:is(main:not([class]):not(:has(> section)), .home-page-main),
.social-share,
.comments-section,
.author-bio {
  width: 100%;
  max-width: var(--wrap-narrow);
  margin-inline: auto;
}


/* ================================================================
   4. HEADER / NAVIGATION / SEARCH  (shared by all pages)
   ================================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 800;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-container {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  min-height: 72px;
  padding-block: .75rem;
}

/* Logo */
.logo a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
}
.logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 6px;
}
.site-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .3rem .35rem .3rem .9rem;
  max-width: 240px;
  flex: 1 1 180px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-faint); }
.search-box input:focus { outline: none; }
.search-box button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.search-box button:hover { background: var(--accent-hover); color: #fff; }

/* Primary navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.main-nav a {
  position: relative;
  display: inline-block;
  padding: .35rem 0;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.main-nav a:hover,
.main-nav a.active { color: var(--ink); }
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

/* Mobile menu toggle (hidden on desktop) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.mobile-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ================================================================
   5. FOOTER  (shared by all pages)
   ================================================================ */
footer {
  margin-top: var(--space-xl);
  background: var(--surface-alt);
  border-top: 3px solid var(--accent);
}
.footer-container { padding-block: clamp(2.5rem, 6vw, 4rem); }

.footer-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .75rem;
}
.footer-logo img { width: 34px; height: 34px; object-fit: contain; border-radius: 5px; }
.footer-logo span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-info p {
  font-size: .875rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.footer-datetime {
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--ink-faint);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.footer-nav a {
  color: var(--ink-soft);
  font-size: .875rem;
  letter-spacing: .02em;
}
.footer-nav a:hover { color: var(--accent); }


/* ================================================================
   6. BUTTONS & FORMS  (shared: comment form, contact form, etc.)
   ================================================================ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  margin-bottom: .4rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.submit-btn,
.modal-close-btn {
  display: inline-block;
  padding: .8rem 1.8rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.submit-btn:hover,
.modal-close-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.submit-btn:active,
.modal-close-btn:active { transform: translateY(1px); }


/* ================================================================
   7. AUTHOR BIO BLOCK  (shared: home aside, article/about sidebars)
   ================================================================ */
.author-bio {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.author-photo {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-pill);
  border: 2px solid var(--accent-tint);
}
.author-details p {
  color: var(--ink-soft);
  font-size: .95rem;
}
.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .7rem;
}
.social-link {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.social-link:hover { color: var(--accent); }


/* ================================================================
   8. MODALS  (shared: search + comment confirmation modals)
   ================================================================ */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(24, 22, 19, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: modal-fade .2s ease;
}
.search-modal {
  width: 100%;
  max-width: 430px;
  padding: 2.25rem 2rem;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(24, 22, 19, .4);
  animation: modal-rise .28s ease;
}
.search-modal-icon { font-size: 2.5rem; line-height: 1; }
.search-modal h3 {
  margin-top: .75rem;
  font-size: 1.6rem;
}
.search-modal p {
  margin-top: .5rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.search-modal-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 1.25rem 0;
}
.modal-link {
  display: block;
  padding: .65rem .75rem;
  font-size: .9rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.modal-link:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-tint);
}

@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(12px); } }


/* ================================================================
   9. HOME — HERO
   ================================================================ */
.hero-section {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
/* Thin L-bracket accent offset from the rounded top-left corner */
.hero-section::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: -12px;
  left: calc(clamp(1.25rem, 4vw, 2.5rem) - 12px);
  width: min(44%, 300px);
  height: 56%;
  border-top: 2px solid rgba(255, 255, 255, .72);
  border-left: 2px solid rgba(255, 255, 255, .72);
  border-top-left-radius: var(--radius-hero);
  pointer-events: none;
}
.hero-image {
  width: 100%;
  height: clamp(360px, 62vh, 640px);
  object-fit: cover;
  border-radius: var(--radius-hero-shape);
  filter: saturate(1.02) contrast(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin-inline: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: var(--radius-hero-shape);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(24, 22, 19, .15) 0%, rgba(24, 22, 19, .55) 100%);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.08;
  color: #fff;
  max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.hero-subtitle {
  margin-top: 1rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}


/* ================================================================
   10. HOME — ARTICLE CONTENT
   Shared by the explicit home-page main and class-less article bodies.
   Other named page templates get their own typography rules below.
   ================================================================ */
:is(main:not([class]):not(:has(> section)), .home-page-main) {
  padding: var(--space-lg) clamp(1.25rem, 4vw, 2.5rem) 0;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) > h1:first-child {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-bottom: 1.5rem;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) > h1:first-child::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 1rem auto 0;
  background: var(--accent);
  border-radius: 2px;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-top: 2em;
  margin-bottom: .6em;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) h3 {
  font-size: 1.3rem;
  margin-top: 1.6em;
  margin-bottom: .5em;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) p {
  margin-bottom: 1.25em;
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
:is(main:not([class]):not(:has(> section)), .home-page-main) ul,
:is(main:not([class]):not(:has(> section)), .home-page-main) ol {
  margin: 0 0 1.4em 1.4em;
  color: var(--ink-soft);
}
:is(main:not([class]):not(:has(> section)), .home-page-main) li { margin-bottom: .55em; line-height: 1.75; }
:is(main:not([class]):not(:has(> section)), .home-page-main) li::marker { color: var(--accent); }
:is(main:not([class]):not(:has(> section)), .home-page-main) a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
:is(main:not([class]):not(:has(> section)), .home-page-main) blockquote {
  margin: 1.8em 0;
  padding: .4em 0 .4em 1.4em;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--ink);
}
:is(main:not([class]):not(:has(> section)), .home-page-main) img {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.8em 0;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) figure { margin: 1.8em 0; }
:is(main:not([class]):not(:has(> section)), .home-page-main) figcaption {
  margin-top: .6em;
  font-size: .85rem;
  color: var(--ink-faint);
  text-align: center;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5em 0;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: .95rem;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) th,
:is(main:not([class]):not(:has(> section)), .home-page-main) td {
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  text-align: left;
}
:is(main:not([class]):not(:has(> section)), .home-page-main) th { background: var(--surface-alt); font-family: var(--font-display); }


/* ================================================================
   Shared section heading for the home asides
   ================================================================ */
.social-share h3,
.recent-posts-slider h2,
.popular-posts h2,
.comments-toggle h2 {
  font-family: var(--font-display);
}
.recent-posts-slider > h2,
.popular-posts > h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-bottom: 1.75rem;
}
.recent-posts-slider > h2::after,
.popular-posts > h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin: .9rem auto 0;
  background: var(--accent);
  border-radius: 2px;
}


/* ================================================================
   11. HOME — SOCIAL SHARE
   ================================================================ */
.social-share-aside {
  margin-top: var(--space-lg);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.social-share {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.social-share h3 {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: .75rem;
}
.share-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  background: var(--surface);
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.share-btn:hover {
  transform: translateY(-3px);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.share-btn svg { width: 20px; height: 20px; }


/* ================================================================
   12. HOME — RECENT POSTS SLIDER
   ================================================================ */
.recent-posts-aside { margin-top: var(--space-lg); }

.slider-container {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.slider-track {
  display: flex;
  transition: transform .5s ease;
}
.slider-slide {
  flex: 0 0 100%;
  min-width: 100%;
}
.slider-slide a {
  display: grid;
  grid-template-columns: minmax(0, 45%) 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--ink);
}
.slider-slide img {
  grid-column: 1;
  grid-row: 1 / -1;
  width: 100%;
  height: 100%;
  min-height: 260px;
  max-height: 360px;
  object-fit: cover;
}
.slider-slide h3 {
  grid-column: 2;
  align-self: end;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin-bottom: .5rem;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.25rem) 0 0;
}
.slider-slide p {
  grid-column: 2;
  align-self: start;
  color: var(--ink-soft);
  font-size: .97rem;
  padding: 0 clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2rem) 0;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
}
.slider-dots .dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--line);
  cursor: pointer;
  transition: width var(--transition), background var(--transition);
}
.slider-dots .dot.active {
  width: 26px;
  background: var(--accent);
}


/* ================================================================
   13. HOME — POPULAR ARTICLES
   ================================================================ */
.popular-posts-aside { margin-top: var(--space-lg); }

.popular-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.popular-posts > h2 { grid-column: 1 / -1; }

.popular-post-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.popular-post-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.popular-post-item a { display: block; color: var(--ink); }
.popular-post-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.popular-post-content { padding: 1.35rem 1.4rem 1.5rem; }
.popular-post-content h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: .5rem;
}
.popular-post-content p {
  font-size: .93rem;
  color: var(--ink-soft);
  margin-bottom: .9rem;
}
.read-more {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.popular-post-item:hover .read-more { color: var(--accent); }


/* ================================================================
   14. HOME — COMMENTS (collapsible)
   ================================================================ */
.comments-aside { margin-top: var(--space-lg); }

.comments-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comments-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.6rem;
}
.comments-toggle h2 { font-size: 1.4rem; }
.toggle-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.toggle-btn:hover { background: var(--accent-hover); color: #fff; }
.toggle-btn .arrow-icon {
  width: 22px;
  height: 22px;
  transition: transform var(--transition);
}
.toggle-btn.active .arrow-icon { transform: rotate(180deg); }

.comment-form-container {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.6rem;
  opacity: 0;
  transition: max-height .35s ease, opacity .35s ease, padding .35s ease;
}
.comment-form-container.active {
  max-height: 720px;
  opacity: 1;
  padding-bottom: 1.6rem;
}
.comment-form-container .comment-form { padding-top: .5rem; border-top: 1px solid var(--line); }
.comment-form-container .form-group:first-child { margin-top: 1.1rem; }


/* ================================================================
   15. HOME — AUTHOR ASIDE
   ================================================================ */
.author-aside {
  margin-top: var(--space-lg);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.author-aside .author-bio { background: var(--surface-alt); }


/* ================================================================
   18. ABOUT PAGE  (about-template.html)
   ----------------------------------------------------------------
   <main class="about-page-main"> + sibling <aside class="about-sidebar">.
   Desktop = two columns via a scoped body grid (header/footer stay
   full-bleed); below 860px it collapses to a single centred column.
   ================================================================ */
body:has(.about-page-main) {
  display: grid;
  grid-template-columns:
    [full-start] 1fr
    [wide-start] clamp(1.25rem, 4vw, 2.5rem)
    [main-start] minmax(0, 740px)
    [main-end] clamp(1.75rem, 4vw, 3rem)
    [side-start] minmax(0, 300px)
    [side-end] clamp(1.25rem, 4vw, 2.5rem)
    [wide-end] 1fr [full-end];
  align-content: start;
}
body:has(.about-page-main) > header,
body:has(.about-page-main) > footer { grid-column: full-start / full-end; }
body:has(.about-page-main) > .about-page-main { grid-column: main-start / main-end; }
body:has(.about-page-main) > .about-sidebar   { grid-column: side-start / side-end; }

.about-page-main {
  max-width: none;
  margin-inline: 0;
  padding-top: var(--space-lg);
}
.about-sidebar { padding-top: var(--space-lg); }

/* --- Page header (shared by About / Blog / Contact) --- */
.about-header,
.blog-header,
.contact-header { margin-bottom: var(--space-md); }
.about-header h1,
.blog-header h1,
.contact-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
}
.about-header h1::after,
.blog-header h1::after,
.contact-header h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 1.1rem;
  background: var(--accent);
  border-radius: 2px;
}
.about-header .intro-text,
.blog-header .intro-text,
.contact-header .intro-text {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* --- About body sections --- */
.about-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.about-section h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin-bottom: .55rem;
}
.about-section p {
  font-size: 1.04rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.about-section p + p { margin-top: 1.1em; }
.about-author-section {
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}
.about-author-section h2 { margin-bottom: 1.2rem; }

/* --- Sidebar widgets --- */
.sidebar-widget {
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.sidebar-widget + .sidebar-widget { margin-top: 1.5rem; }
.sidebar-widget > h3 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: .9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.team-member + .team-member {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.team-member h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: .15rem;
}
.team-member-role {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .45rem;
}
.team-member-bio {
  font-size: .92rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.contact-description {
  margin-bottom: 1rem;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.contact-item strong {
  display: block;
  margin-bottom: .2rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-item p {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  body:has(.about-page-main) { display: block; }
  .about-page-main,
  .about-sidebar {
    max-width: var(--wrap-narrow);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  }
  .about-sidebar { padding-top: var(--space-md); }
}


/* ================================================================
   19. BLOG INDEX PAGE  (blog-template.html)
   ----------------------------------------------------------------
   <div class="blog-page-wrapper"> holds <main class="blog-main"> +
   <aside class="blog-sidebar">. The wrapper (not body) is the grid,
   so header/footer stay full-bleed with no :has() needed.
   ================================================================ */
.blog-page-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  column-gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--space-lg) clamp(1.25rem, 4vw, 2.5rem) 0;
}

/* --- Article list --- */
.articles-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.blog-post {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.blog-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.blog-post .post-link {
  display: grid;
  grid-template-columns: minmax(0, 40%) 1fr;
  color: var(--ink);
}
.post-image-wrapper {
  overflow: hidden;
  background: var(--surface-alt);
}
.post-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}
.post-details {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.4rem 1.5rem 1.5rem;
}
.post-details h2 {
  font-size: 1.35rem;
  line-height: 1.25;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.post-meta span + span::before {
  content: "·";
  margin-right: .5rem;
  color: var(--line);
}
.post-excerpt {
  font-size: .96rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.post-details .read-more { margin-top: .25rem; }

/* --- Featured article: image on top, roomier --- */
.blog-post.featured .post-link { grid-template-columns: 1fr; }
.blog-post.featured .post-image { min-height: 240px; max-height: 340px; }
.blog-post.featured .post-details { padding: 1.75rem clamp(1.5rem, 3vw, 2.25rem) 2rem; }
.blog-post.featured .post-details h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  padding: .35rem .8rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-pill);
}

/* --- Pagination --- */
.pagination { margin-top: var(--space-md); }
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.pagination-numbers { display: flex; gap: .35rem; }
.pagination-btn,
.pagination-number {
  min-width: 40px;
  padding: .55rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pagination-btn:hover:not(:disabled),
.pagination-number:hover:not(.active) {
  border-color: var(--accent);
  color: var(--ink);
}
.pagination-number.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  cursor: default;
}
.pagination-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* --- Blog sidebar (top-aligned with the article list) --- */
.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.sidebar-list li + li {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}
.sidebar-list a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink);
}
.sidebar-list a:hover { color: var(--accent); }

.sidebar-updates {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.sidebar-updates li { font-size: .9rem; line-height: 1.6; color: var(--ink-soft); }
.update-date {
  display: block;
  margin-bottom: .1rem;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

@media (max-width: 860px) {
  .blog-page-wrapper {
    grid-template-columns: 1fr;
    max-width: var(--wrap-narrow);
    row-gap: var(--space-md);
  }
}

@media (max-width: 620px) {
  .blog-post .post-link,
  .blog-post.featured .post-link { grid-template-columns: 1fr; }
  .post-image { min-height: 190px; max-height: 240px; }
}


/* ================================================================
   20. CONTACT PAGE  (contact-template.html)
   ----------------------------------------------------------------
   <main class="contact-page-main"> holds the header, a two-column
   <div class="contact-content-wrapper"> (form + info aside) and a
   full-width map section.
   ================================================================ */
.contact-page-main {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--space-lg) clamp(1.25rem, 4vw, 2.5rem) 0;
}

/* --- Two-column form + info --- */
.contact-content-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  column-gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.contact-form-section h2,
.contact-map-section h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1.1rem;
}

.contact-form {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.contact-form .submit-btn { margin-top: .5rem; }

/* --- Contact info box (same card language as sidebar widgets) --- */
.contact-info-box {
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.contact-info-box h3 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: .9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.contact-detail-item {
  display: flex;
  gap: .85rem;
  padding: .9rem 0;
}
.contact-detail-item + .contact-detail-item { border-top: 1px solid var(--line); }
.contact-detail-item:first-of-type { padding-top: 0; }
.contact-detail-item:last-child { padding-bottom: 0; }
.contact-detail-item > svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: .15rem;
  color: var(--accent);
}
.contact-detail-item strong {
  display: block;
  margin-bottom: .15rem;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-detail-item a,
.contact-detail-item p {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.contact-detail-item a:hover { color: var(--accent); }

/* --- Map --- */
.contact-map-section { margin-top: var(--space-lg); }
.map-container {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  line-height: 0;
}
.map-container iframe { display: block; width: 100%; border: 0; }

@media (max-width: 860px) {
  .contact-content-wrapper {
    grid-template-columns: 1fr;
    row-gap: var(--space-md);
  }
}


/* ================================================================
   21. ARTICLE PAGE  (article-template.html)
   ----------------------------------------------------------------
   <figure class="article-hero-media">, then a class-less <main>
   (generator-injected, styled by section 10) wrapped in
   <div class="article-page-main">, plus a sibling
   <aside class="article-sidebar">. Two columns via a scoped body
   grid; header / footer / hero stay full-width.
   ================================================================ */
body:has(.article-page-main) {
  display: grid;
  grid-template-columns:
    [full-start] 1fr
    [wide-start] clamp(1.25rem, 4vw, 2.5rem)
    [main-start] minmax(0, 720px)
    [main-end] clamp(1.75rem, 4vw, 3rem)
    [side-start] minmax(0, 300px)
    [side-end] clamp(1.25rem, 4vw, 2.5rem)
    [wide-end] 1fr [full-end];
  align-content: start;
}
body:has(.article-page-main) > header,
body:has(.article-page-main) > footer { grid-column: full-start / full-end; }
body:has(.article-page-main) > .article-hero-media { grid-column: main-start / side-end; }
body:has(.article-page-main) > .article-page-main   { grid-column: main-start / main-end; }
body:has(.article-page-main) > .article-sidebar     { grid-column: side-start / side-end; }

/* --- Hero image --- */
.article-hero-media {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-hero-shape);
  overflow: hidden;
  background: var(--surface-alt);
}
.article-hero-media img {
  width: 100%;
  height: clamp(300px, 44vh, 520px);
  object-fit: cover;
}

/* --- Article body column (inner <main> keeps section-10 typography) --- */
.article-page-main > main {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}
.article-sidebar { padding-top: var(--space-lg); }

/* --- Author widget: flatten the nested author-bio card, stack it --- */
.sidebar-widget .author-bio {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  flex-direction: column;
  text-align: center;
  gap: 1rem;
}
.sidebar-widget .author-photo { width: 84px; height: 84px; }
.sidebar-widget .author-links { justify-content: center; }
.author-details h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: .3rem;
}

/* --- Comments widget --- */
.comments-intro {
  margin-bottom: 1rem;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.comments-widget .comment-form .form-group { margin-bottom: 1rem; }

@media (max-width: 860px) {
  body:has(.article-page-main) { display: block; }
  .article-page-main,
  .article-sidebar {
    max-width: var(--wrap-narrow);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  }
  .article-sidebar { padding-top: var(--space-md); }
  .article-hero-media {
    margin-top: 0;
    border-radius: 0;
  }
  .article-hero-media img { height: clamp(240px, 40vh, 380px); }
}


/* ================================================================
   22. AUTHOR PROFILE PAGE  (author-template.html)
   ----------------------------------------------------------------
   Class-less <main> (holds <section> blocks, so it is excluded from
   the section-10 prose rules) + sibling <aside class="author-sidebar">.
   Two columns via a scoped body grid; header / footer full-width.
   ================================================================ */
body:has(.author-sidebar) {
  display: grid;
  grid-template-columns:
    [full-start] 1fr
    [wide-start] clamp(1.25rem, 4vw, 2.5rem)
    [main-start] minmax(0, 740px)
    [main-end] clamp(1.75rem, 4vw, 3rem)
    [side-start] minmax(0, 300px)
    [side-end] clamp(1.25rem, 4vw, 2.5rem)
    [wide-end] 1fr [full-end];
  align-content: start;
}
body:has(.author-sidebar) > header,
body:has(.author-sidebar) > footer { grid-column: full-start / full-end; }
body:has(.author-sidebar) > main            { grid-column: main-start / main-end; padding-top: var(--space-lg); }
body:has(.author-sidebar) > .author-sidebar { grid-column: side-start / side-end; padding-top: var(--space-lg); }

/* Section rhythm + headings */
body:has(.author-sidebar) main > section + section { margin-top: var(--space-lg); }
.author-topics > h2,
.author-featured > h2,
.author-approach > h2,
.author-currently > h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}

/* --- Hero --- */
.author-hero {
  display: flex;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: flex-start;
}
.author-hero-photo {
  flex-shrink: 0;
  width: clamp(150px, 26vw, 220px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-hero-shape);
}
.author-hero-content h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1;
}
.author-tagline {
  margin-top: .5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-style: italic;
  color: var(--ink-soft);
}
.author-credentials {
  margin-top: .9rem;
  font-size: .82rem;
  letter-spacing: .02em;
  color: var(--ink-faint);
}
.author-bio-text {
  margin-top: 1rem;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.author-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.25rem;
}
.author-social-links .social-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color var(--transition), color var(--transition);
}
.author-social-links .social-link:hover { border-color: var(--accent); color: var(--ink); }
.author-social-links .social-link svg { width: 16px; height: 16px; }

/* --- Topic tags --- */
.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  list-style: none;
}
.topic-tag {
  padding: .45rem .95rem;
  font-size: .85rem;
  color: var(--accent-dark);
  background: var(--accent-tint);
  border-radius: var(--radius-pill);
}

/* --- Featured writing cards --- */
.featured-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.featured-article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.featured-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.featured-article-card a {
  display: block;
  padding-bottom: 1.1rem;
  color: var(--ink);
}
.featured-article-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: .9rem;
}
.article-category {
  display: inline-block;
  margin: 0 1.1rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.featured-article-card h3 {
  margin: .4rem 1.1rem 0;
  font-size: 1.1rem;
  line-height: 1.25;
}
.featured-article-card p {
  margin: .4rem 1.1rem 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 1.1rem 0;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.article-meta span + span::before,
.article-meta time + span::before {
  content: "·";
  margin-right: .5rem;
  color: var(--line);
}

/* --- Approach --- */
.author-approach-quote {
  margin: 0;
  padding: .3em 0 .3em 1.3em;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}
.author-approach-text {
  margin-top: 1.1rem;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.author-currently p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* --- Author sidebar --- */
.author-sidebar .sidebar-section {
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.author-sidebar .sidebar-section + .sidebar-section { margin-top: 1.5rem; }
.author-sidebar .sidebar-section > h3 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: .9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.author-sidebar .sidebar-section > p {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.author-facts { margin: 0; }
.author-facts dt {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.author-facts dd {
  margin: .15rem 0 0;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.author-facts dd + dt {
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}

.contact-button {
  display: inline-block;
  margin-top: 1rem;
  padding: .7rem 1.5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: background var(--transition);
}
.contact-button:hover { background: var(--accent-hover); color: #fff; }

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 1rem;
}
.newsletter-form input {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.newsletter-form button {
  padding: .7rem 1.2rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition);
}
.newsletter-form button:hover { background: var(--accent-hover); }

@media (max-width: 860px) {
  body:has(.author-sidebar) { display: block; }
  body:has(.author-sidebar) > main,
  .author-sidebar {
    max-width: var(--wrap-narrow);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  }
  .author-sidebar { padding-top: var(--space-md); }
  .featured-articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .author-hero { flex-direction: column; align-items: center; text-align: center; }
  .author-social-links { justify-content: center; }
  .topic-tags { justify-content: center; }
  .featured-articles-grid { grid-template-columns: 1fr; }
}


/* ================================================================
   23. LEGAL / POLICY PAGES
   (privacy-policy-template.html, cookie-policy-template.html)
   ----------------------------------------------------------------
   <main class="policy-page-main"> > <article class="policy-content">
   with a <div class="policy-meta"> and repeated
   <section class="policy-section">. Single reading column.
   ================================================================ */
.policy-page-main {
  width: 100%;
  max-width: var(--wrap-narrow);
  margin-inline: auto;
  padding: var(--space-lg) clamp(1.25rem, 4vw, 2.5rem) 0;
}

.policy-content > h1 {
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1;
}
.policy-content > h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 1.1rem;
  background: var(--accent);
  border-radius: 2px;
}

.policy-meta {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--ink-soft);
}
.policy-meta p { margin: 0; }
.policy-meta strong {
  font-family: var(--font-body);
  color: var(--ink);
}

.policy-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}
.policy-section h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: .8rem;
}
.policy-section h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 .5rem;
}
.policy-section p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.policy-section strong { color: var(--ink); }
.policy-section ul {
  margin: 0 0 1.1rem 1.35rem;
  color: var(--ink-soft);
}
.policy-section li {
  margin-bottom: .45rem;
  line-height: 1.7;
}
.policy-section li::marker { color: var(--accent); }
.policy-section a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}

.policy-content .contact-info-box { margin-top: 1rem; }
.policy-content .contact-info-box p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.policy-content .contact-info-box p + p { margin-top: .4rem; }

/* Browser-settings links (cookie policy) as a chip row */
.policy-section ul.browser-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1rem 0 1.1rem;
  list-style: none;
}
.browser-links li { margin: 0; }
.browser-links a {
  display: inline-block;
  padding: .45rem .95rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color var(--transition), color var(--transition);
}
.browser-links a:hover { border-color: var(--accent); color: var(--ink); }


/* ================================================================
   16. RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-content .footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  /* Collapsed navigation */
  .header-container { flex-wrap: wrap; row-gap: .75rem; }
  .mobile-menu-toggle { display: flex; order: 3; }
  .search-box { order: 4; max-width: none; flex-basis: 100%; }

  .main-nav {
    order: 5;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .main-nav.active { max-height: 340px; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: .5rem;
  }
  .main-nav li { border-top: 1px solid var(--line); }
  .main-nav a {
    display: block;
    padding: .85rem .25rem;
    letter-spacing: .12em;
  }
  .main-nav a::after { display: none; }

  .slider-slide a { grid-template-columns: 1fr; column-gap: 0; }
  .slider-slide img { grid-column: 1; grid-row: auto; min-height: 200px; max-height: 260px; }
  .slider-slide h3 { grid-column: 1; padding: 1.25rem clamp(1.25rem, 4vw, 1.75rem) 0; }
  .slider-slide p { grid-column: 1; padding: 0 clamp(1.25rem, 4vw, 1.75rem) 1.5rem; }

  .popular-posts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .hero-image { height: clamp(320px, 70vh, 460px); }
  .hero-section::after { display: none; }

  .form-row { grid-template-columns: 1fr; }

  .author-bio { flex-direction: column; text-align: center; }
  .author-links { justify-content: center; }

  .footer-content { grid-template-columns: 1fr; }

  .popular-posts { grid-template-columns: 1fr; }

  .search-modal { padding: 1.75rem 1.35rem; }
}


/* ================================================================
   17. MOTION / PRINT
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  header,
  footer,
  .social-share-aside,
  .recent-posts-aside,
  .comments-aside,
  .mobile-menu-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  main { max-width: none; }
}
