/*
Theme Name:  Deepak WP
Theme URI:   https://deepak.co
Author:      Deepak Machado
Author URI:  https://deepak.co
Description: Personal brand theme for the Stoic Investor. Sidebar TOC, funnel pages, Reading Room, full Customizer control.
Version:     3.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License:     GNU General Public License v2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: deepak-wp
*/

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Background & Surface */
  --bg:           #F8F5F0;
  --surface:      #FFFFFF;
  --surface-2:    #F2EFE9;

  /* Text */
  --ink:          #1A1916;
  --ink-2:        #3A3733;
  --muted:        #8A8680;
  --faint:        #C4C0BB;

  /* Brand */
  --accent:       #2A5244;
  --accent-dim:   #E4EDEA;
  --accent-mid:   #3D7263;
  --gold:         #B8972A;
  --gold-dim:     #F6F0DC;

  /* Quizzy */
  --q-orange:     #D45B28;
  --q-bg:         #FDF3EE;
  --q-border:     rgba(212, 91, 40, 0.18);

  /* Borders */
  --line:         #E5E0D8;
  --line-strong:  #CEC9C0;

  /* Fonts */
  --serif:        'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:         'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:         'Courier New', Courier, monospace;

  /* Scale */
  --step--1:  0.75rem;
  --step-0:   0.9375rem;   /* 15px base */
  --step-1:   1.0625rem;   /* 17px body */
  --step-2:   1.25rem;
  --step-3:   1.5rem;
  --step-4:   2rem;
  --step-5:   2.625rem;
  --step-6:   3.5rem;
  --step-7:   4.5rem;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --col-content: 680px;
  --col-wide:    1060px;
  --gutter:      clamp(1.25rem, 5vw, 2.5rem);

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;

  /* Motion */
  --ease:  0.2s ease;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Dark Mode: OS ───────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #141210;
    --surface:     #1E1B18;
    --surface-2:   #252220;
    --ink:         #EDE8E0;
    --ink-2:       #C8C3BB;
    --muted:       #7A7570;
    --faint:       #3A3733;
    --accent:      #5A9E8A;
    --accent-dim:  #1A2E28;
    --accent-mid:  #4A8070;
    --gold:        #C9A84C;
    --gold-dim:    #2A2010;
    --q-orange:    #E07050;
    --q-bg:        #2A1C14;
    --q-border:    rgba(224, 112, 80, 0.2);
    --line:        #2E2B27;
    --line-strong: #3A3733;
  }
}

/* ── Dark Mode: Manual Toggle ────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #141210;
  --surface:     #1E1B18;
  --surface-2:   #252220;
  --ink:         #EDE8E0;
  --ink-2:       #C8C3BB;
  --muted:       #7A7570;
  --faint:       #3A3733;
  --accent:      #5A9E8A;
  --accent-dim:  #1A2E28;
  --accent-mid:  #4A8070;
  --gold:        #C9A84C;
  --gold-dim:    #2A2010;
  --q-orange:    #E07050;
  --q-bg:        #2A1C14;
  --q-border:    rgba(224, 112, 80, 0.2);
  --line:        #2E2B27;
  --line-strong: #3A3733;
}

[data-theme="light"] {
  --bg:          #F8F5F0;
  --surface:     #FFFFFF;
  --surface-2:   #F2EFE9;
  --ink:         #1A1916;
  --ink-2:       #3A3733;
  --muted:       #8A8680;
  --faint:       #C4C0BB;
  --accent:      #2A5244;
  --accent-dim:  #E4EDEA;
  --accent-mid:  #3D7263;
  --gold:        #B8972A;
  --gold-dim:    #F6F0DC;
  --q-orange:    #D45B28;
  --q-bg:        #FDF3EE;
  --q-border:    rgba(212, 91, 40, 0.18);
  --line:        #E5E0D8;
  --line-strong: #CEC9C0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-1);
  line-height: 1.75;
  min-height: 100vh;
  transition: background var(--ease), color var(--ease);
}

/* Subtle paper grain — no image, pure CSS */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease), opacity var(--ease);
}

a:hover { opacity: 0.75; }

p { margin-bottom: var(--sp-5); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: var(--sp-8); margin-bottom: var(--sp-5); }
li { margin-bottom: var(--sp-2); line-height: 1.75; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

blockquote {
  border-left: 2px solid var(--accent);
  margin: var(--sp-8) 0;
  padding: var(--sp-4) var(--sp-6);
  color: var(--ink-2);
  font-style: italic;
  font-size: var(--step-2);
  font-family: var(--serif);
}

blockquote p { margin: 0; }

blockquote cite {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--step--1);
  font-family: var(--sans);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-12) 0;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.15em 0.45em;
  border-radius: var(--r-sm);
}

pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--sp-6);
  border-radius: var(--r-md);
  overflow-x: auto;
  margin: var(--sp-8) 0;
}
pre code { background: none; padding: 0; color: var(--ink); }

strong, b { font-weight: 600; color: var(--ink); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-8) 0;
  font-size: var(--step-0);
  font-family: var(--sans);
}
th {
  background: var(--accent-dim);
  color: var(--accent);
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-weight: 600;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}
td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }

/* WP alignment */
.alignleft  { float: left;  margin: var(--sp-2) var(--sp-6) var(--sp-4) 0; }
.alignright { float: right; margin: var(--sp-2) 0 var(--sp-4) var(--sp-6); }
.aligncenter { display: block; margin: var(--sp-6) auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: var(--sp-2);
  font-style: italic;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.reading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.06s linear;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; position: relative; z-index: 1; }
.site-main { flex: 1; padding-bottom: var(--sp-20); }

.wrap {
  width: 100%;
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.col {
  width: 100%;
  max-width: var(--col-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-4) 0 0;
  margin-bottom: var(--sp-6);
  transition: box-shadow var(--ease), border-color var(--ease);
}

/* Frosted glass — light mode */
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(248, 245, 240, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  [data-theme="dark"] .site-header {
    background: rgba(20, 18, 16, 0.88);
  }
}

/* Frosted glass — OS dark mode */
@media (prefers-color-scheme: dark) {
  @supports (backdrop-filter: blur(1px)) {
    :root:not([data-theme="light"]) .site-header {
      background: rgba(20, 18, 16, 0.88);
    }
  }
}

/* Shadow added by JS .scrolled class once user scrolls */
.site-header.scrolled {
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.07);
  border-bottom-color: transparent;
}

.header-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}

.site-title {
  font-family: var(--serif);
  font-size: calc(var(--step-4) * 2);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.site-title a { color: inherit; }
.site-title a:hover { opacity: 0.7; }

.site-tagline {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Dark mode toggle button */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--ease);
  padding: 0;
}
.dark-mode-toggle:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}
.dark-mode-toggle svg { pointer-events: none; }

/* Header rule + nav row */
.header-rule { border: none; border-top: 1px solid var(--line); margin-bottom: 0; }

.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Primary navigation */
.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  display: block;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  transition: all var(--ease);
}
.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links .current-page-ancestor > a,
.nav-links .current-category-ancestor > a {
  color: var(--accent);
  background: var(--accent-dim);
  opacity: 1;
}

/* Compact search in nav */
.nav-search {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0 var(--sp-4);
  transition: border-color var(--ease);
}
.nav-search:focus-within { border-color: var(--accent); }

.nav-search-input {
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink);
  padding: var(--sp-2) 0;
  width: 120px;
  outline: none;
  transition: width var(--ease);
}
.nav-search.expanded .nav-search-input,
.nav-search-input:focus { width: 200px; }

.nav-search-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-2);
  font-size: var(--step-0);
  transition: color var(--ease);
}
.nav-search-btn:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY FILTER (optional, controlled by Customizer)
   ═══════════════════════════════════════════════════════════════════════════ */
.cat-filter-bar {
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-10);
  padding-bottom: var(--sp-4);
}
.cat-filter-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}
.cat-filter-link {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  transition: all var(--ease);
}
.cat-filter-link:hover, .cat-filter-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE INTRO BLOCK
   ═══════════════════════════════════════════════════════════════════════════ */
.intro-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-12);
  margin-bottom: var(--sp-12);
  position: relative;
  overflow: hidden;
}
.intro-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid), var(--gold));
}
.intro-greeting {
  font-family: var(--serif);
  font-size: var(--step-5);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
  line-height: 1.1;
}
.intro-text {
  font-family: var(--sans);
  font-size: var(--step-2);
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: var(--sp-8);
}
.intro-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: var(--sp-3) var(--sp-6);
  border-radius: 30px;
  letter-spacing: 0.04em;
  transition: all var(--ease);
}
.intro-cta::after { content: '→'; transition: transform var(--ease); }
.intro-cta:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}
.intro-cta:hover::after { transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURED POST (latest, highlighted)
   ═══════════════════════════════════════════════════════════════════════════ */
.featured-post {
  padding: var(--sp-10) 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-4);
}
.featured-post-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.featured-post-label::after {
  content: '';
  display: block;
  height: 1px;
  width: 48px;
  background: var(--gold);
  opacity: 0.4;
}
.featured-post-title {
  font-size: clamp(var(--step-4), 4vw, var(--step-6));
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-5);
  font-family: var(--serif);
}
.featured-post-title a {
  color: var(--ink);
}
.featured-post-title a:hover { color: var(--accent); opacity: 1; }

.featured-post-excerpt {
  font-size: var(--step-2);
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: var(--sp-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   POST LIST
   ═══════════════════════════════════════════════════════════════════════════ */
.posts-section-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: var(--sp-6) 0 var(--sp-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0 var(--sp-6);
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

/* Post number badge */
.post-number {
  font-family: var(--serif);
  font-size: var(--step-3);
  color: var(--faint);
  font-weight: 400;
  line-height: 1.1;
  padding-top: 2px;
  text-align: right;
  letter-spacing: -0.02em;
  transition: color var(--ease);
}
.post-item:hover .post-number { color: var(--accent-mid); }

.post-item-body {}

.post-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.post-cat-badge {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.18em 0.65em;
  border-radius: var(--r-sm);
}
.post-cat-badge:hover { background: var(--accent); color: #fff; opacity: 1; }

.post-date, .post-read-time {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
}
.post-read-time::before { content: '·'; margin-right: var(--sp-3); color: var(--faint); }

.post-list-title {
  font-family: var(--serif);
  font-size: clamp(var(--step-2), 2.5vw, var(--step-3));
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.02em;
  transition: color var(--ease);
}
.post-list-title a { color: inherit; }
.post-list-title a:hover { color: var(--accent); opacity: 1; }

.post-excerpt {
  font-size: var(--step-0);
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: var(--sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  gap: var(--sp-2);
}
.read-link::after { content: '→'; transition: transform var(--ease); }
.read-link:hover { opacity: 1; }
.read-link:hover::after { transform: translateX(4px); }

/* No post numbers variant */
.post-item.no-number { grid-template-columns: 1fr; }

/* ═══════════════════════════════════════════════════════════════════════════
   QUIZZY PROMO (inline)
   ═══════════════════════════════════════════════════════════════════════════ */
.quizzy-inline {
  background: var(--q-bg);
  border: 1px solid var(--q-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-8);
  margin: var(--sp-6) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.quizzy-from-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--q-orange);
  margin-bottom: var(--sp-1);
}
.quizzy-inline h4 {
  font-family: var(--serif);
  font-size: var(--step-3);
  color: var(--ink);
  margin-bottom: var(--sp-2);
  font-weight: 400;
}
.quizzy-inline p {
  font-family: var(--sans);
  font-size: var(--step-0);
  color: var(--muted);
  margin: 0;
}
.quizzy-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  color: #fff;
  background: var(--q-orange);
  padding: var(--sp-3) var(--sp-6);
  border-radius: 30px;
  white-space: nowrap;
  transition: opacity var(--ease);
  letter-spacing: 0.02em;
}
.quizzy-btn:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
.pagination-wrap {
  padding: var(--sp-10) 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.pagination-wrap .page-numbers {
  font-family: var(--sans);
  font-size: var(--step-0);
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 0.4em 0.9em;
  border-radius: var(--r-sm);
  transition: all var(--ease);
  line-height: 1.4;
}
.pagination-wrap .page-numbers:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.pagination-wrap .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination-wrap .page-numbers.dots { border-color: transparent; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HEADER (archives, search)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-heading {
  padding: var(--sp-12) 0 var(--sp-8);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-8);
}
.page-heading .label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}
.page-heading h1 {
  font-size: clamp(var(--step-4), 4vw, var(--step-5));
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}
.page-heading .desc {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 500px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════════════════════════════════ */
.single-wrap { padding: var(--sp-12) 0; }

.post-header {
  margin-bottom: var(--sp-10);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--line);
}
.post-header .post-meta-row { margin-bottom: var(--sp-5); }

.post-title {
  font-family: var(--serif);
  font-size: clamp(var(--step-4), 5vw, var(--step-6));
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}

.post-subtitle {
  font-family: var(--sans);
  font-size: var(--step-2);
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
}

.post-thumbnail { margin-bottom: var(--sp-10); border-radius: var(--r-md); overflow: hidden; }
.post-thumbnail img { width: 100%; }

/* Table of Contents */
.toc-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-8) 0;
  font-family: var(--sans);
}
.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.toc-title {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.toc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: var(--step-0);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0;
  transition: color var(--ease);
}
.toc-toggle:hover { color: var(--accent); }
.toc-body { margin-top: var(--sp-4); }
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc-item {
  margin-bottom: var(--sp-2);
  counter-increment: toc;
}
.toc-item.toc-h3 { padding-left: var(--sp-6); }
.toc-link {
  font-size: var(--step-0);
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--ease);
  line-height: 1.4;
  display: block;
  padding: var(--sp-1) 0;
  border-bottom: 1px solid transparent;
}
.toc-link:hover, .toc-link.active {
  color: var(--accent);
  opacity: 1;
}
.toc-link.active { font-weight: 600; }

/* Post body */
.post-body {
  font-family: var(--sans);
  font-size: var(--step-1);
  line-height: 1.8;
}
.post-body h2 { font-size: var(--step-4); margin: var(--sp-12) 0 var(--sp-5); }
.post-body h3 { font-size: var(--step-3); margin: var(--sp-10) 0 var(--sp-4); }
.post-body h4 { font-size: var(--step-2); margin: var(--sp-8) 0 var(--sp-3); }
.post-body p  { margin-bottom: var(--sp-6); }
.post-body a  { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { opacity: 0.7; }
.post-body ul,
.post-body ol { margin: var(--sp-4) 0 var(--sp-6) var(--sp-8); }
.post-body li { margin-bottom: var(--sp-3); }
.post-body img { margin: var(--sp-8) auto; border-radius: var(--r-md); }
.post-body figure { margin: var(--sp-8) 0; }
.post-body figcaption { text-align: center; font-size: var(--step--1); color: var(--muted); margin-top: var(--sp-3); }

/* Stoic pull quote helper class */
.stoic-quote {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-8) 0;
  margin: var(--sp-12) 0;
  text-align: center;
}
.stoic-quote p {
  font-family: var(--serif);
  font-size: clamp(var(--step-3), 3vw, var(--step-5));
  font-style: italic;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}
.stoic-quote cite {
  font-family: var(--sans);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-style: normal;
}

/* Share row */
.share-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: var(--sp-8) 0;
  flex-wrap: wrap;
}
.share-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-right: var(--sp-2);
}
.share-btn {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.4em 0.9em;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  margin: var(--sp-8) 0;
}
.tag-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: var(--sp-2);
}
.post-tag {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.2em 0.8em;
  border-radius: 20px;
}
.post-tag:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* Author box */
.author-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  margin: var(--sp-10) 0;
  display: flex;
  gap: var(--sp-6);
  align-items: flex-start;
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: var(--step-3);
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.author-by { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: var(--sp-1); }
.author-name { font-family: var(--serif); font-size: var(--step-2); color: var(--ink); margin-bottom: var(--sp-2); }
.author-bio { font-family: var(--sans); font-size: var(--step-0); color: var(--muted); line-height: 1.6; margin-bottom: var(--sp-3); }
.author-link { font-family: var(--sans); font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.author-link:hover { opacity: 0.7; }

/* Newsletter box */
.newsletter-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-10);
  margin: var(--sp-10) 0;
  position: relative;
  overflow: hidden;
}
.newsletter-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.newsletter-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  display: block;
}
.newsletter-box h3 { font-family: var(--serif); font-size: var(--step-3); font-weight: 400; margin-bottom: var(--sp-2); }
.newsletter-count { font-family: var(--sans); font-size: var(--step-0); color: var(--gold); font-weight: 600; margin-bottom: var(--sp-2); }
.newsletter-desc { font-family: var(--sans); font-size: var(--step-0); color: var(--muted); line-height: 1.65; margin-bottom: var(--sp-6); }
.newsletter-form { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
  flex: 1; min-width: 180px;
  padding: 0.7em 1em;
  font-size: var(--step-0);
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--ease);
}
.newsletter-form input[type="text"] { flex: 0 0 140px; min-width: 0; }
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
  padding: 0.7em 1.5em;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity var(--ease);
  white-space: nowrap;
}
.newsletter-form button:hover { opacity: 0.85; }
.newsletter-note { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); margin-top: var(--sp-3); margin-bottom: 0; }

/* Related posts */
.related-section {
  margin: var(--sp-10) 0;
  padding-top: var(--sp-8);
  border-top: 1px solid var(--line);
}
.related-label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: var(--sp-5);
}
.related-list { list-style: none; padding: 0; }
.related-list li {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
}
.related-list li:first-child { border-top: 1px solid var(--line); }
.related-list a { font-family: var(--serif); font-size: var(--step-2); color: var(--ink); flex: 1; line-height: 1.3; transition: color var(--ease); }
.related-list a:hover { color: var(--accent); opacity: 1; }
.related-cat { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   STATIC PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.page-wrap { padding: var(--sp-12) 0; }
.page-header-block {
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--line);
}
.page-header-block h1 { font-size: clamp(var(--step-4), 5vw, var(--step-6)); font-weight: 400; letter-spacing: -0.03em; }
.page-body h2 { font-size: var(--step-4); margin: var(--sp-10) 0 var(--sp-4); }
.page-body h3 { font-size: var(--step-3); margin: var(--sp-8) 0 var(--sp-3); }
.page-body p { margin-bottom: var(--sp-6); line-height: 1.8; }
.page-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════════════════════════════════════ */
.search-form-large { display: flex; gap: var(--sp-3); margin: var(--sp-8) 0; flex-wrap: wrap; }
.search-form-large input[type="search"] {
  flex: 1; min-width: 240px;
  padding: 0.8em 1em;
  font-size: var(--step-1);
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--ease);
}
.search-form-large input[type="search"]:focus { border-color: var(--accent); }
.search-form-large button {
  padding: 0.8em 1.6em;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: opacity var(--ease);
}
.search-form-large button:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════════════════
   COMMENTS
   ═══════════════════════════════════════════════════════════════════════════ */
.comments-section { margin-top: var(--sp-12); padding-top: var(--sp-8); border-top: 1px solid var(--line); }
.comments-section .comments-label { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: var(--sp-6); }
.comment-list { list-style: none; padding: 0; }
.comment { padding: var(--sp-6) 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment-author-name { font-family: var(--serif); font-size: var(--step-2); color: var(--ink); margin-bottom: var(--sp-1); }
.comment-byline { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); margin-bottom: var(--sp-4); }
.comment-content p { font-size: var(--step-1); margin-bottom: var(--sp-3); }
.comment-reply-link { font-family: var(--sans); font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.comment-reply-link:hover { color: var(--accent); opacity: 1; }

#respond { margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
#respond h3 { font-size: var(--step-3); font-weight: 400; margin-bottom: var(--sp-6); }
.comment-form label { display: block; font-family: var(--sans); font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--sp-2); }
.comment-form p { margin-bottom: var(--sp-5); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 0.7em 1em;
  font-size: var(--step-0);
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--ease);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { height: 130px; resize: vertical; font-family: var(--sans); line-height: 1.6; }
.comment-form input[type="submit"] {
  padding: 0.7em 1.6em;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity var(--ease);
}
.comment-form input[type="submit"]:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: var(--sp-12) 0 var(--sp-8);
}
.footer-inner { max-width: var(--col-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* Quizzy in footer */
.footer-quizzy {
  background: var(--q-bg);
  border: 1px solid var(--q-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-8);
  margin-bottom: var(--sp-10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.footer-quizzy-copy .q-from { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--q-orange); margin-bottom: var(--sp-1); }
.footer-quizzy-copy h4 { font-family: var(--serif); font-size: var(--step-3); color: var(--ink); margin-bottom: var(--sp-1); font-weight: 400; }
.footer-quizzy-copy p { font-family: var(--sans); font-size: var(--step-0); color: var(--muted); margin: 0; }

/* Footer columns */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-10); margin-bottom: var(--sp-10); padding-bottom: var(--sp-10); border-bottom: 1px solid var(--line); }
.footer-col-title { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); display: block; margin-bottom: var(--sp-4); }
.footer-col p { font-family: var(--sans); font-size: var(--step-0); color: var(--muted); line-height: 1.65; margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: var(--sp-3); }
.footer-col ul a { font-family: var(--sans); font-size: var(--step-0); color: var(--muted); transition: color var(--ease); }
.footer-col ul a:hover { color: var(--accent); opacity: 1; }

/* Footer newsletter form */
.footer-nl-form { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); flex-wrap: wrap; }
.footer-nl-form input[type="email"] {
  flex: 1; min-width: 180px;
  padding: 0.6em 0.85em;
  font-size: var(--step--1);
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--ease);
}
.footer-nl-form input[type="email"]:focus { border-color: var(--accent); }
.footer-nl-form button {
  padding: 0.6em 1.1em;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity var(--ease);
  white-space: nowrap;
}
.footer-nl-form button:hover { opacity: 0.85; }

/* Footer bottom */
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-4); }
.footer-copy { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); }
.footer-copy a { color: var(--muted); }
.footer-copy a:hover { color: var(--accent); opacity: 1; }
.footer-social { display: flex; gap: var(--sp-5); }
.footer-social a { font-family: var(--sans); font-size: var(--step--1); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); transition: color var(--ease); }
.footer-social a:hover { color: var(--accent); opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--ease), transform var(--ease);
  z-index: 90;
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════════════════════════════════
   404
   ═══════════════════════════════════════════════════════════════════════════ */
.error-page { text-align: center; padding: var(--sp-24) var(--gutter); }
.error-numeral { font-family: var(--serif); font-size: clamp(5rem, 15vw, 10rem); font-weight: 400; color: var(--line); line-height: 1; display: block; margin-bottom: var(--sp-4); letter-spacing: -0.05em; }
.error-page h1 { font-size: var(--step-4); font-weight: 400; margin-bottom: var(--sp-4); }
.error-page p { font-family: var(--sans); font-size: var(--step-1); color: var(--muted); max-width: 380px; margin: 0 auto var(--sp-8); }
.error-home { display: inline-block; font-family: var(--sans); font-size: var(--step-0); font-weight: 600; color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 1px; }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 800px) {
  :root { --step-6: 2.75rem; --step-5: 2.125rem; --step-4: 1.625rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
  .intro-block { padding: var(--sp-8); }
}

@media (max-width: 520px) {
  :root { --step-6: 2.25rem; --step-5: 1.75rem; --step-4: 1.5rem; --gutter: 1.25rem; }
  .header-top { flex-direction: column; gap: var(--sp-2); }
  .header-nav-row { flex-direction: column; align-items: flex-start; }
  .nav-search { width: 100%; }
  .nav-search-input { width: 100% !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid .footer-col:first-child { grid-column: auto; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { flex: none; width: 100%; min-width: 0; }
  .author-box { flex-direction: column; gap: var(--sp-4); }
  .quizzy-inline, .footer-quizzy { flex-direction: column; }
  .post-item { grid-template-columns: 24px 1fr; gap: 0 var(--sp-4); }
  .back-to-top { bottom: var(--sp-5); right: var(--sp-5); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .site-header, .site-footer, .newsletter-box, .quizzy-inline, .footer-quizzy,
  .related-section, .comments-section, .cat-filter-bar, .pagination-wrap,
  .share-row, .back-to-top, .dark-mode-toggle, .reading-progress, .toc-wrap { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .post-title { font-size: 22pt; }
}

/* ═══════════════════════════════════════════════════════════════════
   FRONT PAGE — deepak.co personal brand landing page
   All values explicit. No clamp on section padding.
   ═══════════════════════════════════════════════════════════════════ */

/* Body class added by PHP when front-page.php is active */
.dp-fp .site-main {
  padding-top: 0;
  padding-bottom: 0;
}

/* Shared container */
.fp-wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* Shared section label */
.fp-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.5rem;
}

/* Shared section heading */
.fp-heading {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1.5rem;
}

/* Shared divider line under heading */
.fp-heading-line {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line);
  margin-bottom: 1.75rem;
}

/* ─── HERO ─────────────────────────────────────────────────────── */
.fp-hero {
  padding: 1.75rem 0 1.5rem;
}

/* Cream variant (default) */
.fp-hero.is-cream { background: var(--bg); }

/* Dark variant */
.fp-hero.is-dark  { background: #1A1916; }

/* Green variant */
.fp-hero.is-green { background: var(--accent); }

/* Layout: centred */
.fp-hero-center {
  text-align: center;
}

/* Layout: split (photo left, text right) */
.fp-hero-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
}

/* Roles bar */
.fp-roles {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.fp-hero.is-dark  .fp-roles { color: rgba(237,232,224,0.5); }
.fp-hero.is-green .fp-roles { color: rgba(255,255,255,0.6); }

/* Hero headline */
.fp-hero-hl {
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.fp-hero-center .fp-hero-hl {
  margin-left: auto;
  margin-right: auto;
}
.fp-hero.is-dark  .fp-hero-hl { color: #EDE8E0; }
.fp-hero.is-green .fp-hero-hl { color: #ffffff; }

/* Hero sub */
.fp-hero-sub {
  font-family: var(--sans);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 1.75rem;
}
.fp-hero-center .fp-hero-sub {
  margin-left: auto;
  margin-right: auto;
}
.fp-hero.is-dark  .fp-hero-sub { color: rgba(237,232,224,0.72); }
.fp-hero.is-green .fp-hero-sub { color: rgba(255,255,255,0.8); }

/* ─── EMAIL FORM (hero + CTA section) ──────────────────────────── */
.fp-form-wrap {
  width: 100%;
}

.fp-hero-center .fp-form-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.fp-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fp-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75em 1.1em;
  font-family: var(--sans);
  font-size: 0.9375rem;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease;
}
.fp-form input[type="email"]:focus { border-color: var(--accent); }
.fp-form input[type="email"]::placeholder { color: var(--muted); }

/* Dark/green background form */
.fp-hero.is-dark .fp-form input[type="email"],
.fp-hero.is-green .fp-form input[type="email"] {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}
.fp-hero.is-dark .fp-form input::placeholder,
.fp-hero.is-green .fp-form input::placeholder { color: rgba(255,255,255,0.5); }

.fp-form button {
  padding: 0.75em 1.5em;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}
.fp-form button:hover { opacity: 0.85; }

/* On dark/green backgrounds, invert button */
.fp-hero.is-dark .fp-form button,
.fp-hero.is-green .fp-form button {
  background: #fff;
  color: var(--accent);
}
.fp-cta-section .fp-form button {
  background: #fff;
  color: var(--accent);
}

.fp-form-note {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.fp-hero.is-dark  .fp-form-note { color: rgba(237,232,224,0.45); }
.fp-hero.is-green .fp-form-note { color: rgba(255,255,255,0.5); }

/* Admin notice when no form action set */
.fp-form-admin {
  background: #fef9c3;
  border: 1px solid #eab308;
  border-radius: 4px;
  padding: 0.6em 1em;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: #713f12;
}

/* ─── PROFILE PHOTO ─────────────────────────────────────────────── */
.fp-photo-wrap {
  flex-shrink: 0;
}

.fp-photo {
  display: block;
  object-fit: cover;
  object-position: center top;
}

/* Shape variants */
.fp-photo.shape-circle  {
  width: 160px;
  height: 160px;
  border-radius: 50%;
}
.fp-photo.shape-oval {
  width: 148px;
  height: 188px;
  border-radius: 50% / 44%;
}
.fp-photo.shape-rounded {
  width: 160px;
  height: 188px;
  border-radius: 16px;
}

/* Larger in split hero — the photo is the first thing visitors see */
.fp-hero-split .fp-photo.shape-circle  { width: 220px; height: 220px; }
.fp-hero-split .fp-photo.shape-oval    { width: 200px; height: 254px; }
.fp-hero-split .fp-photo.shape-rounded { width: 220px; height: 258px; }

/* When photo sits below hero text in centred layout */
.fp-photo-below {
  margin: 1rem auto 0;
}
.fp-photo-below .fp-photo.shape-circle  { width: 180px; height: 180px; }
.fp-photo-below .fp-photo.shape-oval    { width: 160px; height: 204px; }
.fp-photo-below .fp-photo.shape-rounded { width: 180px; height: 210px; }

/* ─── STATS STRIP ───────────────────────────────────────────────── */
.fp-stats {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.fp-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.fp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 2rem;
  border-right: 1px solid var(--line);
}
.fp-stat:last-child { border-right: none; }

.fp-stat-n {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.fp-stat-l {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* ─── ABOUT ─────────────────────────────────────────────────────── */
.fp-about {
  background: var(--surface);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.fp-about-inner {
  display: flex;
  gap: 0;
  align-items: stretch; /* photo column matches text column height */
}

.fp-about-text {
  flex: 1;
  padding: 0 0 0 2.5rem;
}

.fp-about-photo-col {
  flex-shrink: 0;
  width: 260px;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  order: -1; /* photo on left */
}

/* Override shape-class fixed dimensions inside About — photo fills the column */
.fp-about-photo-col .fp-photo,
.fp-about-photo-col .fp-photo.shape-circle,
.fp-about-photo-col .fp-photo.shape-oval,
.fp-about-photo-col .fp-photo.shape-rounded {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border-radius: 0; /* border-radius handled by parent column */
  object-fit: cover;
  object-position: center top;
}

.fp-about-text p {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 0.875rem;
}
.fp-about-text p:last-of-type { margin-bottom: 1.25rem; }

.fp-about-link {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: opacity 0.18s ease;
}
.fp-about-link:hover { opacity: 0.7; }

/* No photo — single column */
.fp-about-inner.no-photo { display: block; }
.fp-about-inner.no-photo .fp-about-text p { max-width: 640px; }

/* ─── PROJECTS ──────────────────────────────────────────────────── */
.fp-projects {
  background: var(--bg);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.fp-proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.fp-proj-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transition: background 0.18s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}
/* Remove right border on cards in right column */
.fp-proj-card:nth-child(even) { border-right: none; }
/* Remove bottom border from last row */
.fp-proj-card:nth-last-child(-n+2) { border-bottom: none; }
/* If 5 cards (odd last row), also remove bottom from single last card */
.fp-proj-card:last-child { border-bottom: none; }

.fp-proj-card:hover {
  background: var(--accent-dim);
  text-decoration: none;
}

.fp-proj-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.fp-proj-body { flex: 1; min-width: 0; }

.fp-proj-name {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.fp-proj-tagline {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.fp-proj-arrow {
  font-size: 0.9rem;
  color: var(--muted);
  flex-shrink: 0;
  align-self: center;
  transition: color 0.18s ease, transform 0.18s ease;
}
.fp-proj-card:hover .fp-proj-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ─── LATEST POSTS ──────────────────────────────────────────────── */
.fp-posts {
  background: var(--surface);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.fp-posts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fp-posts-head .fp-heading { margin-bottom: 0; }

.fp-view-all {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  white-space: nowrap;
  margin-bottom: 4px;
  transition: opacity 0.18s ease;
}
.fp-view-all:hover { opacity: 0.7; }

.fp-post-list {
  margin-top: 1rem;
}

.fp-post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.fp-post-row:first-child { border-top: 1px solid var(--line); }
.fp-post-row:hover { background: transparent; }
.fp-post-row:hover .fp-post-title { color: var(--accent); }

.fp-post-left { display: flex; flex-direction: column; gap: 0.3rem; }

.fp-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.fp-post-title {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.015em;
  transition: color 0.18s ease;
}

.fp-post-excerpt {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.fp-post-rt {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

/* ─── CTA SECTION (newsletter) ──────────────────────────────────── */
.fp-cta-section {
  background: #1A1916;
  padding: 3rem 0;
}

.fp-cta-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.fp-cta-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(237,232,224,0.5);
  margin-bottom: 0.75rem;
  display: block;
}

.fp-cta-hl {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #EDE8E0;
  margin: 0 0 0.75rem;
}

.fp-cta-sub {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: rgba(237,232,224,0.65);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.fp-cta-section .fp-form {
  justify-content: center;
}

.fp-cta-section .fp-form input[type="email"] {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.fp-cta-section .fp-form input::placeholder { color: rgba(255,255,255,0.45); }
.fp-cta-section .fp-form input:focus { border-color: rgba(255,255,255,0.5); }

.fp-cta-section .fp-form-note { color: rgba(237,232,224,0.4); text-align: center; }

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 780px) {
  .fp-hero-split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .fp-hero-split .fp-photo-wrap { display: flex; justify-content: center; order: -1; }
  .fp-hero-split .fp-hero-sub   { margin-left: auto; margin-right: auto; }
  .fp-hero-split .fp-form-wrap  { margin: 0 auto; }
  .fp-hero-split .fp-form-note  { text-align: center; }

  .fp-about-inner { flex-direction: column; gap: 1.5rem; }
  .fp-about-text  { padding: 0; }
  .fp-about-photo-col {
    width: 100%;
    max-width: 340px;
    min-height: 220px;
    border-radius: 8px;
    order: -1;
    align-self: center;
  }
  .fp-about-photo-col .fp-photo,
  .fp-about-photo-col .fp-photo.shape-circle,
  .fp-about-photo-col .fp-photo.shape-oval,
  .fp-about-photo-col .fp-photo.shape-rounded {
    width: 100%;
    height: 220px;
    min-height: 220px;
  }
  .fp-photo.shape-circle  { width: 160px; height: 160px; }
  .fp-photo.shape-oval    { width: 148px; height: 188px; }
  .fp-photo.shape-rounded { width: 160px; height: 186px; }

  .fp-proj-grid { grid-template-columns: 1fr; }
  .fp-proj-card { border-right: none !important; }
  .fp-proj-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fp-proj-card:last-child { border-bottom: none; }

  .fp-stat { padding: 0.35rem 1rem; }
  .fp-stats-row { justify-content: flex-start; }

  .fp-post-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .fp-post-rt  { text-align: left; }
}

@media (max-width: 480px) {
  .fp-form { flex-direction: column; }
  .fp-form input[type="email"] { min-width: 0; width: 100%; }
  .fp-form button { width: 100%; justify-content: center; text-align: center; }
  .fp-stats-row { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   READING ROOM — /reads/
   ═══════════════════════════════════════════════════════════════════ */

.rd-page { background: var(--bg); }

.rd-wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ── Page header ─────────────────────────────────────────────────── */
.rd-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
}

.rd-eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.rd-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.rd-desc {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.65;
  margin: 0;
}

/* ── Category filter ─────────────────────────────────────────────── */
.rd-filter {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0.625rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.rd-filter .rd-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.rd-filter-btn {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.rd-filter-btn:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
.rd-filter-btn.active { color: var(--accent); background: var(--accent-dim); border-color: var(--accent-dim); }

/* ── List wrapper ─────────────────────────────────────────────────── */
.rd-list-wrap { padding: 2rem 0 2.5rem; }

/* ── Week group header ────────────────────────────────────────────── */
.rd-week-group { margin-bottom: 0.5rem; }

.rd-week-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 1.25rem 0 0.75rem;
  border-top: 1px solid var(--line);
  margin: 0;
}
.rd-week-group:first-child .rd-week-label { border-top: none; padding-top: 0; }

/* ── Individual read item ─────────────────────────────────────────── */
.rd-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.rd-item:last-child { border-bottom: none; }

.rd-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.rd-tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.18em 0.65em;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.18s ease;
}
.rd-tag:hover { background: var(--accent); color: #fff; opacity: 1; }

.rd-date {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Two-column body: headline+excerpt LEFT, take RIGHT */
.rd-item-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

/* Article headline */
.rd-headline {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
  transition: color 0.18s ease;
}
a.rd-headline:hover { color: var(--accent); }
.rd-headline--single { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.5rem; }

.rd-ext { font-size: 0.75em; opacity: 0.5; }

.rd-source {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}
.rd-source--single { font-size: 0.875rem; margin-bottom: 1rem; }

/* Pull quote from original article */
.rd-excerpt {
  border-left: 2px solid var(--line);
  margin: 0;
  padding: 0.4rem 0.85rem;
  color: var(--muted);
  font-style: italic;
  font-size: 0.875rem;
  font-family: var(--sans);
  line-height: 1.6;
}
.rd-excerpt p { margin: 0 0 0.25rem; }
.rd-excerpt cite {
  display: block;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-top: 0.35rem;
}
.rd-excerpt--single { font-size: 1rem; padding: 0.75rem 1.25rem; margin: 1.5rem 0; }

/* Deepak's take — the star of the show */
.rd-take {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 0.9rem 1rem;
}
.rd-take--single {
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.rd-take-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.rd-take p {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
}

.rd-read-original {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: opacity 0.18s ease;
}
.rd-read-original:hover { opacity: 0.75; }

/* ── Pagination ──────────────────────────────────────────────────── */
.rd-pagination {
  padding: 2rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.rd-pagination .page-numbers {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 0.4em 0.9em;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.18s ease;
}
.rd-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.rd-pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Empty state ─────────────────────────────────────────────────── */
.rd-empty {
  text-align: center;
  padding: 4rem 0;
}
.rd-empty-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.rd-empty-sub { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.rd-empty-sub a { color: var(--accent); }

/* ── Newsletter CTA ──────────────────────────────────────────────── */
.rd-nl-cta {
  background: #1A1916;
  padding: 2.5rem 0;
}
.rd-nl-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.rd-nl-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(237,232,224,0.5);
  margin-bottom: 0.75rem;
}
.rd-nl-hl {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: #EDE8E0;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.rd-nl-sub {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: rgba(237,232,224,0.65);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.rd-nl-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.rd-nl-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75em 1em;
  font-family: var(--sans);
  font-size: 0.9375rem;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
}
.rd-nl-form input::placeholder { color: rgba(255,255,255,0.45); }
.rd-nl-form input:focus { border-color: rgba(255,255,255,0.5); }
.rd-nl-form button {
  padding: 0.75em 1.5em;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}
.rd-nl-form button:hover { opacity: 0.85; }
.rd-nl-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

/* ── Single read breadcrumb ──────────────────────────────────────── */
.rd-breadcrumb {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 1.5rem 0 0;
}
.rd-breadcrumb a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.rd-breadcrumb a:hover { color: var(--accent); border-color: var(--accent); }

.rd-single { padding: 1.5rem 0 2rem; }
.rd-single-header { margin-bottom: 1.5rem; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .rd-item-body {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .rd-filter { position: static; }
}

@media (max-width: 480px) {
  .rd-nl-form { flex-direction: column; }
  .rd-nl-form input[type="email"] { min-width: 0; width: 100%; }
  .rd-nl-form button { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   SINGLE POST — Sidebar TOC layout
   ═══════════════════════════════════════════════════════════════════ */
.single-page-outer { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.25rem,4vw,2.5rem); }
.single-layout { display: block; padding: 2.5rem 0; }
.single-layout.has-toc { display: grid; grid-template-columns: 1fr 270px; gap: 4rem; align-items: start; }
.single-layout.has-toc .single-content { min-width: 0; max-width: 680px; }
.single-layout:not(.has-toc) .single-content { max-width: 680px; margin: 0 auto; }

/* ── Sidebar TOC ─────────────────────────────────────────────────── */
.toc-sidebar { display: block; }
.toc-sidebar-inner {
  position: sticky;
  top: calc(68px + 1.5rem);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.125rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.toc-sidebar-inner::-webkit-scrollbar { width: 3px; }
.toc-sidebar-inner::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.toc-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .875rem; padding-bottom: .625rem; border-bottom: 1px solid var(--line);
}
.toc-title {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.toc-collapse-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 3px; display: flex; align-items: center; justify-content: center;
  transition: transform var(--ease);
}
.toc-collapse-btn[aria-expanded="false"] { transform: rotate(-90deg); }
.toc-ol { list-style: none; padding: 0; margin: 0; }
.toc-li { margin: 0; }
.toc-lv2 { margin-top: .2rem; }
.toc-lv3 { padding-left: 1rem; }
.toc-anchor {
  display: block; font-family: var(--sans); font-size: .8rem; color: var(--muted);
  padding: .3rem 0 .3rem .6rem; margin-left: -.6rem;
  border-left: 2px solid transparent; line-height: 1.4;
  transition: color var(--ease), border-color var(--ease); text-decoration: none;
}
.toc-anchor:hover { color: var(--accent); border-left-color: var(--accent); opacity: 1; }
.toc-anchor.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-reading-progress {
  margin-top: .875rem; padding-top: .875rem; border-top: 1px solid var(--line);
  height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; position: relative;
}
.toc-reading-bar { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--accent); border-radius: 2px; transition: width .1s linear; }

/* ── Mobile TOC strip ────────────────────────────────────────────── */
.toc-mobile-strip { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 1.75rem; }
.toc-mobile-btn { width: 100%; background: none; border: none; padding: .875rem 1rem; display: flex; align-items: center; justify-content: space-between; font-family: var(--sans); font-size: .875rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.toc-mobile-btn svg { transition: transform var(--ease); }
.toc-mobile-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.toc-mobile-body { padding: 0 1rem 1rem; }

/* ── Responsive single ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .single-layout.has-toc { grid-template-columns: 1fr; }
  .toc-sidebar { display: none !important; }
  .toc-mobile-strip { display: block; }
  .single-layout.has-toc .single-content { max-width: 100%; }
}
@media (max-width: 640px) {
  .single-layout { padding: 1.75rem 0; }
}
