:root {
  color-scheme: only light;
  --paper: #f4efe6;
  --paper-ink: #1d1a16;
  --accent: #b3412f;
  --accent-deep: #7d2e24;
  --rule: #cbb9a7;
  --muted: #5e534a;
  --highlight: #efe3d2;
  --shadow: rgba(19, 17, 15, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--paper-ink);
  font-family: "Source Serif 4", "Georgia", serif;
  min-height: 100vh;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 64px;
}

header {
  border-bottom: 2px solid var(--paper-ink);
  padding-bottom: 18px;
  margin-bottom: 26px;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
}

/* .masthead h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  text-align: center;
}

.masthead .meta {
  font-family: "Unica One", "Helvetica", sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.masthead .meta span {
  display: block;
} */

nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

nav a {
  text-decoration: none;
  color: var(--paper-ink);
}

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

.back-nav {
  justify-content: flex-start;
}

.back-nav .icon-link {
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.lead a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lead a:hover {
  color: var(--accent);
  border-bottom-color: transparent;
}

.contact-row {
  text-align: center;
}

.contact-row .icon-link {
  justify-content: center;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 24px;
  margin-bottom: 32px;
}

.lead {
  /* background: var(--highlight); */
  padding: 20px 22px;
  /* border: 1px solid var(--rule); */
  /* box-shadow: 0 18px 40px var(--shadow); */
}

.lead h2 {
  /* font-family: "Playfair Display", "Times New Roman", serif; */
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  margin: 0 0 12px;
}

.lead p {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* .lead p:first-of-type::first-letter {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 3.6rem;
  float: left;
  line-height: 0.9;
  margin-right: 12px;
  color: var(--accent);
} */

.sidebar {
  /* border: 1px solid var(--rule); */
  padding: 18px;
  /* background: #fff6ec; */
}

.sidebar h3 {
  font-family: "Unica One", "Helvetica", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  color: var(--accent-deep);
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  padding: 10px 0;
  font-size: 0.95rem;
}

.sidebar li:last-child {
  border-bottom: none;
}

.sidebar img {
  display: block;
  width: 100%;
  height: auto;
  /* border: 1px solid var(--rule); */
}

.sidebar-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
}

.sidebar-location svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
}

.section {
  margin: 32px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--accent-deep);
}

.section-title::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--rule);
}

.columns {
  margin-top: 20px;
  column-count: 3;
  column-gap: 26px;
  font-size: 1rem;
  line-height: 1.7;
}

.columns p {
  break-inside: avoid;
  margin-top: 0;
}

.news-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  line-height: 1.7;
}

.news-list li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
}

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

.news-date {
  min-width: 86px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--muted);
}

.news-text {
  flex: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.pub-list {
  margin-top: 20px;
  display: grid;
  gap: 26px;
}

.pub-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px;
}

.pub-thumb {
  /* border: 1px solid var(--rule); */
  padding: 12px;
  background: #ffffff;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.pub-placeholder {
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
}

.pub-title {
  margin: 0 0 6px;
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: clamp(0.95rem, 0.5vw + 0.85rem, 1.15rem);
}

.pub-title a {
  color: var(--accent-deep);
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: clamp(0.85rem, 0.4vw + 0.75rem, 0.95rem);
}

.pub-venue {
  font-weight: 600;
  margin: 2px 0 6px;
  color: var(--muted);
}

.pub-abstract {
  margin: 0 0 8px;
  font-size: clamp(0.85rem, 0.4vw + 0.75rem, 0.95rem);
  line-height: 1.6;
}

.pub-links a {
  color: var(--accent-deep);
  text-decoration: none;
  font-size: clamp(0.8rem, 0.35vw + 0.75rem, 0.9rem);
}

.pub-links {
  margin: 2px 0 10px;
}
.pub-links a:hover {
  color: var(--accent);
}

.blog-list {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.blog-filter {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-filter-tag {
  border: 1px solid var(--rule);
  padding: 5px 10px;
  font-size: 0.72rem;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  background: #fff;
  cursor: pointer;
}

.blog-filter-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.blog-filter-tag.is-active {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: #fff;
}

.blog-filter-tag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.blog-item {
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 14px;
}

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

.blog-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.blog-title a {
  color: var(--accent-deep);
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--accent);
}

.blog-meta {
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-item.is-pinned {
  border: 1px solid var(--accent);
  padding: 16px;
  border-radius: 12px;
}

.blog-pin {
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.blog-summary {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-tags span {
  border: 1px solid var(--rule);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.blog-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post {
  max-width: 740px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.post-shell {
  display: block;
}

.toc-rail {
  position: fixed;
  left: 18px;
  top: 45%;
  width: 36px;
  height: 56px;
  border: none;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 8px;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 12px 26px var(--shadow);
}

.toc-rail span {
  display: block;
  width: 12px;
  height: 2px;
  background: var(--muted);
  border-radius: 999px;
}

.toc-rail:hover span {
  background: #000;
}

.post-toc {
  position: fixed;
  left: 64px;
  top: 18%;
  width: 240px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 14px 12px;
  background: #fff;
  box-shadow: 0 16px 36px var(--shadow);
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--muted);
  max-height: 64vh;
  overflow: auto;
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 35;
}

.post-toc.is-open {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.post-toc-title {
  margin-bottom: 10px;
  color: var(--paper-ink);
}

.post-toc a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.post-toc nav {
  display: block;
}

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

.post-header {
  display: grid;
  gap: 8px;
}

.post-kicker {
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--muted);
}

.post-title {
  margin: 0;
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: clamp(2.2rem, 3.6vw, 3.1rem);
  line-height: 1.12;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--muted);
}

.post-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--muted);
}

.post-author .post-author-name {
  color: var(--paper-ink);
}

.post-meta {
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags span {
  border: 1px solid var(--rule);
  padding: 4px 8px;
  font-size: 0.68rem;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: #fff;
}

.post-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, #efe6d9 0%, #e5cfc0 50%, #d1b1a3 100%);
  border: 1px solid var(--rule);
}

.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.post-content {
  font-size: 1.03rem;
  line-height: 1.9;
}

.post-heading {
  margin-top: 28px;
  margin-bottom: 2px;
}

.post-content h2 {
  margin: 0;
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 1.55rem;
  line-height: 1.15;
}

.post-heading-date {
  margin-top: 1px;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.1;
  transform: translateY(0);
}

.post-content h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 1.25rem;
}

.post-content a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.post-content a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.post-content blockquote {
  margin: 20px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: #fff;
  font-style: italic;
}

.post-figure,
.post-gallery-wrap,
.post-collage-wrap {
  margin: 22px 0;
}

.post-figure img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.post-figure-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-gallery {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  margin-left: auto;
  margin-right: auto;
}

.post-gallery-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.post-collage {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-collage-item {
  margin: 0;
}

.post-collage-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  cursor: pointer;
}

.post-collage-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.post-lightbox-open {
  overflow: hidden;
}

.post-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
}

.post-lightbox[aria-hidden="true"] {
  display: none;
}

.post-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(10, 10, 10, 0.7);
  cursor: pointer;
}

.post-lightbox-body {
  position: relative;
  max-width: min(92vw, 960px);
  max-height: 80vh;
  z-index: 1;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.post-lightbox-body img {
  width: 100%;
  height: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.post-lightbox-caption {
  font-size: 0.9rem;
  color: #f5f5f5;
  text-align: center;
}

.post-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (min-width: 720px) {
  .post-collage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.post-gallery-track {
  display: flex;
  transition: transform 0.35s ease;
  height: 100%;
}

.post-gallery-slide {
  min-width: 100%;
  margin: 0;
  height: 100%;
}

.post-gallery-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.post-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(29, 26, 22, 0.7);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.post-gallery-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.post-gallery-btn.prev {
  left: 12px;
}

.post-gallery-btn.next {
  right: 12px;
}

.post-content ul {
  padding-left: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.card {
  border: 1px solid var(--rule);
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 30px var(--shadow);
  min-height: 200px;
}

.card h4 {
  font-family: "Playfair Display", "Times New Roman", serif;
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.card p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card span {
  display: inline-block;
  font-family: "Unica One", "Helvetica", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.timeline div {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.timeline h5 {
  margin: 0 0 6px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.footer {
  margin-top: 48px;
  border-top: 2px solid var(--paper-ink);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: "Unica One", "Helvetica", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}

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

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

  .masthead {
    grid-template-columns: 1fr;
    text-align: center;
  }

  main {
    padding-left: 10px;
    padding-right: 10px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .columns {
    column-count: 1;
  }


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

  .timeline {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .sidebar img {
    max-width: 380px;
    margin: 0 auto;
  }

  .post-shell {
    grid-template-columns: 1fr;
  }

  .toc-rail {
    display: none;
  }

  .post-toc {
    display: none;
  }

  .sidebar-location {
    width: min(380px, 100%);
    justify-content: flex-start;
  }

  .pub-item {
    width: 92%;
    max-width: 600px;
    margin: 0 auto;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    padding: 16px;
  }

  .pub-thumb {
    min-height: 120px;
    padding: 10px;
  }
}

@media (max-width: 520px) {
  .pub-item {
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .pub-thumb {
    min-height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
