/* ==========================================================================
   My Teaching Journey — Warm Botanical
   Reading. Thinking. Teaching. Growing.
   ========================================================================== */

:root {
  --bg: #f7f1e3;
  --ink: #33523b;
  --ink-soft: #3c3b33;
  --muted: #7a7263;
  --green-pale: #dfe8d2;
  --green-footer: #3f5f3a;
  --card: #f9f3e5;
  --line: #e4dac2;
  --cream: #f7f1e3;

  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia,
    "Songti SC", "Noto Serif SC", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  --gutter: clamp(20px, 4.44vw, 64px);
  --max: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --------------------------------------------------------------- header --- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 22px;
  flex-wrap: wrap;
}

.brand__name {
  margin: 0;
  font-size: clamp(30px, 2.85vw, 41px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: var(--ink);
}

.brand__tagline {
  margin: 4px 0 0;
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--muted);
}

.header-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.lang {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.lang span {
  margin: 0 5px;
}

.lang a.is-active {
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 36px);
  font-size: clamp(16px, 1.35vw, 19px);
}

.nav a {
  position: relative;
  padding-bottom: 6px;
  color: var(--ink);
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 0.62;
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ink);
}

/* ----------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  min-height: clamp(320px, 32vw, 460px);
  display: flex;
  align-items: center;
  background: var(--cream);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
}

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

.hero__text {
  position: relative;
  z-index: 1;
  width: 42%;
  margin: 0;
  padding: clamp(36px, 3vw, 44px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

/* --- full-bleed hero (home) --- */

.hero--full {
  min-height: clamp(340px, 38.4vw, 553px);
}

.hero--full .hero__media {
  width: 100%;
}

.hero--full .hero__media img {
  object-fit: contain;
  object-position: right bottom;
}

.hero__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(247, 241, 227, 0.98) 0%,
    rgba(247, 241, 227, 0.95) 26%,
    rgba(247, 241, 227, 0.6) 36%,
    rgba(247, 241, 227, 0.2) 46%,
    rgba(247, 241, 227, 0) 54%);
}

.hero--full .hero__text {
  width: 55%;
  max-width: var(--max);
  margin: 0;
}

.hero__title {
  margin: 0;
  font-size: clamp(34px, 3.9vw, 56px);
  line-height: 1.18;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.hero__title span {
  display: block;
}

.hero__lede {
  margin: 0;
  max-width: 400px;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero__italic {
  margin: 0;
  font-style: italic;
  font-size: clamp(19px, 1.75vw, 25px);
  color: var(--ink);
}

/* section numbering */
.secnum {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.secsub {
  margin: 8px 0 16px;
  font-style: italic;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted);
}

/* closing */
.closing__inner {
  max-width: 760px;
}

.closing p {
  margin: 0 0 16px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
}

/* discovery quote */
.discovery {
  background: #fbf8ee;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(46px, 5vw, 76px) 0;
}

.discovery__inner {
  max-width: 800px;
}

.discovery__eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.discovery__title {
  margin: 0 0 28px;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 500;
  color: var(--ink);
}

.discovery__quote {
  position: relative;
  margin: 0 0 30px;
  padding-left: clamp(28px, 3vw, 44px);
  font-size: clamp(23px, 2.35vw, 33px);
  line-height: 1.42;
  font-style: italic;
  color: var(--ink);
}

.discovery__quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 8px;
  width: 2px;
  background: var(--green-pale);
}

.discovery__mark {
  display: none;
}

.discovery__quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.discovery__reflect {
  padding-left: clamp(28px, 3vw, 44px);
  max-width: 660px;
}

.discovery__reflect p {
  margin: 0 0 14px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.62;
  color: var(--ink-soft);
}

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

/* moments gallery */
.moments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
}

.moment {
  margin: 0;
}

.moment__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 16 / 9.6;
  overflow: hidden;
  background: #fbf8ee;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.moment__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}

.moment:hover .moment__media {
  border-color: var(--ink);
  box-shadow: 0 10px 26px rgba(51, 82, 59, .13);
  transform: translateY(-2px);
}

.moment:hover .moment__media img {
  transform: scale(1.035);
}

.moment__media:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.moment__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(51, 82, 59, .88);
  color: #f7f1e3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}

.moment:hover .moment__zoom,
.moment__media:focus-visible .moment__zoom {
  opacity: 1;
  transform: none;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 24px);
  padding: clamp(18px, 3vw, 56px);
  background: rgba(28, 38, 29, .78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox.is-open {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox__figure {
  margin: 0;
  max-width: min(1180px, 88vw);
  background: var(--cream);
  padding: clamp(10px, 1.2vw, 16px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}

.lightbox__figure img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.lightbox__figure figcaption {
  padding: 12px 4px 2px;
}

.lightbox__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.lightbox__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.lightbox__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  opacity: .8;
}

.lightbox__figure img {
  transition: opacity .25s ease;
}

.lightbox__figure.is-loading img {
  opacity: .35;
}

.lightbox__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 70ch;
}

.lightbox__close,
.lightbox__nav {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(247, 241, 227, .45);
  background: rgba(247, 241, 227, .1);
  color: #f7f1e3;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.lightbox__close {
  position: absolute;
  top: clamp(16px, 2.4vw, 30px);
  right: clamp(16px, 2.4vw, 30px);
  font-size: 24px;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(247, 241, 227, .24);
  border-color: rgba(247, 241, 227, .8);
}

@media (max-width: 700px) {
  .lightbox {
    flex-direction: column;
    gap: 14px;
    padding: 64px 16px 24px;
  }
  .lightbox__figure {
    max-width: 100%;
    padding: 8px;
  }
  .lightbox__figure img {
    max-height: 58vh;
  }
  .lightbox__nav {
    position: absolute;
    bottom: 20px;
    width: 44px;
    height: 44px;
  }
  .lightbox__nav--prev { left: calc(50% - 52px); }
  .lightbox__nav--next { right: calc(50% - 52px); }
  .lightbox__figure figcaption {
    padding: 10px 2px 44px;
  }
  .lightbox__text {
    font-size: 14px;
  }
}

.moment__media--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green-pale);
  border-color: transparent;
}

.moment__media--empty img {
  width: 34px;
  height: auto;
  opacity: .45;
}

.moment__media--empty span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .55;
}

.moment figcaption {
  padding: 12px 2px 0;
}

.moment__label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.moment__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* chapter reference that trails a caption */
.moment__chapter {
  display: inline-block;
  margin-left: 0.45em;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

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

/* leaf + rule decoration */
.deco {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 6px;
}

.deco img {
  width: clamp(46px, 5vw, 66px);
  height: auto;
  flex: none;
}

.deco__rule {
  height: 1px;
  width: clamp(120px, 16vw, 220px);
  background: var(--line);
}

/* ---------------------------------------------------------------- cards --- */

.section {
  border-top: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: clamp(24px, 2.2vw, 32px);
  padding-bottom: clamp(28px, 2.4vw, 36px);
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 20px;
  align-items: center;
  padding: 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(51, 82, 59, 0.07);
}

.card__title {
  margin: 0 0 8px;
  font-size: clamp(22px, 1.95vw, 29px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}

.card__text {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.card__link {
  font-size: 17px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.card__link:hover {
  border-color: var(--ink);
}

.card__media {
  width: 120px;
  height: 140px;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------- journal --- */

.entries {
  padding-top: clamp(24px, 2vw, 28px);
  padding-bottom: clamp(30px, 2.6vw, 38px);
}

.entries__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.entries__title {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 500;
  color: var(--ink);
}

.text-link {
  font-size: 17px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  white-space: nowrap;
}

.text-link:hover {
  border-color: var(--ink);
}

.entry-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 250px;
  gap: 36px;
  align-items: start;
}

.entry-row__media {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.entry-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-row h3 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.05vw, 31px);
  font-weight: 500;
  color: var(--ink);
}

.entry-row__meta {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.entry-row p {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.6;
}

.quote-card {
  background: var(--green-pale);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.quote-card p {
  margin: 0;
  font-style: italic;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.45;
  color: var(--ink);
}

.quote-card img {
  width: 46px;
  opacity: 0.9;
}

/* ---------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--green-footer);
  color: #eef1e2;
  text-align: center;
  padding: 30px var(--gutter) 26px;
}

.site-footer__quote {
  margin: 0 0 14px;
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 34px);
  color: #f3f2e4;
}

.site-footer__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
}

.site-footer__rule i {
  display: block;
  width: clamp(70px, 9vw, 129px);
  height: 1px;
  background: rgba(238, 241, 226, 0.42);
}

.site-footer__rule svg {
  width: 26px;
  height: 20px;
  fill: none;
  stroke: rgba(238, 241, 226, 0.85);
  stroke-width: 1.2;
}

.site-footer__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 241, 226, 0.7);
}

/* --------------------------------------------------------------- teaching --- */

.intro {
  padding-top: clamp(18px, 1.6vw, 22px);
  padding-bottom: clamp(18px, 1.6vw, 22px);
}

.intro p {
  margin: 0;
  max-width: 1180px;
  font-size: clamp(17px, 1.35vw, 19px);
  color: var(--ink-soft);
}

/* name note — footnote-style disclosure of the pseudonym */
.name-note {
  padding-bottom: clamp(24px, 2.4vw, 34px);
}

.name-note__inner {
  max-width: 720px;
}

.name-note__label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b957f;
  margin-bottom: 7px;
}

.name-note__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  font-style: italic;
  color: var(--muted);
}

/* compact variant — one quiet line, used on Journal and Home previews */
.name-note--compact {
  padding: 0;
  margin: 12px 0 0;
}

.name-note--compact .name-note__label {
  display: inline;
  margin: 0 7px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.name-note--compact .name-note__text {
  display: inline;
  font-size: 12.5px;
  line-height: 1.55;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding-top: 8px;
  padding-bottom: clamp(28px, 2.6vw, 38px);
}

.project {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(51, 82, 59, 0.08);
}

.project__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* for book-cover style images: show whole cover on white, no crop */
.project__media--fit {
  background: #fdfbf4;
}

.project__media--fit img {
  object-fit: contain;
}


.project__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  flex: 1;
}

.project__title {
  margin: 0;
  font-size: clamp(19px, 1.55vw, 23px);
  font-weight: 500;
  line-height: 1.28;
  color: var(--ink);
}

.project__age {
  margin: 2px 0 6px;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0.85;
}

/* --- learning journey (teaching overview) --- */

.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 26px 0 4px;
}

.journey__step {
  border-top: 1.5px solid #33523b;
  padding-top: 14px;
}

.journey__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.journey__title {
  margin: 8px 0 6px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.journey__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.journey__note {
  margin: 20px 0 0;
  font-size: 13.5px;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 760px) {
  .journey { grid-template-columns: 1fr; gap: 18px; }
}

/* --- teaching approach cards (teaching overview) --- */

.approach__sub {
  margin: 0 0 4px;
  font-style: italic;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--muted);
}

.approach-grid4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 0;
}

.approach-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px 24px 24px;
}

.approach-card__letter {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #33523b;
  opacity: 0.75;
}

.approach-card__title {
  margin: 10px 0 8px;
  font-size: clamp(18px, 1.4vw, 21px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.approach-card__desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .approach-grid4 { grid-template-columns: 1fr; gap: 14px; }
  .approach-card { padding: 20px 20px 22px; }
  .approach-card__desc { font-size: 15px; }
}

.project__hint {
  margin: 0;
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

.project__link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}

.project__link:hover {
  border-color: var(--ink);
}

/* non-clickable status label for projects without a page yet */
.project__note {
  margin-top: auto;
  padding-top: 8px;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  opacity: 0.9;
}

/* continuation of the intro copy below the About hero */
.about-intro {
  padding: clamp(30px, 3vw, 46px) 0 clamp(34px, 3.4vw, 52px);
}
.about-intro .wrap {
  max-width: 860px;
}
.about-intro p {
  margin: 0 0 14px;
  font-size: clamp(16.5px, 1.3vw, 18px);
  line-height: 1.78;
  color: var(--ink-soft);
}
.about-intro p:last-child {
  margin-bottom: 0;
}

.about-intro p.about-intro__key {
  margin: 26px 0 24px;
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.55;
  font-style: italic;
  color: #33523b;
}

/* contact form success message */
.contact-thanks {
  border-left: 2px solid var(--green-pale);
  padding-left: clamp(20px, 2vw, 30px);
}
.contact-thanks h3 {
  margin: 0 0 8px;
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.contact-thanks p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.band {
  position: relative;
  overflow: hidden;
  min-height: 240px;
}

.band {
  background: var(--green-pale);
}

.band__media {
  position: absolute;
  inset: 0;
}
.band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.band-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(14px, 1.6vw, 22px) var(--gutter) clamp(18px, 2.2vw, 30px);
  background: var(--cream);
}

.band-divider__line {
  flex: 1;
  height: 1.5px;
  background: #33523b;
  opacity: .5;
}

.band-divider img {
  width: clamp(36px, 3.4vw, 48px);
  height: auto;
  flex: none;
}

.band__wash {
  display: none;
}

.band__title {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 500;
  color: var(--ink);
}

.band__text p {
  margin: 0;
  max-width: 720px;
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-soft);
}

.band__text {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: clamp(26px, 2.6vw, 40px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

/* ---------------------------------------------------------------- journal page --- */

.journal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 3vw, 44px);
  padding-top: clamp(20px, 1.8vw, 26px);
  padding-bottom: clamp(30px, 2.6vw, 40px);
  align-items: start;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.filter {
  padding: 7px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.filter:hover {
  background: rgba(223, 232, 210, 0.5);
}

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #f7f1e3;
}

.post {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.post:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(223, 232, 210, 0.85);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}

.post h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  color: var(--ink);
}

.post__meta {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.post p {
  margin: 0 0 10px;
  font-size: 17px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.sidebar h4 {
  margin: 0 0 12px;
  font-size: clamp(24px, 2vw, 29px);
  font-weight: 500;
  color: var(--ink);
}

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

.side-list li {
  border-bottom: 1px solid var(--line);
}

.side-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 18px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.side-list a:hover {
  color: var(--ink);
}

.side-cta {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 24px 22px;
  text-align: center;
}

.side-cta p {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--ink);
}

.side-cta .deco {
  justify-content: center;
  margin: 8px 0 14px;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--ink);
  color: #f7f1e3;
  font-size: 17px;
  border-radius: 999px;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.86;
}

/* ---------------------------------------------------------------- contact --- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 60px);
  padding-top: clamp(20px, 2vw, 28px);
  padding-bottom: clamp(34px, 3vw, 48px);
  align-items: start;
}

.form {
  position: relative;
}

.form__sprig {
  position: absolute;
  left: -10px;
  bottom: -18px;
  width: clamp(130px, 12vw, 170px);
  height: auto;
  pointer-events: none;
}

.form h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 500;
  color: var(--ink);
}

.form .deco {
  margin: 0 0 22px;
  gap: 0;
}

.form .deco__rule {
  width: 78px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: #fbf8ee;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 17px;
  color: var(--ink-soft);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.form button {
  display: block;
  margin: 6px auto 0;
  padding: 13px 32px;
  background: var(--ink);
  color: #f7f1e3;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.form button:hover {
  opacity: 0.86;
}

.form__form-note {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.info-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.info-item svg {
  width: 26px;
  height: 26px;
  margin-top: 4px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
}

.info-item h3 {
  margin: 0 0 4px;
  font-size: clamp(20px, 1.75vw, 26px);
  font-weight: 500;
  color: var(--ink);
}

.info-item p {
  margin: 0;
  font-size: 17px;
}

.info-media {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.info-media img {
  width: 100%;
  height: auto;
}

.info-email {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 230px;
}

.info-email__media {
  position: absolute;
  inset: 0;
}

.info-email__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.info-email__text {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 22px;
}

.info-email__text .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(213, 222, 192, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-email__text .icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
}

.info-email__text h3 {
  margin: 0 0 4px;
  font-size: clamp(20px, 1.75vw, 26px);
  font-weight: 500;
  color: var(--ink);
}

.info-email__text p {
  margin: 0;
  font-size: 17px;
}

/* ---------------------------------------------------------------- responsive --- */

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .entry-row {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .entry-row .quote-card {
    grid-column: 1 / -1;
  }
  .journal-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 17px;
  }
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  .hero__media {
    position: relative;
    width: 100%;
    height: 240px;
    order: -1;
  }
  .hero--full .hero__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    order: 0;
  }
  .hero--full .hero__media img {
    object-fit: cover;
    object-position: center bottom;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero--full .hero__wash {
    background: rgba(247, 241, 227, 0.9);
  }
  .hero__text,
  .hero--full .hero__text {
    width: 100%;
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .hero__lede {
    max-width: 100%;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .band {
    grid-template-columns: 1fr;
  }
  .band__media {
    order: -1;
    height: 240px;
  }
  .contact-grid,
  .journal-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .post {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
  }
  .site-header__inner {
    align-items: center;
  }
  .header-nav {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero__text {
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .project-grid,
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
  .card__media {
    width: 100px;
    height: 116px;
  }
  .entry-row,
  .post {
    grid-template-columns: 1fr;
  }
  .post__media,
  .entry-row__media {
    max-width: 100%;
  }
  .nav {
    gap: 14px;
    font-size: 15px;
  }
  .entries__head {
    flex-direction: column;
    gap: 6px;
  }
}

/* ---------------------------------------------- content grids (responsive) --- */
/* fixed-width side columns used by the project and about pages; declared here
   so they can collapse to a single column on narrow screens instead of
   forcing horizontal page scroll. */

.approach-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

.about-top {
  grid-template-columns: 330px minmax(0, 1fr) 250px;
  gap: 44px;
  align-items: start;
}

.about-bottom {
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .about-top,
  .about-bottom {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
}

@media (max-width: 820px) {
  .approach-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* ------------------------------------------------------- project: ORT page --- */

.intro p + p {
  margin-top: 14px;
}

/* prose columns for the ORT text sections */
.ort-prose {
  max-width: 780px;
}

.ort-prose p {
  margin: 0 0 16px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7;
  color: var(--ink-soft);
}

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

/* gallery placeholder — replaced by the real photo grid once photographs arrive */
.gallery-reserved {
  margin-top: 8px;
  padding: clamp(44px, 6vw, 76px) 24px;
  background: #fbf8ee;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.gallery-reserved img {
  width: clamp(36px, 3.4vw, 48px);
  height: auto;
  opacity: 0.85;
}

.gallery-reserved__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b957f;
}

.gallery-reserved__text {
  margin: 0;
  max-width: 460px;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

/* closing emphasis line */
.closing__line {
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink);
  margin-top: 6px;
}

/* when the two sentences are stacked, each gets its own even line break */
.closing__line > span {
  display: block;
  text-wrap: balance;
}

/* lead-in lines before a blockquote */
.discovery__lead {
  margin: 0 0 14px;
  max-width: 660px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
}

/* translation of the quoted line, kept quieter than the original */
.discovery__quote-zh {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.8;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* numbered rows used by the reflection list */
.steps--closing {
  display: grid;
  gap: 18px;
  margin: 24px 0 0;
  padding: 0;
}

.step-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.step-row__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 5px;
}

.step-row strong {
  display: block;
  font-weight: 500;
}

.step-row > div > span {
  display: block;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------- journal article page --- */
.article-head {
  padding: clamp(42px, 5vw, 72px) 0 6px;
}

.article-eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.article-eyebrow a:hover {
  color: var(--ink);
}

.article-title {
  margin: 14px 0 0;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.2;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.2px;
  text-wrap: balance;
}

.article-cover {
  margin: clamp(26px, 3vw, 40px) 0 0;
}

.article-cover .wrap {
  max-width: 1040px;
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.article-body {
  padding: clamp(38px, 4.4vw, 62px) 0 clamp(56px, 6vw, 84px);
}

.article-body__inner {
  max-width: 700px;
}

.article-body__inner > p {
  margin: 0 0 18px;
  font-size: clamp(16.5px, 1.3vw, 18px);
  line-height: 1.78;
  color: var(--ink-soft);
}

.article-body__inner > p > em {
  font-style: italic;
}

.article-body__inner h2 {
  margin: clamp(34px, 3.6vw, 48px) 0 18px;
  font-size: clamp(23px, 2.1vw, 29px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.article-quote {
  margin: 26px 0 26px;
  padding-left: clamp(24px, 2.6vw, 36px);
  border-left: 2px solid var(--green-pale);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}

@media (max-width: 640px) {
  .article-cover .wrap {
    max-width: 100%;
  }
}

/* ORT gallery — 4:3 media boxes to suit the reading photographs */
.moments--ort .moment__media {
  aspect-ratio: 4 / 3;
}

/* ------------------------------------------------- Chinese edition (lang-zh) --- */
/* Latin set in EB Garamond, Chinese falls through to Noto Serif SC.
   Chinese has no true italic, so the italic accents of the English layout
   become letter-spaced upright text instead. */

body.lang-zh {
  font-family: "EB Garamond", "Noto Serif SC", "Songti SC", "STSong", serif;
}

body.lang-zh .hero__italic,
body.lang-zh .secsub,
body.lang-zh .name-note__text,
body.lang-zh .closing__line,
body.lang-zh .moment__text em {
  font-style: normal;
}

body.lang-zh .hero__italic {
  letter-spacing: 0.08em;
}

body.lang-zh .hero__title,
body.lang-zh .entries__title {
  letter-spacing: 0.02em;
}

body.lang-zh .entries__title {
  line-height: 1.35;
}

body.lang-zh .intro p {
  line-height: 1.95;
  letter-spacing: 0.015em;
}

body.lang-zh .ort-prose p {
  font-size: clamp(16px, 1.22vw, 17px);
  line-height: 2;
  margin-bottom: 18px;
  letter-spacing: 0.015em;
}

body.lang-zh .closing p {
  line-height: 2;
  letter-spacing: 0.015em;
}

body.lang-zh .moment__text,
body.lang-zh .name-note__text,
body.lang-zh .steps span,
body.lang-zh .brand__tagline {
  letter-spacing: 0.02em;
}

@media (max-width: 700px) {
  body.lang-zh .intro p,
  body.lang-zh .ort-prose p,
  body.lang-zh .closing p {
    line-height: 1.95;
  }
}

/* Chinese hero text — a wider measure so a short statement stays on one line */
body.lang-zh .hero__lede {
  max-width: min(100%, 560px);
}

/* ------------------------------------------------- CJK line breaking --- */
/* Chinese has no spaces, so a line can end with a single stray character
   and the closing 。 or 点 drops to the next line — it reads as detached.
   `text-wrap: balance` even out short statements (so 19 characters become
   one line, or two even ones instead of 18 + 1), and `text-wrap: pretty`
   discourages a lonely last character in running paragraphs.
   Lines still break normally when there is genuinely not enough room. */

body.lang-zh {
  line-break: strict;
  word-break: normal;
  overflow-wrap: normal;
}

body.lang-zh p,
body.lang-zh li,
body.lang-zh .intro p,
body.lang-zh .ort-prose p,
body.lang-zh .closing p {
  text-wrap: balance;
}

body.lang-zh .hero__lede,
body.lang-zh .hero__italic,
body.lang-zh .secsub,
body.lang-zh .name-note__text,
body.lang-zh .closing__line,
body.lang-zh .moment__text,
body.lang-zh .steps span,
body.lang-zh .site-footer__quote,
body.lang-zh .entries__title,
body.lang-zh .lightbox__text {
  text-wrap: balance;
}

/* Chinese copy that lives inside the English pages */
p[lang="zh-CN"],
h3[lang="zh-CN"],
p[lang="zh-Hans"],
h3[lang="zh-Hans"] {
  text-wrap: balance;
  line-break: strict;
}

/* Journal article, Chinese edition */
body.lang-zh .article-title {
  letter-spacing: 0.02em;
}
body.lang-zh .article-body__inner > p {
  line-height: 2;
  letter-spacing: 0.015em;
}
body.lang-zh .article-body__inner > p > em,
body.lang-zh .article-quote {
  font-style: normal;
}
body.lang-zh .article-quote {
  letter-spacing: 0.04em;
}

/* emphasised standalone quotation — larger and bolder */
.article-body__inner .article-quote--big,
.article-quote--big {
  font-size: clamp(25px, 2.5vw, 33px);
  font-weight: 600;
  margin: 32px 0;
  line-height: 1.45;
}


/* Journal article — small artwork cover (constrained, centred) */
.article-cover--art .wrap {
  display: flex;
  justify-content: center;
}
.article-cover--art img {
  width: auto;
  max-width: min(520px, 100%);
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 3px;
}

/* photograph cover — same centred layout, no white print frame */
.article-cover--art.article-cover--bare img {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* Journal article — embedded video */
.article-video {
  margin: clamp(26px, 3vw, 40px) 0;
}
.article-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ece6d6;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-video__frame iframe,
.article-video__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  object-fit: contain;
}

/* portrait (vertical phone) video — keep the original 9:16 aspect */
.article-video__frame--portrait {
  aspect-ratio: 9 / 16;
  max-width: min(100%, 420px);
  margin: 0 auto;
  background: #1c1c1a;
}
.article-video__placeholder {
  padding: 12px 20px;
  text-align: center;
  color: var(--muted);
}
.article-video__placeholder svg {
  width: 44px;
  height: 44px;
  display: block;
  margin: 0 auto 10px;
  fill: none;
  stroke: #33523b;
  stroke-width: 1.3;
  opacity: 0.75;
}
.article-video__placeholder p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.article-video__placeholder span {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.article-video__caption {
  margin: 12px 0 0;
  text-align: center;
  font-style: italic;
  font-size: 14.5px;
  color: var(--muted);
}
.article-video__credit {
  margin: 6px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  opacity: 0.85;
}

@media (min-width: 760px) {
  .article-body__inner .article-video {
    width: min(88vw, 900px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Journal article — inline figure inside the body */
.article-inline,
.article-body__inner figure {
  position: relative;
  margin: clamp(26px, 3vw, 40px) 0;
}
.article-inline img,
.article-body__inner figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 3px;
}
.article-inline figcaption,
.article-body__inner figure figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  font-style: italic;
}
body.lang-zh .article-inline figcaption,
body.lang-zh .article-body__inner figure figcaption {
  font-style: normal;
  letter-spacing: 0.03em;
}

/* Journal article — small section heading inside the body */
.article-sub {
  margin: clamp(30px, 3.4vw, 44px) 0 -4px;
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 500;
  color: var(--ink);
}
/* larger subsection headings inside teaching project pages (ort-prose) */
.ort-prose .article-sub {
  font-size: clamp(21px, 1.8vw, 25px);
  font-weight: 500;
}
body.lang-zh .article-sub {
  letter-spacing: 0.03em;
}

/* Journal article — lists inside the body */
.article-body__inner ul,
.article-body__inner ol {
  margin: 0 0 20px;
  padding-left: 26px;
}
.article-body__inner li {
  font-size: clamp(16.5px, 1.3vw, 18px);
  line-height: 1.78;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.article-body__inner li > strong {
  color: var(--ink);
  font-weight: 500;
}
body.lang-zh .article-body__inner li {
  line-height: 2;
  letter-spacing: 0.015em;
}

/* ------------------------------------------------- Journal article illustrations --- */
/* Inline figures break out to ~85-90% of the article content width on desktop,
   keep their aspect ratio, and open in a centred lightbox on click. */

.article-inline,
.article-body__inner figure {
  margin: clamp(30px, 3.2vw, 44px) 0;
  cursor: zoom-in;
}

@media (min-width: 760px) {
  .article-body__inner .article-inline,
  .article-body__inner figure {
    width: min(88vw, 900px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  /* portrait inline illustration — keep it modest on desktop */
  .article-body__inner .article-inline--portrait,
  .article-inline--portrait {
    width: min(88vw, 440px);
    left: 50%;
    transform: translateX(-50%);
  }
}

.article-inline img,
.article-body__inner figure img {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (hover: hover) {
  .article-inline:hover img,
  .article-body__inner figure:hover img {
    transform: scale(1.012);
    box-shadow: 0 12px 34px rgba(51, 82, 59, 0.16);
  }
  .article-inline::after,
  .article-body__inner figure::after {
    opacity: 1;
  }
}

/* zoom indicator badge (top-right of the illustration) */
.article-inline::after,
.article-body__inner figure::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(251, 248, 238, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333523b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Cpath d='M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(24, 23, 20, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox__img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}
.lightbox.is-open .lightbox__img {
  transform: scale(1);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox__caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 86vw;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  text-align: center;
  font-style: italic;
}
body.lightbox-open {
  overflow: hidden;
}

/* Journal article — category in the eyebrow, book kept as a linked-title note */
.article-book {
  margin: 10px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
body.lang-zh .article-book {
  font-family: "EB Garamond", "Noto Serif SC", serif;
  font-size: 13.5px;
  text-transform: none;
  letter-spacing: 0.06em;
}

/* Journal category filtering */
.journal-empty {
  margin: 8px 0 0;
  padding: 26px 0;
  text-align: center;
  font-size: 16.5px;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--line);
}
body.lang-zh .journal-empty {
  font-style: normal;
  letter-spacing: 0.03em;
}
.side-list a.is-active {
  color: var(--ink);
  font-weight: 500;
}
.side-list a.is-active span {
  color: var(--ink);
}
