/* ============================================
   ROOT & TOKENS
   ============================================ */

:root {
  --paper:        #faf7f2;
  --paper-dark:   #f0ebe0;
  --ink:          #1c1917;
  --ink-mid:      #292524;
  --ink-light:    #78716c;
  --ink-faint:    #a8a29e;
  --amber:        #42b983;
  --amber-light:  #359469;
  --amber-faint:  #e8f7f0;

  --font-body:    'Palatino Linotype', 'Palatino', 'Book Antiqua', 'URW Palladio L', 'FreeSerif', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --measure:      72ch;
  --measure-wide: 82ch;

  --step--1: clamp(0.82rem,  0.80rem + 0.1vw,  0.9rem);
  --step-0:  clamp(1.15rem,  1.05rem + 0.5vw,  1.4rem);
  --step-1:  clamp(1.4rem,   1.2rem  + 0.8vw,  1.85rem);
  --step-2:  clamp(1.75rem,  1.4rem  + 1.2vw,  2.4rem);
  --step-3:  clamp(2.1rem,   1.7rem  + 1.8vw,  3.2rem);
  --step-4:  clamp(2.6rem,   2.1rem  + 2.5vw,  4.2rem);
}

[data-theme="dark"] {
  --paper:        #1c1917;
  --paper-dark:   #292524;
  --ink:          #f5f0e8;
  --ink-mid:      #e7e0d5;
  --ink-light:    #a8a29e;
  --ink-faint:    #78716c;
  --amber:        #359469;
  --amber-light:  #5ecfa0;
  --amber-faint:  #1a2e25;
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove focus outline for mouse users, keep for keyboard navigation */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "calt", "kern", "liga";
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.1px;
  hyphens: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ============================================
   SCROLL PROGRESS
   ============================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--amber);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ============================================
   HEADER & NAV
   ============================================ */

.site-header {
  border-bottom: 1px solid var(--paper-dark);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  background-color: var(--paper);
  z-index: 100;
  transition: background-color 0.3s ease;
}

.nav-inner {
  max-width: 75%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.03em;
}

.logo-v {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 700;
  font-style: normal;
  color: var(--ink);
  line-height: 1;
  transition: color 0.2s ease;
}

.logo-sep {
  display: none;
}

.logo-p {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 600;
  font-style: italic;
  color: var(--amber);
  line-height: 1;
  transition: color 0.2s ease;
}

.site-logo:hover .logo-v { color: var(--amber); }
.site-logo:hover .logo-p { color: var(--ink); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--amber);
}

.nav-links .nav-zp a {
  color: var(--amber-light);
  opacity: 0.8;
}

.nav-links .nav-zp a:hover {
  opacity: 1;
}

.theme-toggle,
.search-trigger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.theme-toggle:hover,
.search-trigger:hover {
  color: var(--amber);
}

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

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  flex: 1;
  padding: 5rem 0 7rem;
}

/* Inner wrapper constrains content to 75% */
.main-content > * {
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.main-content > article,
.main-content > section,
.main-content > div {
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HOME PAGE
   ============================================ */

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

/* Hero */
.home-hero {
  text-align: center;
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--paper-dark);
  margin-bottom: 5rem;
}

.home-hero-title {
  font-size: clamp(3rem, 5vw + 1rem, 6.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.home-hero-title em {
  font-style: italic;
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 2px;
}

.home-hero-sub {
  font-size: var(--step-0);
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 48ch;
  margin: 0 auto 2.5rem;
  font-style: italic;
}

.home-hero-cta {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--amber);
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.home-hero-cta:hover { color: var(--amber); }

/* Intro section */
.home-intro {
  max-width: 68ch;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--paper-dark);
}

.home-bio p {
  margin-bottom: 1.25em;
  color: var(--ink);
  line-height: 1.8;
}

.home-bio blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--amber);
  font-style: italic;
  color: var(--ink-light);
}

.home-bio a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  transition: opacity 0.2s ease;
}

.home-bio a:hover { opacity: 0.7; }

.post-item--compact {
  padding: 0.5rem 0;
  border-bottom: none;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.post-item--compact .post-item-meta {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin-bottom: 0;
  white-space: nowrap;
  min-width: 8rem;
}

.post-item--compact .post-item-title {
  font-size: var(--step-0);
  font-weight: 500;
  margin-bottom: 0;
}

.home-section-label {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

.home-footer {
  padding-top: 2rem;
  margin-top: 1rem;
}

.archive-footer {
  padding: 2.5rem 0 0;
}

.view-all-link {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.view-all-link:hover { color: var(--amber); }

/* ============================================
   POST LIST
   ============================================ */

.post-list {
  list-style: none;
}

.post-item {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--paper-dark);
}

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

.post-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-faint);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.post-tag {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-faint);
  padding: 0.15em 0.6em;
  border-radius: 2px;
}

.post-item-title {
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.post-item-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.post-item-excerpt {
  font-size: var(--step-0);
  color: var(--ink-light);
  line-height: 1.65;
  font-style: italic;
}

/* ============================================
   ARCHIVE
   ============================================ */

.archive-page {
  max-width: var(--measure);
  margin: 0 auto;
}

.archive-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--paper-dark);
}

.archive-title {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.archive-count {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-faint);
  padding: 0.2em 0.7em;
  border-radius: 2px;
  white-space: nowrap;
}

.archive-year-group {
  border-bottom: 1px solid var(--paper-dark);
}

.archive-year-group[open] {
  padding-bottom: 0.75rem;
}

.archive-year {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s ease;
}

.archive-year::-webkit-details-marker { display: none; }
.archive-year::marker { display: none; }
.archive-year:hover { color: var(--amber); }

details { outline: none; }
details:focus { outline: none; }
details summary:focus { outline: none; }
details summary:focus-visible { outline: none; }

.archive-year-count {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
}

/* Chevron indicator */
.archive-year span:first-child::before {
  content: '▸  ';
  font-size: 0.65em;
  color: var(--ink-faint);
  display: inline-block;
}

details[open] .archive-year span:first-child::before {
  content: '▾  ';
}

/* Compact inline list — date + title on one line */
.archive-year-list {
  list-style: none;
  padding: 0.25rem 0 0.5rem;
}

.archive-year-list .post-item {
  padding: 0.3rem 0;
  border-bottom: none;
  display: grid;
  grid-template-columns: 6rem 1fr;
  align-items: baseline;
  gap: 1rem;
}

.archive-year-list .post-item article {
  display: contents;
}

.archive-year-list .post-item-meta {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin-bottom: 0;
  white-space: nowrap;
}

.archive-year-list .post-item-title {
  font-size: var(--step-0);
  font-weight: 400;
  margin-bottom: 0;
  font-family: var(--font-body);
  font-style: italic;
}

.archive-year-list .post-item-title a {
  color: var(--ink-light);
  border: none;
  text-decoration: none;
  transition: color 0.2s ease;
}

.archive-year-list .post-item-title a:hover {
  color: var(--amber);
}

/* ============================================
   POST
   ============================================ */

/* Post — clean typography, no card */
.post {
  max-width: 680px;
  margin: 0 auto;
}

/* Post header */
.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--paper-dark);
}

.post-title {
  font-size: clamp(3rem, 6vw + 1rem, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

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

.post-subtitle {
  font-size: var(--step-0);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-light);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.post-meta {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-faint);
  font-weight: 400;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta-sep { color: var(--ink-faint); }

.post-updated {
  color: var(--amber);
  font-style: italic;
}

.post-rule {
  display: none;
}

/* Post body */
.post-body {
  font-size: var(--step-0);
  line-height: 1.9;
  color: var(--ink);
}

.post-body p {
  margin-bottom: 1.6em;
}

/* Drop cap */
.post-body > p:first-of-type::first-letter {
  font-size: 6.2em;
  font-weight: 700;
  float: left;
  line-height: 0.83;
  margin-right: 0.08em;
  margin-top: 0.1em;
  margin-bottom: -0.1em;
  color: var(--amber);
  font-style: normal;
}

.post-body p + p {
  text-indent: 0;
}

.post-body h2 {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 2.5em 0 0.75em;
  color: var(--ink);
}

.post-body h3 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2em 0 0.6em;
  color: var(--ink);
}

.post-body h4 {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 2em 0 0.5em;
}

.post-body a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s ease;
}

.post-body a:hover { opacity: 0.7; }

.post-body strong {
  font-variant-caps: small-caps;
  font-weight: 600;
  letter-spacing: 0.04em;
}

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

.post-body blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--amber);
  font-style: italic;
  color: var(--ink-light);
  font-size: var(--step-0);
  line-height: 1.7;
}

.post-body blockquote p {
  margin-bottom: 0.5em;
}

.post-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Suppress drop cap inside blockquotes */
.post-body blockquote p:first-of-type::first-letter {
  font-size: inherit;
  font-weight: inherit;
  float: none;
  line-height: inherit;
  margin: 0;
  color: inherit;
}

/* Source blockquote — {.source} class via markdown-it-attrs */
.post-body blockquote.source {
  position: relative;
  margin: 2.5em 0;
  padding: 0.1em 0 0.1em 1.5rem;
  border-left: 2px solid var(--amber);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--ink-light);
  line-height: 1.6;
}

.post-body blockquote.source p {
  margin: 0;
}

/* Citation line — last paragraph acts as attribution */
.post-body blockquote.source p:last-of-type {
  display: block;
  margin-top: 1em;
  padding-top: 0.75em;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  position: relative;
}

/* Separator line above citation */
.post-body blockquote.source p:last-of-type::before {
  content: '';
  display: block;
  width: 50%;
  height: 1px;
  background: var(--paper-dark);
  margin-bottom: 0.75em;
}

/* Italic in citation (e.g. book title) */
.post-body blockquote.source p:last-of-type em {
  font-style: italic;
}

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

.post-body li { margin-bottom: 0.4em; }

.post-body hr {
  border: none;
  border-top: 1px solid var(--paper-dark);
  margin: 3em 0;
}

/* Ornamental break */
.post-body hr + p::before,
.post-body p:has(+ hr)::after {
  content: none;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--paper-dark);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-body pre {
  background: var(--paper-dark);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.5em;
  font-size: 0.875em;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.post-body sup a {
  font-family: var(--font-ui);
  font-size: 0.7em;
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
  border: none;
}

.post-body .footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--paper-dark);
}

.post-body .footnotes li {
  font-size: var(--step--1);
  color: var(--ink-light);
  margin-bottom: 0.5em;
}

.post-body img {
  border-radius: 4px;
  margin: 2em 0;
}

/* Post footer */
.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--paper-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--amber); }

/* ============================================
   NOW PAGE
   ============================================ */

.now-page {
  max-width: var(--measure-wide);
  margin: 0 auto;
}

/* Now header */
.now-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--paper-dark);
}

.now-header-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.now-title {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.now-badge {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-faint);
  padding: 0.2em 0.7em;
  border-radius: 2px;
  white-space: nowrap;
}

.now-description {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-light);
  line-height: 1.6;
}

.now-description a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  transition: opacity 0.2s ease;
}

.now-description a:hover { opacity: 0.7; }

.now-rule {
  display: none;
}

/* Intro */
.now-intro {
  margin-bottom: 3rem;
}

.now-intro p {
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 54ch;
}

/* Now items */
.now-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.now-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--paper-dark);
  align-items: start;
}

.now-item:last-child {
  border-bottom: none;
}

.now-item-marker {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-top: 0.3rem;
}

.now-item-title {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.now-item-body {
  font-size: var(--step-0);
  color: var(--ink-light);
  line-height: 1.75;
}

.now-item-body a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  transition: opacity 0.2s ease;
}

.now-item-body a:hover { opacity: 0.7; }

@media (max-width: 600px) {
  .now-item { grid-template-columns: 2rem 1fr; gap: 1rem; }
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-page {
  max-width: var(--measure-wide);
  margin: 0 auto;
}

/* ============================================
   SEARCH
   ============================================ */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.search-modal {
  background: var(--paper);
  width: 100%;
  max-width: 600px;
  margin: 0 2rem;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(28, 25, 23, 0.25);
  overflow: hidden;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--paper-dark);
}

.search-modal-header #search { flex: 1; }

.search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 0.85rem;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.search-close:hover { color: var(--ink); }

.pagefind-ui__form { display: flex; align-items: center; }

.pagefind-ui__form::before { display: none !important; }

.pagefind-ui__search-input {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  font-family: var(--font-body) !important;
  font-size: var(--step-0) !important;
  font-style: italic !important;
  color: var(--ink) !important;
  padding: 1rem 1.25rem !important;
  box-shadow: none !important;
}

.pagefind-ui__search-input::placeholder { color: var(--ink-faint) !important; }

.pagefind-ui__search-input[type="search"]::-webkit-search-decoration,
.pagefind-ui__search-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.pagefind-ui__search-clear {
  background: none !important;
  border: none !important;
  color: var(--ink-faint) !important;
  cursor: pointer !important;
  padding: 0 1rem !important;
}

.pagefind-ui__results {
  padding: 0.5rem 0 !important;
  max-height: 55vh;
  overflow-y: auto;
}

.pagefind-ui__result {
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid var(--paper-dark) !important;
  list-style: none !important;
}

.pagefind-ui__result:last-child { border-bottom: none !important; }

.pagefind-ui__result-link {
  font-family: var(--font-body) !important;
  font-size: var(--step-0) !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  text-decoration: none !important;
  display: block !important;
  margin-bottom: 0.3rem !important;
  transition: color 0.15s ease !important;
  border: none !important;
}

.pagefind-ui__result-link:hover { color: var(--amber) !important; }

.pagefind-ui__result-excerpt {
  font-family: var(--font-body) !important;
  font-size: var(--step--1) !important;
  font-style: italic !important;
  color: var(--ink-light) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

.pagefind-ui__result-excerpt mark {
  background: none !important;
  color: var(--amber) !important;
  font-weight: 600 !important;
}

.pagefind-ui__message {
  font-family: var(--font-body) !important;
  font-size: var(--step--1) !important;
  font-style: italic !important;
  color: var(--ink-faint) !important;
  padding: 1rem 1.25rem !important;
}

body.search-open { overflow: hidden; }

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--paper-dark);
  padding: 2rem;
}

.footer-inner {
  text-align: center;
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-faint);
}

.footer-copy a {
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--paper-dark);
  transition: color 0.2s ease;
}

.footer-copy a:hover { color: var(--amber); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 0.5rem;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate to X when open */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-inner {
    max-width: 100%;
    padding: 0 1.25rem;
    flex-wrap: wrap;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hide links by default on mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    order: 3;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid var(--paper-dark);
    margin-top: 0.5rem;
  }

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

  .nav-links li a {
    display: block;
    padding: 0.65rem 0;
    font-size: var(--step-0);
    border-bottom: 1px solid var(--paper-dark);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-right {
    gap: 0.75rem;
  }

  .main-content > * {
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .post-title { font-size: clamp(2.2rem, 7vw, 3.5rem); }
  .home-hero-title { font-size: clamp(2.5rem, 8vw, 4rem); }
  .now-title, .archive-title { font-size: var(--step-3); }
}