/* ============================================================
   MONT VITA — Luxury Personal Publication Theme
   Typography-first. Cinematic. Intentional.
   ============================================================ */

/* --- CSS Custom Properties (Light + Dark) --- */
:root {
  /* Typography Scale */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Font Sizes — fluid typography */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  --text-hero: clamp(3rem, 2rem + 5vw, 8vw);

  /* Spacing Scale */
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1rem + 2vw, 3rem);
  --space-xl: clamp(3rem, 2rem + 4vw, 6rem);
  --space-2xl: clamp(5rem, 3rem + 6vw, 10rem);
  --space-3xl: clamp(7rem, 4rem + 8vw, 14rem);

  /* Reading Width */
  --content-width: 680px;
  --wide-width: 1080px;
  --max-width: 1320px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 0.2s;
  --duration-base: 0.4s;
  --duration-slow: 0.8s;
  --duration-reveal: 1.2s;

  /* Light Mode Colors */
  --bg: #FAFAF8;
  --bg-alt: #F2F1ED;
  --bg-card: #FFFFFF;
  --surface: #FFFFFF;
  --text-primary: #1A1A18;
  --text-secondary: #6B6B65;
  --text-tertiary: #9C9C95;
  --accent: #8B7355;
  --accent-light: #A8956F;
  --accent-subtle: rgba(139, 115, 85, 0.08);
  --border: rgba(26, 26, 24, 0.08);
  --border-strong: rgba(26, 26, 24, 0.15);
  --shadow-sm: 0 1px 2px rgba(26, 26, 24, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 26, 24, 0.06);
  --shadow-lg: 0 8px 32px rgba(26, 26, 24, 0.08);
  --shadow-hover: 0 12px 40px rgba(26, 26, 24, 0.12);
  --gradient-placeholder: linear-gradient(145deg, #E8E6E1 0%, #D4D1CA 50%, #C4C0B8 100%);
  --gradient-placeholder-warm: linear-gradient(145deg, #E2DDD5 0%, #D1C9BE 50%, #C5BBA8 100%);
  --gradient-newsletter: linear-gradient(145deg, #F5F4F0 0%, #EAE8E3 100%);
  --overlay: rgba(26, 26, 24, 0.03);
  --nav-bg: rgba(250, 250, 248, 0.85);
  --scrollbar-thumb: rgba(26, 26, 24, 0.15);
  --scrollbar-track: transparent;
}

[data-theme="dark"] {
  --bg: #0F0F0E;
  --bg-alt: #181816;
  --bg-card: #1C1C1A;
  --surface: #222220;
  --text-primary: #EDEDEA;
  --text-secondary: #9C9C95;
  --text-tertiary: #6B6B65;
  --accent: #C4A97D;
  --accent-light: #D4BC94;
  --accent-subtle: rgba(196, 169, 125, 0.1);
  --border: rgba(237, 237, 234, 0.06);
  --border-strong: rgba(237, 237, 234, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
  --gradient-placeholder: linear-gradient(145deg, #252523 0%, #1E1E1C 50%, #2A2A27 100%);
  --gradient-placeholder-warm: linear-gradient(145deg, #2A2824 0%, #242220 50%, #302C26 100%);
  --gradient-newsletter: linear-gradient(145deg, #1A1A18 0%, #222220 100%);
  --overlay: rgba(0, 0, 0, 0.2);
  --nav-bg: rgba(15, 15, 14, 0.88);
  --scrollbar-thumb: rgba(237, 237, 234, 0.12);
  --scrollbar-track: transparent;
}


/* --- Reset & Foundation --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar {
  width: 6px;
}

html::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg);
  transition: background-color var(--duration-slow) var(--ease-out-expo),
              color var(--duration-slow) var(--ease-out-expo);
  overflow-x: hidden;
}

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


/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-lg);
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: all var(--duration-base) var(--ease-out-expo);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--duration-fast) ease;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  transition: color var(--duration-fast) ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) ease;
  width: 36px;
  height: 36px;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--duration-base) var(--ease-out-expo);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}


/* --- Hero Section (Homepage) --- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-2xl) var(--space-lg);
  padding-top: calc(var(--space-2xl) + 80px);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out-expo) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  max-width: 14ch;
  opacity: 0;
  animation: fadeUp 1.2s var(--ease-out-expo) 0.5s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeUp 1.2s var(--ease-out-expo) 0.7s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
  transition: all var(--duration-base) var(--ease-out-expo);
  opacity: 0;
  animation: fadeUp 1.2s var(--ease-out-expo) 0.9s forwards;
}

.hero-cta:hover {
  gap: 14px;
  border-color: transparent;
}

.hero-cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out-expo) 1.5s forwards;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--border-strong);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollPulse 2s var(--ease-out-expo) infinite;
}

.scroll-label {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}


/* --- Section Layouts --- */
.section {
  padding: var(--space-2xl) var(--space-lg);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-wide {
  max-width: var(--wide-width);
  margin: 0 auto;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-xl) 0;
}


/* --- Category Cards (Pillars) --- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.pillar-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-xl) var(--space-lg);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-base) var(--ease-out-expo);
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.pillar-card:hover::before {
  transform: scaleX(1);
}

/* Photo placeholder on cards */
.pillar-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gradient-placeholder);
  border-radius: 8px;
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.pillar-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, transparent 40%, rgba(139, 115, 85, 0.05) 100%);
}

[data-theme="dark"] .pillar-image::after {
  background: linear-gradient(145deg, transparent 40%, rgba(196, 169, 125, 0.04) 100%);
}

.pillar-number {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  transition: color var(--duration-fast) ease;
}

.pillar-card:hover .pillar-title {
  color: var(--accent);
}

.pillar-excerpt {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: var(--space-lg);
}

.pillar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap var(--duration-base) var(--ease-out-expo);
}

.pillar-card:hover .pillar-link {
  gap: 12px;
}

.pillar-link svg {
  width: 14px;
  height: 14px;
}


/* --- Latest Posts Section --- */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--space-xl);
}

.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all var(--duration-fast) ease;
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-item:hover {
  padding-left: var(--space-md);
}

.post-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
}

.post-category {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 100px;
}

.post-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.3;
  transition: color var(--duration-fast) ease;
}

.post-item:hover .post-title {
  color: var(--accent);
}

.post-date {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Featured Post (large card) */
.post-featured {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--space-xl);
}

.post-featured-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  background: var(--gradient-placeholder-warm);
  border-radius: 12px;
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.post-featured:hover .post-featured-image {
  transform: scale(1.01);
}

.post-featured-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(26, 26, 24, 0.06));
}

.post-featured-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.post-featured-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  transition: color var(--duration-fast) ease;
}

.post-featured:hover .post-featured-title {
  color: var(--accent);
}

.post-featured-excerpt {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: var(--content-width);
}


/* --- Newsletter Section ("The Briefing") --- */
.newsletter-section {
  background: var(--gradient-newsletter);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-xl);
  text-align: center;
  max-width: var(--wide-width);
  margin: var(--space-2xl) auto;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--accent);
}

.newsletter-eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.newsletter-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.newsletter-desc {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-lg);
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--duration-fast) ease;
}

.newsletter-input::placeholder {
  color: var(--text-tertiary);
}

.newsletter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.newsletter-submit {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  background: var(--text-primary);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.newsletter-submit:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.newsletter-privacy {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-md);
}

.newsletter-privacy a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* --- Article / Reading Experience --- */
.article {
  padding-top: calc(80px + var(--space-2xl));
  padding-bottom: var(--space-2xl);
}

.article-header {
  max-width: var(--content-width);
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-lg);
}

.article-category {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.article-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.article-meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

/* Hero Image for Articles */
.article-hero-image {
  width: 100%;
  max-width: var(--wide-width);
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-lg);
}

.article-hero-image .image-placeholder {
  aspect-ratio: 21 / 9;
}

/* Article Body — the reading experience */
.article-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.article-body h1 { font-size: var(--text-2xl); }
.article-body h2 { font-size: var(--text-xl); }
.article-body h3 { font-size: var(--text-lg); }
.article-body h4 { font-size: var(--text-base); font-weight: 600; }

.article-body p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 1.5em;
  font-weight: 370;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--duration-fast) ease;
}

.article-body a:hover {
  text-decoration-color: transparent;
}

.article-body strong {
  font-weight: 600;
  color: var(--text-primary);
}

.article-body em {
  font-style: italic;
}

.article-body blockquote {
  border-left: 2px solid var(--accent);
  margin: 2em 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-subtle);
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 0;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.article-body li {
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-alt);
  border-radius: 4px;
  color: var(--accent);
}

.article-body pre {
  margin: 2em 0;
  padding: var(--space-lg);
  background: var(--bg-alt);
  border-radius: 8px;
  overflow-x: auto;
}

.article-body pre code {
  padding: 0;
  background: none;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3em 0;
}

.article-body figure {
  margin: 2.5em 0;
}

.article-body figcaption {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
  width: 0%;
}


/* --- Image Placeholders --- */
.image-placeholder {
  width: 100%;
  background: var(--gradient-placeholder);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
}

.image-placeholder.ratio-16-9 { aspect-ratio: 16 / 9; }
.image-placeholder.ratio-21-9 { aspect-ratio: 21 / 9; }
.image-placeholder.ratio-4-3 { aspect-ratio: 4 / 3; }
.image-placeholder.ratio-1-1 { aspect-ratio: 1 / 1; }
.image-placeholder.ratio-3-4 { aspect-ratio: 3 / 4; }

.image-placeholder.warm {
  background: var(--gradient-placeholder-warm);
}

/* When real images are added */
.image-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}


/* --- Section Landing (Category Index) --- */
.section-landing {
  padding-top: calc(80px + var(--space-2xl));
}

.section-landing-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-xl);
}

.section-landing-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}

.section-landing-desc {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

.section-landing-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Post cards in section listings */
.post-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out-expo);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gradient-placeholder);
  position: relative;
  overflow: hidden;
}

.post-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(26, 26, 24, 0.04));
}

.post-card-body {
  padding: var(--space-lg);
}

.post-card-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--space-sm);
  transition: color var(--duration-fast) ease;
}

.post-card:hover .post-card-title {
  color: var(--accent);
}

.post-card-excerpt {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}


/* --- About Page --- */
.about-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: calc(80px + var(--space-2xl)) var(--space-lg) var(--space-xl);
}

.about-portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient-placeholder-warm);
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.about-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: var(--space-sm);
}

.about-tagline {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 300;
}


/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
}

.footer-brand {
  flex: 1;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.footer-bottom a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.footer-bottom a:hover {
  color: var(--text-primary);
}


/* --- Page (generic static page) --- */
.page {
  padding-top: calc(80px + var(--space-2xl));
  padding-bottom: var(--space-2xl);
}

.page-header {
  max-width: var(--content-width);
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-lg);
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: var(--space-md);
}

.page-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Page body inherits article-body styling */
.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body p,
.page-body ul,
.page-body ol,
.page-body li,
.page-body blockquote,
.page-body a,
.page-body strong,
.page-body em,
.page-body code,
.page-body pre,
.page-body hr {
  /* Inherits from article-body via shared utility or direct repetition */
}

.page-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.page-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.page-body p {
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: 1.5em;
  font-weight: 370;
}

.page-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.page-body ul, .page-body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.page-body li {
  line-height: 1.8;
  margin-bottom: 0.5em;
}

.page-body strong {
  font-weight: 600;
}

.page-body blockquote {
  border-left: 2px solid var(--accent);
  margin: 2em 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-subtle);
  border-radius: 0 8px 8px 0;
}

.page-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3em 0;
}


/* --- Keyframe Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}


/* --- 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;
}

.text-balance {
  text-wrap: balance;
}


/* --- Responsive --- */
@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .post-cards {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: var(--text-lg);
  }

  .nav-toggle {
    display: block;
    z-index: 101;
  }

  .hero {
    padding-top: calc(var(--space-xl) + 80px);
    min-height: 90vh;
    min-height: 90svh;
  }

  .hero-title {
    max-width: 100%;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .post-date {
    order: -1;
  }

  .post-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-submit {
    width: 100%;
  }

  .scroll-indicator {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .pillar-card {
    padding: var(--space-lg) var(--space-md);
  }

  .newsletter-section {
    padding: var(--space-lg) var(--space-md);
    margin-left: var(--space-md);
    margin-right: var(--space-md);
  }
}


/* --- About Teaser (Homepage) responsive --- */
.about-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 768px) {
  .about-teaser-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}


/* --- Parallax-like depth for images on scroll --- */
@media (prefers-reduced-motion: no-preference) {
  .pillar-image,
  .post-featured-image,
  .post-card-image {
    transition: transform var(--duration-slow) var(--ease-out-expo);
  }

  .pillar-card:hover .pillar-image {
    transform: scale(1.03);
  }

  .post-card:hover .post-card-image {
    transform: scale(1.02);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .scroll-indicator {
    display: none;
  }
}


/* --- Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}


/* --- Print --- */
@media print {
  .nav, .footer, .newsletter-section, .scroll-indicator, .theme-toggle,
  .reading-progress { display: none; }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .article-body, .page-body {
    max-width: 100%;
  }
}

/* FORCE ALL CONTENT VISIBLE */
.reveal, .fade-in, [class*="reveal"] {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   VISIBILITY & CONTRAST FIX — Mar 28, 2026
   ========================================================================== */

/* --- Force all reveal animations to show content --- */
.reveal, .reveal-left, .reveal-right, .reveal-scale,
.reveal-stagger > *, .fade-in, [class*="reveal"] {
  opacity: 1 !important;
  transform: none !important;
}

/* --- Hero animations: force visible --- */
.hero-eyebrow,
.hero-title,
.hero-subtitle,
.hero-cta,
.scroll-indicator {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* --- Ensure text contrast in all sections --- */
.section h1,
.section h2,
.section h3,
.section h4 {
  color: var(--text-primary);
}

.section p,
.section li {
  color: var(--text-secondary);
}

.section-label {
  color: var(--accent);
}

.section-title {
  color: var(--text-primary);
}

/* Pillar cards */
.pillar-card {
  background: var(--bg-card);
}

.pillar-title {
  color: var(--text-primary);
}

.pillar-excerpt {
  color: var(--text-secondary);
}

.pillar-number {
  color: var(--text-tertiary);
}

/* Newsletter section visibility */
.newsletter-title {
  color: var(--text-primary);
}

.newsletter-desc {
  color: var(--text-secondary);
}

.newsletter-eyebrow {
  color: var(--accent);
}

/* About teaser */
.about-teaser-grid h2 {
  color: var(--text-primary);
}

.about-teaser-grid p {
  color: var(--text-secondary);
}

/* Footer */
.footer-logo {
  color: var(--text-primary);
}

.footer-tagline {
  color: var(--text-tertiary);
}

.footer-col h4 {
  color: var(--text-secondary);
}

.footer-col a {
  color: var(--text-tertiary);
}

.footer-bottom {
  color: var(--text-tertiary);
}

/* Post items */
.post-title {
  color: var(--text-primary);
}

.post-date {
  color: var(--text-tertiary);
}

.post-category {
  color: var(--accent);
}

.post-featured-title {
  color: var(--text-primary);
}

.post-featured-excerpt {
  color: var(--text-secondary);
}

/* Page and article body */
.page-body p,
.article-body p {
  color: var(--text-primary);
}

.page-body h2,
.page-body h3,
.article-body h2,
.article-body h3 {
  color: var(--text-primary);
}

/* ==========================================================================
   ENHANCED MOBILE — Mar 28, 2026
   ========================================================================== */

@media (max-width: 768px) {
  /* Hero mobile */
  .hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    min-height: 85vh;
    min-height: 85svh;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    max-width: 100%;
  }

  /* Pillar cards single column */
  .pillars-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .pillar-card {
    padding: 1.5rem 1.25rem;
  }

  .pillar-title {
    font-size: 1.35rem;
  }

  .pillar-image {
    aspect-ratio: 16 / 8;
  }

  /* Section spacing */
  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  /* Posts list */
  .post-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-title {
    font-size: 1.15rem;
  }

  /* Post featured */
  .post-featured-image {
    aspect-ratio: 16 / 9;
  }

  .post-featured-title {
    font-size: 1.5rem;
  }

  /* Newsletter */
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-submit {
    width: 100%;
  }

  .newsletter-section {
    padding: 2rem 1.25rem;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }

  .newsletter-title {
    font-size: 1.5rem;
  }

  /* About teaser */
  .about-teaser-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* Nav */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-toggle {
    display: block;
    z-index: 101;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .pillar-card {
    padding: 1.25rem 1rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .newsletter-section {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 1.5rem 1rem;
  }

  .newsletter-title {
    font-size: 1.25rem;
  }
}
