/* ========================================================
   GITA'S NOOK — TIDE & PINE
   A redesign palette: deep ocean + pine forest + warm sand
   ======================================================== */

/* ---------- TOKENS ---------- */
:root {
  /* Ocean */
  --ocean-50:  #f0f5f3;
  --ocean-100: #d8e7e5;
  --ocean-200: #aecdce;
  --ocean-300: #7aa6c2;
  --ocean-400: #4a7d9a;
  --ocean-500: #2f5d77;
  --ocean-600: #1f4256;
  --ocean-700: #142e3e;
  --ocean-800: #0d1f2c;
  --ocean-900: #0a1620;

  /* Pine / Kelp */
  --pine-100: #e3efe8;
  --pine-200: #b6d4c0;
  --pine-300: #7ab59a;
  --pine-400: #4f9a7c;
  --pine-500: #3a8068;
  --pine-600: #2a6450;
  --pine-700: #1f4a3c;

  /* Sand (secondary, warm highlight) */
  --sand-100: #f6ead6;
  --sand-200: #e6cfa3;
  --sand-300: #d4b27d;
  --sand-400: #b8935b;
  --sand-500: #8c6b3b;

  /* Coral (sparingly used for "new", "live", links) */
  --coral-300: #f29c8a;
  --coral-400: #e87a64;
  --coral-500: #c75c47;

  /* Mist (cool gray) */
  --mist-100: #ecf1f0;
  --mist-200: #d4dcdc;
  --mist-300: #a8b3b3;
  --mist-400: #6c7a7c;

  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-script: 'Caveat', cursive;

  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --container: 1180px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- LIGHT THEME (default) ---------- */
:root,
[data-theme="light"] {
  --bg:           #f0f5f3;
  --bg-soft:      #e8f0ee;
  --bg-surface:   #ffffff;
  --bg-elevated:  #ffffff;
  --text:         #0e1a24;
  --text-muted:   #4a6168;
  --text-subtle:  #7e8e92;
  --border:       #d6e3e0;
  --border-soft:  #e6eeec;
  --accent:       var(--pine-500);    /* main: pine green */
  --accent-soft:  var(--pine-200);
  --accent-text:  var(--pine-600);
  --secondary:    var(--ocean-400);   /* ocean blue */
  --secondary-soft: #c2d6e0;
  --tertiary:     var(--sand-400);    /* warm sand */
  --highlight:    var(--coral-400);
  --shadow-color: 200 30% 25%;
  --hero-from:    #d8e7e5;
  --hero-via:     #b6d4c0;
  --hero-to:      #c2d6e0;
}

/* ---------- DARK THEME ---------- */
[data-theme="dark"] {
  --bg:           #0a1620;
  --bg-soft:      #0d1f2c;
  --bg-surface:   #122838;
  --bg-elevated:  #163048;
  --text:         #e6eef0;
  --text-muted:   #9cb5bd;
  --text-subtle:  #6c8893;
  --border:       #1e3a4f;
  --border-soft:  #163148;
  --accent:       var(--pine-300);
  --accent-soft:  rgba(122, 181, 154, 0.16);
  --accent-text:  var(--pine-200);
  --secondary:    var(--ocean-300);
  --secondary-soft: rgba(122, 166, 194, 0.16);
  --tertiary:     var(--sand-300);
  --highlight:    var(--coral-300);
  --shadow-color: 200 80% 5%;
  --hero-from:    #0d1f2c;
  --hero-via:     #142e3e;
  --hero-to:      #1f4a3c;
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
  transition: background 0.5s var(--ease), color 0.3s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

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

/* ---------- LAYOUT ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-soft);
}
.site-header__inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  font-style: italic;
}
.brand__mark {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  position: relative;
}
.brand__mark svg { width: 100%; height: 100%; overflow: visible; }
.brand:hover .brand__mark svg { animation: brandWave 1.6s var(--ease); }
@keyframes brandWave {
  0% { transform: rotate(-4deg); }
  50% { transform: rotate(6deg); }
  100% { transform: rotate(0); }
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s var(--ease);
}
.nav__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
  z-index: -1;
}
.nav__link:hover { color: var(--accent-text); }
.nav__link:hover::before { opacity: 1; transform: scale(1); }
.nav__link.is-active {
  color: var(--accent-text);
}
.nav__link.is-active::before {
  opacity: 1;
  transform: scale(1);
}

.header-actions {
  display: flex; align-items: center; gap: 6px;
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.icon-btn:active { transform: scale(0.93); }
.icon-btn svg { width: 18px; height: 18px; }

/* Theme toggle morph */
.theme-toggle .sun, .theme-toggle .moon {
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}
[data-theme="light"] .theme-toggle .moon { transform: scale(0) rotate(-90deg); opacity: 0; }
[data-theme="light"] .theme-toggle .sun  { transform: scale(1) rotate(0); opacity: 1; }
[data-theme="dark"]  .theme-toggle .sun  { transform: scale(0) rotate(90deg); opacity: 0; }
[data-theme="dark"]  .theme-toggle .moon { transform: scale(1) rotate(0); opacity: 1; }
.theme-toggle svg { position: absolute; }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: -10% -5% -20%;
  z-index: 0;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-via) 50%, var(--hero-to));
  filter: blur(0px);
  opacity: 0.85;
}
.hero__bg::before,
.hero__bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
[data-theme="light"] .hero__bg::before,
[data-theme="light"] .hero__bg::after {
  mix-blend-mode: multiply;
  opacity: 0.35;
}
.hero__bg::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--pine-300), transparent 70%);
  top: -120px; left: -80px;
  animation: drift1 18s ease-in-out infinite alternate;
}
.hero__bg::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--ocean-300), transparent 70%);
  bottom: -160px; right: -60px;
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(120px, 80px) scale(1.15); }
}
@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, -60px) scale(1.1); }
}

/* Floating illustrative bits — playful */
.hero__sprite {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: var(--accent);
  opacity: 0.42;
}
.hero__sprite--leaf-1 { top: 80px; left: 6%; animation: float 7s ease-in-out infinite; }
.hero__sprite--leaf-2 { top: 36%; right: 9%; animation: float 9s ease-in-out infinite reverse; }
.hero__sprite--wave { bottom: 14%; left: 12%; animation: float 11s ease-in-out infinite; color: var(--secondary); }
.hero__sprite--berry { top: 22%; right: 22%; animation: float 8s ease-in-out infinite; color: var(--highlight); opacity: 0.55;}
.hero__sprite--fish { top: 58%; left: 14%; animation: swim 14s linear infinite; color: var(--secondary); }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-18px) rotate(8deg); }
}
@keyframes swim {
  0% { transform: translateX(-30px); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateX(60vw); opacity: 0; }
}

.hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: color-mix(in srgb, var(--bg-surface) 60%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 28px;
  animation: floatIn 0.9s var(--ease) both;
}
.hero__eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 10px transparent; opacity: 0.6; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  font-variation-settings: "SOFT" 50, "WONK" 1;
}
.hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent-text);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  position: relative;
  display: inline-block;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 4%; right: 4%;
  bottom: -2px;
  height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M0,8 Q25,0 50,8 T100,8 T150,8 T200,8' fill='none' stroke='%233a8068' stroke-width='2.5' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  opacity: 0.7;
  animation: drawWave 1.2s 0.6s var(--ease) both;
  transform-origin: left;
}
[data-theme="dark"] .hero__title em::after {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M0,8 Q25,0 50,8 T100,8 T150,8 T200,8' fill='none' stroke='%237ab59a' stroke-width='2.5' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}
@keyframes drawWave {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 0.7; }
}

.hero__sub {
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero__sub .script {
  font-family: var(--font-script);
  font-size: 1.4em;
  color: var(--accent-text);
  margin: 0 4px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  border: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 14px 30px -12px hsl(var(--shadow-color) / 0.4);
}
.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px hsl(var(--shadow-color) / 0.5);
}
.hero__cta__chip {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  transition: transform 0.4s var(--ease);
}
.hero__cta:hover .hero__cta__chip { transform: rotate(45deg); }
.hero__cta__chip svg { width: 16px; height: 16px; }

.hero__meta {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-subtle);
}
.hero__meta .sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.4; }

/* Animated wave divider at bottom of hero */
.hero__waves {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 80px;
  z-index: 2;
  pointer-events: none;
}
.hero__waves svg { width: 100%; height: 100%; display: block; }

/* ===========================================================
   SECTION HEADERS
   =========================================================== */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 36px;
}
.section-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
.section-head__title em {
  font-style: italic;
  color: var(--accent-text);
  font-weight: 300;
}
.section-head__sub {
  color: var(--text-muted);
  margin: 8px 0 0;
  font-size: 15px;
}
.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-text);
  white-space: nowrap;
}
.section-head__link svg {
  transition: transform 0.3s var(--ease);
}
.section-head__link:hover svg { transform: translateX(4px); }

/* ===========================================================
   CATEGORY CARDS (HOME)
   =========================================================== */
.cats {
  padding: 80px 0 40px;
}
.cats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.3s var(--ease), box-shadow 0.5s var(--ease);
  isolation: isolate;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-soft);
  box-shadow: 0 30px 60px -30px hsl(var(--shadow-color) / 0.3);
}
.cat-card__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.cat-card:hover .cat-card__bg { opacity: 1; }
.cat-card__icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  transition: transform 0.5s var(--ease), border-radius 0.5s var(--ease);
}
.cat-card:hover .cat-card__icon {
  transform: rotate(-8deg) scale(1.05);
  border-radius: 22px;
}
.cat-card__icon svg { width: 26px; height: 26px; }
.cat-card__body { margin-top: 28px; }
.cat-card__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-style: italic;
}
.cat-card__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 340px;
}
.cat-card__count {
  position: absolute;
  top: 28px; right: 28px;
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cat-card--cooking .cat-card__icon {
  background: color-mix(in srgb, var(--secondary) 18%, transparent);
  color: var(--secondary);
}
.cat-card--cooking:hover { border-color: color-mix(in srgb, var(--secondary) 40%, transparent); }
.cat-card__pattern {
  position: absolute;
  right: -40px; bottom: -40px;
  width: 220px; height: 220px;
  opacity: 0.08;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}
.cat-card:hover .cat-card__pattern {
  opacity: 0.16;
  transform: rotate(15deg) scale(1.1);
}

/* ===========================================================
   MAGAZINE GRID — varied card sizes
   =========================================================== */
.mag {
  padding: 80px 0;
  position: relative;
}
.mag__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 20px;
}

.post {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.5s var(--ease), border-color 0.3s var(--ease), box-shadow 0.5s var(--ease);
}
.post:hover {
  transform: translateY(-4px);
  border-color: var(--accent-soft);
  box-shadow: 0 24px 50px -28px hsl(var(--shadow-color) / 0.3);
}
.post__cover {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
  flex: none;
}
.post__cover-art {
  width: 100%; height: 100%;
  display: block;
  transition: transform 0.7s var(--ease);
}
.post:hover .post__cover-art { transform: scale(1.04); }
.post__category {
  position: absolute;
  top: 14px; left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  backdrop-filter: blur(8px);
  color: var(--accent-text);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post__category--cooking { color: var(--secondary); }
.post__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post__meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post__meta .dot { width: 3px; height: 3px; background: currentColor; border-radius: 50%; opacity: 0.5; }
.post__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}
.post__desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  text-wrap: pretty;
}
.post__tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}
.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  transition: transform 0.2s var(--ease);
}
.tag--cooking { background: var(--secondary-soft); color: var(--secondary); }
.tag:hover { transform: translateY(-1px); }

/* SIZES */
.post--feature {
  grid-column: span 2;
  grid-row: span 1;
}
.post--feature .post__cover { aspect-ratio: 16/9; }
.post--feature .post__title { font-size: clamp(28px, 3vw, 38px); line-height: 1.05; }
.post--feature .post__desc { font-size: 16px; }
.post--feature .post__body { padding: 28px 32px 32px; gap: 12px; }

.post--side {
  grid-column: span 1;
}
.post--side .post__cover { aspect-ratio: 4/3; }

.post--text {
  grid-column: span 1;
  background: var(--bg-soft);
  border-style: dashed;
  border-color: var(--border);
}
.post--text .post__body { padding: 26px; }

.post--wide {
  grid-column: span 1;
  display: flex;
}
.post--wide .post__cover { aspect-ratio: 16/9; height: auto; min-height: 0; }
.post--wide .post__cover-art { height: 100%; object-fit: cover; }
.post--wide .post__body { padding: 22px 24px 24px; }

.post--small {
  grid-column: span 1;
}
.post--small .post__cover { aspect-ratio: 5/3; }
.post--small .post__title { font-size: 19px; }
.post--small .post__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
}

/* Cover SVG illustrations */
.cover-illust { width: 100%; height: 100%; display: block; }

/* ===========================================================
   QUOTE / CALLOUT BAND
   =========================================================== */
.callout {
  padding: 80px 0;
  background:
    radial-gradient(ellipse at 20% 50%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(ellipse at 80% 50%, color-mix(in srgb, var(--secondary) 12%, transparent), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 200' preserveAspectRatio='none'><path d='M0,100 Q175,40 350,100 T700,100 T1050,100 T1400,100' fill='none' stroke='%233a8068' stroke-width='1' stroke-opacity='0.18'/><path d='M0,130 Q175,70 350,130 T700,130 T1050,130 T1400,130' fill='none' stroke='%234a7d9a' stroke-width='1' stroke-opacity='0.15'/></svg>") no-repeat center / 100% 100%;
  pointer-events: none;
}
.callout__inner {
  text-align: center;
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.callout__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.3;
  margin: 0 0 24px;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.callout__quote .accent { color: var(--accent-text); }
.callout__attr {
  font-family: var(--font-script);
  font-size: 22px;
  color: var(--text-muted);
}

/* ===========================================================
   NEWSLETTER
   =========================================================== */
.newsletter {
  padding: 100px 0;
}
.newsletter__card {
  position: relative;
  background: var(--text);
  color: #f0f5f3;
  border-radius: var(--radius-xl);
  padding: 56px clamp(28px, 5vw, 64px);
  overflow: hidden;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: center;
}
[data-theme="dark"] .newsletter__card {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-soft);
}
.newsletter__card::before {
  content: "";
  position: absolute;
  top: -40%; right: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--pine-400), transparent 70%);
  opacity: 0.45;
  filter: blur(40px);
  animation: drift1 20s ease-in-out infinite alternate;
}
.newsletter__card::after {
  content: "";
  position: absolute;
  bottom: -50%; left: -10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--ocean-400), transparent 70%);
  opacity: 0.4;
  filter: blur(40px);
  animation: drift2 24s ease-in-out infinite alternate;
}
.newsletter__content { position: relative; z-index: 2; }
.newsletter__eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pine-300);
  margin-bottom: 12px;
}
.newsletter__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
  text-wrap: balance;
}
.newsletter__title em { font-style: italic; color: var(--pine-300); font-weight: 300; }
.newsletter__desc {
  font-size: 15px;
  color: color-mix(in srgb, white 70%, transparent);
  margin: 0 0 24px;
  max-width: 420px;
}
[data-theme="dark"] .newsletter__desc { color: var(--text-muted); }
.newsletter__form {
  display: flex;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 5px;
  position: relative;
  z-index: 2;
}
[data-theme="dark"] .newsletter__form {
  background: var(--bg);
  border-color: var(--border);
}
.newsletter__form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 18px;
  color: inherit;
  font-size: 14px;
  font-family: inherit;
}
.newsletter__form input::placeholder { color: color-mix(in srgb, white 40%, transparent); }
[data-theme="dark"] .newsletter__form input::placeholder { color: var(--text-subtle); }
.newsletter__form button {
  background: var(--pine-300);
  color: var(--ocean-900);
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.newsletter__form button:hover:not(:disabled) { transform: translateY(-1px); background: var(--pine-200); }
.newsletter__form button:disabled { opacity: 0.6; cursor: default; }
.newsletter__form input:disabled { opacity: 0.6; }
.newsletter__error {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--coral-300);
}
.newsletter__success,
.newsletter__duplicate {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
}
.newsletter__success {
  background: rgba(255,255,255,0.1);
  color: white;
}
.newsletter__duplicate {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  font-style: italic;
}
[data-theme="dark"] .newsletter__success { background: var(--bg); color: var(--text); }
[data-theme="dark"] .newsletter__duplicate { background: var(--bg); color: var(--text-muted); }
.newsletter__perks {
  display: flex; gap: 16px;
  margin-top: 18px;
  font-size: 13px;
  color: color-mix(in srgb, white 55%, transparent);
}
[data-theme="dark"] .newsletter__perks { color: var(--text-subtle); }
.newsletter__perks span { display: inline-flex; align-items: center; gap: 6px; }

/* RHS illustrative blob */
.newsletter__art {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
}

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
  position: relative;
  padding: 0 0 22px;
  border-top: none;
  background: var(--bg-soft);
  color: var(--accent); /* gives wave paths their green fill via currentColor */
  overflow: hidden;
}
.site-footer__wave {
  display: block;
  width: 100%;
  height: 72px;
  margin-bottom: -20px; /* bar overlaps the wave's lower portion */
  flex-shrink: 0;
}
.site-footer__bar {
  position: relative;
  z-index: 1; /* sits in front of the wave */
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 0 2px;
}
.site-footer__brand-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-footer__brand-link .brand__mark svg { width: 18px; height: 18px; }
.site-footer__brand-link:hover { color: var(--accent-text); }
.site-footer__links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}
.site-footer__links a { font-size: 13px; color: var(--text-muted); transition: color 0.2s var(--ease); }
.site-footer__links a:hover { color: var(--accent-text); }
.site-footer__sep { color: var(--border-soft); font-size: 13px; }
.site-footer__copy { font-size: 12px; color: var(--text-subtle); white-space: nowrap; margin: 0; }

/* ===========================================================
   ROUTE TRANSITIONS
   =========================================================== */
.page {
  display: none;
  animation: pageIn 0.55s var(--ease) both;
}
.page.is-active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

/* ===========================================================
   CATEGORY PAGE
   =========================================================== */
.cat-hero {
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.cat-hero__icon {
  width: 64px; height: 64px;
  border-radius: 22px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 20px;
}
.cat-hero__icon svg { width: 30px; height: 30px; }
.cat-hero--cooking .cat-hero__icon {
  background: var(--secondary-soft);
  color: var(--secondary);
}
.cat-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.cat-hero__title em { font-style: italic; color: var(--accent-text); font-weight: 300; }
.cat-hero--cooking .cat-hero__title em { color: var(--secondary); }
.cat-hero__sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 0 24px;
}
.cat-hero__count {
  font-size: 14px;
  color: var(--text-subtle);
}
.cat-hero__count strong { color: var(--accent-text); font-weight: 600; }
.cat-hero--cooking .cat-hero__count strong { color: var(--secondary); }

.tag-bar {
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 48px;
  position: sticky;
  top: 68px;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
}
.tag-bar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-bar__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-right: 8px;
}
.tag-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-1px); }
.tag-pill.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.cat-hero--cooking ~ * .tag-pill.is-active { background: var(--secondary); border-color: var(--secondary); }
.tag-pill .count {
  font-size: 11px;
  opacity: 0.6;
}

/* ===========================================================
   POST DETAIL
   =========================================================== */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  width: 0;
  z-index: 100;
  transition: width 0.05s linear;
}
.post-hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}
.post-hero__crumbs {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 24px;
}
.post-hero__crumbs a:hover { color: var(--accent-text); }
.post-hero__crumbs .crumb-cat { color: var(--accent-text); font-weight: 500; }
.post-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  text-wrap: balance;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.post-hero__title em { font-style: italic; color: var(--accent-text); font-weight: 300; }
.post-hero__sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;
  line-height: 1.5;
}
.post-hero__meta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
}
.post-hero__meta .author {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  color: var(--text);
}
.post-hero__meta .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
}
.post-hero__meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.3; }

.post-hero__cover {
  margin: 48px auto 0;
  max-width: 1100px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/8;
  background: var(--bg-soft);
  position: relative;
}

.article {
  padding: 60px 0 80px;
}
.article__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: 60px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 100px;
  font-size: 13px;
}
.toc__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin: 0 0 14px;
  font-weight: 600;
}
.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  gap: 2px;
}
.toc__list a {
  display: block;
  padding: 6px 14px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all 0.2s var(--ease);
  line-height: 1.4;
}
.toc__list a:hover { color: var(--accent-text); }
.toc__list a.is-active {
  color: var(--accent-text);
  border-left-color: var(--accent);
  font-weight: 500;
}

.prose {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--text);
  font-family: var(--font-sans);
}
.prose > * + * { margin-top: 1.4em; }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 2em;
  margin-bottom: 0.4em;
  scroll-margin-top: 100px;
}
.prose h2 em { font-style: italic; color: var(--accent-text); font-weight: 300; }
.prose h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}
.prose p { margin: 1.2em 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; }
.prose a {
  color: var(--accent-text);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}
.prose a:hover { background-size: 100% 2px; }
.prose blockquote {
  position: relative;
  margin: 2em 0;
  padding: 24px 28px 24px 36px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15em;
  line-height: 1.4;
  color: var(--text);
}
.prose blockquote::before {
  content: "";
  position: absolute;
  left: 0; top: 24px; bottom: 24px;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent), var(--secondary));
  border-radius: 999px;
}
.prose ul, .prose ol {
  padding-left: 1.6em;
  margin: 1.2em 0;
}
.prose li { margin: 0.4em 0; }
.prose ul li::marker { color: var(--accent); }
.prose img, .prose .figure {
  margin: 2em 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.prose .pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 26px;
  line-height: 1.3;
  color: var(--accent-text);
  text-align: center;
  padding: 24px 0;
  margin: 2em -20px;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.share {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 4px;
  font-weight: 600;
}
.share__btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.share__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
}
.share__btn svg { width: 16px; height: 16px; }

/* Related posts at bottom */
.related {
  border-top: 1px solid var(--border-soft);
  padding: 60px 0 0;
  margin-top: 60px;
}

/* ===========================================================
   ABOUT PAGE
   =========================================================== */
.about {
  padding: 80px 0;
}
.about__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.about__title em { font-style: italic; color: var(--accent-text); font-weight: 300; }
.about__lead {
  font-size: 19px;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.55;
}
.about__sig {
  font-family: var(--font-script);
  font-size: 38px;
  color: var(--accent-text);
  margin-top: 24px;
}

.about__portrait {
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent-soft), var(--secondary-soft));
  position: relative;
  overflow: hidden;
}
.about__portrait::before,
.about__portrait::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}
.about__portrait::before {
  width: 60%; height: 60%;
  background: var(--accent);
  top: -20%; right: -20%;
  opacity: 0.4;
  animation: drift1 16s ease-in-out infinite alternate;
}
.about__portrait::after {
  width: 70%; height: 70%;
  background: var(--secondary);
  bottom: -25%; left: -25%;
  opacity: 0.35;
  animation: drift2 20s ease-in-out infinite alternate;
}
.about__portrait-tag {
  position: absolute;
  bottom: 20px; left: 20px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
.about__portrait-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral-400); }

.values {
  margin-top: 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.value {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.value:hover { transform: translateY(-4px); border-color: var(--accent-soft); }
.value__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 16px;
}
.value__icon svg { width: 22px; height: 22px; }
.value:nth-child(2) .value__icon { background: var(--secondary-soft); color: var(--secondary); }
.value:nth-child(3) .value__icon {
  background: color-mix(in srgb, var(--tertiary) 20%, transparent);
  color: var(--sand-500);
}
[data-theme="dark"] .value:nth-child(3) .value__icon { color: var(--sand-300); }
.value h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.value p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===========================================================
   SEARCH OVERLAY (cmd-K style)
   =========================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(20px);
  animation: searchIn 0.3s var(--ease) both;
}
.search-overlay.is-open { display: flex; }
@keyframes searchIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.search-panel {
  width: min(640px, 92vw);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px hsl(var(--shadow-color) / 0.5);
  overflow: hidden;
  animation: searchPanelIn 0.4s var(--ease) both;
}
@keyframes searchPanelIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.search-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.search-input-row svg { color: var(--text-subtle); }
.search-input-row input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--text);
}
.kbd {
  font-size: 11px;
  padding: 2px 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-subtle);
}
.search-results { padding: 8px; max-height: 50vh; overflow-y: auto; }
.search-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  padding: 10px 12px 6px;
  font-weight: 600;
}
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.search-result:hover, .search-result.is-focused { background: var(--bg-soft); }
.search-result__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid; place-items: center;
}
.search-result__title { font-weight: 500; font-size: 14px; }
.search-result__sub { font-size: 12px; color: var(--text-subtle); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 920px) {
  .cats__grid { grid-template-columns: 1fr; }
  .mag__grid { grid-template-columns: repeat(2, 1fr); }
  .post--feature, .post--side, .post--text, .post--small, .post--wide { grid-column: span 1; }
  .post--feature { grid-column: span 2; }
  .post--wide { grid-column: span 1; }
  .post--wide .post__cover { aspect-ratio: 16/9; }
  .article__layout { grid-template-columns: 1fr; gap: 30px; }
  .toc, .share { display: none; }
  .newsletter__card { grid-template-columns: 1fr; }
  .newsletter__art { display: none; }
  .about__hero { grid-template-columns: 1fr; }
  .about__portrait { max-width: 360px; }
  .values { grid-template-columns: 1fr; }
  .site-footer__bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer__links { gap: 10px; }
  .site-footer__copy { align-self: flex-start; }
  .nav { display: none; }
}

@media (max-width: 680px) {
  .mag__grid { grid-template-columns: 1fr; }
  .post--feature, .post--side, .post--text, .post--small, .post--wide { grid-column: span 1; }
}

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

/* ===========================================================
   APP SHELL — boot splash, curtain, reading progress,
   cursor glow, palette (Cmd-K)
   =========================================================== */

/* Page stage — gives main content layout & enter/leave anims */
.app-root { display: block; min-height: 60vh; }
.page-stage {
  display: block;
  animation: pageIn 0.55s var(--ease) both;
}
.page-stage.is-leaving { animation: pageOut 0.4s var(--ease) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* ---------- Boot splash ---------- */
.boot {
  position: fixed; inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent);
  pointer-events: all;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
  overflow: hidden;
}
.boot.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__sea {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 60%, var(--hero-via), transparent 70%),
    linear-gradient(180deg, var(--hero-from), var(--hero-to));
  opacity: 0.55;
}
.boot__sea::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 40%;
  background:
    radial-gradient(80% 100% at 50% 100%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  animation: bootRise 1.2s var(--ease) both;
}
@keyframes bootRise {
  from { transform: translateY(60%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.boot__mark {
  position: relative; z-index: 2;
  color: var(--accent-text);
  animation: bootMark 1.1s var(--ease) both;
  filter: drop-shadow(0 8px 20px hsl(var(--shadow-color) / 0.35));
}
@keyframes bootMark {
  0% { opacity: 0; transform: translateY(20px) scale(0.9); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.boot__caption {
  position: relative; z-index: 2;
  margin-top: 18px;
  font-family: var(--font-script);
  font-size: 22px;
  color: var(--text-muted);
  display: inline-flex; align-items: baseline; gap: 4px;
  animation: fadeInOnly 0.6s var(--ease) 0.4s both;
}
@keyframes fadeInOnly { from { opacity: 0; } to { opacity: 1; } }
.boot__caption .dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.boot__caption .dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: dotPulse 1.2s ease-in-out infinite;
}
.boot__caption .dots i:nth-child(2) { animation-delay: 0.15s; }
.boot__caption .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* ---------- Page transition curtain ---------- */
.curtain {
  position: fixed; inset: 0;
  z-index: 180;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-text) 100%);
}
.curtain.is-active { transform: translateY(0); }
.curtain__wave {
  position: absolute;
  top: -1px; left: 0; right: 0;
  width: 100%; height: 100px;
  transform: translateY(-99%);
  color: var(--accent);
  fill: currentColor;
}
.curtain__wave path { fill: var(--accent); }

/* ---------- Reading progress ---------- */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  background: transparent;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--secondary), var(--highlight));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: width 0.12s linear;
}

/* ---------- Cursor glow ---------- */
.has-cursor-glow body::before {
  content: "";
  position: fixed;
  width: 380px; height: 380px;
  left: var(--cursor-x, -200px);
  top:  var(--cursor-y, -200px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 60%);
  mix-blend-mode: plus-lighter;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}
[data-theme="light"].has-cursor-glow body::before {
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 60%);
  mix-blend-mode: multiply;
  opacity: 0.4;
}
@media (hover: none) {
  .has-cursor-glow body::before { display: none; }
}

/* ---------- Cmd-K palette ---------- */
.palette {
  position: fixed; inset: 0;
  z-index: 150;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 24px 24px;
}
.palette.is-open { display: flex; animation: paletteIn 0.25s var(--ease) both; }
@keyframes paletteIn { from { opacity: 0; } to { opacity: 1; } }
.palette__backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.palette__panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px hsl(var(--shadow-color) / 0.4);
  overflow: hidden;
  animation: panelDrop 0.35s var(--ease) both;
}
@keyframes panelDrop {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.palette__search {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}
.palette__search input {
  flex: 1;
  border: none; outline: none; background: transparent;
  font: inherit; font-size: 16px;
  color: var(--text);
}
.palette__search input::placeholder { color: var(--text-subtle); }
.palette__search kbd, .palette__hint kbd {
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text-muted);
}
.palette__results {
  max-height: 50vh;
  overflow-y: auto;
}
.palette__list {
  list-style: none;
  margin: 0; padding: 8px;
}
.palette__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.palette__item.is-active { background: var(--accent-soft); }
.palette__kind {
  grid-row: 1 / span 2;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  align-self: center;
}
.palette__kind--post { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.palette__kind--page { background: color-mix(in srgb, var(--secondary) 18%, transparent); color: var(--secondary); }
.palette__title { font-weight: 600; color: var(--text); font-size: 14px; }
.palette__title em { font-style: italic; color: var(--accent-text); font-weight: 400; }
.palette__sub { font-size: 12px; color: var(--text-subtle); grid-column: 2; }
.palette__arrow {
  grid-row: 1 / span 2;
  color: var(--text-subtle);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.palette__item.is-active .palette__arrow { opacity: 1; transform: translateX(0); }
.palette__empty {
  padding: 28px 16px; text-align: center;
  color: var(--text-subtle); font-size: 14px;
}
.palette__hint {
  display: flex; gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--text-subtle);
  background: var(--bg-soft);
}
.palette__hint kbd { margin-right: 4px; }

