/* ==========================================================================
   Apoorva Mishra — Direction 3, "Specimen Drawer"
   Tokens ------------------------------------------------------------------ */

/* Dark is the site's only mode. */
:root {
  --bg: #111110;
  --card: #1a1a18;
  --fg: #eceae4;
  --dim: #959086;
  --line: #2b2a27;
  --accent: #7fbaa9;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4);

  --sans: 'Switzer', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Gambarino', 'Chillax', Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 1120px;
  --gutter: 22px;
  --hatch: repeating-linear-gradient(135deg, var(--line) 0 6px, transparent 6px 12px);

  color-scheme: dark;
}

/* Base -------------------------------------------------------------------- */

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

body.page {
  margin: 0;
  padding: 0 var(--gutter) 96px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; }

a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

a:hover { color: var(--accent); text-decoration-color: var(--accent); }

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

img { max-width: 100%; }

.mono { font-family: var(--mono); }

.link-plain { text-decoration: none; }
.link-plain:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
}
.skip-link:focus { left: var(--gutter); top: 10px; }

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 0;
}

/* Full-bleed backdrop so the bar spans the viewport, not just the column */
.masthead::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: -1;
}

.masthead__mark {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
}

.masthead__mark:hover { color: var(--accent); }

html { scroll-behavior: smooth; }

/* Anchored sections stop below the sticky masthead */
[id] { scroll-margin-top: 84px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav__link { color: var(--dim); text-decoration: none; }
.nav__link:hover { color: var(--accent); }

/* Compact social links; hidden once the left spine takes over */
.masthead__social {
  display: inline-flex;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

@media (min-width: 1320px) {
  .masthead__social { display: none; }
}

/* Ticker ------------------------------------------------------------------ */

.ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  overflow: hidden;
}

.ticker__label { flex: none; letter-spacing: .1em; text-transform: uppercase; }

.ticker__window { height: 20px; overflow: hidden; flex: 1 1 300px; min-width: 0; }

.ticker__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  /* --slides counts the markup items; main.js bumps it by one for the
     loop clone and regenerates the keyframes to match. */
  width: calc(var(--slides, 4) * 100%);
  animation: ticker-advance 32s cubic-bezier(.7, 0, .3, 1) infinite;
}

.ticker__item {
  width: calc(100% / var(--slides, 4));
  flex: none;
  padding-right: 12px;
  height: 20px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 44px;
  padding: 46px 0 40px;
  align-items: flex-end;
}

.hero__bg {
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 55%, transparent 100%);
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .12;
}

.hero__copy {
  position: relative;
  z-index: 1;
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 44px;
  align-items: flex-end;
}

.hero__title {
  flex: 1 1 100%;
  margin: 0;
  max-width: 21em;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.18;
  letter-spacing: -.01em;
  text-wrap: pretty;
}

.hero__title em { font-style: italic; }

.hero__lede {
  flex: 1 1 320px;
  margin: 0;
  max-width: 52ch;
  text-wrap: pretty;
}

.portrait {
  position: relative;
  z-index: 1;
  flex: 0 1 300px;
  max-width: 300px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portrait__caption { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }

/* Image frames ------------------------------------------------------------
   A frame shows a hatched placeholder until its optional image loads; if the
   file is missing, main.js drops the <img> and the placeholder stands in. */

.frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--hatch);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frame--portrait { aspect-ratio: 4 / 5; }
.frame--thumb { aspect-ratio: 3 / 2; margin-bottom: 12px; }
.frame--pending { border-style: dashed; }

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

/* Project thumbnails carry text and diagrams; show them whole. */
.frame--thumb img { object-fit: contain; }
.frame--thumb.is-filled { background: var(--card); }

/* The current portrait is a landscape shot with the subject right of
   centre; bias the cover crop so they stay in frame at narrow widths. */
.frame--portrait img { object-position: 87% 50%; }

.frame__label {
  position: absolute;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  background: var(--bg);
  padding: 3px 8px;
}

.frame--thumb .frame__label { font-size: 11px; padding: 2px 6px; background: var(--card); }

.frame.is-filled { background: none; }
.frame.is-filled .frame__label { display: none; }

/* Selected-work marquee ---------------------------------------------------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  overflow: hidden;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 14px;
}

.marquee__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: max-content;
  animation: marquee-drift 70s linear infinite;
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

/* Spacing lives on the item, not as a track `gap`, so that a -50% shift of
   the duplicated track lands exactly on the matching tile. */
.tile {
  display: block;
  flex: none;
  width: 270px;
  height: 180px;
  margin-right: 18px;
  position: relative;
  border: 1px solid var(--line);
  background: var(--hatch);
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
}

a.tile:hover { border-color: var(--accent); color: var(--fg); }

.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Affiliation tiles: logo centred on a fixed light chip so dark-on-
   transparent logos stay legible in both themes. */
.tile--logo { background: #f5f3ee; }

.tile--logo .tile__logo {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  max-height: 44%;
  object-fit: contain;
}

.tile__tag {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--card);
  padding: 2px 6px;
}

.tile__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: var(--card);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--fg);
}

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

.section { padding: 56px 0 0; }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 8px;
  margin-bottom: 22px;
}

.section__head--tight { margin-bottom: 8px; }
.section__head--solo { margin-bottom: 18px; }

.section__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(23px, 3.4vw, 27px);
  font-weight: 400;
}

.section__note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section__intro { margin: 0 0 22px; color: var(--dim); max-width: 56ch; }

.section__intro--career { max-width: none; color: var(--fg); text-wrap: pretty; }

.section__more { margin: 16px 0 0; font-size: 12.5px; }

/* Cards ------------------------------------------------------------------- */

.grid { display: grid; gap: 20px; }
.grid--domains { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--books { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  transition: border-color .15s ease;
}

.card:hover { border-color: var(--accent); }
.card--pending { border-style: dashed; }

.card__index {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.card--pending .card__index { color: var(--dim); }

.card__title {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 8px;
}

.card--rail .card__title { margin-bottom: 4px; }
.card__title--essay { font-size: 24px; }

.card__meta { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-bottom: 8px; }

.card__body { margin: 0; color: var(--dim); font-size: 15px; }
.card__body--pending { opacity: .75; }

.card--rail + .card--rail { margin-left: 0; }

/* Horizontal rails --------------------------------------------------------- */

.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  overscroll-behavior-x: contain;
}

.card--rail { flex: none; width: 292px; scroll-snap-align: start; }

/* Publications ------------------------------------------------------------- */

.pubs {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}

.pubs__item {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

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

.pubs__source {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  min-width: 190px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Reading ------------------------------------------------------------------ */

.shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.shelf__btn {
  border: 1px solid var(--line);
  background: none;
  padding: 4px 11px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
}

.shelf__btn:hover { color: var(--accent); border-color: var(--accent); }
.shelf__btn.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.book.is-hidden { display: none; }

.frame--cover { aspect-ratio: 2 / 3; margin-bottom: 12px; }
.frame--cover .frame__label { font-size: 11px; padding: 2px 6px; background: var(--card); }
.frame--cover img { object-fit: cover; }

.book {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px 16px 16px;
  transition: border-color .15s ease;
}

.book:hover { border-color: var(--accent); }

.book__index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: 8px;
}

.book__title { font-family: var(--display); font-size: 17px; line-height: 1.2; }
.book__author { font-family: var(--mono); font-size: 11px; color: var(--dim); margin: 4px 0 8px; }
.book__note { margin: 0; font-size: 14.5px; color: var(--dim); }

/* Contact ------------------------------------------------------------------ */

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 15.5px;
}

.credentials {
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  text-wrap: pretty;
}

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

@keyframes marquee-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Regenerated by main.js for the real item count (plus the loop clone).
   This four-item default keeps the ticker cycling with JS disabled. */
@keyframes ticker-advance {
  0%, 19%      { transform: translateX(0); }
  25%, 44%     { transform: translateX(-25%); }
  50%, 69%     { transform: translateX(-50%); }
  75%, 100%    { transform: translateX(-75%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track, .marquee__track { animation: none; }
  .card, .book { transition: none; }
}

/* Career story slider -------------------------------------------------------
   Auto-advancing chapters, story style. Without JS every chapter renders
   stacked; main.js adds .js to <html> and turns it into the slider. */

.story {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.story__bars {
  display: none;
  gap: 6px;
  padding: 14px 16px 0;
  position: relative;
  z-index: 3;
}

html.js .story__bars { display: flex; }

.story__bar {
  flex: 1;
  height: 3px;
  background: var(--line);
  overflow: hidden;
}

.story__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.chapter { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.chapter:last-of-type { border-bottom: 0; }

html.js .chapter { display: none; border-bottom: 0; }
html.js .chapter.is-active { display: block; }

.chapter__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .08;
  pointer-events: none;
}

.chapter__inner {
  position: relative;
  z-index: 1;
  padding: 22px 28px 24px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
}

.chapter__era {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.chapter__title {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 4px;
}

.chapter__cred {
  font-family: var(--display);
  font-style: italic;
  font-size: 16.5px;
  color: var(--accent);
  margin-bottom: 4px;
}

.chapter__role {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--dim);
  margin-bottom: 12px;
}

.chapter__facts {
  margin: 0;
  padding-left: 1.1em;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  max-width: 60ch;
}

.chapter__facts li + li { margin-top: 4px; }

.chapter__loc {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
}

.story__nav {
  display: none;
  position: absolute;
  top: 30px;
  bottom: 0;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

html.js .story__nav { display: flex; align-items: center; }
.story__nav--prev { left: 0; width: 34%; justify-content: flex-start; }
.story__nav--next { right: 0; width: 66%; justify-content: flex-end; }

/* Arrow chips: quietly present, brighten when the pointer is over their
   half so the tap zones explain themselves. */
.story__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 44px;
  margin: 0 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--dim);
  font-size: 22px;
  line-height: 1;
  opacity: .45;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}

@media (max-width: 640px) {
  html.js .story__nav { align-items: flex-end; }
  .story__arrow { margin-bottom: 14px; height: 38px; }
  .chapter__inner { padding-bottom: 66px; }
}

.story__nav:hover .story__arrow,
.story__nav:focus-visible .story__arrow {
  opacity: 1;
  color: var(--accent);
  border-color: var(--accent);
}

.story__nav:hover { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .story__bar i { transition: none; }
}

/* Social spine (left edge) ------------------------------------------------- */

.spine {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: none;
  flex-direction: column;
  gap: 26px;
  padding: 18px 6px;
  border-right: 1px solid var(--line);
}

.spine a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
}

.spine a:hover { color: var(--accent); }

/* Core-sample timeline (right edge) ----------------------------------------
   Career eras as geological strata, newest at the top; stratum height is
   proportional to years (--yrs). Hover or focus a stratum to read its card. */

.core {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.core__title {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
}

.core__col {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  /* Cap so title + column always fit inside the viewport when centred */
  height: min(52vh, calc(100vh - 280px));
  min-height: 300px;
  width: 40px;
  border: 1px solid var(--line);
  background: var(--card);
}

.stratum {
  position: relative;
  flex: var(--yrs) 1 0;
  min-height: 26px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  outline-offset: -2px;
}

.stratum:last-child { border-bottom: 0; }

/* one hatch voice per era */
.stratum--now { background: repeating-linear-gradient(135deg, var(--accent) 0 2px, transparent 2px 7px); }
.stratum--h2  { background: repeating-linear-gradient(45deg,  var(--line) 0 2px, transparent 2px 7px); }
.stratum--h3  { background: repeating-linear-gradient(0deg,   var(--line) 0 2px, transparent 2px 8px); }
.stratum--h4  { background: repeating-linear-gradient(90deg,  var(--line) 0 2px, transparent 2px 8px); }
.stratum--h5  { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 7px), repeating-linear-gradient(45deg, var(--line) 0 2px, transparent 2px 7px); }
.stratum--h6  { background: repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 9px), repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 9px); }

.stratum__year {
  position: absolute;
  right: calc(100% + 8px);
  top: -6px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
}

.stratum__tag {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  color: var(--dim);
  background: var(--card);
  padding: 1px 3px;
  pointer-events: none;
}

.stratum:hover .stratum__tag, .stratum:focus .stratum__tag { color: var(--accent); }

.stratum__card {
  position: absolute;
  right: calc(100% + 26px);
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  background: var(--card);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  z-index: 6;
}

.stratum:hover .stratum__card, .stratum:focus .stratum__card {
  opacity: 1;
  visibility: visible;
}

.stratum__when {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.stratum__role {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stratum__note { margin: 0; font-size: 13px; color: var(--dim); line-height: 1.45; }

/* Rails appear once the viewport clears the content column */
@media (min-width: 1320px) {
  .spine, .core { display: flex; }
}

/* In-flow horizontal core sample for narrower screens */
@media (max-width: 1319.98px) {
  .core {
    display: flex;
    position: static;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 20px 0 4px;
  }

  .core__title { writing-mode: horizontal-tb; letter-spacing: .18em; }

  .core__col {
    flex-direction: row;
    height: 34px;
    min-height: 0;
    width: 100%;
  }

  .stratum {
    flex: var(--yrs) 1 0;
    min-height: 0;
    min-width: 30px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .stratum:last-child { border-right: 0; }

  /* newest-first markup reads right-to-left in time; flip so ’13 is left */
  .core__col { flex-direction: row-reverse; }

  .stratum__year {
    right: auto;
    left: 2px;
    top: calc(100% + 4px);
  }

  .stratum__card {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: min(250px, 78vw);
  }

  .stratum:first-child .stratum__card { left: auto; right: 0; transform: none; }
  .stratum:last-child .stratum__card { left: 0; transform: none; }
}

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

@media (max-width: 640px) {
  body.page { padding-bottom: 72px; }
  .hero { padding: 32px 0 28px; }
  .portrait { flex: 1 1 auto; max-width: none; }
  .section { padding-top: 44px; }
  .pubs__source { min-width: 0; }
}

@media print {
  .ticker, .marquee, .theme-toggle, .skip-link { display: none; }
  .rail { overflow: visible; flex-wrap: wrap; }
  body.page { padding: 0; }
}
