/* alexander.androv.online — editorial theme
   Quiet paper, ink type, full-bleed imagery, mono labels, letter-spaced titles. */

:root {
  --paper: #f5f3ee;
  --paper-2: #ebe8e0;
  --ink: #121211;
  --ink-2: #4a4945;
  --ink-3: #8a8780;
  --rule: #d6d2c8;
  --night: #0d0d0c;
  --on-night: #f2efe8;
  --accent: #9c7a3c;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  --wrap: min(1320px, 100% - 2 * var(--gutter));
  --gutter: clamp(16px, 4vw, 48px);
  --track: 0.06em;
  --masthead-h: 72px;
}
.lang-zh {
  --sans: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --track: 0.02em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--masthead-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 17px/1.6 var(--sans);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
.wrap { width: var(--wrap); margin-inline: auto; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Labels & buttons ---------- */
.label {
  display: inline-block;
  font: 400 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.label--pill {
  padding: 4px 9px 3px;
  background: rgba(242, 239, 232, 0.16);
  color: var(--on-night);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 2px;
}
.label--muted { color: var(--ink-3); }
.button {
  display: inline-flex; align-items: center; gap: .4em;
  font: 400 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 18px; border: 1px solid currentColor;
  transition: background .25s, color .25s;
}
.button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button--light { color: var(--on-night); }
.button--light:hover, .feature__link:hover .button--light { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }

/* ---------- Masthead ---------- */
.masthead {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--masthead-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter);
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: background .35s, color .35s, border-color .35s, transform .35s;
}
.has-dark-hero .masthead { background: transparent; color: var(--on-night); }
.masthead.is-solid, .has-dark-hero .masthead.is-solid { background: var(--paper); color: var(--ink); border-bottom-color: var(--rule); }
.masthead.is-hidden { transform: translateY(-100%); }
.masthead__nav { display: flex; gap: 26px; }
.masthead__nav a { font-size: 15px; font-weight: 400; letter-spacing: var(--track); opacity: .92; }
.masthead__nav a:hover, .masthead__nav a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.masthead__menu {
  background: none; border: 0; color: inherit; cursor: pointer; padding: 6px 0;
  font: 400 15px/1 var(--sans); letter-spacing: var(--track);
}
.wordmark {
  margin-left: auto;
  font: 500 clamp(20px, 2.1vw, 27px)/1 var(--serif);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.masthead .masthead__menu { display: none; }
@media (max-width: 860px) {
  .masthead__nav { display: none; }
  .masthead .masthead__menu { display: block; }
}
@media (min-width: 861px) {
  .masthead__menu { display: block; order: 0; }
  .masthead .masthead__menu { display: block; margin-left: 4px; padding-left: 26px; border-left: 1px solid currentColor; line-height: 1; opacity: .92; }
}

/* ---------- Overlay menu ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--night); color: var(--on-night);
  display: flex; flex-direction: column;
  padding: 0 var(--gutter) var(--gutter);
  overflow-y: auto;
}
.overlay[hidden] { display: none; }
.overlay__top { height: var(--masthead-h); display: flex; align-items: center; flex-shrink: 0; }
.overlay__top .wordmark { margin-left: 0; }
.overlay__close {
  margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer;
  font: 400 15px/1 var(--sans); letter-spacing: var(--track);
}
.overlay__grid { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; margin-top: clamp(32px, 8vh, 96px); }
.overlay__nav a {
  display: block;
  font: 300 clamp(34px, 6vw, 72px)/1.12 var(--sans);
  letter-spacing: 0.02em; text-transform: uppercase;
  padding: 4px 0; opacity: .88;
}
.overlay__nav a:hover { opacity: 1; font-style: italic; }
.overlay .label { color: var(--ink-3); margin-top: 28px; }
.overlay__langs { display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.overlay__langs a.is-current { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 860px) { .overlay__grid { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Heroes ---------- */
.hero { position: relative; color: var(--on-night); background: var(--night); overflow: hidden; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(13,13,12,.55) 0%, rgba(13,13,12,.12) 22%, rgba(13,13,12,.12) 45%, rgba(13,13,12,.78) 100%); }
.hero--full .hero__shade { background:
  linear-gradient(90deg, rgba(13,13,12,.62) 0%, rgba(13,13,12,.28) 55%, rgba(13,13,12,.05) 100%),
  linear-gradient(180deg, rgba(13,13,12,.45) 0%, rgba(13,13,12,0) 20%, rgba(13,13,12,0) 55%, rgba(13,13,12,.75) 100%); }
.hero__title, .hero__subtitle, .hero__deck { text-shadow: 0 1px 24px rgba(0,0,0,.35); }
.hero--full { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; }
.hero--full .hero__content { align-self: center; padding-top: var(--masthead-h); }
.hero--short { min-height: 62svh; display: flex; align-items: flex-end; }
.hero--short .hero__content, .hero--poem .hero__content { padding: calc(var(--masthead-h) + 40px) 0 clamp(36px, 6vh, 64px); }
.hero--poem { min-height: 78svh; display: flex; align-items: flex-end; }
.hero__title {
  font: 400 clamp(26px, 3.6vw, 46px)/1.18 var(--sans);
  letter-spacing: 0.055em; text-transform: uppercase;
  max-width: 22ch;
  text-wrap: balance;
}
.lang-zh .hero__title { letter-spacing: 0.12em; }
.hero__subtitle { font: 300 clamp(18px, 2vw, 26px)/1.3 var(--sans); letter-spacing: 0.04em; margin: 8px 0 0; opacity: .92; }
.hero__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: clamp(28px, 6vh, 56px); }
.hero__deck { max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); font-weight: 400; letter-spacing: 0.02em; margin: 0; }
@media (max-width: 700px) { .hero__foot { flex-direction: column; align-items: flex-start; } }

/* ---------- Page heads (light pages) ---------- */
.pagehead { padding: calc(var(--masthead-h) + clamp(56px, 10vh, 120px)) 0 clamp(40px, 6vh, 72px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(40px, 6vh, 72px); }
.pagehead--tight { padding: clamp(40px, 6vh, 64px) 0; }
.pagehead__title { font: 400 clamp(30px, 4.6vw, 60px)/1.1 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; }
.pagehead__title a:hover { text-decoration: underline; }
.deck { max-width: 52ch; font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-2); margin: 18px 0 0; }
.deck--wide { max-width: 64ch; margin: 0; }
.count { font: 400 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 28px; }

/* ---------- Statement ---------- */
.statement { padding: clamp(72px, 12vh, 150px) 0; text-align: center; }
.statement__text {
  max-width: 34ch; margin: 0 auto;
  font: 300 clamp(24px, 3vw, 40px)/1.35 var(--serif);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.lang-zh .statement__text { max-width: 24em; line-height: 1.6; }

/* ---------- Sections ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; border-top: 1px solid var(--ink); padding-top: 18px; margin-bottom: 36px; }
.section-title { font: 400 clamp(20px, 1.8vw, 24px)/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.section-more { font: 400 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.section-more:hover { color: var(--ink); }
.selected, .gallery { padding-bottom: clamp(72px, 10vh, 128px); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 36px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--3 { grid-template-columns: 1fr; } }
.card__link { display: block; }
.card__media { overflow: hidden; background: var(--paper-2); margin-bottom: 16px; aspect-ratio: 4 / 5; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .6s; }
a.card__link:hover .card__media img { transform: scale(1.035); }
.card__title { font: 400 clamp(19px, 1.7vw, 23px)/1.3 var(--sans); letter-spacing: 0.02em; margin-bottom: 6px; }
a.card__link:hover .card__title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.card__byline { font-size: 15px; color: var(--ink-2); margin: 0; }
.card--soon .card__media img { filter: grayscale(1) contrast(.9); opacity: .78; }
.card--soon .card__title { color: var(--ink-2); }

/* ---------- Feature banner ---------- */
.feature { margin-bottom: clamp(72px, 10vh, 128px); }
.feature__link { position: relative; display: flex; align-items: flex-end; min-height: 86svh; color: var(--on-night); overflow: hidden; isolation: isolate; background: var(--night); }
.feature__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.feature__link:hover .feature__img { transform: scale(1.02); }
.feature__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13,13,12,.05) 30%, rgba(13,13,12,.78) 100%); }
.feature__content { padding-bottom: clamp(36px, 7vh, 72px); }
.feature__title { font: 400 clamp(26px, 3.6vw, 46px)/1.15 var(--sans); letter-spacing: 0.055em; text-transform: uppercase; max-width: 20ch; margin-bottom: 14px; }
.feature__deck { max-width: 48ch; font-size: clamp(16px, 1.4vw, 19px); font-weight: 400; margin-bottom: 26px; }

/* ---------- Duo ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); padding-bottom: clamp(72px, 10vh, 128px); }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }
.duo__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); margin-bottom: 18px; }
.duo__media img { width: 100%; height: 100%; object-fit: cover; }
.duo__title { font: 400 clamp(22px, 2.2vw, 30px)/1.25 var(--sans); letter-spacing: 0.03em; margin-bottom: 12px; }
.duo__text { color: var(--ink-2); max-width: 46ch; }

/* ---------- Interlude ---------- */
.interlude { margin-bottom: clamp(72px, 10vh, 128px); }
.interlude__img { width: 100%; height: 72svh; object-fit: cover; }

/* ---------- Gallery ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 1.6vw, 24px); align-items: start; }
.gallery__item { margin: 0; overflow: hidden; background: var(--paper-2); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__item--1 { grid-column: 1 / span 7; }
.gallery__item--2 { grid-column: 9 / span 4; margin-top: 18%; }
.gallery__item--3 { grid-column: 2 / span 4; margin-top: -12%; }
.gallery__item--4 { grid-column: 7 / span 6; margin-top: 6%; }
@media (max-width: 760px) {
  .gallery__grid { grid-template-columns: 1fr 1fr; }
  .gallery__item--1, .gallery__item--4 { grid-column: 1 / -1; margin: 0; }
  .gallery__item--2, .gallery__item--3 { grid-column: auto; margin: 0; }
}
.gallery__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.gallery__row .gallery__item { aspect-ratio: 4 / 5; }
@media (max-width: 640px) { .gallery__row { grid-template-columns: 1fr 1fr; } .gallery__row .gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; } }

/* ---------- Poem page ---------- */
.poem__body { width: min(680px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(56px, 10vh, 112px) 0 clamp(48px, 8vh, 96px); }
.poem__credit { font: 400 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 48px; }
.poem__credit a { color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.poem__credit a:hover { color: var(--ink); border-color: var(--ink); }
.poem__text { font: 300 clamp(19px, 1.8vw, 22px)/1.75 var(--serif); letter-spacing: 0.002em; }
.lang-zh .poem__text { font-weight: 400; line-height: 2; letter-spacing: .06em; }
.stanza { margin: 0 0 1.75em; }
.stanza:last-child { margin-bottom: 0; }
.poem__langs { margin-top: clamp(56px, 8vh, 88px); padding-top: 22px; border-top: 1px solid var(--rule); }
.poem__langlist { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 16px; }
.poem__langlist a { border-bottom: 1px solid var(--rule); }
.poem__langlist a:hover { border-color: var(--ink); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: end; border-top: 1px solid var(--ink); padding: 22px 0 clamp(56px, 8vh, 96px); }
.pager a { display: flex; flex-direction: column; }
.pager .label { margin-bottom: 6px; }
.pager__title { font-size: clamp(17px, 1.6vw, 21px); }
.pager a:hover .pager__title { text-decoration: underline; text-underline-offset: 5px; }
.pager__next { text-align: right; align-items: flex-end; }
.pager__all { align-self: center; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } .pager__all { display: none; } }

/* ---------- Prose ---------- */
.prose { width: min(720px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(56px, 10vh, 112px) 0 clamp(48px, 8vh, 88px); font: 300 clamp(18px, 1.6vw, 21px)/1.7 var(--serif); }
.prose__lead { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.45; margin-bottom: 1.2em; }

/* ---------- Empty state ---------- */
.empty { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: end; padding-bottom: clamp(72px, 10vh, 128px); }
.empty__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.empty__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4); }
.empty__text { font: 300 clamp(22px, 2.4vw, 30px)/1.4 var(--serif); font-style: italic; color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .empty { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); border-top: 1px solid var(--ink); padding: 22px 0 clamp(72px, 10vh, 128px); }
.contact__head .deck { margin-top: 12px; }
.contact__links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 34px; }
.contact__big { font: 300 clamp(20px, 2.4vw, 32px)/1.3 var(--sans); letter-spacing: 0.01em; border-bottom: 1px solid var(--rule); word-break: break-word; }
.contact__big:hover { border-color: var(--ink); }
.contact .button { margin-top: 18px; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } .contact__links { padding-top: 0; } }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--on-night); padding: clamp(56px, 8vh, 96px) var(--gutter) 28px; }
.footer__grid { width: min(1320px, 100%); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1.3fr 1fr; gap: 40px; }
.footer .wordmark { margin: 0; font-size: clamp(24px, 2.6vw, 34px); }
.footer__brand p { color: var(--ink-3); margin-top: 14px; max-width: 30ch; font-size: 15px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer__col a { opacity: .85; width: fit-content; }
.footer__col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer__col a.is-current { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer .label { color: var(--ink-3); }
.footer__legal { width: min(1320px, 100%); margin: clamp(48px, 7vh, 80px) auto 0; padding-top: 20px; border-top: 1px solid rgba(242,239,232,.14); font: 400 12px/1.4 var(--mono); letter-spacing: .06em; color: var(--ink-3); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
  .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
