:root {
  color-scheme: dark;
  --bg: #121319;
  --panel: rgba(28, 29, 38, 0.86);
  --edge: rgba(255, 255, 255, 0.1);
  --text: #e6e6eb;
  --soft: #abacb9;
  --accent: #3d8bff;
  --accent-2: #62d4ff;
  --l0: rgba(255, 255, 255, 0.055);
  --l1: #0e4429;
  --l2: #006d32;
  --l3: #26a641;
  --l4: #35c257;
  --skew: -12deg;
  --cut: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

::selection {
  color: var(--bg);
  background: var(--accent);
}

/* ---------- Backdrop ---------- */

.bg {
  --px: 0;
  --py: 0;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(60vw 60vh at 85% 110%, rgba(61, 139, 255, 0.06), transparent 70%),
    radial-gradient(50vw 50vh at 0% 0%, rgba(98, 212, 255, 0.03), transparent 70%), var(--bg);
}

.bg > * {
  position: absolute;
}

.bg-grid {
  inset: -40px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 60% 50%, #000, transparent 75%);
  translate: calc(var(--px) * -8px) calc(var(--py) * -8px);
}

/* A dark slanted slab with accent-coloured edges: wide behind the portrait, a thin strip elsewhere */
.bg-slab {
  top: -20vh;
  right: -8vw;
  width: 40vw;
  height: 140vh;
  background: linear-gradient(170deg, #1c1d26, #15161d 60%);
  border-left: 3px solid var(--accent);
  transform: translateX(calc(var(--px) * -14px)) skewX(var(--skew));
  transition: width 0.7s var(--ease), opacity 0.7s var(--ease);
}

.bg-slab::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -26px;
  width: 4px;
  background: var(--accent);
  opacity: 0.45;
}

body:not([data-screen="profile"]) .bg-slab {
  width: 11vw;
  opacity: 0.85;
}

.bg-word {
  left: 16vw;
  bottom: -9vw;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 34vw;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.04);
  translate: calc(var(--px) * 22px) calc(var(--py) * 10px);
}

/* Slash that sweeps across on every screen change */
.wipe {
  position: fixed;
  inset: -10% -30%;
  z-index: 50;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent-2), var(--accent) 40%, #121319 40% 46%, var(--accent) 46%);
  transform: translateX(-135%) skewX(var(--skew));
}

.wipe.run {
  animation: wipe 0.62s cubic-bezier(0.7, 0, 0.3, 1);
}

.wipe.boot {
  animation: boot 0.95s cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes boot {
  0%,
  40% {
    transform: translateX(0) skewX(var(--skew));
  }
  100% {
    transform: translateX(135%) skewX(var(--skew));
  }
}

@keyframes wipe {
  0% {
    transform: translateX(-135%) skewX(var(--skew));
  }
  45%,
  55% {
    transform: translateX(0) skewX(var(--skew));
  }
  100% {
    transform: translateX(135%) skewX(var(--skew));
  }
}

/* ---------- Frame ---------- */

.app {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

.side {
  display: flex;
  flex-direction: column;
  padding: 34px 0 26px 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.logo-mark {
  width: 15px;
  height: 28px;
  background: var(--accent);
  transform: skewX(var(--skew));
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-block: auto;
}

/* Slanted menu entries; the label is un-skewed inside */
.menu button {
  position: relative;
  width: 230px;
  padding: 11px 24px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  text-align: left;
  letter-spacing: 0.02em;
  color: var(--soft);
  transform: skewX(var(--skew));
  transition: color 0.2s, background 0.2s, width 0.35s var(--ease), translate 0.35s var(--ease);
}

.menu button span {
  display: inline-block;
  transform: skewX(calc(var(--skew) * -1));
}

.menu button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--edge);
  transition: background 0.2s;
}

.menu button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.menu button[aria-selected="true"] {
  width: 250px;
  color: #121319;
  background: var(--accent);
  translate: 8px 0;
}

.menu button[aria-selected="true"]::before {
  left: -12px;
  background: var(--accent);
}

/* ---------- Screens ---------- */

.screens {
  min-height: 0;
  padding: 34px 48px 28px 24px;
  overflow-y: auto;
}

.screen {
  display: none;
  min-height: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

/* Contents arrive one after another, after the wipe has passed */
.screen.active > *,
.profile.active .profile-copy > *,
.profile.active .portrait {
  animation: arrive 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 240ms);
}

.screen.active > :nth-child(2),
.profile-copy > :nth-child(2) {
  --i: 1;
}
.screen.active > :nth-child(3),
.profile-copy > :nth-child(3) {
  --i: 2;
}
.screen.active > :nth-child(4),
.profile-copy > :nth-child(4) {
  --i: 3;
}
.profile-copy > :nth-child(5) {
  --i: 4;
}
.profile-copy > :nth-child(6) {
  --i: 5;
}
.profile-copy > :nth-child(7) {
  --i: 6;
}

.profile.active > * {
  animation: none;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
}

.kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 0.9;
  letter-spacing: -0.005em;
}

.screen-head {
  margin-bottom: 4px;
}

/* Panel with two cut corners */
.panel {
  position: relative;
  padding: 24px 26px;
  background: var(--panel);
  border-left: 3px solid var(--accent);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  backdrop-filter: blur(14px);
}

.panel-label {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--soft);
}

/* ---------- Profile ---------- */

.screen.profile.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

h1 {
  margin: 6px 0 0 -0.03em;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(110px, 17vw, 250px);
  line-height: 0.78;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  text-shadow: 4px 4px 0 var(--accent);
}

.lede {
  max-width: 44ch;
  margin-top: 30px;
  font-size: 18px;
  color: var(--soft);
}

/* Two-part slanted tag: an accent label joined to a dark value */
.learning {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  line-height: 1.3;
}

.learning span,
.learning b {
  padding: 6px 18px;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}

.learning span {
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: #121319;
  background: var(--accent);
}

.learning b {
  margin-left: -7px;
  font-size: 15px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
}

.record {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 30px;
}

.record-total {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.record-total b {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 84px;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.record-total span {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.gauges {
  flex: 1;
  max-width: 340px;
  display: grid;
  gap: 14px;
}

.gauge p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.gauge b {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  transform: skewX(-30deg);
}

.track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.1s var(--ease) 0.5s;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  position: relative;
  padding: 13px 34px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.04em;
  border: 2px solid var(--text);
  transform: skewX(var(--skew));
  background: linear-gradient(90deg, var(--text) 50%, transparent 50%) 100% 0 / 201% 100%;
  transition: background-position 0.35s var(--ease), color 0.25s, translate 0.2s;
}

.btn span {
  display: inline-block;
  transform: skewX(calc(var(--skew) * -1));
}

.btn:hover {
  color: var(--bg);
  background-position: 0 0;
  translate: 4px 0;
}

.btn.primary {
  color: #121319;
  border-color: transparent;
  background: linear-gradient(90deg, var(--text) 50%, var(--accent) 50%) 100% 0 / 201% 100%;
}

.btn.primary:hover {
  background-position: 0 0;
}

.portrait {
  position: relative;
  /* Capped so the 460px avatar is never stretched much. */
  width: min(30vw, 46vh, 360px);
  margin-right: 3vw;
}

/* Slanted frame with an offset outline behind it */
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--text);
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
  translate: 16px 16px;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #121319;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.6s var(--ease);
}

.portrait:hover img {
  scale: 1.06;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(10, 10, 14, 0.85));
}

/* Print-style dots over the portrait, strongest in the lower corner */
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(rgba(10, 10, 14, 0.55) 1px, transparent 1.6px) 0 0 / 5px 5px;
  mask-image: linear-gradient(200deg, transparent 35%, #000);
  pointer-events: none;
}

.portrait figcaption {
  z-index: 2;
  position: absolute;
  left: 9%;
  bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-2);
}

.portrait figcaption b {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--text);
}

/* ---------- Activity ---------- */

.panel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
  margin-bottom: 18px;
}

.summary {
  font-size: 17px;
  color: var(--soft);
}

.summary strong {
  margin-right: 6px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 40px;
  line-height: 0.8;
  color: var(--l4);
}

.legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.legend span:first-child {
  margin-right: 4px;
}

.legend span:last-child {
  margin-left: 4px;
}

.legend i {
  width: 12px;
  height: 12px;
}

.legend i,
.cell {
  background: var(--l0);
}

:is(.cell, .legend i)[data-level="1"] {
  background: var(--l1);
}
:is(.cell, .legend i)[data-level="2"] {
  background: var(--l2);
}
:is(.cell, .legend i)[data-level="3"] {
  background: var(--l3);
}
:is(.cell, .legend i)[data-level="4"] {
  background: var(--l4);
}

.heatmap-scroll {
  overflow-x: auto;
  padding: 6px 2px 8px;
}

/* Cells stretch to fill the panel; the calendar scrolls sideways when it can't fit. */
.heatmap {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px 6px;
  /* Rows keep their natural height; stretching them would widen the square cells. */
  align-content: start;
  min-width: 720px;
  min-height: 150px;
}

.months {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(var(--weeks), 1fr);
  column-gap: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.months span {
  white-space: nowrap;
}

.days {
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  row-gap: 4px;
  align-items: center;
  font-size: 10px;
  /* Shorter than a cell, so the labels never set the row height. */
  line-height: 1;
  color: var(--soft);
}

.cells {
  grid-row: 2;
  grid-column: 2;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
  grid-auto-columns: 1fr;
  gap: 4px;
}

.cell {
  aspect-ratio: 1;
  transition: scale 0.15s;
}

.cell.pad {
  visibility: hidden;
}

.cell:hover {
  scale: 1.35;
  outline: 2px solid var(--text);
}

.readout {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.readout b {
  color: var(--l4);
}

/* Per-month totals as stacks of blocks */
.months-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  align-items: end;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--soft);
}

.months-chart .bar {
  --unit: 9px;
  height: calc(var(--blocks) * var(--unit));
  min-height: 2px;
  margin-bottom: 6px;
  background: repeating-linear-gradient(to top, var(--l3) 0 calc(var(--unit) - 3px), transparent 0 var(--unit));
}

.months-chart .peak .bar {
  background: repeating-linear-gradient(to top, var(--l4) 0 calc(var(--unit) - 3px), transparent 0 var(--unit));
}

.months-chart .value {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text);
}

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

/* Project picker: slanted tabs with upright labels */
.project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tabs button {
  padding: 8px 22px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.1;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: color 0.2s, background 0.2s;
}

.project-tabs button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.11);
}

.project-tabs button[aria-selected="true"] {
  color: #121319;
  background: var(--accent);
}

.missions {
  display: grid;
  gap: 16px;
  max-width: 940px;
}

.mission {
  display: block;
  padding: 26px 34px 30px;
  border-left-width: 5px;
  transition: translate 0.3s var(--ease), border-color 0.3s, background 0.3s;
  animation: arrive 0.45s var(--ease) both;
}

.mission:hover {
  translate: 10px 0;
  border-left-color: var(--accent-2);
  background: rgba(30, 30, 40, 0.86);
}

/* The main project gets a tint and a top line */
.mission.main {
  background: linear-gradient(115deg, rgba(61, 139, 255, 0.1), transparent 46%), var(--panel);
}

.mission.main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
}

.mission .kicker {
  margin-bottom: 10px;
  font-size: 15px;
}

.mission .desc {
  font-size: 18px;
  color: var(--text);
}

.mission-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 44px;
  margin-top: 20px;
}

.mission-stats li {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.mission-stats b {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 0.82;
  color: var(--accent-2);
}

.mission-stats span {
  max-width: 9ch;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--soft);
}

.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 32px;
  margin-top: 22px;
}

.highlights li {
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.16);
}

.highlights b {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
}

.highlights span {
  font-size: 15px;
  color: var(--soft);
}

.mission .chips {
  margin-top: 22px;
}

.mission .btn {
  display: inline-block;
  margin-top: 24px;
}

.mission:hover .btn {
  background-position: 0 0;
  translate: 4px 0;
}

/* Optional picture on the right; the text keeps clear of it */
.mission.has-art {
  padding-right: 230px;
}

.mission-art {
  position: absolute;
  right: 22px;
  top: 50%;
  width: 190px;
  height: 190px;
  object-fit: contain;
  translate: 0 -50%;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
  transition: scale 0.3s var(--ease);
}

.mission:hover .mission-art {
  scale: 1.06;
}

.mission-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.mission h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 0.95;
}

.badge {
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-2);
  border: 1px solid currentColor;
  transform: skewX(var(--skew));
}

/* The title's letters sit low in their line box, so centre the badge on the letters */
.mission-head .badge {
  position: relative;
  top: clamp(6px, 0.8vw, 11px);
}

.mission .desc {
  max-width: 66ch;
  margin-top: 10px;
  color: var(--soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chips span {
  padding: 3px 14px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}

.mission-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.mission-link::after {
  content: "";
  width: 26px;
  height: 3px;
  background: currentColor;
  transform: skewX(-40deg);
  transition: width 0.3s var(--ease);
}

.mission:hover .mission-link::after {
  width: 52px;
}

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

.links {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.links :is(a, div) {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 16px 28px;
  text-align: left;
  border-left: 3px solid var(--accent);
  transform: skewX(var(--skew));
  background: linear-gradient(90deg, var(--accent) 50%, var(--panel) 50%) 100% 0 / 201% 100%;
  transition: background-position 0.4s var(--ease), color 0.25s, translate 0.3s var(--ease);
}

.links :is(a, div) > * {
  transform: skewX(calc(var(--skew) * -1));
}

.links a:hover {
  color: #121319;
  background-position: 0 0;
  translate: 12px 0;
}

.where {
  width: 96px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.handle {
  flex: 1;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1;
}

.go {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Small screens: menu on top, page scrolls ---------- */

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app {
    display: block;
    height: auto;
  }

  .side {
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 14px;
    padding: 16px 16px 12px;
    background: rgba(10, 10, 14, 0.82);
    border-bottom: 1px solid var(--edge);
    backdrop-filter: blur(12px);
  }

  .logo {
    font-size: 24px;
  }

  .menu {
    flex-direction: row;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
  }

  .menu button,
  .menu button[aria-selected="true"] {
    width: auto;
    padding: 8px 14px;
    font-size: 20px;
    translate: 0;
  }

  .bg-word {
    display: none;
  }

  .screens {
    padding: 28px 16px 48px;
    overflow: visible;
  }

  .screen.active {
    justify-content: flex-start;
  }

  .screen.profile.active {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: min(62vw, 280px);
    margin: 0 0 0 4px;
    order: -1;
  }

  h1 {
    font-size: clamp(88px, 30vw, 170px);
  }

  .record {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }

  .gauges {
    max-width: none;
  }

  .mission.has-art {
    padding-right: 30px;
  }

  .mission.has-art .mission-head {
    padding-right: 96px;
    min-height: 84px;
  }

  .mission-art {
    top: 16px;
    right: 14px;
    width: 96px;
    height: 96px;
    translate: 0;
  }

  /* No room for the slanted slab here: its lines would run through the text */
  .bg-slab {
    display: none;
  }

  .panel {
    padding: 20px 18px;
  }

  .months-chart {
    gap: 3px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .mission {
    padding: 22px 20px 26px;
  }

  .project-tabs button {
    padding: 7px 16px;
    font-size: 18px;
  }

  .links :is(a, div) {
    gap: 14px;
    padding: 14px 18px;
  }

  .where {
    width: 74px;
  }

  .go {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Not-found page ---------- */

.lost {
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 18px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px clamp(20px, 10vw, 160px);
}

.lost h1 {
  margin: 0;
}

.lost .lede {
  margin: 0;
}

.lost .btn {
  display: inline-block;
  margin-top: 14px;
}
