/* ==========================================================
   Copyright (c) 2026, Soaibuzzaman. All rights reserved.
   ========================================================== */


/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Accent */
  --clr-accent: #3E6592;
  --clr-accent-hover: #2d5078;
  --clr-accent-bg: rgba(62, 101, 146, 0.07);
  --clr-accent-border: rgba(62, 101, 146, 0.22);
  /* Peach highlight (sliminality-inspired) */
  --clr-highlight: rgba(245, 192, 162, 0.48);
  /* Neutrals */
  --clr-bg: #fffcf2;
  --clr-surface: #fffbef;
  --clr-text: #1c1c2e;
  --clr-muted: #64748b;
  --clr-border: #e2ddd6;
  --clr-border-light: #eeebe5;
  /* Typography */
  --ff-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  /* Scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  /* Layout */
  --max-w: 860px;
  --nav-h: 54px;
  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
}

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

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

/* ── Base ───────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ── Links ──────────────────────────────────────────────────── */
a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  color: var(--clr-accent-hover);
}

/* ── Headings ───────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ff-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-text);
}

h1 {
  font-size: var(--fs-3xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
}

h4 {
  font-size: var(--fs-lg);
}

h5,
h6 {
  font-size: var(--fs-base);
}

/* ── Prose elements ─────────────────────────────────────────── */
em {
  font-style: italic;
}

strong {
  font-weight: 700;
}

p {
  margin-bottom: var(--sp-4);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.5em;
  margin-bottom: var(--sp-4);
}

li {
  margin-bottom: var(--sp-1);
}

blockquote {
  border-left: 3px solid var(--clr-accent-border);
  padding-left: var(--sp-4);
  color: var(--clr-muted);
  margin: var(--sp-6) 0;
  font-style: italic;
}

code,
pre {
  font-family: var(--ff-mono);
  font-size: .9em;
}

code {
  background: var(--clr-border-light);
  padding: .1em .4em;
  border-radius: 3px;
}

pre {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: var(--sp-4);
  overflow-x: auto;
  margin: var(--sp-6) 0;
}

pre code {
  background: none;
  padding: 0;
}

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

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

@media (max-width: 600px) {
  .container {
    padding: 0 var(--sp-4);
  }
}

/* ════════════════════════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════════════════════════ */
.site-nav {
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.site-nav__title {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--clr-text);
  letter-spacing: -.01em;
  flex-shrink: 0;
}

.site-nav__title:hover {
  color: var(--clr-accent);
}

.site-nav__links {
  display: flex;
  gap: var(--sp-6);
  list-style: none;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.site-nav__links a {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-muted);
  letter-spacing: .02em;
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--clr-text);
}

/* ── Hamburger button (hidden on desktop) ─────────────────── */
.site-nav__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 7px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}

.site-nav__burger:hover {
  border-color: var(--clr-border);
  background: var(--clr-surface);
}

.site-nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .2s ease;
  transform-origin: center;
}

/* X state */
.site-nav__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.site-nav__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-nav__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 600px) {
  .site-nav__burger {
    display: flex;
  }

  .site-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--clr-bg);
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    flex-direction: column;
    gap: 0;
    flex-wrap: nowrap;
    margin-bottom: 0;
    padding: var(--sp-1) 0 var(--sp-2);
    z-index: 99;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .06), 0 3px 8px rgba(0, 0, 0, .04);
    /* Slide-down animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .22s cubic-bezier(.23, 1, .32, 1), visibility 0s linear .22s;
    pointer-events: none;
  }

  .site-nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .2s ease, transform .22s cubic-bezier(.23, 1, .32, 1), visibility 0s;
  }

  .site-nav__links li {
    width: 100%;
  }

  .site-nav__links a {
    display: flex;
    align-items: center;
    padding: 11px var(--sp-6);
    font-size: var(--fs-sm);
    letter-spacing: .02em;
    border-left: 2px solid transparent;
    transition: border-color .15s, color .15s, background .15s;
  }

  .site-nav__links a:hover,
  .site-nav__links a[aria-current="page"] {
    border-left-color: var(--clr-accent);
    color: var(--clr-text);
    background: rgba(62, 101, 146, .04);
  }
}

/* ════════════════════════════════════════════════════════════
   HOMEPAGE
   ════════════════════════════════════════════════════════════ */
.home-page {
  padding: var(--sp-8) 0 var(--sp-12);
}

/* ── Header Card ────────────────────────────────────────────── */
.home-header {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  padding: var(--sp-8);
  margin-bottom: 0;
}

.home-header__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: var(--sp-12);
}

@media (max-width: 640px) {
  .home-header {
    padding: var(--sp-6);
  }

  .home-header__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .home-header__photo-col {
    order: -1;
  }
}

/* Name */
.home-header__name {
  font-family: var(--ff-sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--clr-text);
  margin-bottom: var(--sp-4);
}

.home-header__name-text {
  background-image: linear-gradient(transparent 65%, var(--clr-highlight) 65%);
  background-repeat: no-repeat;
}

/* Affiliations */
.home-header__affiliations {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-text);
  line-height: 2;
  margin-bottom: var(--sp-3);
}

.home-header__location {
  font-weight: 400;
  text-transform: none;
  letter-spacing: .03em;
  font-size: 0.72rem;
  color: var(--clr-muted);
}

/* Email */
.home-header__email {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  margin-bottom: var(--sp-4);
  display: block;
}

/* Social links */
.home-header__social {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.home-header__social a {
  color: var(--clr-muted);
  opacity: .8;
  transition: opacity .15s, color .15s;
  display: inline-flex;
  align-items: center;
  font-size: 0;
  /* hide text labels, show icons only */
}

.home-header__social a svg {
  width: 18px;
  height: 18px;
}

.home-header__social a:hover {
  opacity: 1;
  color: var(--clr-accent);
}

/* Section nav pills */
.home-header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.home-header__nav-link {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  padding: .18rem .6rem;
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  border-radius: 5px;
  transition: background 0.15s ease;
}

.home-header__nav-link:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

/* Photo */
.home-header__photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.home-header__photo-frame {
  position: relative;
  padding-right: 14px;
  padding-bottom: 14px;
}

/* Diamond behind photo */
.home-header__photo-frame::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: var(--clr-accent-bg);
  transform: rotate(45deg);
  border-radius: 4px;
  top: -10px;
  right: -6px;
  z-index: 0;
}

/* Offset border */
.home-header__photo-frame::after {
  content: '';
  position: absolute;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border: 3px solid rgba(200, 120, 100, 0.5);
  border-radius: 4px;
  bottom: 0;
  right: 0;
  z-index: 0;
}

.home-header__photo {
  position: relative;
  z-index: 1;
  width: 180px;
  height: 215px;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
  display: block;
}

.home-header__quote {
  font-size: var(--fs-xs, 0.75rem);
  font-style: italic;
  color: var(--clr-muted);
  text-align: center;
  max-width: 180px;
  line-height: 1.5;
  margin: 0;
}

/* ── Sections ───────────────────────────────────────────────── */
.home-section {
  border-top: 1px solid var(--clr-border);
  padding: var(--sp-8) 0;
}

.home-section:first-of-type {
  border-top: none;
}

.home-last-updated {
  font-size: var(--fs-xs, 0.75rem);
  color: var(--clr-muted);
  text-align: right;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--clr-border);
  margin: 0;
}

/* Section title — with sliminality-style peach underbar */
.home-section__title {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  /* letter-spacing: .12em; */
  text-transform: uppercase;
  /* color: var(--clr-muted); */
  margin-bottom: var(--sp-2);
  position: relative;
  display: inline-block;
  padding: 0 .1em .05em;
}

.home-section__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background-color: var(--clr-highlight);
  z-index: -1;
}

/* Section description */
.home-section__desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  margin-top: var(--sp-2);
  line-height: 1.65;
}

/* ── About prose ───────────────────────────────────────────── */
.home-prose {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  line-height: 1.8;
}

.home-prose a {
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.home-prose a:hover {
  background: rgba(245, 192, 162, 0.82);
}

.home-prose p {
  margin-bottom: var(--sp-4);
}

.home-prose p:last-child {
  margin-bottom: 0;
}

/* ── News ──────────────────────────────────────────────────── */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

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

.news-item.hidden {
  display: none;
}

@media (max-width: 500px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }
}

.news-item__date {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 500;
  color: var(--clr-muted);
  padding-top: 1px;
  text-align: left;
}

.news-item__text {
  font-family: var(--ff-serif);
}

.news-item__text a {
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.news-item__text a:hover {
  background: rgba(245, 192, 162, 0.82);
}

.news-toggle {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-3) 0 0;
}

.news-toggle:hover {
  color: var(--clr-accent-hover);
  text-decoration: underline;
}

/* ── Timeline (experience / education / training / talks) ──── */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

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

@media (max-width: 520px) {
  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}

.timeline-period {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  color: var(--clr-muted);
  padding-top: 2px;
  text-align: left;
}

.timeline-title {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: var(--sp-1);
}

.timeline-title a,
.timeline-sub a {
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.timeline-title a:hover,
.timeline-sub a:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

.timeline-sub {
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  color: var(--clr-muted);
  line-height: 1.5;
}

.timeline-desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  margin-top: var(--sp-2);
  line-height: 1.55;
}

.timeline-desc a {
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.timeline-desc a:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

/* Teaching collapsible */
.timeline-item.hidden {
  display: none;
}

.timeline-toggle {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-3) 0 0;
}

.timeline-toggle:hover {
  color: var(--clr-accent-hover);
  text-decoration: underline;
}

/* ── Publications preview (homepage) ───────────────────────── */
.pub-preview-list {
  display: flex;
  flex-direction: column;
}

.pub-preview-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

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

@media (max-width: 520px) {
  .pub-preview-item {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}

.pub-preview__year {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  color: var(--clr-muted);
  padding-top: 2px;
  text-align: left;
}

.pub-preview__meta {
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  color: var(--clr-muted);
  margin-bottom: var(--sp-1);
}

.pub-preview__author-self {
  font-weight: 600;
}

.pub-preview__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--clr-text);
  display: inline;
  line-height: 1.4;
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.pub-preview__title:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

.pub-preview__venue {
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--clr-muted);
  margin-top: var(--sp-1);
}

/* See-all link */
.see-all-link {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-accent);
  margin-top: var(--sp-4);
  display: inline-block;
}

.see-all-link:hover {
  color: var(--clr-accent-hover);
  text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   INNER PAGES (publications, projects, posts, etc.)
   ════════════════════════════════════════════════════════════ */
.inner-page {
  padding: var(--sp-8) 0 var(--sp-12);
}

.inner-page__header {
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--clr-border);
}

.inner-page__title {
  font-family: var(--ff-sans);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--clr-text);
  margin-bottom: var(--sp-3);
}

.inner-page__desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  line-height: 1.65;
  max-width: 600px;
}

/* ── Publications list ──────────────────────────────────────── */
.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

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

.pub-item__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: .3rem;
  color: var(--clr-muted);
  stroke: currentColor;
  fill: none;
}

.pub-item__body {
  flex: 1;
  min-width: 0;
}

.pub-item__authors {
  font-family: var(--ff-sans);
  font-size: 0.83rem;
  color: var(--clr-muted);
  margin-bottom: var(--sp-1);
}

.pub-item__author-self {
  font-weight: 600;
  color: var(--clr-text);
}

.pub-item__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.pub-item__title:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

.pub-item__venue {
  font-style: italic;
  color: var(--clr-muted);
}

/* Publication link buttons */
.pub-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: var(--sp-3);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .12rem .5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--clr-text);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.pub-link:hover {
  border-color: var(--clr-accent-border);
  background: var(--clr-accent-bg);
  color: var(--clr-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.pub-link-icon {
  width: .875rem;
  height: .875rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Projects list ───────────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

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

.project-item__title-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}

.project-item__year {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  color: var(--clr-muted);
  white-space: nowrap;
}

.project-item__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-text);
  text-decoration: none;
  display: block;
  margin-bottom: var(--sp-2);
  line-height: 1.3;
  transition: color .15s;
}

.project-item__title:hover {
  color: var(--clr-accent);
  background: none;
  padding: 0;
}

.project-item__summary {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  line-height: 1.6;
}

.project-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.project-tag {
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  padding: .1rem .45rem;
  border-radius: 9999px;
  background: var(--clr-accent-bg);
  color: var(--clr-muted);
  border: 1px solid var(--clr-accent-border);
}

/* ── Posts list ─────────────────────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

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

@media (max-width: 500px) {
  .post-item {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }
}

.post-item__date {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--clr-muted);
  padding-top: 3px;
}

.post-item__title {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--clr-text);
  display: block;
  margin-bottom: var(--sp-1);
}

.post-item__title:hover {
  color: var(--clr-accent);
}

.post-item__summary {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  line-height: 1.55;
}

/* ── Taxonomy (tags) ────────────────────────────────────────── */
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: 0;
}

.tag-item a {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: .3rem .75rem;
  border-radius: 9999px;
  background: var(--clr-accent-bg);
  border: 1px solid var(--clr-accent-border);
  color: var(--clr-accent);
}

.tag-item a:hover {
  background: rgba(62, 101, 146, .14);
  color: var(--clr-accent-hover);
}

/* ════════════════════════════════════════════════════════════
   SINGLE PAGE (posts, about, research, etc.)
   ════════════════════════════════════════════════════════════ */
.single-page {
  padding: var(--sp-8) 0 var(--sp-12);
}

.single-page__header {
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--clr-border);
}

.single-page__title {
  font-family: var(--ff-sans);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -.02em;
  margin-bottom: var(--sp-3);
}

.single-page__meta {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
}

.single-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.single-page__tag {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: .15rem .55rem;
  border-radius: 9999px;
  background: var(--clr-accent-bg);
  border: 1px solid var(--clr-accent-border);
  color: var(--clr-accent);
}

/* Article prose */
.article-content {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: var(--ff-sans);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-4);
}

.article-content h2 {
  font-size: var(--fs-xl);
  border-bottom: 1px solid var(--clr-border-light);
  padding-bottom: var(--sp-2);
}

.article-content h3 {
  font-size: var(--fs-lg);
}

.article-content p {
  margin-bottom: var(--sp-4);
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--sp-4);
}

.article-content a {
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.article-content a:hover {
  background: rgba(245, 192, 162, 0.82);
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: var(--sp-6) 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-6) 0;
  font-size: var(--fs-sm);
}

.article-content th,
.article-content td {
  border: 1px solid var(--clr-border);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--ff-sans);
}

.article-content th {
  background: var(--clr-border-light);
  font-weight: 600;
}





/* ════════════════════════════════════════════════════════════
   SINGLE PUBLICATION
   ════════════════════════════════════════════════════════════ */
.pub-single {
  padding: var(--sp-8) 0 var(--sp-12);
}

.pub-single__header {
  margin-bottom: var(--sp-6);
}

.pub-single__title {
  font-family: var(--ff-sans);
  font-size: clamp(1.2rem, 3.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-4);
}

.pub-single__meta {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}

.pub-single__meta strong {
  color: var(--clr-text);
  font-weight: 600;
}

.pub-single__meta a {
  color: var(--clr-text);
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.pub-single__meta a:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

.pub-single__venue {
  font-style: italic;
}

.pub-single__actions {
  margin-bottom: var(--sp-6);
}

.pub-single__actions .pub-item__links {
  margin-top: 0;
}

.pub-single__abstract {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.pub-single__abstract h2 {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: var(--sp-4);
}

.pub-single__abstract p {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--clr-text);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   CITATION MODAL
   ════════════════════════════════════════════════════════════ */
.citation-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
}

.citation-modal.is-open {
  display: flex;
}

.citation-modal__box {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  padding: var(--sp-8);
  width: 90%;
  max-width: 620px;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.citation-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
}

.citation-modal__heading {
  font-family: var(--ff-sans);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.citation-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--clr-muted);
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}

.citation-modal__close:hover {
  color: var(--clr-text);
}

.citation-modal__pre {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  padding: var(--sp-4);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.citation-modal__copy {
  margin-top: var(--sp-4);
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: var(--sp-2) var(--sp-4);
  background: var(--clr-accent-bg);
  border: 1px solid var(--clr-accent-border);
  border-radius: 4px;
  color: var(--clr-accent);
  cursor: pointer;
  transition: background .15s;
}

.citation-modal__copy:hover {
  background: rgba(62, 101, 146, .14);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--clr-border);
  background: var(--clr-bg);
  padding: var(--sp-8) 0;
}

.site-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
}

@media (max-width: 500px) {
  .site-footer__inner {
    flex-direction: column;
    gap: var(--sp-2);
    text-align: center;
  }
}

.site-footer a {
  color: var(--clr-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--clr-accent);
}

/* ── 404 ─────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
  min-height: 50vh;
  gap: var(--sp-4);
}

.not-found__code {
  font-family: var(--ff-sans);
  font-size: 5rem;
  font-weight: 800;
  color: var(--clr-border);
  line-height: 1;
  margin: 0;
}

.not-found__title {
  font-family: var(--ff-sans);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-text);
  margin: 0;
}

.not-found__desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  color: var(--clr-muted);
  margin: 0;
}

.not-found__home {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-accent);
  text-decoration: none;
  margin-top: var(--sp-2);
}

.not-found__home:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════
   PUBLICATION YEAR GROUPS
   ════════════════════════════════════════════════════════════ */
.pub-year-group {
  margin-top: var(--sp-8);
}

.pub-year-group:first-of-type {
  margin-top: 0;
}

.pub-year-heading {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding-bottom: var(--sp-3);
  margin-bottom: 0;
  border-bottom: 2px solid var(--clr-border);
  position: relative;
  display: block;
}

.pub-year-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 2.5rem;
  height: 2px;
  background: var(--clr-accent);
}

/* ════════════════════════════════════════════════════════════
   BLOG / POSTS LIST
   ════════════════════════════════════════════════════════════ */
.blog-list {
  display: flex;
  flex-direction: column;
}

.blog-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: var(--sp-6);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

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

@media (max-width: 520px) {
  .blog-item {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}

.blog-item__date {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--clr-muted);
  text-align: right;
  padding-top: 4px;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .blog-item__date {
    text-align: left;
  }
}

.blog-item__body {
  min-width: 0;
}

.blog-item__title {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--clr-text);
  display: inline;
  margin-bottom: var(--sp-1);
  line-height: 1.3;
  text-decoration: none;
  background: var(--clr-highlight);
  padding: 0 2px;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.blog-item__title:hover {
  background: rgba(245, 192, 162, 0.82);
  color: var(--clr-text);
}

.blog-item__desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  line-height: 1.6;
  margin-bottom: var(--sp-2);
}

.blog-item__footer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.blog-item__reading-time {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  color: var(--clr-muted);
  opacity: .7;
}

.blog-item__tags {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}

.blog-tag {
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  padding: .1rem .45rem;
  border-radius: 9999px;
  background: var(--clr-accent-bg);
  color: var(--clr-muted);
  border: 1px solid var(--clr-accent-border);
}

/* ════════════════════════════════════════════════════════════
   SHORTCODE: IMG
   ════════════════════════════════════════════════════════════ */
.article-figure {
  margin: var(--sp-6) 0;
}

.article-figure img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  border: 1px solid var(--clr-border-light);
}

.article-figure figcaption {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  color: var(--clr-muted);
  text-align: center;
  margin-top: var(--sp-2);
  font-style: italic;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   SHORTCODE: PDF
   ════════════════════════════════════════════════════════════ */
.pdf-embed {
  margin: var(--sp-6) 0;
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  overflow: hidden;
}

.pdf-embed object {
  display: block;
  width: 100%;
}

/* ════════════════════════════════════════════════════════════
   PAGE TRANSITIONS
   ════════════════════════════════════════════════════════════ */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#main-content {
  animation: pageFadeIn 0.28s ease-out both;
}

body.page-is-leaving #main-content {
  animation: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease-in, transform 0.18s ease-in;
}

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

/* ════════════════════════════════════════════════════════════
   GALLERY — list page (Pig justified grid)
   ════════════════════════════════════════════════════════════ */

.gallery-page {
  padding-bottom: var(--sp-12);
}

/* ── Tag filters ─────────────────────────────────────────── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: var(--sp-4) 0 var(--sp-3);
}

.gallery-filter {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--clr-muted);
  background: none;
  border: none;
  border-bottom: 1.5px solid transparent;
  padding: 3px 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  line-height: 1.5;
}

.gallery-filter:first-child {
  padding-left: 0;
}

.gallery-filter:hover {
  color: var(--clr-text);
}

.gallery-filter.is-active {
  color: var(--clr-text);
  font-weight: 600;
  border-bottom-color: var(--clr-accent);
}

/* ── Pig grid container ──────────────────────────────────── */
/*
 * Pig.js uses absolute positioning and sets container height via JS.
 * We just need a full-width container with a small top gap.
 */
.gallery-pig-container {
  width: 100%;
  margin-top: var(--sp-2);
  /* Pig injects its own styles for figures/images */
}

/* Make Pig figures (images in the grid) respond to hover */
.gd-figure {
  cursor: pointer;
  transition: filter .15s ease;
}

.gd-figure:hover {
  filter: brightness(1.18);
}

/* ── Empty state ─────────────────────────────────────────── */
.gallery-empty {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  padding: var(--sp-12) 0;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   GALLERY — Lightbox modal  (sambecker.com-style split layout)
   ════════════════════════════════════════════════════════════ */

/* Modal root — hidden; .is-open turns it into a flex row */
.gd-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  flex-direction: row;
}

.gd-modal.is-open {
  display: flex;
}

/* ── Left: image stage ───────────────────────────────────── */
.gd-modal-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* Each image (thumbnail + full) covers the stage with object-contain */
.gd-modal-content {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .2s ease;
}

/* Blurred LQIP placeholder */
.gd-modal-content.gd-modal-thumbnail {
  filter: blur(24px);
  transform: scale(1.04);
  /* hide blur edge */
  transition: opacity .5s ease;
  z-index: 1;
  opacity: 1;
}

.gd-modal-content.gd-modal-loaded.gd-modal-thumbnail {
  opacity: 0;
  pointer-events: none;
}

/* Prev / Next arrows on the image stage */
.gd-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  border: none;
  width: 48px;
  height: 72px;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .2s, background .2s;
}

.gd-modal-stage:hover .gd-modal-nav,
.gd-modal-stage:focus-within .gd-modal-nav {
  opacity: 1;
}

.gd-modal-nav:hover {
  background: rgba(0, 0, 0, .75);
}

.gd-modal-nav--prev {
  left: 12px;
}

.gd-modal-nav--next {
  right: 12px;
}

/* Zoom buttons — bottom-centre of the stage */
.gd-modal-zoom-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 10;
  opacity: 0;
  transition: opacity .2s;
}

.gd-modal-stage:hover .gd-modal-zoom-controls,
.gd-modal-stage:focus-within .gd-modal-zoom-controls {
  opacity: 1;
}

.gd-modal-zoom-btn {
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.gd-modal-zoom-btn:hover {
  background: rgba(0, 0, 0, .8);
}

/* ── Right: EXIF sidebar ─────────────────────────────────── */
.gd-modal-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--clr-bg);
  border-left: 1px solid var(--clr-border);
  overflow-y: auto;
  padding: .75rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  position: relative;
}

/* Close button — top-right of sidebar */
.gd-modal-close {
  align-self: flex-end;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(28, 28, 46, .4);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s;
  flex-shrink: 0;
}

.gd-modal-close:hover {
  color: var(--clr-text);
}

/* Photo title */
.gd-modal-title {
  font-family: var(--ff-sans);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--clr-text);
  letter-spacing: .015em;
  margin: 0;
  line-height: 1.25;
}

/* Tag pills — reuses .photo-page__tag; just set up the flex container */
.gd-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.gd-modal-exif {
  border-top: none;
  padding-top: 0;
}

/* Capture date */
.gd-modal-date {
  font-family: var(--ff-mono);
  font-size: .725rem;
  color: rgba(28, 28, 46, .4);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
}

/* Optional description */
.gd-modal-description {
  font-family: var(--ff-sans);
  font-size: .8rem;
  line-height: 1.6;
  color: var(--clr-text);
  margin: 0;
  padding: .75rem 0;
  border-top: 1px solid var(--clr-border);
}

/* Actions (Details link) */
.gd-modal-actions {
  margin-top: auto;
  padding-top: 1.25rem;
}

.gd-modal-link {
  font-family: var(--ff-sans);
  font-size: .8rem;
  font-weight: 500;
  color: var(--clr-accent);
  text-decoration: none;
  border: 1px solid var(--clr-accent);
  padding: .4rem 1rem;
  border-radius: 4px;
  display: inline-block;
  transition: background .15s, color .15s;
}

.gd-modal-link:hover {
  background: var(--clr-accent);
  color: #fff;
}

/* ── Mobile: sidebar slides below the image ──────────────── */
@media (max-width: 768px) {
  .gd-modal {
    flex-direction: column;
  }

  .gd-modal-stage {
    flex: 0 0 52vh;
  }

  /* override flex:1 so height is respected */
  .gd-modal-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--clr-border);
    padding: .875rem 1.25rem 1.5rem;
    flex: 1 1 auto;
    min-height: 0;
  }

  .gd-modal-nav {
    opacity: 1;
  }

  /* always visible on touch */
}

/* ════════════════════════════════════════════════════════════
   GALLERY — single photo page  (/gallery/photo-name/)
   ════════════════════════════════════════════════════════════ */

.photo-page {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

@media (max-width: 900px) {
  .photo-page {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
}

/* ── Stage (left / main image area) ──────────────────────── */
.photo-page__stage {
  position: relative;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: calc(100vh - var(--nav-h));
}

@media (max-width: 900px) {
  .photo-page__stage {
    height: 60vw;
    min-height: 260px;
    max-height: 80vh;
  }
}

.photo-page__figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-page__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: blur(16px);
  transform: scale(1.04);
  transition: filter .45s ease, transform .45s ease;
}

.photo-page__img.is-loaded {
  filter: none;
  transform: scale(1);
}

/* ── Prev / next arrows ──────────────────────────────────── */
.photo-page__arrows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
}

.photo-page__arrow {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: background .15s, transform .15s;
}

.photo-page__arrow svg {
  width: 20px;
  height: 20px;
}

.photo-page__arrow:hover {
  background: rgba(255, 255, 255, .25);
  transform: scale(1.08);
  color: #fff;
}

/* ── Zoom controls ───────────────────────────────────────── */
.photo-page__zoom-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10;
  opacity: 0;
  transition: opacity .2s;
}

.photo-page__stage:hover .photo-page__zoom-controls {
  opacity: 1;
}

.photo-page__zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: #fff;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .15s, transform .1s;
}

.photo-page__zoom-btn:hover {
  background: rgba(0, 0, 0, .75);
  transform: scale(1.08);
}

.photo-page__zoom-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.photo-page__sidebar {
  background: var(--clr-bg);
  border-left: 1px solid var(--clr-border);
  padding: var(--sp-6);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

@media (max-width: 900px) {
  .photo-page__sidebar {
    border-left: none;
    border-top: 1px solid var(--clr-border);
    padding: var(--sp-6) var(--sp-4);
  }
}

.photo-page__back {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--clr-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s;
}

.photo-page__back:hover {
  color: var(--clr-accent);
}

.photo-page__title {
  font-family: var(--ff-sans);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1.2;
  margin: 0;
}

.photo-page__date {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  color: var(--clr-muted);
  display: block;
  margin-top: calc(-1 * var(--sp-2));
}

.photo-page__desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-text);
  line-height: 1.7;
}

.photo-page__desc p {
  margin-bottom: var(--sp-2);
}

.photo-page__desc p:last-child {
  margin-bottom: 0;
}

/* ── EXIF panel on single page ───────────────────────────── */
.photo-page__exif {
  border-top: 1px solid var(--clr-border);
  padding-top: var(--sp-4);
}

.photo-page__exif-heading {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: var(--sp-3);
}

.photo-page__exif-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.photo-page__exif-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--sp-2);
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  line-height: 1.4;
}

.photo-page__exif-row dt {
  color: var(--clr-muted);
  font-weight: 500;
}

.photo-page__exif-row dd {
  color: var(--clr-text);
  font-weight: 600;
  font-family: var(--ff-mono);
}

/* ── Tags on single page ─────────────────────────────────── */
.photo-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  border-top: 1px solid var(--clr-border);
  padding-top: var(--sp-4);
}

.photo-page__tag {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: lowercase;
  padding: .2rem .6rem;
  background: var(--clr-accent-bg);
  color: var(--clr-accent);
  border: 1px solid var(--clr-accent-border);
  border-radius: 99px;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.photo-page__tag:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
  border-color: var(--clr-accent);
}



/* ── Post archive (grouped list) ──────────────────────────── */
.post-archive {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.post-year-label {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  /* Reset h2 defaults */
  border: none;
  padding: 0;
  background: none;
}

.post-year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}

.post-year-entries {
  display: flex;
  flex-direction: column;
}

.post-entry {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

.post-entry:last-child {
  border-bottom: none;
}

@media (max-width: 500px) {
  .post-entry {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }
}

.post-entry__date {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--clr-muted);
  padding-top: 3px;
  text-align: right;
  line-height: 1.4;
}

@media (max-width: 500px) {
  .post-entry__date {
    text-align: left;
  }
}

.post-entry__body {
  min-width: 0;
}

.post-entry__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-text);
  text-decoration: none;
  display: block;
  margin-bottom: var(--sp-2);
  line-height: 1.3;
  transition: color .15s;
}

.post-entry__title:hover {
  color: var(--clr-accent);
  background: none;
  padding: 0;
}

.post-entry__desc {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  line-height: 1.6;
  margin-bottom: var(--sp-2);
}

.post-entry__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.post-entry__read-time {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  color: var(--clr-muted);
  opacity: .75;
}

.post-entry__tags {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}

.post-entry__tag {
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  padding: .12rem .45rem;
  border-radius: 9999px;
  background: var(--clr-accent-bg);
  color: var(--clr-muted);
  border: 1px solid var(--clr-accent-border);
}


/* ── Single post — improved header ────────────────────────── */
.single-page__back {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--clr-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-6);
  transition: color .15s;
}

.single-page__back:hover {
  color: var(--clr-accent);
  background: none;
  padding: 0;
}

.single-page__header {
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--clr-border);
}

.single-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.single-page__tag {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: .2rem .6rem;
  border-radius: 9999px;
  background: var(--clr-accent-bg);
  border: 1px solid var(--clr-accent-border);
  color: var(--clr-accent);
  text-decoration: none;
  transition: background .15s;
}

.single-page__tag:hover {
  background: rgba(62, 101, 146, .14);
  color: var(--clr-accent-hover);
}

.single-page__title {
  font-family: var(--ff-sans);
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.single-page__meta {
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.single-page__meta-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--clr-border);
}


/* ── Drop cap on first paragraph ──────────────────────────── */
.drop-cap>p:first-of-type::first-letter {
  font-family: var(--ff-serif);
  font-size: 3.6em;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  padding-right: 0.1em;
  padding-top: 0.05em;
  color: var(--clr-text);
}


/* ── Single post footer ────────────────────────────────────── */
.single-page__footer {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.single-page__footer-date {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  color: var(--clr-muted);
}


/* ════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--clr-border);
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
}

.pagination__numbers {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.pagination__num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 4px;
  color: var(--clr-muted);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.pagination__num:hover {
  background: var(--clr-surface);
  color: var(--clr-text);
}

.pagination__num--current {
  background: var(--clr-accent-bg);
  color: var(--clr-accent);
  font-weight: 700;
  border: 1px solid var(--clr-accent-border);
}

.pagination__arrow {
  color: var(--clr-text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.pagination__arrow:hover {
  color: var(--clr-accent);
}

.pagination__arrow--disabled {
  color: var(--clr-border);
  pointer-events: none;
}

/* On small screens, hide the numbers and just show Prev / Next */
@media (max-width: 500px) {
  .pagination__numbers {
    display: none;
  }
}


/* ════════════════════════════════════════════════════════════
   SEARCH MODAL
   Replace the search section in main.css with this block.
   ════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────── */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  padding-inline: var(--sp-4);
}

.search-modal[hidden] {
  display: none;
}

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 46, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Box ─────────────────────────────────────────────────── */
.search-modal__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 120px);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .15), 0 4px 16px rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Input row — short, icon aligns correctly ────────────── */
.search-modal__input-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--clr-border-light);
  flex-shrink: 0;
}

.search-modal__icon {
  flex-shrink: 0;
  color: var(--clr-muted);
}

#search-ui {
  flex: 1;
  min-width: 0;
}

/* ── Close button — right of input row ───────────────────── */
.search-modal__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  color: var(--clr-muted);
  cursor: pointer;
  transition: color .15s, background .15s;
}

.search-modal__close:hover {
  color: var(--clr-text);
  background: var(--clr-border-light);
}

/* ── Results area (JS moves .pagefind-ui__drawer here) ───── */
.search-modal__results {
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  padding: 0 var(--sp-4) var(--sp-4);
}

/* ── Pagefind CSS variable overrides ─────────────────────── */
:root {
  --pagefind-ui-scale: 1;
  --pagefind-ui-primary: var(--clr-accent);
  --pagefind-ui-text: var(--clr-text);
  --pagefind-ui-background: var(--clr-bg);
  --pagefind-ui-border: var(--clr-border);
  --pagefind-ui-tag: var(--clr-accent-bg);
  --pagefind-ui-border-width: 0px;
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-font: var(--ff-sans);
}

.pagefind-ui__form {
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

/* Strip all Pagefind input chrome */
.pagefind-ui__search-input {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-right: 2rem !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  /* removes Pagefind's built-in search icon */
  box-shadow: none !important;
  font-family: var(--ff-sans) !important;
  font-size: var(--fs-base) !important;
  color: var(--clr-text) !important;
  line-height: 1.5 !important;
  outline: none !important;
}

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

/* Clear button — top:50% now works because form is input-height only */
.pagefind-ui__search-clear {
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .15s !important;
}

.pagefind-ui__search-clear::after {
  content: '×';
  font-size: 1.1rem;
  line-height: 1;
  color: var(--clr-muted);
}

.pagefind-ui__search-clear:hover {
  background: var(--clr-border-light) !important;
}

.pagefind-ui__search-clear:hover::after {
  color: var(--clr-text);
}

/* Drawer lives in .search-modal__results after JS moves it */
.pagefind-ui__drawer {
  padding: 0 !important;
  margin: 0 !important;
}

.pagefind-ui__results-area {
  margin: 0 !important;
  padding: 0 !important;
}

.pagefind-ui__message {
  font-family: var(--ff-sans) !important;
  font-size: var(--fs-xs) !important;
  color: var(--clr-muted) !important;
  padding: var(--sp-3) 0 var(--sp-2) !important;
  margin: 0 !important;
}

.pagefind-ui__results {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pagefind-ui__result {
  padding: var(--sp-3) 0 !important;
  border-bottom: 1px solid var(--clr-border-light) !important;
  margin: 0 !important;
}

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

.pagefind-ui__result-inner {
  margin: 0 !important;
  padding: 0 !important;
}

.pagefind-ui__result-title {
  margin: 0 0 var(--sp-1) !important;
  padding: 0 !important;
}

.pagefind-ui__result-link {
  font-family: var(--ff-serif) !important;
  font-size: var(--fs-base) !important;
  font-weight: 600 !important;
  color: var(--clr-text) !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  transition: color .15s !important;
}

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

.pagefind-ui__result-excerpt {
  font-family: var(--ff-serif) !important;
  font-size: var(--fs-sm) !important;
  color: var(--clr-muted) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pagefind-ui__result-excerpt mark {
  background: var(--clr-highlight) !important;
  color: var(--clr-text) !important;
  border-radius: 2px !important;
  padding: 0 2px !important;
}

/* Load more */
.pagefind-ui__button {
  display: block !important;
  width: 100% !important;
  margin-top: var(--sp-4) !important;
  padding: var(--sp-2) var(--sp-4) !important;
  background: var(--clr-surface) !important;
  border: 1px solid var(--clr-border) !important;
  border-radius: 6px !important;
  font-family: var(--ff-sans) !important;
  font-size: var(--fs-sm) !important;
  font-weight: 500 !important;
  color: var(--clr-muted) !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: border-color .15s, color .15s, background .15s !important;
}

.pagefind-ui__button:hover {
  border-color: var(--clr-accent-border) !important;
  color: var(--clr-accent) !important;
  background: var(--clr-accent-bg) !important;
}

/* ── Nav trigger ──────────────────────────────────────────── */
.site-nav__search-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--clr-muted);
  cursor: pointer;
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}

.site-nav__search-btn:hover {
  border-color: var(--clr-accent-border);
  color: var(--clr-text);
}

.site-nav__search-hint {
  font-size: 0.65rem;
  color: var(--clr-muted);
  letter-spacing: .03em;
}

@media (max-width: 600px) {
  .site-nav__search-hint {
    display: none;
  }
}


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


.pagefind-ui__search-clear {
  display: none !important;
}

.pagefind-ui__search-input {
  padding-left: 0 !important;
}