:root {
  --academic-paper: #F8ECDE;
  --academic-surface: #FFF8EF;
  --academic-ink: #241417;
  --academic-muted: #786158;
  --academic-line: #E1C8AD;
  --academic-sidebar: #5A2034;
  --academic-sidebar-dark: #2A101A;
  --academic-sidebar-ink: #F8EBDD;
  --academic-sidebar-muted: rgba(248, 235, 221, 0.72);
  --academic-sidebar-link: rgba(248, 235, 221, 0.84);
  --academic-accent: #A8325A;
  --academic-accent-strong: #7F2444;
  --academic-accent-soft: #F2D9D1;
  --academic-gold: #B8874D;
  --academic-gold-soft: #EFE0C5;
  --academic-shadow: rgba(68, 34, 24, 0.1);
  --academic-font-heading: "Fraunces", Georgia, serif;
  --academic-font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --academic-font-code: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --hb-color-background: var(--academic-paper);
  --hb-color-foreground: var(--academic-ink);
  --hb-color-header-bg: var(--academic-paper);
  --hb-color-header-fg: var(--academic-ink);
  --hb-color-footer-bg: var(--academic-paper);
  --hb-color-footer-fg: var(--academic-muted);
  --hb-font-heading: var(--academic-font-heading);
  --hb-font-body: var(--academic-font-body);
  --hb-font-nav: var(--academic-font-body);
  --hb-font-code: var(--academic-font-code);
  --hb-font-family-sans: var(--academic-font-body);
  --color-primary-50: #FFF8EF;
  --color-primary-100: #F6DFE6;
  --color-primary-200: #EABACB;
  --color-primary-300: #D98CA8;
  --color-primary-400: #C55F83;
  --color-primary-500: #A8325A;
  --color-primary-600: #8C284B;
  --color-primary-700: #6F213D;
  --color-primary-800: #541A2F;
  --color-primary-900: #3A1221;
  --color-primary-950: #241417;
  --color-secondary-50: #FFF8EF;
  --color-secondary-100: #F3E2C8;
  --color-secondary-200: #E5C28F;
  --color-secondary-300: #D3A15C;
  --color-secondary-400: #B8874D;
  --color-secondary-500: #B8874D;
  --color-secondary-600: #946838;
  --color-secondary-700: #704C29;
  --color-secondary-800: #4F351F;
  --color-secondary-900: #352316;
  --color-secondary-950: #1F140D;
  --color-neutral-50: #FFF8EF;
  --color-neutral-100: #F8ECDE;
  --color-neutral-200: #E1C8AD;
  --color-neutral-300: #CDB19A;
  --color-neutral-400: #A9897B;
  --color-neutral-500: #786158;
  --color-neutral-600: #624E47;
  --color-neutral-700: #4A3936;
  --color-neutral-800: #362626;
  --color-neutral-900: #241417;
  --color-neutral-950: #12090D;
  --hb-primary-500-rgb: 168 50 90;
  --hb-secondary-500-rgb: 184 135 77;
}

.dark {
  --academic-paper: #12090D;
  --academic-surface: #201118;
  --academic-ink: #F8EBDD;
  --academic-muted: #C6A89B;
  --academic-line: #402733;
  --academic-sidebar: #28101A;
  --academic-sidebar-dark: #12090D;
  --academic-sidebar-ink: #F8EBDD;
  --academic-sidebar-muted: rgba(248, 235, 221, 0.68);
  --academic-sidebar-link: rgba(248, 235, 221, 0.8);
  --academic-accent: #E5658E;
  --academic-accent-strong: #F09AB5;
  --academic-accent-soft: #351823;
  --academic-gold: #D3A15C;
  --academic-gold-soft: #342416;
  --academic-shadow: rgba(0, 0, 0, 0.34);
  --hb-color-background: var(--academic-paper);
  --hb-color-foreground: var(--academic-ink);
  --hb-color-header-bg: var(--academic-paper);
  --hb-color-header-fg: var(--academic-ink);
  --hb-color-footer-bg: var(--academic-paper);
  --hb-color-footer-fg: var(--academic-muted);
  --color-primary-50: #F8EBDD;
  --color-primary-100: #F4D3DD;
  --color-primary-200: #EDAFC4;
  --color-primary-300: #E98AA9;
  --color-primary-400: #E5658E;
  --color-primary-500: #E5658E;
  --color-primary-600: #C34873;
  --color-primary-700: #9E355B;
  --color-primary-800: #762743;
  --color-primary-900: #4F192D;
  --color-primary-950: #2A0D18;
  --color-secondary-50: #F8EBDD;
  --color-secondary-100: #F0D7AD;
  --color-secondary-200: #E2BC80;
  --color-secondary-300: #D3A15C;
  --color-secondary-400: #C08A43;
  --color-secondary-500: #D3A15C;
  --color-secondary-600: #A87337;
  --color-secondary-700: #7B5127;
  --color-secondary-800: #50341D;
  --color-secondary-900: #342416;
  --color-secondary-950: #1E120A;
  --color-neutral-50: #F8EBDD;
  --color-neutral-100: #E7D3C8;
  --color-neutral-200: #C6A89B;
  --color-neutral-300: #A48278;
  --color-neutral-400: #7F625D;
  --color-neutral-500: #5D4343;
  --color-neutral-600: #402733;
  --color-neutral-700: #2F1A24;
  --color-neutral-800: #201118;
  --color-neutral-900: #12090D;
  --color-neutral-950: #090406;
  --hb-primary-500-rgb: 229 101 142;
  --hb-secondary-500-rgb: 211 161 92;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

::selection {
  background: color-mix(in srgb, var(--academic-gold-soft) 78%, var(--academic-accent-soft));
  color: var(--academic-ink);
}

body {
  background: var(--academic-paper);
  color: var(--academic-ink);
  font-family: var(--academic-font-body);
  font-size: 0.98rem;
  line-height: 1.64;
  accent-color: var(--academic-accent);
}

body,
button,
input,
textarea,
select,
main,
article,
nav,
footer,
.page-body,
.page-header,
.page-footer,
.prose {
  font-family: var(--academic-font-body) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: var(--academic-font-heading) !important;
  letter-spacing: 0;
}

.page-header nav {
  box-shadow: none !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.7rem !important;
  border: 1px solid var(--academic-sidebar-muted);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--academic-sidebar-ink) !important;
  outline: none;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--academic-sidebar-ink) 58%, var(--academic-gold));
  background: rgba(255, 255, 255, 0.14);
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--academic-sidebar-ink) 72%, var(--academic-gold));
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.page-body .hbb-section {
  padding: 2.8rem 0;
  background: var(--academic-paper);
}

.page-body .hbb-section:nth-of-type(even) {
  background: color-mix(in srgb, var(--academic-paper) 88%, var(--academic-surface));
}

.page-body .hbb-section + .hbb-section {
  border-top: 1px solid var(--academic-line);
}

.page-body .hbb-section > div:not(.home-section-bg),
.page-body .hbb-section .container {
  max-width: 48rem;
}

.page-body .prose {
  color: var(--academic-ink);
  font-family: var(--academic-font-body);
  font-size: 0.98rem;
  line-height: 1.66;
}

.page-body .prose h1 {
  margin: 0 0 0.85rem;
  color: var(--academic-ink);
  font-family: var(--academic-font-heading);
  font-size: clamp(2.05rem, 4.2vw, 3rem);
  font-weight: 640;
  line-height: 1.04;
}

.page-body .prose h2 {
  color: var(--academic-ink);
  font-family: var(--academic-font-heading);
  font-weight: 600;
}

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

.page-body .prose a:hover {
  color: var(--academic-accent-strong);
}

.page-body .prose ul {
  padding-left: 1.2rem;
}

.page-body .prose li::marker {
  color: var(--academic-accent);
}

.page-body .hbb-section .mb-6.text-3xl {
  align-self: stretch;
  width: 100%;
  margin-bottom: 1.05rem;
  color: var(--academic-ink);
  font-size: 1.32rem;
  font-family: var(--academic-font-heading);
  font-weight: 600;
  letter-spacing: 0;
}

#intro {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
}

#intro .prose {
  max-width: 46rem;
}

.intro-photo {
  margin: 1.45rem 0 1.35rem;
}

.intro-photo img {
  display: block;
  width: 100%;
  max-height: 19rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.35rem;
  box-shadow: 0 0.65rem 1.5rem var(--academic-shadow);
  object-fit: cover;
  object-position: center;
}

.intro-photo figcaption {
  margin-top: 0.42rem;
  color: var(--academic-muted);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.45;
}

#intro .prose p:first-of-type {
  margin-top: 0;
  color: var(--academic-ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

#intro .prose p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
}

#intro .prose p:last-child a {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.25rem;
  background: var(--academic-surface);
  color: var(--academic-ink);
  font-size: 0.9rem;
  font-family: var(--academic-font-body);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 0.35rem 1rem var(--academic-shadow);
}

#intro .prose p:last-child a:hover {
  background: color-mix(in srgb, var(--academic-accent-soft) 78%, var(--academic-gold-soft));
  border-color: var(--academic-accent);
  color: var(--academic-accent);
}

#photography .prose {
  max-width: 52rem;
}

#photography .prose > p:first-of-type {
  margin-bottom: 0.55rem;
}

#photography .prose > figure {
  margin: 0.8rem 0 !important;
}

#photography .prose figure > div,
#photography .prose figure > div > div,
.postcard-gallery-slide > div,
.postcard-gallery-slide > div > div {
  width: 100%;
  height: 100%;
}

#photography .prose figure img,
.postcard-gallery-slide img {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0 !important;
  border: 1px solid var(--academic-line);
  border-radius: 0.3rem;
  box-shadow: 0 0.65rem 1.5rem var(--academic-shadow);
  object-fit: cover;
}

.postcard-gallery {
  position: relative;
  margin: 1.1rem 0 1rem;
}

.postcard-gallery-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0.15rem 0 1rem;
  scroll-padding-inline: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.postcard-gallery-track::-webkit-scrollbar {
  display: none;
}

.postcard-gallery-slide {
  flex: 0 0 min(78%, 35rem);
  margin: 0 !important;
  cursor: zoom-in;
  scroll-snap-align: center;
}

.postcard-gallery-slide img {
  aspect-ratio: 16 / 10;
  transition: border-color 180ms ease, filter 180ms ease, transform 180ms ease;
}

.postcard-gallery-slide:hover img,
.postcard-gallery-slide:focus-visible img,
.postcard-gallery-slide.is-active img {
  border-color: color-mix(in srgb, var(--academic-accent) 68%, var(--academic-gold));
  filter: saturate(1.05);
}

.postcard-gallery-slide:focus-visible {
  outline: 2px solid var(--academic-accent);
  outline-offset: 0.25rem;
}

.postcard-gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  margin-top: 0.1rem;
}

.postcard-gallery-dot,
.postcard-gallery-side,
.postcard-lightbox button {
  border: 1px solid var(--academic-line);
  background: var(--academic-surface);
  color: var(--academic-ink);
  font-family: var(--academic-font-body);
  box-shadow: 0 0.35rem 1rem var(--academic-shadow);
}

.postcard-gallery-side {
  position: absolute;
  top: 0.15rem;
  bottom: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(7.5rem, 22%);
  border: 0;
  border-radius: 0.3rem;
  background: linear-gradient(90deg, rgba(18, 9, 13, 0.34), transparent);
  color: rgba(248, 235, 221, 0);
  font-size: 2.1rem;
  line-height: 1;
  opacity: 0;
  box-shadow: none;
  transition: opacity 160ms ease, color 160ms ease, background 160ms ease;
  z-index: 2;
}

.postcard-gallery-side-prev {
  left: 0;
}

.postcard-gallery-side-next {
  right: 0;
  background: linear-gradient(270deg, rgba(18, 9, 13, 0.34), transparent);
}

.postcard-gallery-side:hover,
.postcard-gallery-side:focus-visible {
  color: rgba(248, 235, 221, 0.9);
  opacity: 1;
}

.postcard-gallery-dot {
  width: 0.62rem;
  height: 0.62rem;
  padding: 0;
  border-radius: 999px;
}

.postcard-gallery-dot.is-active {
  background: var(--academic-accent);
  border-color: var(--academic-accent);
}

.postcard-gallery-dot:hover,
.postcard-gallery-side:hover,
.postcard-lightbox button:hover {
  background: var(--academic-accent-soft);
  border-color: var(--academic-accent);
  color: var(--academic-accent);
}

.postcard-gallery-side:hover {
  background: rgba(18, 9, 13, 0.42);
  color: rgba(248, 235, 221, 1);
}

body.postcard-lightbox-open {
  overflow: hidden;
}

.postcard-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 4rem 5rem;
  background: rgba(18, 9, 13, 0.92);
  backdrop-filter: blur(0.35rem);
  cursor: grab;
  touch-action: pan-y;
}

.postcard-lightbox.is-open {
  display: grid;
}

.postcard-lightbox img {
  max-width: min(100%, 76rem);
  max-height: 82vh;
  border: 1px solid rgba(248, 235, 221, 0.2);
  border-radius: 0.28rem;
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.45);
  object-fit: contain;
  transform: translateX(var(--photo-drag-x, 0));
  transition: transform 180ms ease, opacity 180ms ease;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.postcard-lightbox.is-dragging {
  cursor: grabbing;
}

.postcard-lightbox.is-dragging img {
  transition: none;
}

.postcard-lightbox-close,
.postcard-lightbox-nav {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.25rem;
  font-size: 1.65rem;
  line-height: 1;
}

.postcard-lightbox-close {
  top: 1.2rem;
  right: 1.2rem;
}

.postcard-lightbox-prev {
  left: 1.2rem;
}

.postcard-lightbox-next {
  right: 1.2rem;
}

.postcard-lightbox-counter {
  position: fixed;
  bottom: 1.3rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(248, 235, 221, 0.82);
  font-family: var(--academic-font-body);
  font-size: 0.85rem;
}

#photography .prose > p:last-child {
  margin-top: 0.7rem;
}

#photography .prose p:last-child a {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.25rem;
  background: var(--academic-surface);
  color: var(--academic-ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0.35rem 1rem var(--academic-shadow);
}

#photography .prose p:last-child a:hover {
  background: var(--academic-accent-soft);
  border-color: var(--academic-accent);
  color: var(--academic-accent);
}

.spotify-player {
  margin: 1rem 0 0.2rem;
}

.spotify-player-widget {
  position: fixed;
  right: 0.25rem;
  bottom: 1rem;
  z-index: 2147483000;
  width: min(22.5rem, calc(100vw - 2rem));
  margin: 0;
  pointer-events: none;
}

.spotify-player-frame {
  overflow: hidden;
  border: 1px solid var(--academic-line);
  border-radius: 0.35rem;
  background: #121212;
  box-shadow: 0 0.65rem 1.6rem var(--academic-shadow);
}

.spotify-player-frame iframe {
  display: block;
  width: 100%;
  border: 0;
}

.spotify-widget-toggle,
.spotify-widget-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--academic-line);
  background: var(--academic-surface);
  color: var(--academic-ink);
  font-family: var(--academic-font-body);
  box-shadow: 0 0.55rem 1.35rem var(--academic-shadow);
}

.spotify-widget-toggle {
  gap: 0.45rem;
  min-height: 2.45rem;
  margin-left: auto;
  padding: 0.48rem 0.74rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  pointer-events: auto;
}

.spotify-widget-toggle:hover,
.spotify-widget-close:hover {
  border-color: var(--academic-accent);
  background: var(--academic-accent-soft);
  color: var(--academic-accent);
}

.spotify-widget-bars {
  display: inline-flex;
  align-items: end;
  gap: 0.11rem;
  height: 0.92rem;
  color: var(--academic-accent);
}

.spotify-widget-bars span {
  display: block;
  width: 0.16rem;
  border-radius: 999px;
  background: currentColor;
}

.spotify-widget-bars span:nth-child(1) {
  height: 0.52rem;
}

.spotify-widget-bars span:nth-child(2) {
  height: 0.88rem;
}

.spotify-widget-bars span:nth-child(3) {
  height: 0.66rem;
}

.spotify-widget-panel {
  overflow: hidden;
  border: 1px solid var(--academic-line);
  border-radius: 0.38rem;
  background: color-mix(in srgb, var(--academic-surface) 92%, var(--academic-accent-soft));
  box-shadow: 0 0.8rem 2.4rem var(--academic-shadow);
  pointer-events: auto;
}

.spotify-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-height: 2.6rem;
  padding: 0.5rem 0.58rem 0.5rem 0.78rem;
  color: var(--academic-ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.spotify-widget-close {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.22rem;
  font-size: 1.2rem;
  line-height: 1;
}

.spotify-player-widget .spotify-player-frame {
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.spotify-player-widget.is-collapsed .spotify-widget-panel,
.spotify-player-widget.is-open .spotify-widget-toggle {
  display: none;
}

.spotify-profile-card {
  display: grid;
  gap: 0.2rem;
  max-width: 28rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--academic-surface) 88%, var(--academic-accent-soft));
  color: var(--academic-ink) !important;
  text-decoration: none !important;
  box-shadow: 0 0.55rem 1.4rem var(--academic-shadow);
}

.spotify-profile-card:hover {
  border-color: var(--academic-accent);
  transform: translateY(-1px);
}

.spotify-profile-kicker {
  color: var(--academic-gold);
  font-family: var(--academic-font-code);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spotify-profile-title {
  font-family: var(--academic-font-heading);
  font-size: 1.2rem;
  font-weight: 620;
  line-height: 1.2;
}

.spotify-profile-link {
  color: var(--academic-muted);
  font-size: 0.84rem;
  font-weight: 650;
}

#publications .prose {
  font-size: 0.94rem;
  line-height: 1.5;
}

#publications .prose p {
  margin: 0 0 1rem;
}

#publications .prose p:last-child {
  margin-top: 0.35rem;
}

#publications .prose a {
  color: var(--academic-ink);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

#publications .prose a:hover {
  color: var(--academic-accent);
}

#publications .prose p:last-child a {
  color: var(--academic-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.publication-is-hidden {
  display: none;
}

.publication-toggle,
.copy-citation,
.copy-email-button,
.publication-action {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.25rem;
  background: var(--academic-surface);
  color: var(--academic-ink);
  font-family: var(--academic-font-body);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 0.35rem 1rem var(--academic-shadow);
}

.publication-toggle:hover,
.copy-citation:hover,
.copy-email-button:hover,
.publication-action:hover {
  border-color: var(--academic-accent);
  background: var(--academic-accent-soft);
  color: var(--academic-accent);
}

.audio-demo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.audio-demo-item {
  border: 1px solid var(--academic-line);
  border-radius: 0.3rem;
  background: var(--academic-surface);
  padding: 0.9rem;
  box-shadow: 0 0.45rem 1.1rem var(--academic-shadow);
}

.audio-demo-label {
  margin-bottom: 0.5rem;
  color: var(--academic-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audio-demo audio {
  display: block;
  width: 100%;
}

.copy-citation {
  margin-top: 0.4rem;
}

.copy-email {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  vertical-align: middle;
}

.copy-email-address {
  color: var(--academic-ink);
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.publication-action {
  margin: 0;
}

.site-search {
  max-width: 44rem;
  margin-top: 0.8rem;
  --pagefind-ui-primary: var(--academic-accent);
  --pagefind-ui-text: var(--academic-ink);
  --pagefind-ui-background: var(--academic-surface);
  --pagefind-ui-border: var(--academic-line);
  --pagefind-ui-tag: var(--academic-accent-soft);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 0.3rem;
  --pagefind-ui-image-border-radius: 0.25rem;
  --pagefind-ui-font: var(--academic-font-body);
}

.site-search .pagefind-ui__form {
  margin-bottom: 1rem;
}

.site-search .pagefind-ui__search-input {
  min-height: 3rem;
  border-color: var(--academic-line);
  box-shadow: 0 0.45rem 1.15rem var(--academic-shadow);
  font-size: 0.95rem;
}

.site-search .pagefind-ui__search-input:focus {
  outline: 2px solid color-mix(in srgb, var(--academic-accent) 42%, transparent);
  outline-offset: 2px;
}

.site-search .pagefind-ui__search-clear {
  color: var(--academic-muted);
}

.site-search .pagefind-ui__result {
  padding: 1rem 0;
  border-top: 1px solid var(--academic-line);
}

.site-search .pagefind-ui__result-title {
  font-family: var(--academic-font-heading);
  font-size: 1.05rem;
  font-weight: 620;
  line-height: 1.28;
}

.site-search .pagefind-ui__result-link {
  color: var(--academic-ink);
  text-decoration: none;
}

.site-search .pagefind-ui__result-link:hover {
  color: var(--academic-accent);
}

.site-search .pagefind-ui__result-excerpt,
.site-search .pagefind-ui__message,
.site-search-fallback {
  color: var(--academic-muted);
  font-size: 0.92rem;
}

.delight-trigger {
  cursor: default;
}

body.atakan-easter-egg-open {
  overflow: hidden;
}

.atakan-easter-egg {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 3rem);
  background: rgba(18, 9, 13, 0.76);
  backdrop-filter: blur(0.35rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.atakan-easter-egg.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.atakan-easter-egg-frame {
  position: relative;
  width: min(34rem, 100%);
  transform: translateY(0.8rem) scale(0.98);
  transition: transform 180ms ease;
}

.atakan-easter-egg.is-visible .atakan-easter-egg-frame {
  transform: translateY(0) scale(1);
}

.atakan-easter-egg img {
  display: block;
  width: 100%;
  max-height: min(78vh, 48rem);
  border: 1px solid rgba(248, 235, 221, 0.26);
  border-radius: 0.35rem;
  background: var(--academic-paper);
  box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.46);
  object-fit: contain;
}

.atakan-easter-egg-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(248, 235, 221, 0.42);
  border-radius: 0.25rem;
  background: rgba(18, 9, 13, 0.76);
  color: #F8EBDD;
  font-family: var(--academic-font-body);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 0 0.55rem 1.4rem rgba(0, 0, 0, 0.28);
}

.atakan-easter-egg-close:hover,
.atakan-easter-egg-close:focus-visible {
  border-color: #F8EBDD;
  background: var(--academic-accent);
  color: #F8EBDD;
}

.delight-toast {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(24rem, calc(100vw - 2.2rem));
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--academic-surface) 94%, var(--academic-accent-soft));
  color: var(--academic-ink);
  box-shadow: 0 0.75rem 2rem var(--academic-shadow);
  font-size: 0.86rem;
  font-weight: 650;
}

.delight-wave {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  color: var(--academic-accent);
}

.delight-wave span {
  display: block;
  width: 0.15rem;
  height: 0.82rem;
  border-radius: 999px;
  background: currentColor;
  animation: delight-pulse 720ms ease-in-out infinite;
}

.delight-wave span:nth-child(2) {
  animation-delay: 90ms;
}

.delight-wave span:nth-child(3) {
  animation-delay: 180ms;
}

.delight-wave span:nth-child(4) {
  animation-delay: 270ms;
}

.delight-wave span:nth-child(5) {
  animation-delay: 360ms;
}

@keyframes delight-pulse {
  0%,
  100% {
    transform: scaleY(0.42);
    opacity: 0.55;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atakan-easter-egg,
  .atakan-easter-egg-frame {
    transition: none;
  }

  .atakan-easter-egg-frame,
  .atakan-easter-egg.is-visible .atakan-easter-egg-frame {
    transform: none;
  }
}

#projects .grid {
  gap: 1rem !important;
}

#projects [role="article"] {
  border: 1px solid var(--academic-line) !important;
  border-radius: 0.25rem !important;
  background: var(--academic-surface) !important;
  box-shadow: 0 0.65rem 1.6rem var(--academic-shadow) !important;
  transform: none !important;
}

#projects [role="article"] > .relative {
  display: none;
}

#projects [role="article"] .p-8 {
  padding: 1.15rem !important;
}

#projects [role="article"] h3 {
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

#projects [role="article"] h3 a {
  color: var(--academic-ink) !important;
  text-decoration: none;
}

#projects [role="article"] h3 a:hover {
  color: var(--academic-accent) !important;
}

#projects [role="article"] p {
  color: var(--academic-muted) !important;
  font-size: 0.92rem !important;
}

#projects [role="article"] span.rounded-full {
  border-radius: 0.2rem !important;
  background: var(--academic-gold-soft) !important;
  color: var(--academic-gold) !important;
  font-weight: 500 !important;
}

#projects [role="article"] .border-t {
  border-color: var(--academic-line) !important;
}

#projects [role="article"] a.inline-flex {
  color: var(--academic-accent) !important;
}

#writing .container {
  max-width: 48rem !important;
  padding-top: 0.75rem !important;
}

#writing .grid {
  grid-template-columns: 1fr !important;
  gap: 0.85rem !important;
}

#writing [role="article"] {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--academic-line) !important;
  border-radius: 0.3rem !important;
  background: color-mix(in srgb, var(--academic-surface) 90%, var(--academic-accent-soft)) !important;
  box-shadow: 0 0.55rem 1.35rem var(--academic-shadow) !important;
  transform: none !important;
}

#writing [role="article"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.24rem;
  background: linear-gradient(180deg, var(--academic-accent), var(--academic-gold));
}

#writing [role="article"] > .relative {
  display: none !important;
}

#writing [role="article"] .p-8 {
  position: relative;
  padding: 1.25rem 1.35rem 1.15rem 1.55rem !important;
}

#writing [role="article"] .p-8::before {
  content: "01";
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  color: color-mix(in srgb, var(--academic-gold) 44%, var(--academic-line));
  font-family: var(--academic-font-heading);
  font-size: 2.1rem;
  font-weight: 650;
  line-height: 1;
}

#writing [role="article"]:nth-child(2) .p-8::before {
  content: "02";
}

#writing [role="article"] .flex.items-center.gap-2 {
  margin-bottom: 0.45rem;
}

#writing [role="article"] span.rounded-full {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--academic-muted) !important;
  font-family: var(--academic-font-body);
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#writing [role="article"] h3 {
  max-width: calc(100% - 3.5rem);
  margin: 0 !important;
  font-size: 1.18rem !important;
  font-weight: 620 !important;
  line-height: 1.22 !important;
}

#writing [role="article"] h3 a {
  color: var(--academic-ink) !important;
  text-decoration: none;
}

#writing [role="article"] h3 a:hover {
  color: var(--academic-accent) !important;
}

#writing [role="article"] p {
  max-width: 37rem;
  color: var(--academic-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}

#writing [role="article"] .pt-3.border-t {
  padding-top: 0 !important;
  border-top: 0 !important;
}

#writing [role="article"] .flex.items-center.gap-3.text-xs {
  display: none !important;
}

#writing [role="article"] .pt-2.border-t {
  display: inline-flex;
  padding-top: 0.2rem !important;
  border-top: 0 !important;
}

#writing [role="article"] a.inline-flex {
  color: var(--academic-accent) !important;
  font-size: 0.86rem !important;
  font-weight: 650 !important;
  text-decoration: none !important;
}

#writing [role="article"] a.inline-flex:hover {
  color: var(--academic-ink) !important;
}

.page-footer footer {
  max-width: 48rem;
  color: var(--academic-muted);
}

.page-body.my-10 > .mx-auto.flex.max-w-screen-xl {
  max-width: 54rem;
}

.page-body.my-10 .hb-sidebar-container,
.page-body.my-10 .hb-toc,
.page-body.my-10 .max-xl\:hidden.h-0.w-64.shrink-0 {
  display: none !important;
}

.page-body.my-10 main {
  max-width: 54rem !important;
  padding: 0 2rem 4rem !important;
}

.page-body.my-10 article {
  justify-content: flex-start !important;
  padding-right: 0 !important;
}

.page-body.my-10 article .text-gray-500.dark\:text-gray-300.text-sm.flex.items-center.flex-wrap.gap-y-2,
.page-body.my-10 article .max-w-prose.print\:hidden {
  display: none !important;
}

.page-body.my-10 article h1 {
  max-width: 44rem;
  color: var(--academic-ink);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-family: var(--academic-font-heading);
  font-weight: 640;
  line-height: 1.12;
}

.page-body.my-10 article .prose {
  font-size: 0.98rem;
  line-height: 1.66;
}

.page-body.my-10 article .prose h2 {
  font-size: 1.35rem;
  line-height: 1.25;
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--academic-paper);
  color: var(--academic-ink);
}

.not-found-page main {
  width: min(100%, 42rem);
}

.not-found-kicker {
  margin: 0 0 0.7rem;
  color: var(--academic-muted);
  font-family: var(--academic-font-code);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.not-found-page h1 {
  max-width: 34rem;
  margin: 0 0 1rem;
  color: var(--academic-ink);
  font-family: var(--academic-font-heading);
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 650;
  line-height: 1.04;
}

.not-found-page p {
  max-width: 34rem;
  margin: 0 0 1rem;
  color: var(--academic-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.not-found-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.78rem;
  border: 1px solid var(--academic-line);
  border-radius: 0.25rem;
  background: var(--academic-surface);
  color: var(--academic-ink);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 0.35rem 1rem var(--academic-shadow);
}

.not-found-actions a:hover {
  border-color: var(--academic-accent);
  background: var(--academic-accent-soft);
  color: var(--academic-accent);
}

@media (min-width: 1024px) {
  body {
    min-height: 100vh;
  }

  .page-header {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 18.5rem;
    background: linear-gradient(180deg, var(--academic-sidebar), var(--academic-sidebar-dark));
  }

  .page-header nav {
    height: 100vh;
    align-items: flex-start !important;
    background: transparent !important;
    color: var(--academic-sidebar-ink) !important;
    padding: 3.5rem 2rem !important;
  }

  .page-header nav::before {
    content: "Ege Küçükkömürcü";
    display: block;
    width: 100%;
    margin-bottom: 0.35rem;
    color: var(--academic-sidebar-ink);
    white-space: pre-line;
    font-family: var(--academic-font-heading) !important;
    font-size: 1.45rem;
    font-style: normal;
    font-weight: 640;
    line-height: 1.18;
  }

  .page-header nav > div::before {
    content: "PhD Candidate";
    order: 1;
    display: block; 
    width: 100%;
    margin-bottom: 4rem;
    color: var(--academic-sidebar-muted);
    font-family: var(--academic-font-body);
    font-size: 0.86rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.35;
  }

  .page-header nav > div::after {
    content: "";
    order: 2;
    display: block;
    flex: 0 0 4.15rem;
    width: 4.15rem;
    aspect-ratio: 818 / 597;
    margin-bottom: 2.15rem;
    background: url("/media/ek-logo-lison-darkmode-cream-rose.png") center / contain no-repeat;
    opacity: 0.82;
    pointer-events: none;
  }

  .page-header nav::after {
    content: "All-optical photoacoustic imaging";
    display: block;
    margin-top: auto;
    color: var(--academic-sidebar-muted);
    font-family: var(--academic-font-body);
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .page-header nav > div {
    align-items: flex-start !important;
    padding: 0 !important;
    width: 100%;
  }

  .page-header #collapse-main-navbar {
    order: 3;
    display: flex !important;
    flex-basis: 100% !important;
    width: 100%;
    justify-content: flex-start !important;
    margin-top: 0 !important;
  }

  .page-header ul {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 0.85rem;
  }

  .page-header li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .page-header a,
  .page-header button {
    color: var(--academic-sidebar-link) !important;
    font-family: var(--academic-font-body);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
  }

  .page-header a:hover,
  .page-header a.active {
    color: var(--academic-sidebar-ink) !important;
  }

  .page-body,
  .page-footer {
    margin-left: 18.5rem;
  }

  .page-body {
    padding: 0 4rem;
  }

  #intro {
    min-height: 100vh;
  }

  .page-body.my-10 {
    padding-top: 4rem;
  }
}

@media (max-width: 1023px) {
  .page-header nav {
    position: relative;
    min-height: 3.35rem;
    background: var(--academic-paper) !important;
    border-bottom: 1px solid var(--academic-line);
  }

  .page-header nav::before {
    content: "";
    position: absolute;
    top: 0.62rem;
    left: 50%;
    width: 2.55rem;
    aspect-ratio: 818 / 597;
    transform: translateX(-50%);
    background: url("/media/ek-logo-lison-burgundy-rose.png") center / contain no-repeat;
    opacity: 0.92;
    pointer-events: none;
  }

  .dark .page-header nav::before {
    background-image: url("/media/ek-logo-lison-darkmode-cream-rose.png");
  }

  .page-header a,
  .page-header button {
    color: var(--academic-ink) !important;
  }

  .theme-toggle {
    border-color: var(--academic-line);
    background: var(--academic-surface);
    color: var(--academic-ink) !important;
  }

  .theme-toggle:hover {
    border-color: var(--academic-accent);
    background: var(--academic-accent-soft);
  }

  .page-body .hbb-section {
    padding: 2.6rem 0;
  }

  .postcard-gallery-slide {
    flex-basis: 86%;
  }

  .audio-demo {
    grid-template-columns: 1fr;
  }

  .postcard-gallery-side {
    bottom: 2.05rem;
    color: rgba(248, 235, 221, 0.82);
    opacity: 1;
    width: 3.4rem;
  }

  .postcard-lightbox {
    padding: 3.4rem 1rem 4rem;
  }

  .postcard-lightbox img {
    max-height: 74vh;
  }

  .postcard-lightbox-prev {
    left: 0.7rem;
    bottom: 1rem;
  }

  .postcard-lightbox-next {
    right: 0.7rem;
    bottom: 1rem;
  }

  .postcard-lightbox-close {
    top: 0.8rem;
    right: 0.8rem;
  }

  .page-body.my-10 main {
    padding: 0 1.5rem 3rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .delight-wave span {
    animation: none;
  }
}
