/* ===========================================================================
   Amina Baktiyarova
   Newsreader for reading text, Inter for navigation and labels.
   =========================================================================== */

:root {
  --paper: #FFFFFF;
  --navy: #071528;
  --ink: #0D1E3C;
  --muted: #33507A;
  --burgundy: #7A1F2B;
  --rule: rgba(10, 27, 54, 0.12);

  --shell: 1000px;
  --pad: 40px;
  --measure: 720px;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 450;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

a { color: var(--navy); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }

img { max-width: 100%; }

/* --------------------------------------------------------------- skip link */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  background: var(--paper);
  color: var(--navy);
  border: 1.5px solid var(--burgundy);
  padding: 10px 18px;
}
.skip:focus {
  left: var(--pad);
  top: calc(env(safe-area-inset-top, 0px) + 10px);
}

/* ------------------------------------------------------------------ header */

header { border-bottom: 1px solid var(--rule); }

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 32px;
  padding-block: 26px;
}

.mark {
  font-size: 22px;
  font-weight: 550;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin-right: auto;
}
.mark span { color: var(--burgundy); }

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
}
header nav a {
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
}
header nav a:hover { border-bottom-color: var(--burgundy); }
header nav a[aria-current] { color: var(--navy); border-bottom-color: var(--burgundy); }

/* --------------------------------------------------------------- page head */

.top { padding-top: 76px; padding-bottom: 44px; }

h1 {
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.014em;
  color: var(--navy);
  margin: 0 0 18px;
}

.lede {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.38;
  color: var(--ink);
  margin: 0 0 16px;
}

.top > p:last-child { margin: 0; max-width: var(--measure); }

/* ---------------------------------------------------------------- headings */

h2 {
  font-size: 26px;
  font-weight: 500;
  color: var(--burgundy);
  margin: 0 0 16px;
  line-height: 1.25;
}

h3 {
  font-size: 22px;
  font-weight: 550;
  color: var(--navy);
  margin: 0 0 4px;
  line-height: 1.3;
}

section { margin-bottom: 68px; }

section > p { margin: 0 0 18px; max-width: var(--measure); }
section > p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------- homepage photographs */

.photos { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 72px; }
.photos img { display: block; height: auto; }

/* Widths are each photograph's share of the combined aspect ratio
   (1.5000 + 1.2142 + 1.4988 + 0.7500 = 4.9630), so every photograph in the
   row ends up the same height with nothing cropped. */
.photos img:nth-child(1) { width: calc((100% - 48px) * 0.302237); }
.photos img:nth-child(2) { width: calc((100% - 48px) * 0.244650); }
.photos img:nth-child(3) { width: calc((100% - 48px) * 0.301995); }
.photos img:nth-child(4) { width: calc((100% - 48px) * 0.151118); }

/* ------------------------------------------------------------- simple lists */

.projects, .entries { list-style: none; margin: 26px 0 0; padding: 0; max-width: var(--measure); }
.projects li, .entries li { margin-bottom: 26px; }
.projects li:last-child, .entries li:last-child { margin-bottom: 0; }
.projects h3, .entries h3 { margin: 0 0 4px; }
.projects p, .entries p { margin: 0; }
.entries h3 a { color: var(--navy); border-bottom: 1.5px solid var(--burgundy); }

.roles { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.roles li { position: relative; padding-left: 24px; margin-bottom: 12px; }
.roles li:last-child { margin-bottom: 0; }
.roles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--burgundy);
}

ul.plain { list-style: none; margin: 0 0 18px; padding: 0; max-width: var(--measure); }
ul.plain li { position: relative; padding-left: 24px; margin-bottom: 14px; }
ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--burgundy);
}
ul.plain strong { font-weight: 550; color: var(--navy); }

.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; }
.cols2 li { margin-bottom: 12px; }

/* ------------------------------------------------------------------- links */

.more {
  display: inline-block;
  margin-top: 22px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  color: var(--navy);
  border-bottom: 1.5px solid var(--burgundy);
  padding-bottom: 2px;
}
.more:hover { color: var(--burgundy); }

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 28px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
}
.jump a { color: var(--ink); border-bottom: 1.5px solid transparent; padding-bottom: 3px; }
.jump a:hover { border-bottom-color: var(--burgundy); }

/* -------------------------------------------------------------- filter bar */

.tagbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-bottom: 56px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
}
.tag {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1.5px solid transparent;
  padding: 0 0 3px;
  cursor: pointer;
}
.tag:hover { border-bottom-color: var(--burgundy); }
.tag.on { color: var(--navy); border-bottom-color: var(--burgundy); }
.tag:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }

.empty { margin: 0; }

/* ------------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 44px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cards li { display: flex; flex-direction: column; }
.cards li[hidden] { display: none; }
.cards h3 { margin: 0 0 10px; }
.cards p { font-size: 18px; line-height: 1.58; margin: 0 0 22px; }
.cards .foot { margin-top: auto; }

.kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--burgundy);
  margin: 0 0 8px;
}

.cards .spec { list-style: none; margin: 0 0 24px; padding: 0; }
.cards .spec li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 11px;
  font-size: 18px;
  line-height: 1.55;
}
.cards .spec li:last-child { margin-bottom: 0; }
.cards .spec li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 9px;
  height: 2px;
  background: var(--burgundy);
}

.btn {
  display: inline-block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--burgundy);
  background: none;
  border: 1.5px solid var(--burgundy);
  padding: 11px 22px;
}
.btn:hover { background: var(--burgundy); color: #FFFFFF; }
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.aside { font-size: 18px; margin: 34px 0 0; max-width: var(--measure); }
.aside a { border-bottom: 1.5px solid var(--burgundy); }

/* ------------------------------------------------------------------ panels */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  margin-top: 36px;
}

.panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.split h3, .panels h3 { margin: 0 0 10px; }
.split p, .panels p { margin: 0; font-size: 18px; line-height: 1.58; }

.panel, .note, .doc-link {
  border-left: 2px solid var(--burgundy);
  padding-left: 28px;
  margin-top: 40px;
  max-width: var(--measure);
}
.panel h3, .note h3, .doc-link h3 { margin: 0 0 10px; }
.panel p, .note p { margin: 0 0 12px; font-size: 18px; line-height: 1.58; }
.panel p:last-child, .note p:last-child { margin-bottom: 0; }
.note ul { list-style: none; margin: 0; padding: 0; }
.note ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 11px;
  font-size: 18px;
  line-height: 1.55;
}
.note ul li:last-child { margin-bottom: 0; }
.note ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 9px;
  height: 2px;
  background: var(--burgundy);
}

/* ---------------------------------------------------------- numbered steps */

.flow {
  list-style: none;
  counter-reset: step;
  margin: 32px 0 0;
  padding: 0;
  max-width: var(--measure);
}
.flow li {
  counter-increment: step;
  position: relative;
  padding-left: 54px;
  margin-bottom: 32px;
}
.flow li:last-child { margin-bottom: 0; }
.flow li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.06em;
  font-size: 26px;
  font-weight: 500;
  color: var(--burgundy);
}
.flow h3 { margin: 0 0 8px; }
.flow p { margin: 0; font-size: 18px; line-height: 1.58; }

/* ------------------------------------------------------------------- table */

table { border-collapse: collapse; margin: 18px 0 0; max-width: var(--measure); }
table th, table td { text-align: left; vertical-align: top; border: 0; padding: 0 0 14px; }
table th { width: 150px; padding-right: 28px; font-weight: 550; color: var(--navy); }
table td { color: var(--ink); }
table a { border-bottom: 1.5px solid var(--burgundy); }
table tr:last-child th, table tr:last-child td { padding-bottom: 0; }

/* ------------------------------------------------------------ long articles */

.prose { max-width: var(--measure); }
.prose h2 { margin: 46px 0 14px; }
.prose > h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; }
.prose a, .top .meta a, .doc-link .meta a { border-bottom: 1.5px solid var(--burgundy); }
.prose ul { list-style: none; margin: 0 0 18px; padding: 0; }
.prose ul li { position: relative; padding-left: 24px; margin-bottom: 12px; line-height: 1.58; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--burgundy);
}

.doc-link { margin-bottom: 44px; }
.doc-link .meta {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 20px;
}

.doc-figure { margin: 0 0 24px; max-width: 520px; }
.doc-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  -webkit-touch-callout: none;
}
.doc-figure figcaption {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.55;
}

/* --------------------------------------------------------------- post list */

.posts { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.posts li { margin-bottom: 30px; }
.posts li:last-child { margin-bottom: 0; }
.posts h3 { margin: 0 0 5px; }
.posts h3 a { color: var(--navy); border-bottom: 1.5px solid transparent; }
.posts h3 a:hover { border-bottom-color: var(--burgundy); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  color: var(--muted);
}
.meta .tag { font-size: 16px; color: var(--burgundy); padding: 0; }
.meta .tag:hover { border-bottom-color: var(--burgundy); }
.top .meta { margin-top: 18px; }

.post-end { margin-top: 44px; }

/* ------------------------------------------------------------------ footer */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding-block: 34px 64px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  color: var(--muted);
}
.flinks { display: flex; flex-wrap: wrap; gap: 26px; margin-bottom: 12px; }
footer a { color: var(--ink); border-bottom: 1.5px solid transparent; padding-bottom: 2px; }
footer a:hover { border-bottom-color: var(--burgundy); }
footer p { margin: 0; }

/* =========================================================== narrow screens */

@media (max-width: 1099px) {
  section { margin-bottom: 64px; }
  h2 { font-size: 24px; }
  .top { padding-top: 60px; padding-bottom: 36px; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .split, .panels { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .cols2 { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
}

@media (max-width: 699px) {
  :root { --pad: 20px; }
  body { font-size: 19px; }

  .bar { padding-block: 20px; gap: 8px 20px; }
  header nav { gap: 18px; font-size: 14px; }

  .top { padding-top: 48px; padding-bottom: 32px; }
  h1 { margin-bottom: 16px; }
  h2 { font-size: 23px; }
  .lede { font-size: 22px; }

  .photos { gap: 12px; margin-bottom: 64px; }
  .photos img:nth-child(1) { width: calc((100% - 12px) * 0.50020); order: 1; }
  .photos img:nth-child(3) { width: calc((100% - 12px) * 0.49980); order: 2; }
  .photos img:nth-child(2) { width: calc((100% - 12px) * 0.61817); order: 3; }
  .photos img:nth-child(4) { width: calc((100% - 12px) * 0.38183); order: 4; }

  .cards p, .cards .spec li, .aside { font-size: 17px; }
  .split p, .panels p, .panel p, .note p, .note ul li, .flow p { font-size: 17px; }
  .flow li { padding-left: 42px; }
  .panel, .note, .doc-link { padding-left: 22px; }

  table th, table td { display: block; width: auto; padding: 0; }
  table th { padding-top: 16px; }
  table td { padding-bottom: 0; }
  table tr:first-child th { padding-top: 0; }
}
