/* Homepage: the issue's opening spread, the research leaf, the register, the correspondence panel. */

/* Opening spread: the introduction leaf with a smaller card tipped in beside it. */
.spread { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; margin-top: 20px; }
.intro { padding: 60px 68px 50px; }
.intro h1 { font-weight: 400; font-size: clamp(44px, 6.4vw, 68px); line-height: 1; letter-spacing: -.014em; }
.roles { display: flex; flex-direction: column; margin-top: 16px; font-size: 19.5px; line-height: 1.5; color: var(--soft); }
.roles span { text-wrap: balance; }
.bio { max-width: 66ch; text-wrap: pretty; }
.bio + .bio { margin-top: 12px; }
.bio strong { font-weight: 700; }
/* The essay opens on small capitals, as a chapter does. */
.lead { font-variant-caps: small-caps; letter-spacing: .05em; }
.aside { margin-top: 14px; font-style: italic; color: var(--soft); }

.card { display: flex; flex-direction: column; padding: 20px 20px 14px; }
/* The portrait is printed straight onto the card; a hairline keeps a pale sky apart from the paper. */
.portrait { align-self: start; }
.portrait img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  outline: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); outline-offset: -1px;
}
.contacts { padding-top: 18px; font-size: 16.5px; }
.contacts a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 6px 2px; border-top: 1px solid var(--rule); transition: color .18s ease; }
.contacts a:hover { color: var(--verm-text); }
.contacts span { overflow-wrap: anywhere; }
.contacts .icon { color: var(--soft); transition: color .18s ease; }
.contacts a:hover .icon { color: var(--verm-text); }

/* Research: five papers, each with its figure tipped in as a plate. */
.research { --under: #ebe4d5; margin-top: 64px; padding: 50px 68px 30px; }
/* Beneath the research leaf lies the edge of the next sheet: a gathering, not a single page. */
.research::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: translate(5px, 6px);
  background-color: var(--under); background-image: var(--grain);
  box-shadow: var(--shadow);
}
.leaf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.count { font-size: 18px; color: var(--soft); }
.paper { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 32vw, 380px); gap: clamp(32px, 4vw, 58px); padding: 36px 0 40px; border-bottom: 1px solid var(--rule); }
.paper:last-child { border-bottom: 0; }
/* The venue is the kicker: vermilion small capitals once published, a quiet italic while a preprint. */
.kicker { margin-bottom: 8px; font-size: 16.5px; line-height: 1.3; color: var(--verm-text); }
.kicker.preprint { font-style: italic; font-size: 17px; color: var(--soft); }
.paper h3 { position: relative; font-weight: 400; font-size: 27px; line-height: 1.22; letter-spacing: -.003em; text-wrap: balance; }
.paper h3 a { transition: color .18s ease; }
.paper h3 a:hover { color: var(--verm-text); }
/* Arriving at a paper from a link, a vermilion point marks it in the margin. */
.paper:target h3::before {
  content: ""; position: absolute; left: -40px; top: .5em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--verm);
  animation: mark-in .7s var(--ease) both;
}
@keyframes mark-in { from { opacity: 0; transform: scale(0); } 55% { opacity: 1; transform: scale(1.45); } }
.nowrap, .authors > span, .authors > strong { white-space: nowrap; }
.authors { margin-top: 10px; font-size: 17px; color: var(--soft); }
.authors strong { font-weight: 700; color: var(--ink); }
.tldr { margin-top: 12px; text-wrap: pretty; }
/* Beside a plate a summary runs three to five lines: set them to even lengths, so none ends on a word or two. */
@media (min-width: 701px) { .tldr { text-wrap: balance; } }
.tldr strong { font-weight: 700; }
.links { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-top: 14px; font-size: 16.5px; }
.links a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--verm-text);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
  text-decoration-color: transparent;
  transition: text-decoration-color .18s ease;
}
.links a:hover { text-decoration-color: currentColor; }
/* A plate's size is fixed before its figure arrives (the figures load lazily): the width the column allows, never taller than --h.
   A tall figure beside its text is held to about the height of that text. */
.plate { --w: 380px; --h: 380px; display: flex; flex-direction: column; align-items: center; gap: 10px; align-self: start; margin-top: 6px; }
.plate.tall { --w: 320px; --h: 260px; }
.mount { display: inline-block; }
.mount img { width: min(var(--w), var(--h) * (var(--ratio, 2))); }
.plate:hover .plate-cap, .plate:focus-visible .plate-cap { color: var(--verm-text); }

/* The register: experience, education and honours on one leaf, ruled like a contents page. */
.register { margin-top: 64px; padding: 48px 68px 36px; }
.block { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
.block + .block { margin-top: 30px; }
.block .label { padding-top: 18px; border-top: 1px solid var(--ink); }
.rows { border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding: 17px 0; border-top: 1px solid var(--rule); }
.row:first-child { border-top: 0; }
.row.entry { grid-template-columns: 46px minmax(0, 1fr) auto; }
.org-logo { display: block; width: 46px; height: 46px; margin-top: 3px; }
.org-logo img, .org-logo svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.org-logo--ms svg { width: 32px; height: 32px; margin: 7px; }
.row-title { font-weight: 400; font-size: 21px; line-height: 1.32; }
.row-sub { font-size: 17px; line-height: 1.5; color: var(--soft); }
.row-date { padding-top: 3px; font-size: 18px; text-align: right; white-space: nowrap; }
.row-date small { display: block; margin-top: 2px; font-size: 16px; font-style: italic; color: var(--soft); }
.distinction { display: block; font-style: italic; color: var(--verm-text); }

/* Correspondence: a reply card on the desk, lying over the monogram printed beneath it. */
.closing { position: relative; margin-top: 88px; color: var(--cream); }
.panel {
  position: relative; width: min(100%, 720px);
  padding: 40px 46px 42px;
  background-color: var(--ground); background-image: var(--ground-grain);
  border: 1px solid color-mix(in srgb, var(--cream) 50%, transparent);
  box-shadow: 12px 16px 30px -14px rgba(0, 0, 0, .55);
}
.panel .label { color: var(--cream); }
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 10px; }
.address a {
  font-size: clamp(28px, 2.7vw, 38px); line-height: 1.15;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em;
  text-decoration-color: color-mix(in srgb, var(--verm) 80%, transparent);
  transition: color .18s ease;
}
.address a:hover { color: #fff; }
.copy {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 86px; min-height: 36px; padding: 0 12px;
  font: inherit; font-variant-caps: small-caps; font-size: 18px; color: var(--cream); background: none; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--cream) 45%, transparent);
  transition: color .18s ease, border-color .18s ease;
}
.copy:hover { color: #fff; border-color: var(--cream); }
.copy.is-done { color: var(--verm-bright); border-color: var(--verm-bright); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* Printed on the desk itself, so the leaf above and the reply card both lie over it. */
.monogram {
  position: absolute; z-index: -1; right: 1%; top: -136px;
  font-size: clamp(300px, 33vw, 430px); line-height: .8; letter-spacing: -.06em;
  color: var(--monogram); user-select: none; pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .research { --under: #121319; }
  .org-logo { filter: brightness(.9); }
  .org-logo img { padding: 3px; background: #d6d0c4; border-radius: 50%; }
}

@media (max-width: 1000px) {
  .spread { grid-template-columns: minmax(0, 1fr) 236px; gap: 28px; }
  .contacts { font-size: 15.5px; }
  .intro { padding: 52px 52px 46px; }
  .research, .register { padding-inline: 52px; }
  .paper { grid-template-columns: 1fr; gap: 22px; }
  .paper:target h3::before { left: -31px; }
  .plate { --w: 60vw; align-items: flex-start; }
  .plate.tall { --h: 380px; }
  .block { grid-template-columns: 1fr; gap: 0; }
  .block .label { padding: 18px 0 6px; }
  .rows { border-top: 0; }
  .panel { width: auto; }
  .monogram { display: none; }
}

/* Below 900px the card becomes a strip above the introduction. */
@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; gap: 20px; }
  .card { order: -1; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 24px; padding: 18px; }
  .contacts { padding-top: 0; font-size: 16.5px; }
  .contacts li:first-child a { border-top: 0; }
}

@media (max-width: 700px) {
  body { font-size: 17.5px; }
  .spread { gap: 16px; margin-top: 4px; }
  .card { grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px; }
  .contacts { font-size: 16px; }
  .contacts a { min-height: 44px; }
  .intro { padding: 32px 24px 28px; }
  .intro h1 { font-size: 44px; }
  .roles { font-size: 17px; }
  .research::before { transform: translate(3px, 4px); }
  .research, .register { margin-top: 24px; padding: 30px 22px 22px; }
  .leaf-head { flex-direction: column; gap: 6px; }
  .paper { padding: 24px 0 28px; }
  .paper h3 { font-size: 23px; }
  .paper:target h3::before { left: -15px; width: 6px; height: 6px; }
  .links { margin-top: 6px; }
  .links a { padding: 10px 0; }
  .plate { --w: 86vw; }
  .plate.tall { --w: 70vw; }
  .row, .row.entry { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; }
  .row.honor { grid-template-columns: 1fr; }
  .row-date { grid-column: 2; padding-top: 2px; text-align: left; }
  .row.honor .row-date { grid-column: 1; }
  .row-date small { display: inline; margin-left: 8px; }
  /* A one-line title link still gets a full-height touch target, without moving the text. */
  .row-title a { display: inline-block; padding: 9px 0; margin: -9px 0; }
  .org-logo { width: 40px; height: 40px; }
  .org-logo--ms svg { width: 28px; height: 28px; margin: 6px; }
  .closing { margin-top: 40px; }
  .panel { padding: 26px 22px 28px; }
  .address a { display: inline-block; padding: 8px 0; font-size: 25px; overflow-wrap: anywhere; }
  .copy { min-height: 44px; }
  .btn { padding: 0 14px; }
}

/* Print: an offprint. One column of text, no plates; paper and profile addresses spelled out. */
@media print {
  .spread { display: block; margin: 0; }
  .intro, .research, .register { margin: 0 0 14pt; padding: 0; }
  .research::before { display: none; }
  .intro h1 { font-size: 26pt; }
  .roles { margin-top: 4pt; font-size: 11pt; color: #333; }
  .card, .plate, .links, .copy, .monogram { display: none !important; }
  .leaf-head { padding-bottom: 4pt; border-color: #000; }
  .paper { display: block; padding: 8pt 0; break-inside: avoid; }
  .kicker, .kicker.preprint { margin-bottom: 2pt; font-size: 10pt; color: #333; }
  .paper h3 { font-size: 12.5pt; text-wrap: normal; }
  .paper:target h3::before { display: none; }
  .paper h3 a[href^="http"]::after { content: attr(href); display: block; margin-top: 1.5pt; font-size: 8.5pt; line-height: 1.4; letter-spacing: 0; color: #444; }
  .authors, .row-sub, .row-date small { font-size: 10pt; color: #333; }
  .distinction { color: #333; }
  .tldr { margin-top: 3pt; }
  .block { grid-template-columns: 110pt minmax(0, 1fr); gap: 12pt; }
  .block .label, .rows { border-color: #000; }
  .row { padding: 6pt 0; gap: 12pt; break-inside: avoid; }
  .row.entry { grid-template-columns: 22pt minmax(0, 1fr) auto; }
  .org-logo { width: 22pt; height: 22pt; }
  .org-logo--ms svg { width: 16pt; height: 16pt; margin: 3pt; }
  .row-title { font-size: 11.5pt; }
  .row-date { font-size: 10pt; }
  .closing { margin: 0; color: #000; }
  .panel { width: auto; padding: 0; border: 0; background: none; box-shadow: none; }
  .panel .label { color: #000; }
  .address a { font-size: 13pt; text-decoration: none; }
  .buttons { display: block; margin-top: 4pt; }
  .btn { display: block; min-height: 0; padding: 0; border: 0; color: #000; font-size: 10pt; }
  .btn .icon { display: none; }
  .btn::after { content: " — " attr(href); font-variant-caps: normal; text-transform: none; letter-spacing: 0; color: #444; }
}
