@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cormorant-sc-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cormorant-sc-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-sc-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-sc-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cormorant-sc-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cormorant-sc-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --sans: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cormorant: "Cormorant SC", serif;
  --ink: #1c2b38;
  --paper: #fff;
  --rule: #ddd8cd;
  --accent: #9a7733;
  --accent-hover: #6e5522;
  --muted: #5b6b78;
  --dark-blue: #0d273c;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  font-family: var(--cormorant);
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
}

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

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
@property --shrink {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

@keyframes header-shrink {
  from {
    --shrink: 0;
  }
  to {
    --shrink: 1;
  }
}

.site-header {
  --shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid var(--dark-blue);
}

/* scroll-driven header shrink: only enable where animation-timeline: scroll() is supported (not Firefox) */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-shrink linear both;
    animation-timeline: scroll(root);
    animation-range: 0 80px;
  }
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(18px - 8px * var(--shrink));
  padding-bottom: calc(18px - 8px * var(--shrink));
}

.header-logo {
  display: block;
  height: calc(80px - 32px * var(--shrink));
  width: auto;
}

.footer-logo {
  height: 80px;
}

/* Header actions (language selector, pinned to the right) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Language selector */
.lang-select {
  position: relative;
}
.lang-select-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  overflow: hidden;
}
.lang-select-current::-webkit-details-marker {
  display: none;
}
.lang-select-current:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-select-current .lang-select-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.lang-select-flag {
  display: flex;
  font-size: 1.1rem;
}
.lang-select-current .lang-select-flag img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.lang-select-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 5;
}
.lang-select-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink);
}
.lang-select-item a:hover {
  background: var(--rule);
  text-decoration: none;
}

/* badges / labels */
.badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 8px;
}

.badge a {
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 16px;
  border: 2px solid var(--accent);
}

.badge a:hover {
  color: inherit;
}

.section-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  margin: 0 0 24px;
}

.byline {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}

/* Hero (home, latest article) */
.hero {
  padding: 48px 24px 40px;
}
.hero-image,
.card-image {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--rule);
}
.hero-image img,
.card-image img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.hero-image {
  margin-bottom: 28px;
}
.hero-image img {
  aspect-ratio: 16 / 7;
}
.hero-title {
  font-size: 3rem;
  line-height: 1.08;
  margin: 0 0 16px;
}
.hero-dek {
  font-size: 1.25rem;
  color: #3a3a3a;
  font-style: italic;
  margin: 0 0 16px;
  max-width: 46em;
}
.btn {
  display: inline-block;
  font-family: var(--cormorant);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--dark-blue);
  color: #fff;
  padding: 8px 18px;
  border-radius: 2px;
}
.btn:hover {
  color: #fff;
  text-decoration: none;
}

/* Card grid (older articles / section list) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 40px 32px;
  margin-bottom: 32px;
}
.card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.card-content {
  flex: 1;
  min-width: 0;
}
.card-image {
  flex: 0 0 25%;
  margin-bottom: 0;
  min-width: 300px;
}
.card-image img {
  aspect-ratio: 3 / 2;
}
.card-title {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 8px;
}
.dek {
  font-size: 0.95rem;
  color: #444;
  margin: 0 0 8px;
}
.older-articles {
  padding-bottom: 56px;
}
.see-all {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 24px;
}

/* Category list */
.category-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0 0 60px;
}
.category-list li {
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.category-list li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.category-list a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px;
  font-family: var(--cormorant);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
}
.category-list .count {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
}

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumbs a:hover {
  color: var(--accent-hover);
}
.breadcrumbs .sep {
  margin: 0 6px;
}
.breadcrumbs .current {
  color: var(--ink);
}

/* Article detail */
.page-title {
  font-size: 2.2rem;
  padding-bottom: 24px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--rule);
}

.article {
  padding: 32px 24px;
}

.article-header {
  margin-bottom: 36px;
}

.article-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 18px;
}

.article-dek {
  font-size: 1.3rem;
  font-style: italic;
  color: #3a3a3a;
  margin: 0 0 18px;
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.75;
  max-width: 42em;
}

.article-body p {
  margin: 0 0 1.4em;
}

.article-body h2 {
  font-size: 2rem;
  margin: 1.8em 0 0.6em;
}

.article-body blockquote {
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}
.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body figure {
  margin: 1.8em 0;
}
.article-body img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  height: auto;
  border-radius: 2px;
  margin: 1.8em auto;
}
.article-body figure img {
  margin: 0 auto;
}
.article-body figcaption {
  margin-top: 0.6em;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.audio-embed-title {
  font-family: var(--cormorant);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 10px;
}
.audio-embed audio {
  width: 100%;
}

/* Related articles carousel */
.carousel-section {
  margin: 48px 0 56px;
}
.carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.carousel .card {
  flex: 0 0 240px;
  flex-direction: column;
  scroll-snap-align: start;
}
.carousel .card-image {
  flex: none;
  width: 100%;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 32px 0 60px;
  margin: 0;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.pagination .page-item:not(.disabled):not(.active) .page-link:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.pagination .page-item.active .page-link {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.pagination .page-item.disabled .page-link {
  border-color: var(--rule);
  color: var(--rule);
  text-decoration: none;
}

/* Footer */
.site-footer {
  font-size: 0.78rem;
  color: white;
  background-color: var(--dark-blue);
  flex-shrink: 0;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-group {
  display: flex;
  gap: 4rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.85rem;
  align-items: flex-end;
}
.footer-nav a {
  color: inherit;
  opacity: 0.85;
}
.footer-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .site-header-inner,
  .site-footer-inner {
    flex-direction: column;
    row-gap: 12px;
  }

  .header-logo,
  .footer-logo {
    height: 40px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2rem;
  }
  .article-title {
    font-size: 1.9rem;
  }
  .card {
    flex-direction: column;
  }
  .card-image {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }
  .carousel .card {
    flex: 0 0 200px;
  }
  .footer-logo {
    display: none;
  }
}

