/* BRAND REFRESH: Self-hosted Figtree variable font */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/https/www.anildash.com/public/fonts/Figtree.ttf') format('truetype');
}

@font-face {
  font-family: 'Figtree';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url('/https/www.anildash.com/public/fonts/Figtree-Italic.ttf') format('truetype');
}

/* BRAND REFRESH: Updated CSS Variables - Purple Primary */
/* Colors converted to OKLCH for perceptual uniformity and accessibility */
:root {
  /* Saturated color palette inspired by Japanese labor posters (OKLCH) */
  --red: oklch(0.577 0.245 27.3);
  --green: oklch(0.46 0.17 145.5);
  --purple: oklch(0.496 0.265 292.4);
  --blue: oklch(0.546 0.245 264.1);

  /* Primary accent is purple (signature color), red is secondary accent */
  --accent: oklch(0.496 0.265 292.4);
  --accent-secondary: oklch(0.577 0.245 27.3);
  --secondary: oklch(0.967 0.003 264.5);
  --background: oklch(1 0 0);
  --color: oklch(0.208 0.042 264.7);
  --card-background: oklch(0.985 0.002 264.5);

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 5rem;

  /* Accessibility enhancement - focus outline color */
  --focus-outline: oklch(0.496 0.265 292.4);
  --focus-outline-width: 3px;
}

/* BRAND REFRESH: Dark theme with saturated colors (OKLCH) */
html[data-theme="dark"] {
  --red: oklch(0.704 0.191 22.2);
  --green: oklch(0.792 0.209 148.5);
  --purple: oklch(0.714 0.164 292.8);
  --blue: oklch(0.882 0.077 241.3);

  --accent: oklch(0.704 0.191 22.2);
  --background: oklch(0.208 0.042 264.7);
  --color: oklch(0.967 0.007 264.5);
  --secondary: oklch(0.279 0.041 264.5);
  --card-background: oklch(0.279 0.041 264.5);
  --focus-outline: oklch(0.704 0.191 22.2);
}

/* BRAND REFRESH: System preference dark mode (OKLCH) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --red: oklch(0.704 0.191 22.2);
    --green: oklch(0.792 0.209 148.5);
    --purple: oklch(0.714 0.164 292.8);
    --blue: oklch(0.882 0.077 241.3);

    --accent: oklch(0.704 0.191 22.2);
    --background: oklch(0.208 0.042 264.7);
    --color: oklch(0.967 0.007 264.5);
    --secondary: oklch(0.279 0.041 264.5);
    --card-background: oklch(0.279 0.041 264.5);
    --focus-outline: oklch(0.704 0.191 22.2);
  }

  /* Reduce brightness of images in dark mode for visual comfort */
  html:not([data-theme="light"]) img {
    filter: brightness(0.9);
  }
}

/* Skip link for keyboard navigation */
/* BRAND REFRESH: Sharp geometric edges, no rounded corners */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.5rem 1rem;
  background-color: var(--background);
  color: var(--accent);
  z-index: 100;
  transform: translateY(-100%);
  transition: transform 0.3s;
  border: 2px solid var(--accent);
  border-radius: 0; /* No rounded corners */
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
  outline: var(--focus-outline-width) solid var(--focus-outline);
}

/* Screen reader only class */
.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;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  height: 100%;
  overflow-x: hidden;
}

/* Add reduced motion preference support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* BRAND REFRESH: Bold, geometric typography with Figtree */
body {
  background-color: var(--background);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--background);
  height: 100%;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--color);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga", "tnum", "calt";
  font-variant-ligatures: contextual;
  -webkit-text-size-adjust: 100%;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
    sans-serif;
  font-weight: 500; /* Default to medium weight for assertive look */
}

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

audio,
canvas,
embed,
iframe,
img,
object,
video {
  display: block;
}

audio,
iframe,
img,
video {
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
}

/* Add proper alt text styling */
img:not([alt]) {
  border: 2px dashed oklch(0.627 0.225 25.7);
}

/* Improve video/iframe accessibility with proper aspect ratio */
.video,
iframe.video {
  aspect-ratio: 16 / 9;
  width: 100%;
}

/* Native scroll-snap carousel — swipe on mobile, scroll on desktop */
.carousel-wrap {
  position: relative;
  margin: 1.5rem 0;
}

.carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 1rem;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-marker-group: after;
  width: 100%;
  max-width: 100%;
}

.carousel::-webkit-scrollbar {
  height: 8px;
}
.carousel::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.carousel > img,
.carousel > * {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  margin: 0;
  display: block;
  border: 2px solid var(--secondary);
  border-radius: 4px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: white;
  border: 2px solid var(--secondary);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.carousel-btn:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn--prev { left: 0.5rem; }
.carousel-btn--next { right: 0.5rem; }

/* Progressive enhancement: native pagination dots in supporting browsers */
@supports (scroll-marker-group: after) {
  .carousel > *::scroll-marker {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--secondary);
    border: 2px solid var(--secondary);
    margin: 0 0.25rem;
    cursor: pointer;
  }

  .carousel > *::scroll-marker:target-current {
    background: var(--accent);
    border-color: var(--accent);
  }

  .carousel::scroll-marker-group {
    display: flex;
    justify-content: center;
    padding: 0.75rem 0;
  }
}

.carousel-caption {
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  color: var(--secondary);
  margin: 0.5rem 0 1.5rem;
}

hr {
  width: 100%;
  border: none;
  background: oklch(0.274 0 0 / 0.1);
  height: 1px;
  margin-top: 2rem;
}

/* BRAND REFRESH: Default links black, body links blue */
a {
  text-decoration: none;
  color: var(--color);
  transition: all 0.2s linear;
}

main a,
.post__content a {
  color: var(--blue);
  text-decoration: underline;
}

main a:hover,
.post__content a:hover {
  color: var(--purple);
}

/* Improved focus states for all interactive elements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: var(--focus-outline-width) solid var(--focus-outline);
  outline-offset: 2px;
  text-decoration: none;
}

p a {
  text-decoration: underline;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

ol {
  list-style-position: inside;
}

ol ol {
  list-style-type: lower-alpha;
}

ol > li::marker {
  font-weight: bold;
}

ul {
  list-style-type: square;
  list-style-position: inside;
}

/* BRAND REFRESH: Bolder emphasis */
b,
strong {
  font-weight: 700;
}

/* Improve table accessibility */
table {
  border-collapse: collapse;
  caption-side: bottom;
  overflow-x: auto;
  min-width: 100%;
  border: 1px solid oklch(0.274 0 0 / 0.3);
}

table,
table caption {
  margin-top: 1rem;
}

/* Make table captions more visible for screen readers */
caption {
  font-weight: bold;
  padding: 0.5rem 0;
  text-align: left;
}

td,
th {
  border: 1px solid oklch(0.274 0 0 / 0.3);
  padding: 0.5rem;
  text-align: left;
}

th {
  font-weight: 500;
}

td:only-child {
  text-align: center;
}

* + h1,
* + h2 {
  margin-top: 1.5rem;
}

* + h3,
* + h4,
* + h5 {
  margin-top: 3rem;
}

* + p {
  margin-top: 2rem;
}

h2 + p,
h3 + p,
h4 + p {
  margin-top: 1rem;
}

/* BRAND REFRESH: Bold, assertive headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 800; /* Extra bold for assertive look */
  color: var(--color);
  font-family: "Figtree", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-weight: 900; /* Black weight for maximum impact */
  font-size: var(--text-5xl);
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

h2 {
  font-weight: 800;
  font-size: var(--text-3xl);
  margin-top: 3.5rem;
  color: var(--color);
}

h3 {
  font-weight: 700;
  font-size: var(--text-xl);
}

h4,
h5,
p {
  font-size: var(--text-lg);
}

/* Improve definition list spacing */
dt {
  font-weight: 600;
  text-align: left;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

/* BRAND REFRESH: Bold blockquote styling */
blockquote {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  border-left: 6px solid var(--accent);
  font-style: italic;
  font-weight: 600;
  background-color: var(--secondary);
  padding: 1rem 1.5rem;
}

blockquote,
pre {
  margin-top: 1rem;
}

pre {
  white-space: pre-wrap;
  tab-size: 2;
  font-size: 0.95rem;
  border: 1px solid oklch(0.274 0 0 / 0.1);
  padding: 1rem;
  overflow: auto;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  scrollbar-width: thin;
  scrollbar-color: oklch(0.274 0 0 / 0.8);
}

/* BRAND REFRESH: Code in green (terminal style) */
code,
kbd {
  font-feature-settings: normal;
  background: var(--secondary);
  color: var(--green);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 0.95rem;
}

code,
pre {
  font-family: Inconsolata, monospace;
}

mark {
  background: var(--accent);
  color: var(--background);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 0.95rem;
}

div.twitter-tweet {
  margin-left: auto;
  margin-right: auto;
}

main ol,
main ul {
  padding-top: 1.5rem;
}

main ol li,
main ul li {
  padding-bottom: 1rem;
}

.main {
  display: flex;
  padding-bottom: 4rem;
  flex-direction: column;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  min-width: auto;
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 700px) {
  .main {
    padding-inline: 1rem;
  }
}

.layout-wrapper {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100%;
}

/* BRAND REFRESH: Color-blocked intro section */
.intro {
  display: grid;
  grid-gap: 2rem;
  grid-template-columns: 2fr 1fr;
  margin-bottom: 3rem;
}

@media (max-width: 1000px) {
  .intro {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .intro {
    grid-template-columns: 1fr;
    grid-gap: 40px;
  }
}

/* BRAND REFRESH: Clean hero text styling */
.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero a {
  color: white !important;
  text-shadow: 2px 2px 4px oklch(0 0 0 / 0.3);
}

.hero a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 700;
}

.hero a:hover {
  background-color: oklch(0 0 0 / 0.3);
  text-decoration-thickness: 3px;
}

@media (max-width: 700px) {
  .hero {
    padding: 2rem 1rem;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  }
}

/* BRAND REFRESH: Intro text - no border (border is on hero container) */
.intro-text {
  position: relative;
  flex: 1 1 450px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background-size: cover;
  word-break: break-word;
  border-radius: 0;
  margin-right: 1.5rem;
}

/* Hero tag links - exact match to post card tags */
a.hero-tag-link {
  display: inline-block !important;
  text-decoration: none !important;
  background: var(--secondary) !important;
  color: var(--color) !important;
  padding: 0.2rem 0.4rem !important;
  margin-right: 0.25rem !important;
  text-transform: uppercase !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  border: 1px solid var(--secondary) !important;
  transition: none !important;
  white-space: nowrap !important;
}

/* Hero tag link hover - white outline in both light and dark mode */
a.hero-tag-link:hover {
  background: var(--accent) !important;
  border-color: white !important;
  color: white !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
}

/* Dark mode - hero tags use darkened red for WCAG contrast with white text */
html[data-theme="dark"] a.hero-tag-link {
  background: oklch(0.59 0.191 22.2) !important;
  border-color: oklch(0.59 0.191 22.2) !important;
  color: white !important;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) a.hero-tag-link {
    background: oklch(0.59 0.191 22.2) !important;
    border-color: oklch(0.59 0.191 22.2) !important;
    color: white !important;
  }
}

/* Regular hero links (not tags) */
.hero .intro-text a:not(.hero-tag-link):hover {
  background: oklch(0 0 0 / 0.3);
  text-decoration: underline;
}

/* About page banner with graffiti background */
.about-banner {
  margin: 0 0 3rem 0;
}

.about-banner img {
  width: 100%;
  height: auto;
  display: block;
  border: 6px solid var(--accent);
  margin-top: 0;
}

/* About page content */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.about-content h1 {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: var(--text-6xl);
  color: transparent;
  -webkit-text-stroke: 3px var(--accent);
  paint-order: stroke fill;
}

@media (max-width: 700px) {
  .about-banner {
    border-width: 4px;
  }

  .about-content {
    padding: 0 1rem;
    margin-bottom: 2rem;
  }
}

/* About page mid-page photo */
.about-photo {
  max-width: 60rem;
  margin: 3rem auto;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 6px solid var(--accent);
  margin-top: 0;
}

@media (max-width: 700px) {
  .about-photo {
    margin: 2rem 0;
  }

  .about-photo img {
    border-width: 4px;
  }
}

/* About page image captions */
.about-banner figcaption,
.about-photo figcaption {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  text-align: right;
}

.about-banner figcaption a,
.about-photo figcaption a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.about-banner figcaption a:hover,
.about-photo figcaption a:hover {
  opacity: 0.8;
}

/* About page podcast grid */
.podcast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.podcast-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 2.25rem 0.75rem 0.75rem;
  border: 3px solid var(--secondary);
  text-decoration: none;
  color: var(--color);
  transition: all 0.2s ease;
  position: relative;
}

.podcast-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px oklch(0 0 0 / 0.1);
  color: var(--color);
}

.podcast-card__art {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  overflow: hidden;
}

.podcast-card__pub-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid oklch(0 0 0 / 0.08);
  height: 1.5rem;
}

.podcast-card__pub-bar img {
  height: 0.75rem !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
  opacity: 0.85;
}

.podcast-card__art img {
  width: 4.5rem !important;
  height: 4.5rem !important;
  max-width: 4.5rem !important;
  object-fit: cover;
  display: block;
  margin-top: 0;
}

.podcast-card__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.podcast-card__show {
  font-weight: 800;
  font-size: var(--text-base);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.podcast-card__venue {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.podcast-card__topic {
  font-size: var(--text-sm);
  opacity: 0.7;
  line-height: 1.4;
  margin-top: 0.35rem;
}

@media (max-width: 700px) {
  .podcast-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Appearances page ────────────────────────────── */
.appearances-page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.appearances-hero {
  padding: 3rem 2.5rem 4rem !important;
}

.appearances-hero .hero-content {
  text-align: left !important;
  max-width: 60rem;
  margin: 0 auto;
}

.appearances-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
}

.appearances-nav a {
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.85 0.05 0);
  text-decoration: none;
  transition: color 0.15s ease;
}

.appearances-nav a:hover {
  color: #fff;
}

.appearances-section {
  margin-bottom: 3.5rem;
}

.appearances-section__heading {
  font-size: var(--text-3xl);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
}

.appearances-section__intro {
  margin: 0 0 1.5rem;
  font-size: var(--text-base);
  opacity: 0.85;
}

.appearances-section__intro a {
  color: var(--accent);
  font-weight: 600;
}

/* Featured grid — larger cards */
.appearances-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.podcast-card--featured {
  flex-direction: column !important;
  text-align: center;
  padding: 2.5rem 1.25rem 1.25rem !important;
}

.podcast-card--featured .podcast-card__art {
  width: 6rem !important;
  height: 6rem !important;
  margin: 0 auto 0.75rem;
}

.podcast-card--featured .podcast-card__pub-bar {
  padding: 0.35rem 1rem;
  height: 1.75rem;
}

.podcast-card--featured .podcast-card__pub-bar img {
  height: 0.85rem !important;
}

.podcast-card--featured .podcast-card__art img {
  width: 6rem !important;
  height: 6rem !important;
}

.podcast-card--featured .podcast-card__show {
  font-size: var(--text-lg);
}

@media (max-width: 700px) {
  .appearances-featured-grid {
    grid-template-columns: 1fr;
  }
  .appearances-page {
    padding: 1rem 1rem 3rem;
  }
}

/* Talks & videos */
.appearances-video-embed {
  margin: 0 0 2rem;
  text-align: center;
}

.appearances-video-embed iframe {
  max-width: 100%;
  border-radius: 0;
  border: 2px solid var(--secondary);
}

.talk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.talk-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--secondary);
  border-radius: 0;
  text-decoration: none;
  color: var(--color);
  transition: border-color 0.2s, transform 0.2s;
  overflow: hidden;
}

.talk-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.talk-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: oklch(0.2 0 0);
}

.talk-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.talk-card__info {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  gap: 0.15rem;
}

.talk-card__title {
  font-weight: 800;
  font-size: var(--text-sm);
  color: var(--color);
  line-height: 1.3;
}

.talk-card__venue {
  font-size: var(--text-xs);
  font-weight: 600;
  opacity: 0.7;
  margin-top: 0.15rem;
}

@media (max-width: 900px) {
  .talk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .talk-grid {
    grid-template-columns: 1fr;
  }
}

/* Writing & press grid */
.writing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.writing-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 2.25rem 0.75rem 0.75rem;
  border: 3px solid var(--secondary);
  border-radius: 0;
  text-decoration: none;
  color: var(--color);
  transition: all 0.2s ease;
  position: relative;
}

.writing-card__pub-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid oklch(0 0 0 / 0.08);
  height: 1.5rem;
}

.writing-card__pub-bar img {
  height: 0.75rem !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
  opacity: 0.85;
}

.writing-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px oklch(0 0 0 / 0.1);
  color: var(--color);
}

.writing-card__art {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  overflow: hidden;
}

.writing-card__art img {
  width: 4.5rem !important;
  height: 4.5rem !important;
  max-width: 4.5rem !important;
  object-fit: cover;
  display: block;
  margin-top: 0;
}

.writing-card__art--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-align: center;
  padding: 0.25rem;
  line-height: 1.3;
}

.affiliation-logo {
  padding: 0.75rem;
  background: white;
}

.affiliation-logo img {
  width: auto !important;
  height: auto !important;
  max-width: 80% !important;
  max-height: 80%;
  object-fit: contain;
}

.writing-card__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.writing-card__pub {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.writing-card__title {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color);
  margin-top: 0.15rem;
}

.writing-card__desc {
  font-size: var(--text-sm);
  opacity: 0.7;
  margin-top: 0.25rem;
}

@media (max-width: 700px) {
  .writing-grid {
    grid-template-columns: 1fr;
  }
}

/* About page lower content section */
.about-lower {
  margin-top: 0;
  margin-bottom: 3rem;
}

.about-lower h2,
.about-lower h3 {
  margin-top: 2.5rem;
}

.about-lower h3:first-child {
  margin-top: 0;
}

/* About page ORCID badge */
.about-orcid {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 1rem 1.5rem;
  border: 4px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.about-orcid__label {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
}

.about-orcid a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inconsolata', monospace;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.about-orcid a:hover {
  color: var(--accent);
}

.about-orcid a img {
  width: 1rem !important;
  max-width: 1rem !important;
  height: 1rem;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 0;
}

@media (max-width: 700px) {
  .about-orcid {
    margin-left: 0;
    margin-right: 0;
    padding: 0.75rem 1rem;
  }
}

figure.feature-pic {
  position: relative;
  flex: 1 1 450px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background-size: cover;
  word-break: break-word;
}

/* BRAND REFRESH: Profile pic with bold black border */
figure.feature-pic .feature-pic-image {
  position: relative;
  flex: 1 1 301px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--secondary);
  border-radius: 0;
  border: 6px solid var(--color);
}

/* Tags as tabs sitting on top of hero image */
.post__hero-wrap {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}

.post__hero-wrap .post__tags {
  margin: 0;
}

.post__hero-wrap .post__tags a {
  margin-bottom: 0;
}

.post__hero-wrap figure.heroimage {
  margin-top: 0;
}

/* BRAND REFRESH: Bold black border on hero images */
figure.heroimage {
  margin: 1rem auto 0 auto;
  width: 100%;
  height: 50vh;
  height: clamp(8rem, 40vh, 40rem);
  border-radius: 0;
  border: 6px solid var(--color);
  overflow: hidden;
  display: block;
  background-color: var(--secondary);
  line-height: 0;
  font-size: 0;
}

/* Ensure picture element fills the container */
figure.heroimage picture {
  width: 100%;
  height: 100%;
  display: block;
  line-height: 0;
  font-size: 0;
}

@media (min-width: 700px) {
  figure.heroimage {
    height: clamp(8rem, 60vh, 40rem);
  }
}

/* Responsive hero image styling */
figure.heroimage img.heroimage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
}

/* Share buttons container */
.post__share {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  float: right;
}

.post__share a,
.post__share button {
  width: 1rem;
  height: 1.25rem;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.post__share a:hover,
.post__share button:hover {
  opacity: 1;
}

/* Share icon images (used by both header and bottom share bars) */
#bluesky-share,
.share-icon--bluesky {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 568 501' fill='%23333'%3E%3Cpath d='M123.121 33.664C188.241 82.553 258.281 181.68 284 234.873c25.719-53.192 95.759-152.32 160.879-201.21C491.866-1.611 568-28.906 568 57.947c0 17.346-9.945 145.713-15.778 166.555-20.275 72.453-94.155 90.933-159.875 79.748C507.222 323.8 536.444 388.56 473.333 453.32c-119.86 122.992-172.272-30.859-185.702-70.281-2.462-7.227-3.614-10.608-3.631-7.733-.017-2.875-1.169.506-3.631 7.733-13.43 39.422-65.842 193.273-185.702 70.281-63.111-64.76-33.89-129.52 80.986-149.071-65.72 11.185-139.6-7.295-159.875-79.748C10.945 203.659 1 75.291 1 57.946 1-28.906 78.134-1.612 123.121 33.664z'/%3E%3C/svg%3E");
}

#mastodon-share,
.share-icon--mastodon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 79' fill='%23333'%3E%3Cpath d='M73.7 17.9c-1.1-7.3-7.4-13-14.8-14.5C56.6 2.9 48.2 1.5 37 1.5s-19.6 1.4-21.9 1.9C7.7 4.9 1.4 10.6.3 17.9c-.6 3.8-.6 8.1-.5 12 .2 7.3.2 14.6 1.3 21.8 1.5 9.3 7.5 17 15.4 20.2 8.3 3.3 17.2 3.9 25.9 2.2 1-.2 2-.5 3-.8.5-.2 1.1-.4 1.6-.6l-.3-6.7c-1.4.4-2.8.7-4.2.9-5.7.8-11.5.4-15.3-3.3-.3-.3-.6-.7-.8-1.1 3.6.7 7.3 1.1 11 1.3 5.3.2 10.6 0 15.8-.8.3 0 .5-.1.8-.1 6.7-1.3 13.1-5.2 13.7-15.5.2-3.9.5-7.9.5-11.9 0-3.6.9-12.4 0-17.6zM61.4 47h-9.6V27.1c0-4.2-1.8-6.3-5.3-6.3-3.9 0-5.9 2.5-5.9 7.5v10.9H31V28.3c0-5 -2-7.5-5.9-7.5-3.5 0-5.3 2.1-5.3 6.3V47h-9.6V26.5c0-4.2 1.1-7.5 3.2-10 2.2-2.5 5.1-3.8 8.7-3.8 4.2 0 7.3 1.6 9.4 4.8l2 3.4 2-3.4c2.1-3.2 5.3-4.8 9.4-4.8 3.6 0 6.5 1.3 8.7 3.8 2.2 2.5 3.2 5.8 3.2 10V47z'/%3E%3C/svg%3E");
}

#linkedin-share,
.share-icon--linkedin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
}

/* Cite (mortarboard) icon — scaled up to match optical weight of other icons */
.post__share .cite-button {
  width: 1.25rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333' stroke='none'%3E%3Cpath d='M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z'/%3E%3C/svg%3E");
}

#share-link,
.share-icon--native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E");
}

/* Bottom share bar */
.post__share--bottom {
  float: none;
  justify-content: center;
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--secondary);
}

.post__share-label {
  font-size: var(--text-sm);
  opacity: 0.6;
  margin-right: 0.25rem;
}

/* Dark mode share icons */
html[data-theme="dark"] #bluesky-share,
html[data-theme="dark"] .share-icon--bluesky {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 568 501' fill='%23ccc'%3E%3Cpath d='M123.121 33.664C188.241 82.553 258.281 181.68 284 234.873c25.719-53.192 95.759-152.32 160.879-201.21C491.866-1.611 568-28.906 568 57.947c0 17.346-9.945 145.713-15.778 166.555-20.275 72.453-94.155 90.933-159.875 79.748C507.222 323.8 536.444 388.56 473.333 453.32c-119.86 122.992-172.272-30.859-185.702-70.281-2.462-7.227-3.614-10.608-3.631-7.733-.017-2.875-1.169.506-3.631 7.733-13.43 39.422-65.842 193.273-185.702 70.281-63.111-64.76-33.89-129.52 80.986-149.071-65.72 11.185-139.6-7.295-159.875-79.748C10.945 203.659 1 75.291 1 57.946 1-28.906 78.134-1.612 123.121 33.664z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] #mastodon-share,
html[data-theme="dark"] .share-icon--mastodon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 79' fill='%23ccc'%3E%3Cpath d='M73.7 17.9c-1.1-7.3-7.4-13-14.8-14.5C56.6 2.9 48.2 1.5 37 1.5s-19.6 1.4-21.9 1.9C7.7 4.9 1.4 10.6.3 17.9c-.6 3.8-.6 8.1-.5 12 .2 7.3.2 14.6 1.3 21.8 1.5 9.3 7.5 17 15.4 20.2 8.3 3.3 17.2 3.9 25.9 2.2 1-.2 2-.5 3-.8.5-.2 1.1-.4 1.6-.6l-.3-6.7c-1.4.4-2.8.7-4.2.9-5.7.8-11.5.4-15.3-3.3-.3-.3-.6-.7-.8-1.1 3.6.7 7.3 1.1 11 1.3 5.3.2 10.6 0 15.8-.8.3 0 .5-.1.8-.1 6.7-1.3 13.1-5.2 13.7-15.5.2-3.9.5-7.9.5-11.9 0-3.6.9-12.4 0-17.6zM61.4 47h-9.6V27.1c0-4.2-1.8-6.3-5.3-6.3-3.9 0-5.9 2.5-5.9 7.5v10.9H31V28.3c0-5 -2-7.5-5.9-7.5-3.5 0-5.3 2.1-5.3 6.3V47h-9.6V26.5c0-4.2 1.1-7.5 3.2-10 2.2-2.5 5.1-3.8 8.7-3.8 4.2 0 7.3 1.6 9.4 4.8l2 3.4 2-3.4c2.1-3.2 5.3-4.8 9.4-4.8 3.6 0 6.5 1.3 8.7 3.8 2.2 2.5 3.2 5.8 3.2 10V47z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] #linkedin-share,
html[data-theme="dark"] .share-icon--linkedin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .cite-button {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc' stroke='none'%3E%3Cpath d='M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] #share-link,
html[data-theme="dark"] .share-icon--native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) #bluesky-share,
  html:not([data-theme="light"]) .share-icon--bluesky {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 568 501' fill='%23ccc'%3E%3Cpath d='M123.121 33.664C188.241 82.553 258.281 181.68 284 234.873c25.719-53.192 95.759-152.32 160.879-201.21C491.866-1.611 568-28.906 568 57.947c0 17.346-9.945 145.713-15.778 166.555-20.275 72.453-94.155 90.933-159.875 79.748C507.222 323.8 536.444 388.56 473.333 453.32c-119.86 122.992-172.272-30.859-185.702-70.281-2.462-7.227-3.614-10.608-3.631-7.733-.017-2.875-1.169.506-3.631 7.733-13.43 39.422-65.842 193.273-185.702 70.281-63.111-64.76-33.89-129.52 80.986-149.071-65.72 11.185-139.6-7.295-159.875-79.748C10.945 203.659 1 75.291 1 57.946 1-28.906 78.134-1.612 123.121 33.664z'/%3E%3C/svg%3E");
  }

  html:not([data-theme="light"]) #mastodon-share,
  html:not([data-theme="light"]) .share-icon--mastodon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 79' fill='%23ccc'%3E%3Cpath d='M73.7 17.9c-1.1-7.3-7.4-13-14.8-14.5C56.6 2.9 48.2 1.5 37 1.5s-19.6 1.4-21.9 1.9C7.7 4.9 1.4 10.6.3 17.9c-.6 3.8-.6 8.1-.5 12 .2 7.3.2 14.6 1.3 21.8 1.5 9.3 7.5 17 15.4 20.2 8.3 3.3 17.2 3.9 25.9 2.2 1-.2 2-.5 3-.8.5-.2 1.1-.4 1.6-.6l-.3-6.7c-1.4.4-2.8.7-4.2.9-5.7.8-11.5.4-15.3-3.3-.3-.3-.6-.7-.8-1.1 3.6.7 7.3 1.1 11 1.3 5.3.2 10.6 0 15.8-.8.3 0 .5-.1.8-.1 6.7-1.3 13.1-5.2 13.7-15.5.2-3.9.5-7.9.5-11.9 0-3.6.9-12.4 0-17.6zM61.4 47h-9.6V27.1c0-4.2-1.8-6.3-5.3-6.3-3.9 0-5.9 2.5-5.9 7.5v10.9H31V28.3c0-5 -2-7.5-5.9-7.5-3.5 0-5.3 2.1-5.3 6.3V47h-9.6V26.5c0-4.2 1.1-7.5 3.2-10 2.2-2.5 5.1-3.8 8.7-3.8 4.2 0 7.3 1.6 9.4 4.8l2 3.4 2-3.4c2.1-3.2 5.3-4.8 9.4-4.8 3.6 0 6.5 1.3 8.7 3.8 2.2 2.5 3.2 5.8 3.2 10V47z'/%3E%3C/svg%3E");
  }

  html:not([data-theme="light"]) #linkedin-share,
  html:not([data-theme="light"]) .share-icon--linkedin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
  }

  html:not([data-theme="light"]) .cite-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc' stroke='none'%3E%3Cpath d='M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z'/%3E%3C/svg%3E");
  }

  html:not([data-theme="light"]) #share-link,
  html:not([data-theme="light"]) .share-icon--native {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E");
  }
}

/* Citation popover */
.cite-popover {
  border: 4px solid var(--accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  max-width: 32rem;
  width: calc(100% - 2rem);
  font-family: inherit;
  background: var(--background);
  color: var(--color);
  /* Center on viewport for Safari */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.cite-popover__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color);
  opacity: 0.5;
  padding: 0.25rem;
  transition: opacity 0.15s;
}

.cite-popover__close:hover {
  opacity: 1;
}

.cite-popover__heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
}

/* Dark mode popover border for contrast */
html[data-theme="dark"] .cite-popover {
  border: 4px solid var(--accent);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .cite-popover {
    border: 4px solid var(--accent);
  }
}

.cite-popover__format {
  margin-bottom: 1rem;
}

.cite-popover__format:last-child {
  margin-bottom: 0;
}

.cite-popover__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.cite-popover__label span {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}

.cite-copy-btn {
  font-size: var(--text-sm);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--color);
  background: transparent;
  cursor: pointer;
  color: inherit;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.cite-copy-btn:hover {
  opacity: 1;
}

.cite-popover__text {
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: 0.75rem;
  background: var(--secondary);
  color: var(--color);
  word-break: break-word;
}

/* Style the RSS icon to match link color */
#rss-icon {
  filter: invert(13%) sepia(64%) saturate(5710%) hue-rotate(282deg)
    brightness(88%) contrast(108%);
  transition: filter 0.2s linear;
  margin: 0;
  vertical-align: middle;
  width: 1rem;
  height: 1rem;
}

/* Match hover state of other links */
a:hover #rss-icon {
  filter: invert(19%) sepia(48%) saturate(5023%) hue-rotate(284deg)
    brightness(95%) contrast(122%);
}

/* BRAND REFRESH: White RSS icon in footer */
.footer #rss-icon {
  filter: invert(100%) brightness(100%);
}

.footer a:hover #rss-icon {
  filter: invert(100%) brightness(100%) opacity(80%);
}

/* Dark mode adjustment */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) #rss-icon {
    filter: invert(66%) sepia(82%) saturate(1622%) hue-rotate(246deg)
      brightness(100%) contrast(106%);
  }

  html:not([data-theme="light"]) a:hover #rss-icon {
    filter: invert(74%) sepia(34%) saturate(1115%) hue-rotate(242deg)
      brightness(101%) contrast(101%);
  }

  /* Footer RSS icon stays white in dark mode */
  html:not([data-theme="light"]) .footer #rss-icon {
    filter: invert(100%) brightness(100%);
  }

  html:not([data-theme="light"]) .footer a:hover #rss-icon {
    filter: invert(100%) brightness(100%) opacity(80%);
  }
}

/* Dark theme explicit styles (overrides system preference) */
html[data-theme="dark"] #rss-icon {
  filter: invert(66%) sepia(82%) saturate(1622%) hue-rotate(246deg)
    brightness(100%) contrast(106%);
}

html[data-theme="dark"] a:hover #rss-icon {
  filter: invert(74%) sepia(34%) saturate(1115%) hue-rotate(242deg)
    brightness(101%) contrast(101%);
}

/* Footer RSS icon stays white in dark mode */
html[data-theme="dark"] .footer #rss-icon {
  filter: invert(100%) brightness(100%);
}

html[data-theme="dark"] .footer a:hover #rss-icon {
  filter: invert(100%) brightness(100%) opacity(80%);
}

.tags > * {
  margin-right: 1rem;
  margin-top: 0.5rem;
}

.tags {
  margin-top: 1rem;
  font-size: var(--text-sm);
  margin-bottom: 1rem;
}

.tags a {
  text-decoration: none;
  color: var(--accent);
}

.post-feed {
  display: block;
  max-width: 80vw;
  margin: 0 auto;
}

/* Improve form accessibility */
form#search {
  align-items: center;
  display: flex;
  width: 30rem;
  margin: 2rem auto 1rem auto;
}

form#search label {
  display: none;
  font-weight: 500;
  margin: 0 10px 0 0;
}

form#search input {
  border: 1px solid var(--accent);
  border-radius: 0;
  flex: 1;
  font-size: var(--text-lg);
  font-weight: 600;
  height: 33px;
  margin: 0;
  min-width: 30rem;
  padding: 0.5rem;
  -webkit-appearance: textfield;
}

/* Make input focus state more visible */
form#search input:focus {
  outline: var(--focus-outline-width) solid var(--focus-outline);
  outline-offset: 0;
  border-color: transparent;
}

form#search button {
  border: none;
  cursor: pointer;
  height: 33px;
  padding: 0;
  /* Add tooltip or aria-label in HTML */
}

form#search svg {
  background-color: oklch(0.529 0.161 143.3);
  border-radius: 0;
  fill: white;
  height: 33px;
  min-width: 2.5rem;
  padding: 0 7px;
  width: 2.5rem;
}

form#search svg:hover {
  background-color: oklch(0.434 0.137 142.8);
  fill: white;
}

/* Improved color contrast for form focus */
form#search button:focus {
  outline: var(--focus-outline-width) solid var(--focus-outline);
  outline-offset: 2px;
}

@media all and (min-width: 500px) {
  form#search label {
    display: inline;
  }
  form#search input::placeholder {
    opacity: 0;
  }
}

.bull {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.post {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-feed .post {
  flex-direction: row;
}

/* BRAND REFRESH: Post details with better spacing */
.post__details {
  opacity: 0.9;
  font-size: 0.9rem;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post__dateline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.post__header {
  max-width: 90vw;
}

/* BRAND REFRESH: Bold post titles - slightly smaller */
header.post__header h1 {
  font-size: var(--text-6xl);
  text-align: center;
  margin: 2rem 5% 2rem 5%;
  letter-spacing: -0.03em;
  line-height: 125%;
  color: transparent;
  font-weight: 900;
  text-transform: uppercase;
  -webkit-text-stroke: 3px var(--accent);
  paint-order: stroke fill;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  header.post__header h1 {
    font-size: var(--text-5xl);
    margin: 1rem 0;
    line-height: 110%;
    -webkit-text-stroke: 2px var(--accent);
  }
}
.post__details > * + * {
  margin-left: 0.5rem;
}

.post__content {
  margin-top: 1rem;
  word-wrap: break-word;
  /* Improve readability with optimal line length */
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.post__aside {
  margin-top: 2rem;
}

.post__aside-heading {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  margin: 0 0 1rem 0;
}

/* BRAND REFRESH: Subtle tag button styling */
.post__tags {
  opacity: 1;
  font-size: var(--text-sm);
  display: inline;
  margin-top: 0.5rem;
}

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

.post-list__wrapper {
  max-width: 90vw;
  margin-top: 1.5rem;
}

/* BRAND REFRESH: Previous/next navigation as card-based design */
.post__pagination {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 767px) {
  .post__pagination {
    grid-template-columns: 1fr;
  }
}

.post__pagination > :only-child {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .post__pagination > :only-child {
    max-width: 100%;
  }
}

.pagination-card {
  background: var(--card-background);
  border: 4px solid var(--accent);
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.1);
}

.pagination-card:hover {
  border-color: var(--purple);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.15);
}

.pagination-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pagination-card__link:hover {
  text-decoration: none;
}

.pagination-card__link * {
  text-decoration: none;
}

.pagination-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--secondary);
  border-bottom: 2px solid var(--secondary);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.pagination-card__arrow {
  font-size: 1.2rem;
  font-weight: 700;
}

.pagination-card__direction {
  opacity: 0.82;
}

.pagination-card__image {
  width: 100%;
  height: 120px;
  background-color: var(--secondary);
  border-bottom: 6px solid oklch(0.869 0.009 264.5);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive pagination card image styling */
.pagination-card__image img.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pagination-card__content {
  padding: 1rem;
  flex-grow: 1;
}

.pagination-card__title {
  font-family: "Figtree", sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.pagination-card:hover .pagination-card__title {
  color: var(--accent);
}

.pagination-card__date {
  display: block;
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 600;
  opacity: 0.8;
}

/* BRAND REFRESH: Tag buttons with subtle styling */
.post__tags a {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  background: var(--secondary);
  border: 1px solid var(--secondary);
  color: var(--color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.post__tags a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Dark mode tags — darken from --accent for WCAG contrast with white text */
html[data-theme="dark"] .post__tags a {
  background: oklch(0.59 0.191 22.2);
  border-color: oklch(0.59 0.191 22.2);
  color: white;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .post__tags a {
    background: oklch(0.59 0.191 22.2);
    border-color: oklch(0.59 0.191 22.2);
    color: white;
  }
}

.post-list__tags {
  display: inline;
  text-decoration: none;
  font-size: var(--text-sm);
  margin-top: 0.5rem;
}

.post-list__tags a {
  text-decoration: none;
  color: var(--accent);
}

.post-list__tags a:hover {
  color: var(--accent);
}

.post-list__tags > * + * {
  margin-left: 0.5rem;
}

.post-list__excerpt {
  margin-top: 1rem;
  color: oklch(0 0 0 / 0.8);
}

.post-list__meta {
  font-size: var(--text-sm);
  margin-top: 0.15rem;
  color: var(--accent);
}

/* Additional posts list styling */
.additional-posts {
  margin-top: 5rem;
  width: 100%;
  max-width: 80vw;
  margin-left: auto;
  margin-right: auto;
}

.additional-posts h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: var(--text-2xl);
}

/* Change post-list-compact to be full-width instead of two-across */
.post-list-compact {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr; /* Changed from repeat(auto-fill, minmax(320px, 1fr)) to 1fr */
  gap: 1.5rem;
  width: 100%;
}

/* BRAND REFRESH: Bold borders on post list items */
.post-list-item {
  position: relative;
  padding: 1rem;
  border-radius: 0;
  background-color: var(--card-background);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 3px solid var(--secondary);
  border-left: 6px solid var(--accent);
}

.post-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.08);
}

.post-list-item a {
  text-decoration: none;
  color: var(--color);
  display: block;
}

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

.post-list-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.post-list-date {
  font-size: var(--text-sm);
  color: var(--accent);
  margin-top: 0.5rem;
  display: block;
}

@media (max-width: 767px) {
  .post-list-compact {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .additional-posts {
    max-width: 90vw;
  }
}

/* BRAND REFRESH: Bold borders on post cards */
.post-card {
  display: flex;
  flex-direction: row;
  height: 200px;
  background-color: var(--card-background);
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.1);
  border: 4px solid var(--accent);
  border-radius: 0;
  margin-top: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* BRAND REFRESH: Bold hover effect with color rotation */
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.15);
  border-color: var(--purple);
}

.post-card-image-link {
  width: 30rem;
  max-width: 35%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background-color: var(--secondary);
  flex-shrink: 0;
  border-right: 6px solid oklch(0.869 0.009 264.5);
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-top: 0;
}

.post-card-content {
  flex-grow: 1;
  margin: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card-header {
  margin-bottom: 0.5rem;
}

/* Change hover style to use color instead of underline */
.post-card-content-link {
  color: var(--color);
  text-decoration: none;
  transition: color 0.2s;
}

.post-card-content-link:hover {
  color: var(--accent);
  text-decoration: none;
}

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

.post-card-title {
  font-size: var(--text-2xl);
  margin-top: 0;
  margin-bottom: 0.5rem;
  /* Limit to 2 lines with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.post-card-excerpt {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}

.post-card-excerpt p {
  font-size: var(--text-base);
  color: var(--color);
  opacity: 0.8;
  margin: 0;
  /* Create a smooth fade-out effect at the bottom */
  max-height: 3em;
  overflow: hidden;
  position: relative;
  line-height: 1.5;
}

.post-card-excerpt p::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 1.5em;
  background: linear-gradient(
    to right,
    transparent,
    var(--card-background) 80%
  );
}

/* Dark mode card styles */
html[data-theme="dark"] .post-card {
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.2);
}

html[data-theme="dark"] .post-card:hover {
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.3);
}

html[data-theme="dark"] .post-card-excerpt p::after {
  background: linear-gradient(
    to right,
    transparent,
    var(--card-background) 80%
  );
}

/* Mobile adjustments for cards */
@media (max-width: 767px) {
  /* Reset all problematic properties */
  .post-card {
    display: block !important;
    flex-direction: column;
    height: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem !important;
    box-shadow: 0 2px 6px oklch(0 0 0 / 0.08);
  }

  .post-card-image-link {
    width: 100%;
    max-width: 100%;
    height: 180px;
    border-radius: 0;
    border-right: none;
    border-bottom: 6px solid oklch(0.869 0.009 264.5);
  }

  .post-card-content {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    padding: 0.75rem;
    margin: 0;
    width: 100%;
  }

  .post-card-title {
    text-align: center;
    -webkit-line-clamp: 2;
  }

  .post-card-excerpt {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    margin: 0.75rem 0;
  }

  .post-card-excerpt p {
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    position: static !important;
    color: var(--color) !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin: 0.75rem 0 !important;
    padding: 0 0.5rem !important;
  }

  /* Remove the fade effect on mobile */
  .post-card-excerpt p::after {
    display: none !important;
  }

  /* Fix hidden metadata */
  .post-card-meta {
    display: block !important;
    margin-top: 0.75rem !important;
    text-align: center !important;
  }

  .post-list__meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .bull {
    display: none; /* Hide bullet on mobile */
  }

  .post-list__tags {
    margin-top: 0.25rem !important;
  }

  /* Make sure overflow isn't hidden at any level */
  .post-feed,
  .post-list__wrapper {
    overflow: visible !important;
  }

  /* Fix for mobile text issues in dark mode */
  html[data-theme="dark"] .post-card-excerpt p {
    color: var(--color) !important;
  }
}

/* Improve display at even smaller mobile sizes */
@media (max-width: 480px) {
  .post-card-image-link {
    height: 150px;
  }

  .post-feed {
    max-width: 95vw;
  }

  .post-list__wrapper {
    max-width: 95vw;
  }
}

.header {
  max-width: none;
  width: 100%;
  position: relative;
  border-bottom: 4px solid var(--accent);
  /*
  margin-bottom: 2rem;
  */
}

html[data-theme="dark"] .header {
  border-bottom-color: oklch(0.38 0.22 292.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .header {
    border-bottom-color: oklch(0.38 0.22 292.8);
  }
}

/* BRAND REFRESH: Purple background for nav container */
.nav {
  position: relative;
  background: var(--purple);
  padding: 0 1rem;
  margin-left: -1rem;
  /* Extend right by 6px to align with hero box's 6px border */
  margin-right: -6px;
  padding-right: calc(1rem + 6px);
  overflow: visible;
}

/* Dark mode - dark purple nav matching hero/footer, white text, coral links */
html[data-theme="dark"] .nav {
  background: oklch(0.38 0.22 292.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav {
    background: oklch(0.38 0.22 292.8);
  }
}

.header__content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 60rem;
  padding: 0 2.5rem;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

@media (max-width: 700px) {
  .header__content {
    padding: 0 1rem;
  }

  .nav {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .nav::after {
    display: none;
  }
}

.header__content h1 {
  font-family: "Figtree", sans-serif;
  font-weight: 900;
}

/* BRAND REFRESH: Hero with layered clip-path border */
.hero {
  position: relative;
  padding: 3.2rem 2.5rem 5rem;
  margin-bottom: 3rem;
  /* No margin-top needed - spacing comes from newsletter banner margin-bottom */
}

/* Black border layer - bottom layer */
.hero::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  background: var(--color);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  z-index: 1;
}

/* Purple content layer - top layer */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--purple);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  z-index: 2;
}

/* Dark mode: darken purple backgrounds so white text passes WCAG 4.5:1 */
html[data-theme="dark"] .hero::after {
  background: oklch(0.38 0.22 292.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .hero::after {
    background: oklch(0.38 0.22 292.8);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 60rem;
  margin: 0 auto;
  color: white;
}

/* BRAND REFRESH: Purple long bio box (About page) */
.long-bio-box {
  max-width: 60rem;
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--purple);
  border: 6px solid var(--color);
  color: white;
}

html[data-theme="dark"] .long-bio-box {
  background: oklch(0.38 0.22 292.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .long-bio-box {
    background: oklch(0.38 0.22 292.8);
  }
}

.long-bio-box h2 {
  margin-top: 0;
  color: white;
  text-transform: uppercase;
  font-weight: 900;
  font-size: var(--text-3xl);
}

.long-bio-box p {
  color: white;
}

.long-bio-box a {
  color: white;
  border-bottom: 2px solid white;
  text-decoration: none;
  font-weight: 700;
}

.long-bio-box a:hover {
  color: white;
  background-color: oklch(1 0 0 / 0.2);
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
}

@media (max-width: 700px) {
  .long-bio-box {
    margin: 2rem 1rem;
    padding: 1.5rem;
  }
}

/* BRAND REFRESH: Site title black with purple hover */
.site-title {
  font-size: var(--text-3xl);
  margin: 0;
  display: flex;
  align-items: center;
}

.site-title a {
  color: transparent;
  text-decoration: none;
  font-weight: 900;
  -webkit-text-stroke: 1.5px var(--color);
  text-stroke: 1.5px var(--color);
  paint-order: stroke fill;
}

.site-title a:hover {
  color: var(--purple);
  -webkit-text-stroke: 0;
  text-stroke: 0;
}

.nav__list {
  display: flex;
  justify-content: space-around;
  list-style: none;
  font-size: var(--text-base);
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}

/* White background for all social links with diagonal edge */
.nav__list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1rem;
  right: 165px;
  background: var(--background);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 100%, 0 100%);
  z-index: 1;
}

.nav__list > * {
  position: relative;
  z-index: 2;
}

.nav__list a {
  color: var(--accent);
  text-decoration: none;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Improve navigation accessibility with enhanced focus and current page state */
.nav__list a[aria-current="page"] {
  font-weight: bold;
  text-decoration: underline;
}

.nav__list li {
  margin-right: 1.5rem;
}

.nav__list li:last-child {
  margin-right: 0;
}

.nav__list a:hover {
  color: var(--color);
}

/* BRAND REFRESH: Extra spacing before about link */
.nav-item-about {
  margin-left: 1.5rem;
}

/* BRAND REFRESH: About link on purple background */
.nav-about-link {
  font-weight: 700;
  color: white !important;
  text-decoration: none !important;
}

.nav-about-link:hover {
  color: var(--color) !important;
  text-decoration: underline !important;
}

/* Dark mode - white text on dark purple nav, white on hover too */
html[data-theme="dark"] .nav-about-link:hover {
  color: white !important;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav-about-link:hover {
    color: white !important;
  }
}

.nav-about-link[aria-current="page"] {
  text-decoration: none !important;
}

/* BRAND REFRESH: Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
}

/* Hide mobile-only nav items on desktop */
.nav-item-search-link,
.nav-item-theme-toggle {
  display: none !important;
}

/* Show them only in mobile menu */
@media (max-width: 700px) {
  .nav__list.active .nav-item-search-link,
  .nav__list.active .nav-item-theme-toggle {
    display: block !important;
  }
}

/* Mobile theme toggle button in hamburger menu */
.mobile-theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color);
  padding: 1rem 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.mobile-theme-toggle:hover {
  background-color: var(--secondary);
}

.mobile-theme-toggle .theme-toggle-light,
.mobile-theme-toggle .theme-toggle-dark {
  display: inline;
}

/* In light mode, show sun; in dark mode, show moon */
.mobile-theme-toggle .theme-toggle-dark {
  display: none;
}

html[data-theme="dark"] .mobile-theme-toggle .theme-toggle-light {
  display: none;
}

html[data-theme="dark"] .mobile-theme-toggle .theme-toggle-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .mobile-theme-toggle .theme-toggle-light {
    display: none;
  }
  html:not([data-theme="light"]) .mobile-theme-toggle .theme-toggle-dark {
    display: inline;
  }
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--color);
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile responsive navigation */
@media (max-width: 700px) {
  .hamburger {
    display: flex;
  }

  .nav__list {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--background);
    flex-direction: column;
    padding: 0;
    margin: 0;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, box-shadow 0.3s ease;
    border: none;
  }

  .nav__list.active {
    max-height: 500px;
    box-shadow: 0 4px 6px oklch(0 0 0 / 0.1);
    padding: 2rem 0;
  }

  .nav-item-social {
    display: block;
  }

  .nav__list::before {
    display: none;
  }

  .nav-item {
    margin: 0;
    width: 100%;
  }

  .nav-item-about {
    margin-left: 0;
  }

  .nav__list a {
    padding: 1rem 1.5rem;
    margin: 0;
    display: block;
    width: 100%;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
  }

  /* Hide expandable search widget in mobile menu */
  .nav__list .expandable-search {
    display: none;
  }

  /* Fix about link color in mobile menu */
  .nav__list .nav-about-link {
    color: var(--accent) !important;
  }

  .nav__list .nav-about-link:hover {
    color: var(--color) !important;
    opacity: 1;
  }
}

/* Hide breadcrumbs visually while keeping them in the DOM for SEO */
.breadcrumbs {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* BRAND REFRESH: Footer with clip-path border effect */
.footer {
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
  width: 100%;
  margin-top: 6rem;
  padding-top: 2rem;
  position: relative;
}

/* Black border layer - bottom layer */
.footer::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color);
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* Purple content layer - top layer */
.footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--purple);
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
  z-index: 2;
}

html[data-theme="dark"] .footer::after {
  background: oklch(0.38 0.22 292.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .footer::after {
    background: oklch(0.38 0.22 292.8);
  }
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 60rem;
  width: 100%;
  font-size: var(--text-base);
  border-top: none;
  padding: 2rem 2.5rem 3rem;
  position: relative;
  z-index: 3;
}

.footer a,
.footer p {
  color: white !important;
}

.footer a {
  font-weight: 700;
  text-decoration: none;
}

.footer a:hover {
  background-color: oklch(1 0 0 / 0.2);
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
}

/* BRAND REFRESH: Footer copyright styling */
.copyright {
  text-align: center;
  font-size: var(--text-xs);
  margin-top: 1rem;
  padding-bottom: 1rem;
  color: white;
  opacity: 0.9;
}

/* Footer newsletter form - appears when top banner is dismissed */
.footer-newsletter {
  text-align: center;
  padding: 1.5rem 0;
  margin-bottom: 1rem;
}

.footer-newsletter-text {
  font-size: 0.9rem;
  color: white;
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.footer-newsletter-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-newsletter-form input[type="email"] {
  padding: 0.4rem 0.75rem;
  border: 2px solid white;
  border-radius: 0;
  background: oklch(1 0 0 / 0.9);
  color: var(--color);
  font-size: 0.9rem;
  font-weight: 600;
  width: 200px;
  transition: all 0.2s ease;
}

.footer-newsletter-form input[type="email"]:focus {
  outline: none;
  background: white;
  border-color: white;
}

.footer-newsletter-form input[type="email"]::placeholder {
  color: var(--color);
  opacity: 0.6;
}

.footer-newsletter-form button {
  padding: 0.4rem 1rem;
  background: white;
  color: var(--purple);
  border: 2px solid white;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-newsletter-form button:hover {
  background: transparent;
  color: white;
  border-color: white;
  transform: translateY(-2px);
}

.footer-newsletter-form button:focus {
  outline: 3px solid white;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .footer-newsletter {
    padding: 1rem 0;
  }

  .footer-newsletter-text {
    font-size: 0.8rem;
  }

  .footer-newsletter-form input[type="email"] {
    width: 160px;
    font-size: 0.85rem;
  }

  .footer-newsletter-form button {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }
}

.footer__content > * {
  margin-top: 2rem;
  width: 100%;
}

/* Use flex for centered navigation with spacing */
.footer nav {
  width: 100%;
  display: flex;
  justify-content: center;
}

.footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  width: auto;
  max-width: 100%;
  padding: 0;
  margin: 0;
  gap: 2.5rem; /* Consistent spacing between items */
}

.footer li {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Improved footer navigation for mobile */
@media (max-width: 600px) {
  /* Target the footer nav itself to change alignment */
  .footer nav {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .footer ul.hero__social-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-left: 0;
    width: 100%; /* Take full width of parent */
    margin-left: 0;
  }

  .footer li {
    justify-content: center;
    width: 100%;
  }

  .theme-toggle-container {
    justify-content: flex-start;
    margin-left: 0;
  }

  .copyright {
    text-align: left;
    padding-left: 1rem;
  }
}

/* Theme toggle styling */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 1.2rem;
  position: relative;
  border-radius: 0;
  color: var(--accent);
  width: 2.5rem;
  height: 2.5rem;
  transition: background-color 0.2s;
  /* Remove extra margins that might affect alignment */
  margin: 0;
}

.theme-toggle:hover {
  background-color: var(--secondary);
}

.theme-toggle:focus {
  outline: var(--focus-outline-width) solid var(--focus-outline);
  outline-offset: 2px;
}

.theme-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Match height of other footer items */
  height: 2.5rem;
}

/* Show/hide sun and moon based on current theme */
.theme-toggle .theme-toggle-light,
.theme-toggle .theme-toggle-dark {
  position: absolute;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Light mode (default) */
.theme-toggle .theme-toggle-light {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.theme-toggle .theme-toggle-dark {
  opacity: 0;
  transform: translateY(10px) rotate(90deg);
}

/* Dark mode */
html[data-theme="dark"] .theme-toggle .theme-toggle-light {
  opacity: 0;
  transform: translateY(-10px) rotate(-90deg);
}

html[data-theme="dark"] .theme-toggle .theme-toggle-dark {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* Disable transitions when prefers-reduced-motion is enabled */
@media (prefers-reduced-motion: reduce) {
  .theme-toggle .theme-toggle-light,
  .theme-toggle .theme-toggle-dark {
    transition: none;
  }
}

/* Search input */
.search-form {
  width: 100%;
}

.search-input {
  color: var(--color);
  background-color: var(--background);
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  font-weight: 500;
  border: 2px solid var(--secondary);
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-size: var(--text-lg);
  width: 100%;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.42 0.18 328 / 0.1);
}

.search-input::placeholder {
  color: var(--color);
  opacity: 0.6;
}

html[data-theme="dark"] .search-input:focus {
  box-shadow: 0 0 0 3px oklch(0.699 0.228 310 / 0.2);
}

#custom-search-results {
  margin-top: 1rem;
}

@media (max-width: 767px) {
  .search-input {
    font-size: var(--text-base);
    padding: 0.625rem 0.75rem;
  }
}

/* header search styles */
/* Expandable Search Styles */
.expandable-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* BRAND REFRESH: Search toggle white on purple background */
.search-toggle {
  background: white;
  border: 2px solid var(--color);
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 0;
  transition: all 0.2s ease;
  color: var(--color);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.search-toggle:hover {
  background: oklch(1 0 0 / 0.9);
  color: var(--color);
}

.search-toggle:focus {
  outline: var(--focus-outline-width) solid var(--focus-outline);
  outline-offset: 2px;
}

.search-toggle svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  margin-right: 0.25rem;
}

.search-toggle::after {
  content: "Search";
  font-size: 0.85rem;
}

/* BRAND REFRESH: Search input as utility element */
.search-input-container {
  position: absolute;
  right: 0;
  top: 0;
  height: 1.8rem;
  background: var(--background);
  border: 2px solid var(--color);
  border-radius: 0;
  display: flex;
  align-items: center;
  padding: 0 2rem 0 0.6rem;
  opacity: 0;
  width: 6rem;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: none;
}

/* Expanded state */
.expandable-search.expanded .search-input-container {
  opacity: 1;
  width: 180px;
  pointer-events: auto;
  border-color: var(--color);
}

.expandable-search.expanded .search-toggle {
  opacity: 0;
  pointer-events: none;
}

/* Search input */
.search-input-container input {
  border: none;
  background: none;
  color: var(--color);
  font-size: 0.85rem; /* Match newsletter input */
  width: 100%;
  outline: none;
  font-family: inherit;
}

.search-input-container input::placeholder {
  color: var(--color);
  opacity: 0.5;
}

/* Close button */
.search-close {
  position: absolute;
  right: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color);
  opacity: 0.6;
  font-size: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.expandable-search.expanded .search-close {
  opacity: 0.6;
  pointer-events: auto;
}

.search-close:hover {
  opacity: 1;
  background-color: oklch(0.42 0.18 328 / 0.1);
}

/* Dark mode adjustments */
html[data-theme="dark"] .search-toggle {
  border-color: oklch(0.699 0.228 310 / 0.15);
}

html[data-theme="dark"] .search-toggle:hover {
  background: var(--accent);
  color: var(--background);
}

html[data-theme="dark"] .search-input-container {
  border-color: oklch(0.699 0.228 310 / 0.15);
}

html[data-theme="dark"] .expandable-search.expanded .search-input-container {
  border-color: var(--accent);
}

/* BRAND REFRESH: Dark mode button fixes (both explicit and system preference) */
html[data-theme="dark"] .search-toggle,
html:not([data-theme="light"]) .search-toggle {
  background: white !important;
  color: var(--background) !important;
  border-color: var(--background) !important;
}

html[data-theme="dark"] .search-toggle svg,
html:not([data-theme="light"]) .search-toggle svg {
  stroke: var(--background) !important;
}

html[data-theme="dark"] .newsletter-form button,
html:not([data-theme="light"]) .newsletter-form button {
  background: oklch(0.59 0.191 22.2) !important;
  color: white !important;
  border-color: oklch(0.59 0.191 22.2) !important;
}

html[data-theme="dark"] .newsletter-dismiss,
html:not([data-theme="light"]) .newsletter-dismiss {
  background: white !important;
  color: var(--background) !important;
  border-color: var(--background) !important;
}

html[data-theme="dark"] .newsletter-dismiss:hover,
html:not([data-theme="light"]) .newsletter-dismiss:hover {
  background: var(--background) !important;
  color: white !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .search-toggle::after {
    display: none; /* Hide "Search" text on mobile */
  }

  .search-toggle {
    padding: 0.35rem 0.5rem;
  }

  .search-toggle svg {
    margin-right: 0;
  }

  .expandable-search.expanded .search-input-container {
    width: 140px; /* Smaller on mobile */
  }
}

@media (max-width: 480px) {
  .expandable-search.expanded .search-input-container {
    width: 120px;
  }
}

/* Focus states for accessibility */
.search-input-container input:focus {
  outline: none;
}

.expandable-search.expanded .search-input-container:focus-within {
  border-color: var(--accent);
}

/* Navigation alignment fix */
.nav__list {
  align-items: center; /* Ensure all nav items align properly */
}

.nav-item {
  display: flex;
  align-items: center; /* Align nav items to center */
}

/* ==========================================================================
   COMPACT NEWSLETTER BANNER STYLES
   Add these styles to your existing styles.css file
   ========================================================================== */

/* BRAND REFRESH: Subtle gray newsletter banner */
.newsletter-banner {
  padding: 0.8rem 0;
  min-height: auto;
  margin-bottom: 3.2rem;
  position: relative;
  background: var(--secondary);
}

.newsletter-content {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 2rem;
}

/* BRAND REFRESH: Bold newsletter text */
.newsletter-text {
  font-size: 0.9rem;
  color: var(--color);
  opacity: 1;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* BRAND REFRESH: Newsletter input */
.newsletter-form input[type="email"] {
  padding: 0.35rem 0.6rem;
  border: 3px solid var(--color);
  border-radius: 0;
  background: white;
  color: oklch(0.208 0 0); /* Dark text for white background */
  font-size: 0.85rem;
  font-weight: 600;
  width: 180px;
  height: 1.8rem;
  transition: all 0.2s ease;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter-form input[type="email"]::placeholder {
  color: oklch(0.511 0 0); /* Medium gray for better contrast on white */
  opacity: 0.8;
}

/* BRAND REFRESH: Newsletter button */
.newsletter-form button {
  padding: 0.35rem 0.75rem;
  background: var(--color);
  color: white;
  border: 3px solid var(--color);
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  height: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* BRAND REFRESH: Bold hover effect */
.newsletter-form button:hover {
  background: var(--color);
  color: white;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px oklch(0 0 0 / 0.3);
}

.newsletter-form button:focus {
  outline: var(--focus-outline-width) solid var(--focus-outline);
  outline-offset: 2px;
}

/* BRAND REFRESH: Dismiss button */
.newsletter-dismiss {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1rem;
  background: white;
  border: 2px solid var(--color);
  color: var(--color);
  opacity: 1;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  padding: 0.1rem 0.3rem;
  border-radius: 0;
  transition: all 0.2s ease;
  height: 1.8rem;
  width: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-dismiss:hover {
  background: var(--color);
  color: white;
  border-color: var(--color);
}

.newsletter-dismiss:focus {
  outline: 3px solid var(--color);
  outline-offset: 2px;
}

/* Mobile adjustments */
@media (max-width: 700px) {
  .newsletter-content {
    padding: 0 1rem;
    gap: 0.5rem;
    height: auto;
    min-height: 2rem;
  }

  .newsletter-text {
    font-size: 0.8rem;
  }

  .newsletter-form input[type="email"] {
    width: 140px;
    font-size: 0.8rem;
  }

  .newsletter-form button {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
}

/* Extra compact for very small screens */
@media (max-width: 500px) {
  .newsletter-banner {
    padding: 0.3rem 0;
    margin-bottom: 1.5rem;
  }

  .newsletter-content {
    height: 1.8rem;
    gap: 0.4rem;
  }

  .newsletter-text {
    display: none; /* Hide text on very small screens to save space */
  }

  .newsletter-form input[type="email"] {
    width: 120px;
    height: 1.6rem;
    font-size: 0.75rem;
  }

  .newsletter-form button {
    height: 1.6rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }

  .newsletter-dismiss {
    top: 0.5rem;
    right: 0.5rem;
    height: 1.4rem;
    width: 1.4rem;
    font-size: 0.9rem;
    transform: none;
  }
}

/* Homepage Press Banner */
.press-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  margin: 0 0 2.5rem;
  border: 3px solid var(--secondary);
  text-decoration: none;
  color: var(--color);
  transition: all 0.2s ease;
  overflow: hidden;
}

.press-banner:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.press-banner__label {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.press-banner__logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
  overflow: hidden;
  flex: 1;
}

.press-banner__logos img {
  height: 0.9rem;
  width: auto;
  object-fit: contain;
  display: block;
  opacity: 0.5;
  filter: var(--logo-filter, none);
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

html[data-theme="dark"] .press-banner__logos img {
  filter: invert(1);
  opacity: 0.4;
}

.press-banner:hover .press-banner__logos img {
  opacity: 0.75;
}

html[data-theme="dark"] .press-banner:hover .press-banner__logos img {
  opacity: 0.6;
}

@media (max-width: 700px) {
  .press-banner {
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .press-banner__logos {
    gap: 1.25rem;
  }

  .press-banner__logos img {
    height: 0.7rem;
  }

  .press-banner__logos img:nth-child(n+6) {
    display: none;
  }
}

/* About Page Appearances Callout */
.appearances-callout {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  margin: 0 auto 2rem;
  max-width: 800px;
  border: 3px solid var(--secondary);
  text-decoration: none;
  color: var(--color);
  transition: all 0.2s ease;
}

.appearances-callout:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px oklch(0 0 0 / 0.1);
}

.appearances-callout__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}

.appearances-callout__text strong {
  font-size: var(--text-lg);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.appearances-callout__text span {
  font-size: var(--text-sm);
  opacity: 0.7;
}

.appearances-callout__logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: flex-end;
  overflow: hidden;
}

.appearances-callout__logos img {
  height: 0.8rem;
  width: auto;
  object-fit: contain;
  display: block;
  opacity: 0.45;
  filter: var(--logo-filter, none);
  flex-shrink: 0;
}

html[data-theme="dark"] .appearances-callout__logos img {
  filter: invert(1);
  opacity: 0.35;
}

.appearances-callout:hover .appearances-callout__logos img {
  opacity: 0.7;
}

.appearances-callout__arrow {
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.appearances-callout:hover .appearances-callout__arrow {
  transform: translateX(4px);
}

@media (max-width: 700px) {
  .appearances-callout {
    flex-wrap: wrap;
    padding: 1rem;
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .appearances-callout__logos {
    justify-content: flex-start;
    gap: 1rem;
  }

  .appearances-callout__logos img:nth-child(n+4) {
    display: none;
  }
}

/* Homepage Recent Posts Section */
.homepage-recent-posts {
  margin: 0 0 3rem 0;
}

.homepage-recent-posts h2 {
  font-family: "Figtree", sans-serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

/* Tag Page Hero - matches Discover/Canon/All Posts style */
.tag-hero {
  padding: 2rem 2.5rem 3rem !important;
  margin-bottom: 3rem !important;
}

.tag-hero .hero-content {
  text-align: left !important;
  max-width: 60rem;
  margin: 0 auto;
}

.tag-hero h1 {
  font-size: var(--text-5xl) !important;
  margin-bottom: 0.5rem !important;
  letter-spacing: 0.05em;
  color: transparent !important;
  -webkit-text-stroke: 2px white !important;
  paint-order: stroke fill;
  text-shadow: none !important;
}

.tag-recent-posts {
  margin: 0 auto 3rem;
  max-width: 80rem;
}

/* Related Posts Section */
.related-posts {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 3px solid var(--accent);
}

.related-posts__heading {
  font-family: "Figtree", sans-serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.related-posts__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 768px) {
  .related-posts__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-post {
  background: var(--card-background);
  border: 4px solid var(--accent);
  transition: all 0.2s ease;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.1);
  min-width: 0;
  overflow: hidden;
}

.related-post:hover {
  border-color: var(--purple);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.15);
}

/* Image link - wraps the image */
.related-post__image-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-post__image-link:hover {
  text-decoration: none;
}

/* Title link - wraps the title text */
.related-post__title-link {
  text-decoration: none;
  color: inherit;
}

.related-post__title-link:hover {
  text-decoration: underline;
  color: var(--accent);
}

.related-post__image {
  width: 100%;
  height: 180px;
  background-color: var(--secondary);
  background-size: cover;
  background-position: center;
  border-bottom: 6px solid oklch(0.869 0.009 264.5);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive card image styling */
.related-post__image img.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.related-post__content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.related-post__title {
  font-family: "Figtree", sans-serif;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.related-post:hover .related-post__title {
  color: var(--accent);
}

.related-post__date {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--purple);
  color: white;
  padding: 0.35rem 0.65rem;
  margin: 0;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* Dark mode - match card border color */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .related-post__date {
    background: var(--secondary);
    color: var(--color);
  }
}

html[data-theme="dark"] .related-post__date {
  background: var(--secondary);
  color: var(--color);
}

.related-post__tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem 0;
  padding: 0;
  align-items: flex-start;
  flex-shrink: 0;
}

.related-post__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  background: var(--secondary);
  border: 1px solid var(--secondary);
  color: var(--color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.related-post:hover .related-post__tag {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.related-post__excerpt {
  font-size: var(--text-sm);
  color: var(--color);
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
  opacity: 0.85;
}

.related-post__archive-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  background: var(--accent-secondary);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  box-shadow: 0 -2px 8px oklch(0 0 0 / 0.2);
}

/* Dark mode adjustments */
html[data-theme="dark"] .related-post__tag {
  background: oklch(0.59 0.191 22.2);
  color: white;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .related-post__tag {
    background: oklch(0.59 0.191 22.2);
    color: white;
  }
}

/* High-Density Compact Post List */
.compact-posts-list {
  margin: 1rem 0 3rem;
  padding: 0;
}

.compact-posts-list h2 {
  font-family: "Figtree", sans-serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color);
  margin-bottom: 1rem;
}

.compact-posts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--secondary);
}

/* Year dividers for grouping posts */
.compact-post-year-divider {
  padding: 1rem 1rem 0.5rem;
  margin-top: 1.5rem;
  border-top: 3px solid var(--card-background);
  border-bottom: 1px solid var(--secondary);
}

.compact-post-year-divider:first-child {
  margin-top: 0;
  border-top: none;
}

.compact-post-year-divider__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.compact-post {
  border-bottom: 1px solid var(--secondary);
  transition: background-color 0.15s ease;
}

.compact-post:hover {
  background-color: oklch(0.42 0.18 328 / 0.03);
}

.compact-post__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  flex-wrap: nowrap;
}

.compact-post__main {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  min-width: 0;
}

.compact-post__title {
  font-family: "Figtree", sans-serif;
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
  flex-shrink: 0;
}

.compact-post__title a {
  color: var(--color);
  text-decoration: none;
  transition: color 0.15s ease;
}

.compact-post__title a:hover {
  color: var(--accent);
}

.compact-post__date {
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.compact-post__date a {
  color: var(--color);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.compact-post__date a:hover {
  opacity: 1;
}

.compact-post__tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}

.compact-post__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  background: var(--secondary);
  border: 1px solid var(--secondary);
  color: var(--color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.compact-post:hover .compact-post__tag {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Dark mode tags */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .compact-post__tag {
    background: oklch(0.59 0.191 22.2);
    color: white;
  }
}

html[data-theme="dark"] .compact-post__tag {
  background: oklch(0.59 0.191 22.2);
  color: white;
}

/* Mobile: stack title and tags */
@media (max-width: 767px) {
  .compact-post__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }

  .compact-post__main {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .compact-post__title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .compact-post__tags {
    flex-wrap: wrap;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .related-posts {
    margin: 2rem 0;
    padding: 1.5rem 0;
  }

  .related-posts__heading {
    font-size: var(--text-xl);
    margin-bottom: 1rem;
  }

  .related-post__image {
    height: 140px;
  }

  .related-post__content {
    padding: 1rem;
  }

  .related-post__title {
    font-size: var(--text-base);
  }
}

/* Numbered sidebar/callout list */
.numbered-callout {
  background-color: var(--secondary);
  border-left: 6px solid var(--purple);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  counter-reset: callout-counter;
  list-style: none;
}

.numbered-callout li {
  counter-increment: callout-counter;
  margin-bottom: 1rem;
  padding-left: 2.5rem;
  position: relative;
}

.numbered-callout li::before {
  content: counter(callout-counter);
  position: absolute;
  left: 0;
  font-weight: 900;
  font-size: var(--text-xl);
  color: var(--purple);
  width: 2rem;
  text-align: right;
}

.numbered-callout li:last-child {
  margin-bottom: 0;
}

/* ── LINKS PAGE (link-in-bio) ─────────────────────────── */

/* Minimal layout — no site header/footer chrome */
.links-body {
  min-height: 100vh;
  background: var(--background);
}

.links-layout {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.links-site-title {
  text-align: center;
  margin: 0;
  padding: 1.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.links-site-title a {
  color: transparent;
  -webkit-text-stroke: 2px var(--color);
  text-decoration: none;
}

/* Page container */
.links-page {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-top: 0.75rem;
}

/* Avatar */
.links-avatar-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.75rem;
}

.links-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--accent);
}

/* Base link card — every link item is this */
.links-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--card-background);
  border: 1.5px solid oklch(0.85 0.01 264);
  text-decoration: none;
  color: var(--color);
  transition: opacity 0.12s ease;
  border-radius: 2px;
}

.links-card:active {
  opacity: 0.75;
}

html[data-theme="dark"] .links-card {
  border-color: oklch(0.38 0.02 264);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .links-card {
    border-color: oklch(0.38 0.02 264);
  }
}

/* Gala card — gradient background, always highlighted */
.links-card--gala {
  background: linear-gradient(105deg, oklch(0.28 0.12 290) 0%, oklch(0.22 0.05 290) 55%, oklch(0.26 0.08 310) 100%);
  border-color: oklch(0.82 0.14 85);
  border-width: 2px;
  color: #fff;
  padding: 1rem 1.125rem;
  box-shadow: 0 0 0 2px oklch(0.82 0.14 85 / 0.7), 0 6px 20px oklch(0.15 0.06 290 / 0.6);
}

.links-card--gala .links-card__title {
  color: oklch(0.95 0.08 85);
  font-size: var(--text-lg);
  font-weight: 800;
}

.links-card--gala .links-card__desc {
  color: rgba(255,255,255,0.8);
  opacity: 1;
}

.links-card--gala .links-card__arrow {
  color: oklch(0.9 0.15 85);
  opacity: 0.9;
}

/* gala card looks the same in dark mode — gradient is already dark enough */

/* Donate card — warm amber tint */
.links-card--donate {
  border-color: oklch(0.75 0.1 65);
  background: oklch(0.98 0.015 75);
}

html[data-theme="dark"] .links-card--donate {
  background: oklch(0.28 0.04 75);
  border-color: oklch(0.5 0.1 65);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .links-card--donate {
    background: oklch(0.28 0.04 75);
    border-color: oklch(0.5 0.1 65);
  }
}

/* Appearance card — teal/blue outline */
.links-card--appearance {
  border-color: oklch(0.72 0.1 210);
  background: oklch(0.98 0.01 210);
}

html[data-theme="dark"] .links-card--appearance {
  background: oklch(0.27 0.04 210);
  border-color: oklch(0.48 0.1 210);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .links-card--appearance {
    background: oklch(0.27 0.04 210);
    border-color: oklch(0.48 0.1 210);
  }
}

.links-card--appearance .links-card__title {
  color: var(--color);
}

/* Card internals */
.links-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.links-card__title {
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1.3;
  color: var(--color);
}

.links-card__desc {
  font-size: var(--text-sm);
  color: var(--color);
  opacity: 0.65;
}

.links-card__arrow {
  flex-shrink: 0;
  font-size: var(--text-lg);
  color: var(--accent);
  opacity: 0.55;
}

/* Newsletter */
.links-newsletter {
  background: var(--card-background);
  border: 1.5px solid oklch(0.85 0.01 264);
  padding: 1rem 1rem 1.125rem;
  border-radius: 2px;
  margin-top: 0.375rem;
}

html[data-theme="dark"] .links-newsletter {
  border-color: oklch(0.38 0.02 264);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .links-newsletter {
    border-color: oklch(0.38 0.02 264);
  }
}

.links-newsletter__text {
  font-size: var(--text-sm);
  color: var(--color);
  opacity: 0.75;
  margin: 0 0 0.75rem;
}

.links-newsletter__form {
  display: flex;
  gap: 0.5rem;
}

.links-newsletter__form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  border: 1.5px solid oklch(0.8 0.01 264);
  background: var(--background);
  color: var(--color);
  font-family: inherit;
  font-size: var(--text-sm);
  border-radius: 2px;
}

.links-newsletter__form input[type="email"]:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.links-newsletter__form button {
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: var(--text-sm);
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
}

/* Back to blog link */
.links-blog-link {
  text-align: center;
  margin: 0.25rem 0 0;
}

.links-blog-link a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.links-blog-link a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Social icons row */
.links-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.875rem 0 0.25rem;
  flex-wrap: wrap;
}

.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.12s ease;
}

.social-icon-link:active {
  opacity: 1;
}

.social-icon-link svg {
  width: 1.375rem;
  height: 1.375rem;
}
