/* Theravada Foundation: site stylesheet ("Dawn in the deer park").
   Home: a full-bleed dawn photograph that dissolves into rice paper,
   then a quiet, left-aligned editorial column on a 12-part grid.
   Inner pages: the same paper, type and spacing under a dawn-tinted page head. */

:root {
  /* Colour */
  --paper: #f6efe2;         /* rice paper, the page ground */
  --paper-rgb: 246, 239, 226;
  --paper-light: #fbf7ee;   /* raised surfaces */
  --mist: #ebe4d4;          /* fog, quiet fills */
  --dawn: #f8e1c4;          /* peach sky */
  --ink: #2a2319;           /* warm near-black */
  --ink-soft: #5d5343;
  --ink-faint: #8b8170;
  --bronze: #86663a;        /* the statues */
  --bronze-deep: #5c4525;
  --gold: #b88a3d;          /* sunlit accents */
  --gold-pale: #e2c38a;
  --olive: #5e6a3d;         /* leaves */
  --olive-deep: #2f3521;    /* shade under the tree */
  --rule: rgba(134, 102, 58, .26);

  /* Type */
  --display: "Cormorant", "Cormorant Garamond", "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --label: "Jost", "Avenir Next", Avenir, "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --cjk: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "SimSun", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Space */
  --gutter: max(1.25rem, 6vw);
  --page: max(var(--gutter), calc((100vw - 1400px) / 2));
  --ease: cubic-bezier(.2, .65, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
/* The wheel fills its box to the edge; do not let pixel rounding shave the rim. */
.mark, .statement__wheel, .footer__wheel { overflow: visible; }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--gold-pale); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 2px;
}

.nowrap { white-space: nowrap; }
[lang="zh-Hans"] { font-family: var(--cjk); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--label);
  font-size: .8rem;
  letter-spacing: .08em;
  text-decoration: none;
  border-radius: 4px;
}
.skip:focus { top: 1rem; }

/* ---------- Shared small type ---------- */

.eyebrow,
.card__meta,
.entry__kind,
.entry__flag,
.note__meta,
.pagehead__eyebrow,
.article__meta,
.statement__note,
.footer__base,
.btn,
.link,
.masthead__nav a {
  font-family: var(--label);
  font-weight: 500;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1.05em 1.75em 1em;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 999px;
  transition: background-color .4s var(--ease), transform .4s var(--ease);
}
.btn::after { content: "\2193"; font-size: 1.15em; letter-spacing: 0; line-height: 1; transition: transform .4s var(--ease); }
.btn:hover { background: var(--bronze-deep); }
.btn:hover::after { transform: translateY(3px); }

.link {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  color: var(--ink);
  text-decoration: none;
  padding-block: .5em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: color .3s var(--ease), background-size .5s var(--ease);
}
.link::after { content: "\2192"; font-size: 1.15em; letter-spacing: 0; line-height: 1; transition: transform .4s var(--ease); }
.link:hover { color: var(--bronze-deep); }
.link:hover::after { transform: translateX(4px); }

/* ---------- Masthead ---------- */

.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--gutter) 0;
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  color: var(--bronze-deep);
  text-decoration: none;
}
.mark { width: 6.4rem; height: auto; aspect-ratio: 180 / 64; }
.masthead__name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  padding: .3rem;
  border-radius: 999px;
  background: rgba(251, 246, 236, .66);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 1px 24px rgba(60, 44, 16, .10);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}
.masthead__nav a {
  padding: .72em 1.25em .68em;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.masthead__nav a:hover { background: rgba(42, 35, 25, .08); }
.masthead__nav a[aria-current="page"] { background: rgba(42, 35, 25, .1); color: var(--bronze-deep); }

/* ---------- Hero: stacked layout (phones and narrow tablets) ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 18% 0%, rgba(255, 221, 170, .55), rgba(255, 221, 170, 0) 60%),
    linear-gradient(180deg, var(--dawn) 0%, #f7ead6 40%, var(--paper) 74%);
}

.hero__copy {
  order: 1;
  position: relative;
  z-index: 2;
  padding: 7.25rem var(--gutter) 0;
}

.hero__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.2rem, 15.4vw, 6.4rem);
  line-height: .9;
  letter-spacing: -.012em;
  color: var(--ink);
}
.hero__title .line { display: block; }
.hero__title .line > span { display: inline-block; }
.hero__title .line + .line { font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--bronze-deep); }

.hero__lede {
  margin-top: 1.5rem;
  max-width: 24em;
  font-size: 1.22rem;
  line-height: 1.5;
  color: #3a3124;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.6rem;
  margin-top: 1.7rem;
}

.hero__media {
  order: 2;
  position: relative;
  z-index: 1;
  margin-top: 1.25rem;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.5) 9%, #000 24%, #000 80%, rgba(0,0,0,.45) 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.5) 9%, #000 24%, #000 80%, rgba(0,0,0,.45) 92%, transparent 100%);
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 81% 50%;
}

.hero__veil, .hero__fog, .hero__fade { display: none; }

@media (min-width: 600px) {
  .hero__media { aspect-ratio: 16 / 9; }
  .hero__img { object-position: 50% 50%; }
}

/* ---------- Hero: full-bleed layout (desktop) ----------
   The hero never grows taller than the photograph at full width, so the
   picture is never cropped at the sides and the title, set in vw units and
   measured from the vertical centre, always sits in the bright mist on the
   left: under the sun, clear of the tree and of the first listener. */

@media (min-width: 1000px) {
  .hero {
    display: block;
    height: min(100svh, 56.25vw);
    min-height: 32.5rem;
    overflow: hidden;
    isolation: isolate;
    background: var(--dawn);
  }

  .hero__media {
    position: absolute;
    inset: 0;
    margin: 0;
    aspect-ratio: auto;
    -webkit-mask-image: none;
    mask-image: none;
    will-change: transform;
  }

  .hero__veil {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      radial-gradient(ellipse 31vw 21vw at 15vw calc(50% + 5vw), rgba(252, 243, 226, .92) 0%, rgba(252, 243, 226, .82) 46%, rgba(252, 243, 226, 0) 100%),
      linear-gradient(90deg, rgba(252, 243, 226, .46) 0%, rgba(252, 243, 226, .2) 20vw, rgba(252, 243, 226, 0) 40vw);
  }

  .hero__fog {
    display: block;
    position: absolute;
    left: -12%;
    right: -12%;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
  }
  .hero__fog::before {
    content: "";
    position: absolute;
    inset: 0;
    will-change: transform;
  }
  .hero__fog--far { bottom: 3vw; height: 15vw; }
  .hero__fog--far::before {
    background:
      radial-gradient(ellipse 24% 46% at 16% 58%, rgba(253, 246, 232, .5), rgba(253, 246, 232, 0) 72%),
      radial-gradient(ellipse 28% 40% at 55% 66%, rgba(253, 246, 232, .32), rgba(253, 246, 232, 0) 72%),
      radial-gradient(ellipse 22% 44% at 90% 56%, rgba(253, 246, 232, .42), rgba(253, 246, 232, 0) 72%);
    animation: drift-a 52s ease-in-out infinite alternate;
  }
  .hero__fog--near { bottom: -3vw; height: 14vw; }
  .hero__fog--near::before {
    background:
      radial-gradient(ellipse 30% 52% at 30% 62%, rgba(var(--paper-rgb), .62), rgba(var(--paper-rgb), 0) 72%),
      radial-gradient(ellipse 26% 48% at 72% 68%, rgba(var(--paper-rgb), .55), rgba(var(--paper-rgb), 0) 72%),
      radial-gradient(ellipse 18% 40% at 4% 70%, rgba(var(--paper-rgb), .5), rgba(var(--paper-rgb), 0) 72%);
    animation: drift-b 38s ease-in-out infinite alternate;
  }

  .hero__fade {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 14vw;
    z-index: 3;
    background: linear-gradient(
      to bottom,
      rgba(var(--paper-rgb), 0) 0%,
      rgba(var(--paper-rgb), .06) 14%,
      rgba(var(--paper-rgb), .2) 30%,
      rgba(var(--paper-rgb), .42) 46%,
      rgba(var(--paper-rgb), .66) 62%,
      rgba(var(--paper-rgb), .85) 78%,
      rgba(var(--paper-rgb), .96) 91%,
      var(--paper) 100%
    );
  }

  .hero__copy {
    position: absolute;
    z-index: 4;
    left: var(--gutter);
    top: calc(50% - 11.7vw);
    width: 30vw;
    padding: 0;
  }
  .hero__title { font-size: 6.35vw; }
  .hero__lede {
    margin-top: 1.7vw;
    max-width: 25.5vw;
    font-size: clamp(1.02rem, 1.44vw, 1.75rem);
    line-height: 1.46;
  }
  .hero__actions { margin-top: 1.9vw; gap: .9rem 1.9vw; }
  .hero .btn, .hero .link { font-size: clamp(.68rem, .82vw, .95rem); }

  .masthead { padding-top: 1.9vw; }
  .mark { width: clamp(6.4rem, 7.6vw, 9rem); }
}

@keyframes drift-a {
  from { transform: translate3d(-2.5%, 0, 0); }
  to   { transform: translate3d(3%, -4%, 0); }
}
@keyframes drift-b {
  from { transform: translate3d(3%, 2%, 0); }
  to   { transform: translate3d(-3.5%, -3%, 0); }
}

/* ---------- Statement ---------- */

.statement {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: clamp(3.2rem, 6vw, 5.5rem) var(--page) clamp(4.5rem, 9vw, 8.5rem);
  text-align: center;
}
@media (min-width: 1000px) {
  .statement { padding-top: 2vw; }
}
.statement__wheel { width: 2.5rem; height: 2.5rem; color: var(--gold); }
.statement__quote { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; margin: 0; }
.statement__text { margin: 0; }
.statement__text p { margin: 0; }
.statement__text p::before { content: "\201C"; }
.statement__text p::after { content: "\201D"; }
.statement__text {
  max-width: 23em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 3.3rem);
  line-height: 1.26;
  letter-spacing: -.005em;
  text-wrap: balance;
}
.statement__note { color: var(--ink-faint); line-height: 1.9; font-family: var(--text); font-size: .88rem; letter-spacing: .17em; }
.statement__note span { display: block; }
.statement__note a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; transition: color .3s var(--ease); }
.statement__note a:hover { color: var(--bronze-deep); }

/* ---------- Sections ---------- */

.section { padding: 0 var(--page) clamp(5rem, 10vw, 9.5rem); }

.section__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: .9rem;
  align-items: end;
  padding-top: 1.6rem;
  margin-bottom: clamp(2.2rem, 4.5vw, 4rem);
  border-top: 1px solid var(--rule);
}
.eyebrow { grid-column: 1 / -1; color: var(--bronze); }
.section__title {
  grid-column: 1 / span 7;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 4.9rem);
  line-height: 1;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.section__intro {
  grid-column: 9 / -1;
  max-width: 26em;
  padding-bottom: .5rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.5;
}

/* ---------- Projects ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.75rem, 4.5vw, 4rem) clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

/* A project card is a plate with a caption. The whole card is one link:
   the title's anchor is stretched over the card with ::after. */
.card { position: relative; display: flex; flex-direction: column; gap: 1.6rem; min-width: 0; }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; }

.card__meta { display: flex; align-items: center; gap: 1.1em; color: var(--ink-faint); }
.status { display: inline-flex; align-items: center; gap: .7em; color: var(--bronze); }
.status::before { content: ""; width: .58em; height: .58em; border-radius: 50%; border: 1px solid currentColor; }
.status--live { color: var(--olive); margin-left: .3em; }
.status--live::before { background: currentColor; box-shadow: 0 0 0 .28em rgba(94, 106, 61, .16); }

.card__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 2.7vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.008em;
  text-wrap: balance;
}
.card__title a,
.note__title a {
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease), color .3s var(--ease);
}
.card__title a::after,
.note__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 3px; }
.card__title a:focus-visible,
.note__title a:focus-visible { outline: none; }
.card__title a:focus-visible::after,
.note__title a:focus-visible::after { outline: 2px solid var(--bronze); outline-offset: 6px; }
.card:hover .card__title a,
.note:hover .note__title a { color: var(--bronze-deep); background-size: 100% 1px; }
.card__zh { margin-top: -.45rem; font-size: 1.02rem; letter-spacing: .14em; color: var(--bronze); }
.card__text { max-width: 33em; color: #40372a; }

/* The plate at the head of a project: a photograph, or a sheet of paper with
   dawn light rising from its foot and one line drawing. Always 3:2, so a
   picture file can be swapped without touching the layout. */
.plate {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 3px;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.plate--photo {
  background: var(--dawn);
  box-shadow: 0 30px 60px -38px rgba(74, 52, 16, .55);
}
.plate--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease);
}
.card:hover .plate--photo img { transform: scale(1.025); }
.plate--glyph {
  border: 1px solid var(--rule);
  background:
    radial-gradient(75% 90% at 50% 112%, rgba(248, 225, 196, .95), rgba(248, 225, 196, 0) 72%),
    var(--paper-light);
}
.card:hover .plate--glyph {
  border-color: rgba(134, 102, 58, .5);
  box-shadow: 0 24px 48px -34px rgba(74, 52, 16, .5);
}
.plate__disc {
  display: grid;
  place-items: center;
  width: 41%;
  aspect-ratio: 1;
  border: 1px solid rgba(134, 102, 58, .42);
  border-radius: 50%;
  background: rgba(255, 255, 255, .38);
  color: var(--bronze);
}
.plate__disc svg { width: 46%; height: auto; }

/* ---------- Writing ---------- */

.entries { border-bottom: 1px solid var(--rule); }
.entry {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 9fr) auto;
  column-gap: 1.5rem;
  align-items: baseline;
  padding: clamp(1.5rem, 2.6vw, 2.3rem) 0;
  border-top: 1px solid var(--rule);
}
.entry__kind { color: var(--bronze); }
.entry__main { display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.entry__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.008em;
  text-wrap: balance;
}
.entry__title a {
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease), color .3s var(--ease);
}
.entry__title a:hover { color: var(--bronze-deep); background-size: 100% 1px; }
.entry__dek { max-width: 36em; color: var(--ink-soft); }
.entry__flag { color: var(--ink-faint); font-size: .66rem; white-space: nowrap; }
.section__more { margin-top: clamp(1.6rem, 3vw, 2.4rem); }

/* Writing cards (the /writing index) */
.note {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  min-height: 17rem;
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  background: var(--paper-light);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.note:hover {
  border-color: rgba(134, 102, 58, .5);
  box-shadow: 0 24px 48px -34px rgba(74, 52, 16, .5);
}
.note__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4em 1.1em; color: var(--bronze); }
.note__meta > * + * { color: var(--ink-faint); }
.note__meta > * + *::before,
.article__meta > * + *::before { content: ""; display: inline-block; width: 1.6em; height: 1px; margin-right: 1.1em; vertical-align: .32em; background: currentColor; opacity: .6; }
.note__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.85rem, 2.5vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.008em;
  text-wrap: balance;
}
.note__text { max-width: 33em; color: #40372a; }
.note__more { margin-top: auto; padding-top: .6rem; }

/* ---------- Inner pages ---------- */

.pagehead {
  padding: clamp(8.5rem, 13vw, 12.5rem) var(--page) clamp(2.6rem, 5vw, 4.5rem);
  background:
    radial-gradient(110% 85% at 14% 0%, rgba(255, 221, 170, .5), rgba(255, 221, 170, 0) 62%),
    linear-gradient(180deg, var(--dawn) 0%, #f7ead6 36%, var(--paper) 100%);
}
.pagehead__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.pagehead__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1.1em; color: var(--bronze); }
.pagehead__eyebrow a { text-decoration: none; transition: color .3s var(--ease); }
.pagehead__eyebrow a:hover { color: var(--ink); }
.pagehead__eyebrow a::before { content: "\2190"; margin-right: .6em; font-size: 1.15em; letter-spacing: 0; }
.pagehead__title {
  max-width: 17em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
  line-height: 1;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.pagehead__zh { margin-top: -.2rem; font-size: 1.15rem; letter-spacing: .14em; color: var(--bronze); }
.pagehead__lede {
  max-width: 31em;
  margin-top: .35rem;
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 1.6vw, 1.42rem);
  line-height: 1.5;
}

.section--list { padding-top: clamp(.5rem, 1.5vw, 1.5rem); }

/* A project page: the text beside its plate */
.project {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* An article: a narrow margin of facts, then the reading column */
.article {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 9fr);
  column-gap: 1.5rem;
  align-items: start;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
.article__meta { display: flex; flex-direction: column; gap: .6rem; padding-top: .55rem; color: var(--ink-faint); line-height: 1.5; }
.article__meta > :first-child { color: var(--bronze); }
.article__meta > * + *::before { display: none; }

/* ---------- Prose (Markdown bodies) ---------- */

.prose { max-width: 33em; font-size: 1.25rem; line-height: 1.65; color: #332b20; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
.prose h2 { margin-top: 2.1em; font-weight: 500; font-size: clamp(1.9rem, 2.7vw, 2.35rem); line-height: 1.12; letter-spacing: -.008em; }
.prose h3 { margin-top: 1.8em; font-weight: 600; font-size: 1.55rem; line-height: 1.2; }
.prose h4 { margin: 1.8em 0 0; font-family: var(--label); font-weight: 500; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .65em; }
.prose a { color: var(--bronze-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .3s var(--ease); }
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li, .prose li > ul, .prose li > ol { margin-top: .4em; }
.prose li::marker { color: var(--bronze); }
.prose blockquote {
  margin-inline: 0;
  padding: .1em 0 .1em 1.3em;
  border-left: 2px solid var(--gold-pale);
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.22em;
  line-height: 1.38;
  color: var(--ink);
}
.prose blockquote > * + * { margin-top: .7em; }
.prose code {
  padding: .12em .36em;
  border-radius: 3px;
  background: rgba(134, 102, 58, .11);
  font-family: var(--mono);
  font-size: .78em;
  font-variant-ligatures: none;
}
.prose pre {
  overflow-x: auto;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper-light) !important;
  font-family: var(--mono);
  font-size: .9rem;
  line-height: 1.6;
  tab-size: 2;
  -webkit-text-size-adjust: 100%;
}
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--rule); }
.prose img { height: auto; border-radius: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92em; }
.prose th, .prose td { padding: .5em .8em .5em 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-family: var(--label); font-weight: 500; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(184, 138, 61, .2), rgba(184, 138, 61, 0) 60%),
    var(--olive-deep);
  color: #efe6d2;
}
.footer__wheel {
  position: absolute;
  right: -9vw;
  top: 50%;
  width: min(46rem, 62vw);
  height: auto;
  aspect-ratio: 1;
  color: var(--gold-pale);
  opacity: .075;
  transform: translateY(-50%);
  animation: turn 420s linear infinite;
}
@keyframes turn {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}
.footer__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(4rem, 8vw, 7rem) var(--page) 2rem;
}
.footer__mark { width: 7.5rem; color: var(--gold-pale); margin-bottom: 2.4rem; }
.footer__pali {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.3rem, 5.6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #f5ead2;
  text-wrap: balance;
}
.footer__gloss {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1rem;
  margin-top: 1.3rem;
  font-size: 1.2rem;
  color: rgba(239, 230, 210, .78);
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  align-self: stretch;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 195, 138, .22);
  color: rgba(239, 230, 210, .62);
  font-size: .68rem;
  line-height: 1.9;
}
.footer__base nav { display: flex; flex-wrap: wrap; gap: .4rem 2em; }
.footer__base a { text-decoration: none; transition: color .3s var(--ease); }
.footer__base a:hover { color: var(--gold-pale); }
.footer :focus-visible { outline-color: var(--gold-pale); }

/* ---------- Narrow screens ---------- */

@media (max-width: 899px) {
  .section__title { grid-column: 1 / -1; }
  .section__intro { grid-column: 1 / -1; padding-bottom: 0; }
  .entry { grid-template-columns: minmax(0, 1fr) auto; row-gap: .9rem; }
  .entry__kind { grid-column: 1; grid-row: 1; align-self: center; }
  .entry__flag { grid-column: 2; grid-row: 1; }
  .entry__main { grid-column: 1 / -1; grid-row: 2; }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project .plate { order: -1; max-width: 34rem; }
  .article { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
  .article__meta { flex-direction: row; flex-wrap: wrap; gap: .4em 1.1em; padding-top: 0; }
  .article__meta > * + *::before { display: inline-block; }
}

@media (max-width: 699px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .note { min-height: 0; }
}

@media (max-width: 599px) {
  body { font-size: 1.125rem; }
  .masthead { padding-top: 1.1rem; }
  .mark { width: 5.4rem; }
  .masthead__nav a { padding-inline: 1em; font-size: .68rem; letter-spacing: .16em; }
  .prose { font-size: 1.16rem; }
  .prose pre { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-inline: 0; border-radius: 0; font-size: .82rem; }
  .footer__wheel { right: -30vw; width: 110vw; top: 34%; }
}

/* ---------- Motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 1.2s var(--ease), transform 1.4s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

.js .hero__img { opacity: 0; transform: scale(1.05); transition: opacity 1.8s ease-out, transform 7s cubic-bezier(.16, .6, .25, 1); }
.js.is-ready .hero__img { opacity: 1; transform: none; }

.js .hero__title .line > span,
.js .hero__lede,
.js .hero__actions,
.js .masthead {
  opacity: 0;
  transition: opacity 1.9s var(--ease), transform 2.2s var(--ease), filter 1.9s var(--ease);
}
.js .hero__title .line > span { transform: translate3d(0, .22em, 0); filter: blur(8px); }
.js .hero__lede, .js .hero__actions { transform: translate3d(0, 12px, 0); }

.js.is-ready .hero__title .line > span,
.js.is-ready .hero__lede,
.js.is-ready .hero__actions,
.js.is-ready .masthead { opacity: 1; transform: none; filter: none; }

.js.is-ready .masthead { transition-delay: .2s; }
.js.is-ready .hero__title .line:nth-child(1) > span { transition-delay: .35s; }
.js.is-ready .hero__title .line:nth-child(2) > span { transition-delay: .6s; }
.js.is-ready .hero__lede { transition-delay: 1.15s; }
.js.is-ready .hero__actions { transition-delay: 1.45s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal,
  .js .hero__img,
  .js .hero__title .line > span,
  .js .hero__lede,
  .js .hero__actions,
  .js .masthead { opacity: 1; transform: none; filter: none; }
  .footer__wheel { transform: translateY(-50%); }
}
