/* =========================================================================
   Shahriar Rifat — personal site
   Design language: al-folio. A single narrow column, one sans-serif family,
   flat surfaces, hairline dividers, and one accent that carries every link,
   badge and active state. The accent is a deep oxblood rather than
   al-folio's default blue.
   ========================================================================= */

:root {
  /* --- surfaces & ink ------------------------------------------------- */
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text: #000000;
  --text-light: #828282;
  --divider: rgba(0, 0, 0, 0.1);
  --code-bg: rgba(140, 47, 57, 0.05);

  /* --- accent (deep oxblood) ------------------------------------------ */
  /* --theme tints links, badges and active nav. --on-theme is the ink that
     sits on top of a filled --theme surface, so it must stay white in both
     modes; a filled badge never inverts. */
  --theme: #8c2f39;
  --hover: #6f242c;
  --on-theme: #ffffff;

  /* --- news badge hues ------------------------------------------------- */
  /* al-folio tints news categories rather than the accent, so the feed reads
     as a legend. These are the only colors on the site that are not oxblood
     or gray, and they only ever appear as a filled pip. */
  --badge-paper: #8c2f39;
  --badge-patent: #7b2fbe;
  --badge-presentation: #2f6f8c;
  --badge-service: #6c757d;
  --badge-award: #c8960c;

  /* --- type ------------------------------------------------------------ */
  /* One family for everything, headings included — al-folio never switches
     to a display face. Roboto is loaded; the rest is the system fallback. */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Bootstrap's ladder, which is what al-folio inherits. */
  --fs-xs: 0.7rem;     /* 11.2px — button pills, badges */
  --fs-sm: 0.8rem;     /* 12.8px — dates, meta, fine print */
  --fs-news: 0.875rem; /* 14px   — the news feed and other compact blocks */
  --fs-base: 1rem;     /* 16px   — everything that is a sentence */
  --fs-lg: 1.25rem;    /* 20px   — h5 / card headings */
  --fs-xl: 1.5rem;     /* 24px   — h4 / entry titles */
  --fs-2xl: 1.75rem;   /* 28px   — h3 */
  --fs-3xl: 2rem;      /* 32px   — h2 / section headings */
  --fs-4xl: 2.5rem;    /* 40px   — h1 / the name */

  /* --- metrics --------------------------------------------------------- */
  /* 800px is al-folio's container and the single most recognizable thing
     about it: every row of text on the site is this wide, and nothing is
     ever full-bleed. */
  --max: 800px;
  --pad-x: 20px;
  --header-h: 56px;
  --col-label: 116px; /* news dates, publication badges, entry dates */
  --col-gap: 16px;
  --sp-section: 2rem;
  --radius: 3px;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--theme);

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #1c1c1d;
  --card-bg: #212529;
  --text: #e8e8e8;
  --text-light: #a0a0a0;
  --divider: #424246;
  --code-bg: rgba(221, 143, 151, 0.08);

  /* A true oxblood vanishes into a near-black page, so the accent lifts to
     the rose it would be at 60% tint — still unmistakably red, not pink. */
  --theme: #dd8f97;
  --hover: #eaa9b0;
  --on-theme: #1c1c1d;

  --badge-paper: #9d3843;
  --badge-patent: #7b2fbe;
  --badge-presentation: #35708c;
  --badge-service: #6c757d;
  --badge-award: #b29400;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  /* The header is fixed, so the document has to start below it. */
  padding-top: var(--header-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--theme);
  text-decoration: none;
}

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

em {
  font-style: italic;
}

button {
  font: inherit;
  color: inherit;
}

hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--divider);
  margin: var(--sp-section) 0;
}

img {
  max-width: 100%;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--theme);
  background: var(--code-bg);
  border-radius: var(--radius);
  padding: 2px 4px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bg);
  color: var(--theme);
  padding: 10px 16px;
  border: 1px solid var(--divider);
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

.sprite {
  display: none;
}

/* =========================================================================
   Header — fixed, hairline-bottomed, social icons left and pages right.
   ========================================================================= */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  /* al-folio lets the page show faintly through the bar as it scrolls under. */
  opacity: 0.97;
}

.header__inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The scroll-progress hairline that sits flush under the bar. */
.progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  z-index: 99;
  width: 100%;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--theme);
}

.social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
}

.social__link {
  display: inline-flex;
  color: var(--text);
  transition: color 0.2s ease-in-out;
}

.social__link:hover {
  color: var(--theme);
}

.social__icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

/* --- primary nav ---------------------------------------------------- */

.nav__toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}

.nav__toggleBars,
.nav__toggleBars::before,
.nav__toggleBars::after {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__toggleBars {
  top: 50%;
  margin-top: -1px;
}

.nav__toggleBars::before {
  content: "";
  top: -7px;
  margin-left: 0;
  left: 0;
}

.nav__toggleBars::after {
  content: "";
  top: 7px;
  margin-left: 0;
  left: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggleBars {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__toggleBars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggleBars::after {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__item {
  background: none;
  border: 0;
  padding: 4px 0;
  font-size: var(--fs-base);
  color: var(--text);
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav__item:hover {
  color: var(--hover);
}

/* al-folio marks the current page with weight and color only — there is no
   underline, pill or box anywhere in the bar. */
.nav__item[aria-selected="true"] {
  color: var(--theme);
  font-weight: 700;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-left: 4px;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  transition: color 0.15s ease;
}

.iconbtn:hover {
  color: var(--hover);
}

.iconbtn svg {
  width: 18px;
  height: 18px;
}

/* One glyph at a time: sun while the page is light, moon while it is dark. */
.iconbtn__moon {
  display: none;
}

html[data-theme="dark"] .iconbtn__sun {
  display: none;
}

html[data-theme="dark"] .iconbtn__moon {
  display: block;
}

/* =========================================================================
   Page shell — one 800px column, nothing full-bleed.
   ========================================================================= */

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--pad-x) 0;
  outline: none;
}

/* Pages are tab panels: only the selected one is in the document. The fade
   is applied a frame after the swap so it actually plays. */
.page {
  display: none;
}

.page.is-active {
  display: block;
  opacity: 0;
}

.page.is-visible {
  opacity: 1;
  transition: opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .page.is-visible {
    transition: none;
  }
}

.page__head {
  margin-bottom: var(--sp-section);
}

.page__head h1 {
  font-size: var(--fs-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.page__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.25rem;
}

.section {
  margin-bottom: 2.5rem;
}

/* al-folio lowercases its section headings; these stay capitalized as
   written in the markup. */
.section__head h2,
.section__head--tight h2 {
  font-size: var(--fs-3xl);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.section__head--tight h2 {
  font-size: var(--fs-2xl);
}

.section__more {
  margin: 1rem 0 0;
  font-size: var(--fs-news);
}

/* =========================================================================
   Shared bits — eyebrows, ledes, tags, buttons.
   ========================================================================= */

.eyebrow {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.link {
  color: var(--theme);
}

.link:hover {
  color: var(--hover);
}

.lede {
  color: var(--text);
  margin-bottom: 1rem;
}

.lede--sm {
  font-size: var(--fs-news);
  color: var(--text-light);
}

/* Outlined pill, the same shape as the publication link buttons so the two
   read as one family. */
.tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 0.15rem 0.5rem;
  margin: 0 0.35rem 0.35rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  color: var(--theme);
  border-color: var(--theme);
  text-decoration: none;
}

.btn--primary {
  color: var(--on-theme);
  background: var(--theme);
  border-color: var(--theme);
}

.btn--primary:hover {
  color: var(--on-theme);
  background: var(--hover);
  border-color: var(--hover);
}

.btn__icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* =========================================================================
   Hero — the name splits bold/regular, and the portrait floats into the
   prose with a monospace contact block beneath it.
   ========================================================================= */

.hero {
  margin-bottom: var(--sp-section);
}

.hero__name {
  font-size: var(--fs-4xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.hero__name b {
  font-weight: 700;
}

.hero__affil {
  font-size: var(--fs-base);
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.hero__role,
.hero__bio {
  margin-bottom: 1rem;
}

.hero__role em {
  font-style: italic;
}

/* The float has to be declared before the paragraphs it wraps, so the
   figure comes first in the markup. */
.portrait {
  float: right;
  width: 32%;
  margin: 0 0 1rem 1.5rem;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.portrait__info {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text);
}

.portrait__info p {
  margin: 0 0 0.15rem;
}

/* Clear the float so the News heading never rides up beside the portrait. */
.hero::after {
  content: "";
  display: block;
  clear: both;
}

/* =========================================================================
   News — a date column on the left, a category pip under it, text on the
   right. Set a step smaller than body copy, as in al-folio.
   ========================================================================= */

.news {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-news);
}

.news__item {
  display: grid;
  grid-template-columns: var(--col-label) 1fr;
  gap: var(--col-gap);
  padding: 0.4rem 0;
  align-items: start;
}

/* Date and category pip share the left column, stacked. */
.news__when {
  padding-top: 0.05rem;
}

.news__date {
  display: block;
  font-weight: 700;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.news__text {
  margin: 0;
}

.news__text strong {
  font-weight: 700;
}

/* The category pip. Its hue comes from --badge-*, set per modifier below. */
.news__tag {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1em 0.45em;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius);
  color: #fff;
  white-space: nowrap;
  background: var(--badge-service);
}

.news__tag--paper {
  background: var(--badge-paper);
}

.news__tag--patent {
  background: var(--badge-patent);
}

.news__tag--presentation {
  background: var(--badge-presentation);
}

.news__tag--award {
  background: var(--badge-award);
}

.news__tag--service {
  background: var(--badge-service);
}

/* =========================================================================
   Publications — a venue badge in the left column, then title, authors,
   venue, and a row of outlined link buttons.
   ========================================================================= */

.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub {
  display: grid;
  grid-template-columns: var(--col-label) 1fr;
  gap: var(--col-gap);
  padding: 0.85rem 0;
  align-items: start;
}

.pub.is-hidden,
.is-hidden {
  display: none;
}

/* The filled venue chip. Long venue names ("BECITHCON") set a hair smaller
   so the chip keeps its width. */
.pub__year {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--on-theme);
  background: var(--theme);
  border-radius: var(--radius);
  padding: 0.25rem 0.5rem;
  margin-top: 0.15rem;
  /* Grid items stretch by default; the chip has to hug its venue instead. */
  justify-self: start;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Entries with no accepted venue yet get an outline instead of a fill, so
   "in review" never reads as a published venue. */
.pub__year--pending {
  color: var(--text-light);
  background: none;
  border: 1px solid var(--divider);
}

.pub__title {
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.pub__authors {
  font-size: var(--fs-news);
  margin-bottom: 0.15rem;
}

/* al-folio underlines the site owner in the author list rather than
   bolding — it stays legible in a long list of names. */
.pub__authors strong {
  font-weight: 400;
  border-bottom: 1px solid currentColor;
}

.pub__venue {
  font-size: var(--fs-news);
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 0;
}

.pub__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.5rem 0 0;
}

.pub__links .btn {
  padding: 0.2rem 0.7rem;
}

/* =========================================================================
   Publication filters — the same outlined pill as the link buttons, filled
   when active.
   ========================================================================= */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--sp-section);
}

.filter {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.filter:hover {
  color: var(--theme);
  border-color: var(--theme);
}

.filter.is-active {
  color: var(--on-theme);
  background: var(--theme);
  border-color: var(--theme);
}

/* =========================================================================
   Research topics — the number takes the same filled chip as a venue badge,
   so the two pages share one left-column rhythm.
   ========================================================================= */

.topic {
  display: grid;
  grid-template-columns: var(--col-label) 1fr;
  gap: var(--col-gap);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--divider);
  align-items: start;
}

.topic__num {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--on-theme);
  background: var(--theme);
  border-radius: var(--radius);
  padding: 0.25rem 0.6rem;
  margin-top: 0.3rem;
}

.topic__body h2 {
  font-size: var(--fs-xl);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.topic__body p {
  margin-bottom: 0.75rem;
}

.topic__papers {
  margin-bottom: 0;
}

.orgs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orgs li {
  font-size: var(--fs-sm);
  color: var(--text-light);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 0.25rem 0.7rem;
}

/* =========================================================================
   Experience entries — divider-separated rows with the dates in a narrow
   left column, al-folio's list rhythm.
   ========================================================================= */

.entry {
  display: grid;
  /* A hair wider than --col-label: date ranges like "Jun 2014 — Oct 2018"
     wrap onto three lines at 116px. */
  grid-template-columns: 138px 1fr;
  gap: var(--col-gap);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--divider);
  align-items: start;
}

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

.entry__meta {
  font-size: var(--fs-sm);
  color: var(--text-light);
  padding-top: 0.2rem;
}

.entry__when {
  font-weight: 700;
  color: var(--text);
}

.entry__where {
  margin-top: 0.1rem;
}

.entry__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.entry__org {
  font-size: var(--fs-news);
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.entry__note {
  font-size: var(--fs-news);
  margin-bottom: 0;
}

/* =========================================================================
   Cards & lists.
   ========================================================================= */

.grid {
  display: grid;
  gap: 1rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.card h3 {
  font-size: var(--fs-lg);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.card p {
  font-size: var(--fs-news);
  margin-bottom: 0;
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.duo .bullets li {
  font-size: var(--fs-news);
}

.edu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.edu__item {
  padding-bottom: 0.85rem;
}

.edu__degree {
  font-weight: 700;
  font-size: var(--fs-news);
  margin-bottom: 0.1rem;
}

.edu__org {
  font-size: var(--fs-news);
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 0.1rem;
}

.edu__when {
  font-size: var(--fs-sm);
  color: var(--text-light);
  margin-bottom: 0;
}

.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-news);
}

.plain li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--divider);
}

.plain li:last-child {
  border-bottom: 0;
}

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
}

/* An em dash rather than a disc — al-folio's lists are flat and typographic. */
.bullets li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-light);
}

.bullets--wide li {
  margin-bottom: 0.6rem;
}

/* =========================================================================
   Definition lists (skills, at-a-glance) — a bordered card whose rows are
   split by hairlines, matching al-folio's CV list groups.
   ========================================================================= */

.skills {
  margin: 0;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--card-bg);
}

.skills__row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: var(--col-gap);
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--divider);
}

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

.skills dt {
  font-size: var(--fs-news);
  font-weight: 700;
}

.skills dd {
  font-size: var(--fs-news);
  margin: 0;
  color: var(--text);
}

/* =========================================================================
   Footer — a hairline and centered fine print, nothing else.
   ========================================================================= */

.footer {
  max-width: var(--max);
  margin: 3rem auto 0;
  padding: 2.5rem var(--pad-x);
  border-top: 1px solid var(--divider);
  text-align: center;
  font-size: var(--fs-news);
  color: var(--text-light);
}

.footer__brand {
  margin-bottom: 0.75rem;
}

.footer__name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.footer__line {
  margin-bottom: 0;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer__links a {
  color: var(--text-light);
}

.footer__links a:hover {
  color: var(--theme);
  text-decoration: none;
}

.footer__fine {
  font-size: var(--fs-sm);
  margin: 0;
}

/* =========================================================================
   Responsive — below 576px the label columns collapse to stacked rows and
   the nav folds into a sheet under the bar.
   ========================================================================= */

@media (max-width: 720px) {
  .grid--2,
  .duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

@media (max-width: 576px) {
  :root {
    --pad-x: 16px;
    --fs-4xl: 2rem;
    --fs-3xl: 1.6rem;
  }

  .main {
    padding-top: 2rem;
  }

  .portrait {
    float: none;
    width: 100%;
    max-width: 260px;
    margin: 0 auto 1.25rem;
  }

  .portrait__info {
    text-align: center;
  }

  .news__item,
  .pub,
  .topic,
  .entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .news__date,
  .entry__meta {
    padding-top: 0;
  }

  .entry__where {
    display: inline;
  }

  .entry__when::after {
    content: " ·";
  }

  .entry__when {
    display: inline;
  }

  .pub__year,
  .topic__num {
    justify-self: start;
    margin-top: 0;
  }

  .nav__toggle {
    display: block;
  }

  /* The list drops out of the bar and becomes a sheet pinned under it. */
  .nav__list {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--divider);
    padding: 8px var(--pad-x) 12px;
  }

  .nav__list.is-open {
    display: flex;
  }

  .nav__item {
    text-align: left;
    padding: 10px 0;
    border-bottom: 1px solid var(--divider);
  }

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

  .social {
    gap: 12px;
  }
}
