:root {
  --bg: #F7F4EE;
  --band: #EDE8DF;
  --ink: #2A2826;
  --body: #3E3A36;
  --muted: #6B655E;
  --muted-2: #8A847C;
  --muted-3: #9C958C;
  --slash: #BDB4A6;
  --rule: #DDD6CB;
  --accent: #7B3F3C;
  --accent-light: #D9B8A8;
  --light: #F7F4EE;

  --serif: 'EB Garamond', serif;
  --sans: 'Jost', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --fa-sans: 'B Nazanin', 'Jost', sans-serif;
  --fa-serif: 'B Nazanin', 'EB Garamond', serif;

  --gutter: 6vw;
}

/* Farsi typeface, limited to Persian/Arabic script and its punctuation so Latin text and
   ASCII digits inside Farsi passages keep the site's own fonts. */
@font-face {
  font-family: 'B Nazanin';
  src: url('assets/fonts/b-nazanin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF, U+00AB, U+00BB;
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0; }

.site { min-height: 100vh; background: var(--bg); color: var(--ink); }
.noscript { padding: 0 var(--gutter); color: var(--muted); }

/* Shared type */
.kicker { font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; }
.eyebrow { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.arrow-link { display: flex; align-items: center; color: inherit; text-transform: uppercase; }
.arrow-link > span:first-child { white-space: nowrap; }
.arrow-link:hover { color: var(--accent); }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px var(--gutter);
}
.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 44px; font-size: 15px; letter-spacing: 0.02em; }
.nav a {
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a.is-active { border-bottom-color: var(--ink); }

/* ---------- Image placeholders ---------- */

.ph {
  position: relative;
  overflow: hidden;
  background-color: var(--ph-bg, #2A2826);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,var(--ph-a, 0.04)) 0 1px, transparent 1px var(--ph-gap, 9px));
}
.ph > img, .ph > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.ph-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(247,244,238,0.55);
}
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(247,244,238,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  font-size: 18px;
}

/* ---------- Home: featured carousel ---------- */

.carousel {
  position: relative;
  height: min(68vw, 640px);
  min-height: 520px;
  background: #1A1816;
  overflow: hidden;
  color: var(--light);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
  --ph-a: 0.035;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(18,16,14,0.85) 0%, rgba(18,16,14,0.4) 55%, rgba(18,16,14,0.1) 100%);
}
.slide-caption { z-index: 1; left: auto; right: 24px; top: 20px; bottom: auto; color: rgba(247,244,238,0.5); }
.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter) 60px;
  max-width: 820px;
}
.slide-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.slide-kicker > span { white-space: nowrap; }
.slide-kicker .dot { color: rgba(247,244,238,0.5); }
.slide-type { color: var(--accent-light); }
.slide h1 {
  margin-top: 26px;
  font-size: clamp(42px, 5.6vw, 80px);
  line-height: 1.08;
  text-wrap: pretty;
}
.slide h1 a, .slide h1 a:hover { color: inherit; }
/* Essay titles run long: a smaller headline keeps them to about three lines. */
.slide--essay h1 { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.12; }
.slide-dek {
  margin-top: 22px;
  max-width: 560px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.4;
  color: rgba(247,244,238,0.88);
  text-wrap: pretty;
}
.slide-cta { margin-top: 40px; gap: 18px; font-size: 13px; letter-spacing: 0.24em; align-self: flex-start; }
.slide-cta > span:first-child { border-bottom: 1px solid var(--light); padding-bottom: 3px; }
.slide-cta:hover { color: var(--light); opacity: 0.8; }

.slide-dots {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.slide-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  background: var(--slash);
  transition: background 300ms;
}
.slide-dot.is-active { background: var(--accent); }
.slide-dots { align-items: center; }
.slide-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--slash);
  cursor: pointer;
  transition: color 200ms;
}
.slide-arrow:hover { color: var(--light); }

/* ---------- Home: recent work ---------- */

.recent { padding: 64px var(--gutter) 72px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.section-head h2 { font-size: 44px; }
.view-all { gap: 14px; font-size: 12px; letter-spacing: 0.22em; color: var(--muted); }
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(340px, calc((100% - 64px) / 2))), 1fr));
  column-gap: 64px;
}
.recent-item {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.recent-item:hover { color: var(--ink); }
.recent-item:hover h3 { color: var(--accent); }
.recent-item .ph { flex: 0 0 150px; aspect-ratio: 3 / 2; --ph-gap: 8px; }
.recent-item > div:last-child { min-width: 0; }
.recent-item h3 { margin-top: 8px; font-size: 26px; }
.recent-meta { margin-top: 14px; display: flex; gap: 10px; font-size: 13px; color: var(--muted-2); }

/* ---------- Home: about band ---------- */

.about-band { display: flex; flex-wrap: wrap; background: var(--band); }
.about-band > .ph { flex: 1 1 480px; min-height: 300px; --ph-bg: #1A1816; --ph-a: 0.035; }
.about-band > .ph .ph-label { left: 20px; bottom: 18px; color: rgba(247,244,238,0.5); }
.about-band-text {
  flex: 1 1 420px;
  padding: 44px var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-band h2 { margin-top: 22px; font-size: clamp(34px, 3.4vw, 48px); line-height: 1.15; max-width: 560px; }
.about-band .arrow-link { margin-top: 28px; gap: 16px; font-size: 13px; letter-spacing: 0.24em; align-self: flex-start; }

/* ---------- Work ---------- */

.work { padding: 56px var(--gutter) 96px; border-top: 1px solid var(--rule); }
.page-title { font-size: clamp(44px, 5vw, 68px); }
.filters {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.filter {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 6px;
  color: var(--muted-2);
  border-bottom: 1px solid transparent;
}
.filter > span:first-child { white-space: nowrap; }
.filter:hover { color: var(--accent); }
.filter.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.filter-count { font-size: 11px; letter-spacing: 0.05em; color: var(--muted-3); }
.work-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 64px 44px;
}
.work-empty { color: var(--muted); font-weight: 300; }

.card { display: flex; flex-direction: column; color: var(--ink); }
.card:hover { color: var(--ink); }
.card:hover .card-title { color: var(--accent); }
.card .ph { aspect-ratio: 3 / 2; }
.card-label { margin-top: 26px; font-size: 12px; }
.card-title { margin: 12px 0 24px; font-size: 30px; line-height: 1.2; }
.card .ph + .card-title { margin-top: 22px; }  /* no label above the title */
/* margin-top:auto keeps footers aligned along a row even when titles wrap to different lengths. */
.card-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- Project ---------- */

.hero {
  position: relative;
  display: flex;
  min-height: max(420px, min(60vw, 560px));
  --ph-bg: #1F1D1B;
  --ph-a: 0.035;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(16,14,12,0.85) 0%, rgba(16,14,12,0.4) 50%, rgba(16,14,12,0.05) 100%);
}
.hero-caption { z-index: 1; left: auto; right: 24px; bottom: 20px; color: rgba(247,244,238,0.5); }
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px var(--gutter);
  max-width: 680px;
  color: var(--light);
}
.hero:has(.lang-toggle) .hero-content { max-width: 860px; }
.hero:has(.lang-toggle) h1 { font-size: clamp(36px, 4.2vw, 62px); line-height: 1.12; text-wrap: pretty; }
.hero .hero-dek i, .hero h1 i { font-style: italic; }
.hero[dir="rtl"]::before {
  background: linear-gradient(270deg, rgba(16,14,12,0.88) 0%, rgba(16,14,12,0.5) 55%, rgba(16,14,12,0.15) 100%);
}
.hero[dir="rtl"] .hero-caption { right: auto; left: 24px; }

/* Back to the list, pinned to the top corner of the header image. */
.back-link {
  position: absolute;
  z-index: 3;
  top: 28px;
  inset-inline-start: var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(247,244,238,0.85);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.back-link > span:last-child { padding-bottom: 2px; border-bottom: 1px solid transparent; transition: border-color 200ms; }
.back-link:hover { color: var(--light); }
.back-link:hover > span:last-child { border-bottom-color: currentColor; }
.hero[lang="fa"] .back-link { font-family: var(--fa-sans); font-size: 17px; letter-spacing: 0; }

.lang-toggle {
  align-self: flex-start;
  margin-top: 32px;
  padding: 10px 20px;
  border: 1px solid rgba(247,244,238,0.55);
  color: var(--light);
  font-size: 15px;
  transition: background 200ms, color 200ms;
}
.lang-toggle[lang="en"] { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; }
/* B Nazanin reserves far more room above the baseline than its letters use, so equal padding
   leaves the words sitting low; the uneven padding re-centres the visible letters in the box. */
.lang-toggle[lang="fa"] { font-family: var(--fa-sans); font-size: 18px; line-height: 18px; padding: 7px 20px 13px; }
.lang-toggle:hover { background: var(--light); color: var(--ink); }
.hero h1 { margin-top: 22px; font-size: clamp(46px, 5.6vw, 80px); line-height: 1.05; }
.hero-dek { margin-top: 24px; font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.35; max-width: 520px; }
.hero-meta { margin-top: 30px; display: flex; gap: 14px; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; }

.project-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 72px var(--gutter) 96px;
}
.project-body > article { flex: 1 1 auto; max-width: 960px; min-width: 0; }

.video { margin-bottom: 56px; }
.video .ph { aspect-ratio: 16 / 9; --ph-bg: #161412; --ph-a: 0.035; }
.video .play {
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  background: none;
  border: 1px solid rgba(247,244,238,0.6);
  font-size: 24px;
}
.video .ph-label { left: 16px; bottom: 14px; color: rgba(247,244,238,0.5); }
.video-len { position: absolute; right: 16px; bottom: 14px; font-size: 12px; letter-spacing: 0.2em; color: rgba(247,244,238,0.75); }
.caption { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted); }

.prose-section { margin-bottom: 44px; }
.prose-section h2 { margin-bottom: 18px; font-size: 32px; }
.prose-section p {
  margin-bottom: 22px;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--body);
  letter-spacing: 0.01em;
  text-wrap: pretty;
}
.figure { margin: 36px 0 8px; }
.figure .ph { aspect-ratio: 2 / 1; }
.gallery {
  margin: 36px 0 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.gallery .ph { aspect-ratio: 4 / 5; --ph-a: 0.05; --ph-gap: 8px; }
.gallery .ph:first-child { --ph-bg: #3A3836; }
.gallery .ph--wide { grid-column: 1 / 3; aspect-ratio: 2 / 1; --ph-bg: #33302D; }

.next {
  margin-top: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  color: var(--ink);
}
.next:hover { color: var(--ink); }
.next:hover .next-title { color: var(--accent); }
.next-title { margin-top: 10px; font-family: var(--serif); font-size: 30px; }
.next-arrow { font-size: 20px; }

/* ---------- Essays ---------- */

.project-body > article.essay { max-width: 760px; }

.essay p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--body);
  letter-spacing: 0.01em;
  text-wrap: pretty;
}
.essay h2 { margin: 52px 0 18px; font-size: 32px; line-height: 1.25; }
.essay h3 { margin: 40px 0 14px; font-size: 25px; line-height: 1.3; }
.essay > :first-child { margin-top: 0; }
/* Justified body text; hyphenation keeps English lines from opening wide gaps.
   References keep ragged lines because long URLs and titles can't be spaced evenly. */
.essay p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.essay p.essay-ref, .essay p.essay-keywords { text-align: start; hyphens: manual; -webkit-hyphens: manual; }
.essay b, .essay strong { font-weight: 500; }
.essay a:not(.next) { overflow-wrap: anywhere; border-bottom: 1px solid rgba(123,63,60,0.3); }
.essay a:not(.next):hover { border-bottom-color: currentColor; }
.essay sup { font-size: 0.68em; line-height: 0; }
.essay sup a { border: 0 !important; padding: 0 1px; }

.essay blockquote,
.essay p[dir="ltr"][lang="en"] {
  margin: 32px 0;
  padding-inline-start: 24px;
  border-inline-start: 2px solid var(--accent);
}
.essay blockquote p, .essay p[dir="ltr"][lang="en"] {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}
.essay blockquote p:last-child { margin-bottom: 0; }

.essay figure { margin: 40px 0; }
.essay .fig-row { display: flex; gap: 12px; align-items: flex-start; }
.essay .fig-row + .fig-row { margin-top: 12px; }
.essay .fig-cell { min-width: 0; }
.essay .fig-cell img { display: block; width: 100%; height: auto; background: var(--band); }
.essay figcaption { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--muted); text-align: center; text-wrap: balance; }
.essay figure.essay-poster { margin: 0 0 40px; max-width: 300px; }

/* Sensitive figures: blurred behind a warning until the reader clicks. */
.essay figure[data-sensitive] .fig-media { position: relative; }  /* the warning covers the photos, not the caption */
.essay figure[data-sensitive]:focus { outline: none; }
.essay figure[data-sensitive] .fig-cell { overflow: hidden; }
.essay figure[data-sensitive] img { transition: filter 400ms ease, transform 400ms ease; }
.essay figure.is-veiled img { filter: blur(28px) brightness(0.55) saturate(0.6); transform: scale(1.15); }
/* While veiled, fill the gaps between side-by-side photos so the warning reads as one panel. */
.essay figure.is-veiled .fig-row { background: #1F1D1B; }
.essay figure.is-veiled .fig-row + .fig-row { margin-top: 0; padding-top: 12px; }
.sensitive-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  border: 0;
  background: rgba(26,24,22,0.25);
  color: var(--light);
  font-family: var(--sans);
  text-align: center;
  cursor: pointer;
}
.sensitive-veil svg { margin-bottom: 4px; opacity: 0.95; }
.sensitive-title { font-size: 19px; font-weight: 500; letter-spacing: 0.01em; }
.sensitive-text { max-width: 340px; font-size: 15px; font-weight: 300; line-height: 1.5; color: rgba(247,244,238,0.85); }
.sensitive-action {
  margin-top: 14px;
  padding: 10px 26px 0;
  border-top: 1px solid rgba(247,244,238,0.35);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.sensitive-veil:hover .sensitive-action { color: var(--accent-light); }
.sensitive-veil:focus-visible { outline: 1px solid var(--light); outline-offset: -8px; }
.essay[lang="fa"] .sensitive-veil { font-family: var(--fa-sans); }
.essay[lang="fa"] .sensitive-title { font-size: 22px; font-weight: 400; }
.essay[lang="fa"] .sensitive-text { font-size: 18px; }
.essay[lang="fa"] .sensitive-action { font-size: 17px; letter-spacing: 0; }
.essay figure.essay-poster img { display: block; width: 100%; height: auto; }

.essay-abstract { margin: 0 0 48px; padding: 32px 36px; background: var(--band); }
.essay-abstract h2 { margin: 0 0 16px; font-family: var(--sans); font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; }
.essay-abstract p { font-size: 17px; }
.essay p.essay-keywords { margin: 0; font-size: 15px; color: var(--muted); }
.essay-keywords b { color: var(--ink); }

.essay p.essay-ref {
  margin-bottom: 12px;
  padding-inline-start: 24px;
  text-indent: -24px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.essay-notes { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--rule); }
.essay-notes h2 { font-size: 24px; margin-top: 28px; }
.essay-notes ol { margin: 0; padding-inline-start: 22px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.essay-notes li { margin-bottom: 6px; }
.essay-notes li a { border: 0 !important; margin-inline-start: 4px; }
.essay-loading { color: var(--muted); font-weight: 300; }
.essay p.translation-note {
  margin: 56px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-align: start;
}
.essay + .next, .essay .next { margin-top: 56px; }

/* Farsi reading mode */
[lang="fa"] { letter-spacing: 0; }
/* B Nazanin only covers Persian script (see @font-face), so English words inside Farsi text
   fall through to the site's own Jost / EB Garamond. It sets small, hence the larger sizes. */
[lang="fa"] .kicker, [lang="fa"] .hero-meta, [lang="fa"] .eyebrow { letter-spacing: 0; font-family: var(--fa-sans); font-size: 16px; }
.hero[lang="fa"] h1, .essay[lang="fa"] h2, .essay[lang="fa"] h3, .essay[lang="fa"] .next-title,
.hero[lang="fa"] .hero-dek { font-family: var(--fa-serif); font-style: normal; }
.hero[lang="fa"] h1 { font-size: clamp(40px, 4.6vw, 68px); line-height: 1.25; }
.hero[lang="fa"] .hero-dek { font-size: 28px; }
.essay[lang="fa"] { font-family: var(--fa-sans); }
.essay[lang="fa"] p { font-size: 21px; line-height: 1.95; font-weight: 400; letter-spacing: 0; }
.essay[lang="fa"] h2 { font-size: 36px; }
.essay[lang="fa"] h3 { font-size: 28px; }
.essay[lang="fa"] figcaption { font-family: var(--fa-sans); font-style: normal; font-size: 17px; line-height: 1.8; }
.essay[lang="fa"] .essay-abstract p { font-size: 20px; }
.essay[lang="fa"] p.essay-keywords, .essay[lang="fa"] p.essay-ref { font-size: 17px; line-height: 1.9; }
.essay[lang="fa"] .essay-abstract h2 { font-family: var(--fa-sans); letter-spacing: 0; font-size: 18px; }
.essay[lang="fa"] .essay-notes ol { font-size: 17px; }
.essay[lang="fa"] .next-title { font-size: 30px; }
.essay [lang="en"] { font-family: inherit; }
.essay[lang="fa"] p[dir="ltr"][lang="en"] { font-family: var(--serif); font-size: 21px; line-height: 1.5; }

/* ---------- About ---------- */

/* Wide screens: name and bio on the left, portrait centred on the right.
   Narrow screens (below): name, then the portrait centred, then the bio. */
.about {
  padding: 56px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 380px);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "name  photo"
    "text  photo";
  column-gap: 80px;
  align-items: start;
}
.about-name { grid-area: name; font-size: clamp(48px, 5.4vw, 76px); line-height: 1.05; }
.about-text { grid-area: text; min-width: 0; }
.about-text p { margin-top: 22px; font-size: 19px; line-height: 1.8; font-weight: 300; color: var(--body); text-wrap: pretty; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.about-text p:first-child { margin-top: 36px; }
.about-links {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.about-links .slash { color: var(--slash); }

.portrait {
  grid-area: photo;
  width: 100%;
  align-self: center;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background-color: var(--ink);
}
/* Crops the landscape photo to a head-and-shoulders circle. */
.portrait img {
  position: absolute;
  left: -31.3%;
  top: -15%;
  width: 187.6%;
  max-width: none;
  height: auto;
  display: block;
}

.cv { padding: 40px var(--gutter) 96px; }
.cv-block {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 64px;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.cv-block h2 { flex: 0 0 240px; font-size: 30px; }
.cv-body { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cv-list {
  margin: 0;
  padding: 0;
  list-style: none;
  column-count: 2;
  column-gap: 32px;
  font-size: 17px;
  line-height: 1.6;
}
.cv-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  break-inside: avoid;
}
.cv-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.cv-row { display: flex; gap: 32px; align-items: baseline; }
.cv-when { flex: 0 0 120px; font-size: 13px; letter-spacing: 0.14em; color: var(--accent); white-space: nowrap; }
.cv-row > div:last-child { min-width: 0; }
.cv-what { font-size: 17px; line-height: 1.6; }
.cv-where { font-size: 15px; line-height: 1.6; font-weight: 300; color: var(--muted); }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "name" "photo" "text";
  }
  .portrait { justify-self: center; width: min(100%, 320px); margin-top: 36px; }
}

@media (max-width: 560px) {
  .site-header { padding-top: 18px; padding-bottom: 18px; }
  .brand { font-size: 18px; letter-spacing: 0.32em; }
  .nav { gap: 32px; }
  .slide-caption { display: none; }
  .section-head h2 { font-size: 38px; }
  .recent-item { gap: 18px; }
  .recent-item .ph { flex-basis: 110px; }
  .recent-item h3 { font-size: 23px; }
  .hero-dek { font-size: 22px; }
  .hero-content { padding-top: 56px; padding-bottom: 56px; }
  .hero::before, .hero[dir="rtl"]::before { background: rgba(16,14,12,0.74); }
  .essay-abstract { padding: 24px 20px; }
  .essay h2 { font-size: 28px; }
  .essay .fig-row { flex-wrap: wrap; }
  .essay .fig-cell { flex-basis: 100% !important; }
  .cv-list { column-count: 1; }
  .cv-row { gap: 18px; }
  .cv-when { flex-basis: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide, .slide-dot { transition: none; }
}
