/* ============================================================
   sections.css: the body sections of sska.sk
   One rhythm throughout: a 1px rule opens each section, the heading
   hangs from it in the left third, content starts in the next column.
   ============================================================ */

/* The page-long hue journey: stone, a warm afternoon, stone again. */
.paper {
  padding-top: 128px;
  background: linear-gradient(180deg,
    var(--surface) 0%,
    var(--surface) 22%,
    var(--hue-1) 48%,
    var(--hue-2) 78%,
    var(--surface) 100%);
}

.sec {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 0 var(--gutter) 136px;
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: var(--gutter);
  border-top: 1px solid var(--border-strong);
  padding-top: 14px;
  margin-bottom: 72px;
}

.sec-head h2 {
  font: 500 clamp(32px, 1.4rem + 1.7vw, 48px)/1 var(--font-display);
  letter-spacing: -0.03em;
}

.sec-sub {
  max-width: 34em;
  padding-top: 4px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.sec-sub a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--duration-fast) var(--ease-ui);
}

.sec-sub a:hover {
  text-decoration-color: var(--accent);
}

/* ============================================================
   EXPERIENCE: roles scroll past a pinned career axis
   ============================================================ */

.exp-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: 72px;
}

.role {
  padding-bottom: 104px;
  transition: opacity var(--duration-slow) var(--ease-ui);
}

.role-when {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.role-when span {
  font-weight: 400;
  color: var(--text-muted);
}

.role-co {
  font: 500 clamp(26px, 1.2rem + 0.9vw, 32px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.role-title {
  margin-top: 4px;
  font-size: 16px;
  color: var(--text-secondary);
}

.role-list {
  margin-top: 22px;
  display: grid;
  gap: 10px;
  max-width: 38em;
}

.role-list li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.role-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--border-strong);
}

.role-result {
  margin-top: 20px;
  max-width: 36em;
  padding-left: 22px;
  border-left: 2px solid var(--accent);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
}

.role-result b {
  font-weight: 600;
}

.role--edu {
  padding-bottom: 0;
}

.role--edu .role-co {
  font-size: 22px;
}

.role-when--gap {
  margin-top: 36px;
}

/* Steps not being read recede, so the eye stays on one role. */
.exp.is-pinned .role:not(.is-on) {
  opacity: 0.38;
}

/* The pinned visual */
.exp-pin {
  position: sticky;
  top: 132px;
  align-self: start;
}

.axis {
  --cols: 12;
  --gap: 4px;
  display: grid;
  gap: 12px;
  padding: 24px 24px 20px;
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--border);
}

.axis-years,
.axis-row {
  display: grid;
  grid-template-columns: 92px repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: center;
}

.axis-years {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.axis-years span:nth-child(1) { grid-column: 2; }
.axis-years span:nth-child(2) { grid-column: 5; }
.axis-years span:nth-child(3) { grid-column: 8; }
.axis-years span:nth-child(4) { grid-column: 11; }
.axis-years span:nth-child(5) { grid-column: 13; justify-self: end; }

.axis-row {
  color: color-mix(in srgb, var(--text-primary) 22%, transparent);
  transition: color var(--duration-base) var(--ease-ui);
}

.axis-row i {
  grid-row: 1;
  grid-column: 1;
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Twelve faint year squares, then the employed years drawn over them in
   the row's colour. Both are one background repeated per cell, so the
   axis needs no generated markup. */
.axis-row::before,
.axis-row::after {
  content: "";
  grid-row: 1;
  aspect-ratio: auto;
  height: 0;
  padding-bottom: calc((100% + var(--gap)) / var(--n) - var(--gap));
  background-image: linear-gradient(90deg, currentColor calc(100% - var(--gap)), transparent 0);
  background-size: calc((100% + var(--gap)) / var(--n)) 100%;
  background-repeat: repeat-x;
  border-radius: 2px;
}

.axis-row::before {
  --n: var(--cols);
  grid-column: 2 / -1;
  color: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.axis-row::after {
  --n: var(--len);
  grid-column: calc(var(--from) + 1) / span var(--len);
}

.axis-row i {
  color: var(--text-muted);
}

.axis-row.is-on {
  color: var(--accent);
}

.axis-row.is-on i {
  color: var(--text-primary);
}

.axis-fact {
  display: grid;
  margin-top: 28px;
  padding-inline: 4px;
}

.axis-fact p {
  grid-area: 1 / 1;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text-secondary);
  opacity: 0;
  translate: 0 8px;
  transition: opacity var(--duration-base) var(--ease-ui), translate var(--duration-slow) var(--ease-settle);
}

.axis-fact p.is-on {
  opacity: 1;
  translate: 0 0;
}

.axis-fact b {
  display: block;
  font: 500 64px/1 var(--font-display);
  letter-spacing: -0.035em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   WINDOW: evolved.sk opens to full as you scroll
   ============================================================ */

.window-track {
  position: relative;
  height: 230vh;
  margin-bottom: 120px;
}

.window-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 40px;
}

.window-head {
  text-align: center;
  padding-inline: var(--gutter);
  opacity: calc(1 - var(--p, 0) * 2.2);
}

.window-head h2 {
  font: 500 clamp(30px, 1.4rem + 1.6vw, 46px)/1.05 var(--font-display);
  letter-spacing: -0.03em;
}

.window-head p {
  margin-top: 10px;
  font-size: 17px;
  color: var(--text-secondary);
}

/* Scale grows from 1 toward the frame; the origin sits on the focal
   point (the product and price) so they stay in view at full size. */
.window {
  width: min(760px, 86vw);
  border-radius: calc(12px - var(--p, 0) * 8px);
  overflow: hidden;
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--border), 0 40px 80px -40px rgb(28 25 23 / 0.35);
  transform-origin: 50% 30%;
  transform: translateY(calc(var(--p, 0) * -64px)) scale(calc(1 + var(--p, 0) * 0.92));
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.window-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-bar span {
  margin-inline: auto;
  padding: 3px 40px;
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: 12px;
  color: var(--text-muted);
  translate: -16px 0;
}

.window img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* ============================================================
   GALLERY: real screens, one caption row each
   ============================================================ */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 88px var(--gutter);
  align-items: start;
}

.shot {
  grid-column: span 6;
}

.shot--wide {
  grid-column: 1 / span 7;
}

.shot-img {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--border);
}

.shot-img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  transition: scale 0.7s var(--ease-settle);
}

.shot-img:hover img {
  scale: 1.025;
}

/* The caption shares the image's own edges, which binds them. */
.cap {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 28px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 20px;
}

.cap b {
  font-weight: 500;
}

.cap span {
  color: var(--text-muted);
}

.cap a {
  justify-self: end;
  /* 44px tall to the finger, still one 20px line to the eye. */
  margin-block: -12px;
  padding-block: 12px;
  color: var(--text-primary);
  text-underline-offset: 3px;
}

.cap a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.gallery-note {
  grid-column: 9 / span 4;
  align-self: end;
  padding-bottom: 32px;
  font: 400 22px/1.3 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.gallery-note small {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  color: var(--text-muted);
}

/* The terminal is a screen like the others, drawn in HTML */
.term {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  box-shadow: 0 0 0 1px rgb(28 25 23 / 0.9);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-dark);
}

.term-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-dark);
}

.term-bar span {
  margin-left: 10px;
  font: 12px/1 var(--font-mono);
  color: var(--text-on-dark-muted);
}

.term-body {
  flex: 1;
  padding: 20px 22px;
  font: 13.5px/1.65 var(--font-mono);
  white-space: pre-wrap;
  overflow: hidden;
}

.t-dim { color: var(--text-on-dark-muted); }
.t-ok { color: #86efac; }
.t-acc { color: var(--accent); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--text-on-dark);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ============================================================
   HOW A FIX SHIPS: stepper synced to a console and a day of commits
   ============================================================ */

.sim {
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-card);
  overflow: hidden;
}

.sim-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid var(--border);
}

.sim-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  counter-reset: none;
}

.sim-steps li {
  display: flex;
  align-items: center;
}

/* A rail joins the steps, so they read as one sequence. */
.sim-steps li + li::before {
  content: "";
  width: 28px;
  height: 1px;
  margin-right: 4px;
  background: var(--border-strong);
}

.sim-steps button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-ui), background-color var(--duration-fast) var(--ease-ui);
}

.sim-steps button:hover {
  color: var(--text-primary);
  background: var(--surface-alt);
}

.sim-steps button i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1.5px currentColor;
  transition: background-color var(--duration-fast) var(--ease-ui);
}

.sim-steps button.is-done {
  color: var(--text-secondary);
}

.sim-steps button.is-done i {
  background: currentColor;
}

.sim-steps button[aria-selected="true"] {
  color: var(--text-primary);
}

.sim-steps button[aria-selected="true"] i {
  background: var(--accent);
  box-shadow: none;
}

.sim-ctl {
  display: flex;
  gap: 6px;
}

.sim-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: color var(--duration-fast) var(--ease-ui), box-shadow var(--duration-fast) var(--ease-ui);
}

.sim-btn:hover {
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--text-primary);
}

.sim-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  min-height: 420px;
}

.sim-console {
  display: grid;
  padding: 26px 28px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font: 14px/1.5 var(--font-mono);
}

.sim-pane {
  grid-area: 1 / 1;
  display: grid;
  align-content: start;
  gap: 8px;
  visibility: hidden;
}

.sim-pane.is-on {
  visibility: visible;
}

.sim-pane p {
  padding-left: 88px;
  text-indent: -88px;
}

.js .sim-pane p {
  opacity: 0;
  translate: 4px 0;
  transition: opacity 0.25s var(--ease-ui), translate 0.35s var(--ease-settle);
}

.js .sim-pane p.is-in,
.js .sim.is-static .sim-pane p {
  opacity: 1;
  translate: 0 0;
}

.sim-pane b {
  display: inline-block;
  min-width: 76px;
  margin-right: 12px;
  text-indent: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sim-pane i {
  font-style: normal;
  color: var(--text-on-dark-muted);
}

.c-cmd,
.c-note,
.c-sum,
.c-dim,
.c-add,
.c-del {
  padding-left: 0 !important;
  text-indent: 0 !important;
}

.c-cmd { color: var(--text-on-dark); }
.c-cmd::before { content: "$ "; color: var(--text-on-dark-muted); }
.c-note { color: var(--text-on-dark-muted); }
.c-dim { color: var(--text-on-dark-muted); }
.c-bad b { color: #fca5a5; }
.c-warn b { color: #fcd34d; }
.c-ok b { color: #86efac; }
.c-add { color: #86efac; }
.c-del { color: #fca5a5; }

.c-sum {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-dark);
  color: var(--text-on-dark);
}

.sim-day {
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-day-h {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 09:00 to 15:00 on one line; each commit sits at its real minute. */
.sim-hours {
  position: relative;
  display: flex;
  justify-content: space-between;
  height: 40px;
  margin-bottom: 12px;
  padding-top: 24px;
  border-bottom: 1px solid var(--border-strong);
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.sim-ev {
  display: grid;
  grid-template-columns: 48px 64px 1fr;
  column-gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-muted);
  transition: background-color var(--duration-base) var(--ease-ui), color var(--duration-base) var(--ease-ui);
}

.sim-ev b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.sim-ev span {
  grid-column: 3;
}

.sim-ev.is-on {
  background: var(--surface-alt);
  color: var(--text-primary);
}

.sim-ev.is-on b {
  color: var(--accent-text);
}

/* Commit ticks on the hour line, placed by minute after 09:00 of 360. */
.sim-tick {
  position: absolute;
  bottom: -5px;
  left: calc(var(--t) / 360 * 100%);
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 2px;
  background: var(--border-strong);
  transition: background-color var(--duration-base) var(--ease-ui), scale var(--duration-base) var(--ease-settle);
}

.sim-tick.is-on {
  background: var(--accent);
  scale: 1.3;
}

/* ============================================================
   STACK MATRIX
   ============================================================ */

.matrix-wrap {
  overflow-x: auto;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.matrix th,
.matrix td {
  height: 44px;
  text-align: center;
}

.matrix thead th {
  height: auto;
  padding: 0 4px 14px;
  vertical-align: bottom;
  font-weight: 500;
  font-size: 14px;
}

.matrix thead th small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.matrix tbody th {
  width: 32%;
  padding-right: 16px;
  text-align: left;
  font-weight: 400;
  white-space: nowrap;
  color: var(--text-secondary);
}

.matrix tbody tr {
  border-top: 1px solid var(--border);
  transition: background-color var(--duration-fast) var(--ease-ui);
}

.matrix tbody tr:hover {
  background: color-mix(in srgb, var(--surface-alt) 70%, transparent);
}

.matrix tbody tr:hover th {
  color: var(--text-primary);
}

/* A cell is a square: empty is a faint outline, used is solid ink. The
   text inside stays for screen readers and tables copied out. */
.matrix td {
  position: relative;
  font-size: 0;
}

.matrix td::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--border);
  vertical-align: middle;
}

.matrix td.y::before {
  background: var(--text-primary);
  box-shadow: none;
  transition: background-color var(--duration-fast) var(--ease-ui), scale 0.5s var(--ease-settle);
}

.matrix tbody tr:hover td.y::before {
  background: var(--accent);
}

/* Columns fill oldest employer first when the matrix comes into view. */
.js .matrix:not(.is-in) td.y::before {
  scale: 0;
}

.matrix td:nth-child(2).y::before { transition-delay: 0s, 0ms; }
.matrix td:nth-child(3).y::before { transition-delay: 0s, 90ms; }
.matrix td:nth-child(4).y::before { transition-delay: 0s, 180ms; }
.matrix td:nth-child(5).y::before { transition-delay: 0s, 270ms; }
.matrix td:nth-child(6).y::before { transition-delay: 0s, 360ms; }
.matrix td:nth-child(7).y::before { transition-delay: 0s, 450ms; }
.matrix td:nth-child(8).y::before { transition-delay: 0s, 540ms; }

.langs {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-muted);
}

/* ============================================================
   CONTACT: a stepped form whose first step is one tap and an email
   ============================================================ */

.form {
  margin-left: calc((100% + var(--gutter)) / 3);
  max-width: 560px;
}

.form-step {
  border: 0;
  min-width: 0;
}

.js .form-step:not(.is-on) {
  display: none;
}

.form-step + .form-step {
  margin-top: 40px;
}

.js .form-step + .form-step {
  margin-top: 0;
}

.form-count {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.opts {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--surface-alt);
  font-size: 16px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow var(--duration-fast) var(--ease-ui), background-color var(--duration-fast) var(--ease-ui);
}

.opt:hover {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.opt input {
  appearance: none;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px var(--text-muted);
  transition: background-color var(--duration-fast) var(--ease-ui), box-shadow var(--duration-fast) var(--ease-ui);
}

.opt input:checked {
  background: var(--accent);
  box-shadow: none;
}

.opt:has(input:checked) {
  box-shadow: inset 0 0 0 2px var(--text-primary);
}

.opt input:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

/* Filled field, label inside: the box is the only surface. */
.f {
  position: relative;
  margin-bottom: 8px;
}

.f label {
  position: absolute;
  left: 14px;
  top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
}

.f input,
.f textarea {
  width: 100%;
  height: 60px;
  padding: 26px 14px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-alt);
  font-size: 16px;
  outline: 0;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow var(--duration-fast) var(--ease-ui);
}

.f textarea {
  height: auto;
  min-height: 150px;
  padding-top: 30px;
  resize: vertical;
  line-height: 1.5;
}

.f input:hover,
.f textarea:hover {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.f input:focus,
.f textarea:focus {
  box-shadow: inset 0 0 0 2px var(--text-primary);
}

.f [aria-invalid="true"] {
  box-shadow: inset 0 0 0 2px var(--error);
}

.form-error {
  font-size: 14px;
  color: var(--error-text);
}

.form-error:not(:empty) {
  margin-top: 6px;
}

.form-next {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border-radius: 10px;
  background: var(--text-primary);
  color: var(--surface);
  font-size: 16px;
  font-weight: 500;
  transition: background-color var(--duration-fast) var(--ease-ui), scale 0.1s;
}

.form-next:hover {
  background: color-mix(in srgb, var(--text-primary) 86%, var(--accent));
}

.form-next:active {
  scale: 0.985;
}

.form-next[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: end;
}

.form-back {
  height: 50px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: color var(--duration-fast) var(--ease-ui);
}

.form-back:hover {
  color: var(--text-primary);
}

/* Without the step script both steps show, so Back has nothing to do. */
html:not(.js) .form-back,
html:not(.js) [data-next] {
  display: none;
}

/* ============================================================
   CLOSING PANEL: the CV itself, three pages fanned
   ============================================================ */

.close {
  max-width: calc(var(--page-max) + 48px);
  margin-inline: auto;
  padding: 0 var(--space-6) 24px;
}

.close-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: 460px;
  padding: 72px;
  border-radius: 28px;
  background: var(--surface-alt);
}

/* One pale bloom, warm core and cool flanks, running off the right edge.
   Turned down until it is almost doubtful. */
.close-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 44%;
  right: -12%;
  top: -30%;
  bottom: -30%;
  opacity: 0.6;
  filter: blur(40px);
  background:
    radial-gradient(38% 42% at 56% 52%, rgb(255 107 53 / 0.28), transparent),
    radial-gradient(34% 62% at 26% 50%, rgb(214 211 209 / 0.7), transparent),
    radial-gradient(30% 60% at 92% 46%, rgb(214 211 209 / 0.7), transparent);
}

.close-copy h2 {
  max-width: 11em;
  font: 500 clamp(32px, 1.4rem + 1.8vw, 50px)/1.04 var(--font-display);
  letter-spacing: -0.03em;
}

.close-copy p {
  margin-top: 14px;
  max-width: 26em;
  font-size: 17px;
  color: var(--text-secondary);
}

.close-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.close-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 5px;
  transition: text-decoration-color var(--duration-fast) var(--ease-ui);
}

.close-link:hover {
  text-decoration-color: var(--accent);
}

.pages {
  position: relative;
  height: 360px;
}

.pages img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 216px;
  translate: -50% -50%;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(28 25 23 / 0.06), 0 24px 48px -20px rgb(28 25 23 / 0.35);
  transition: rotate 0.6s var(--ease-settle), translate 0.6s var(--ease-settle);
}

.pages img:nth-child(1) { rotate: 7deg; translate: calc(-50% + 70px) calc(-50% + 12px); }
.pages img:nth-child(2) { rotate: -4deg; translate: calc(-50% - 40px) calc(-50% - 4px); }

.close-panel:hover .pages img:nth-child(1) { rotate: 11deg; translate: calc(-50% + 110px) calc(-50% + 16px); }
.close-panel:hover .pages img:nth-child(2) { rotate: -7deg; translate: calc(-50% - 70px) calc(-50% - 6px); }

/* ============================================================
   FOOTER: one inset card
   ============================================================ */

.foot {
  padding: 16px;
}

.foot-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  gap: 48px 24px;
  min-height: 380px;
  padding: 40px 44px 36px;
  border-radius: 16px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.foot-cols {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0 64px;
  font-size: 15px;
}

.foot-cols b {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

.foot-cols a {
  display: block;
  line-height: 30px;
  color: var(--text-on-dark-muted);
  transition: color var(--duration-fast) var(--ease-ui);
}

.foot-cols a:hover {
  color: var(--text-on-dark);
}

.foot-mark {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  font: 500 clamp(28px, 1.2rem + 1.6vw, 44px)/0.8 var(--font-display);
  letter-spacing: -0.03em;
}

.foot-mark .mark {
  width: 34px;
  height: 58px;
}

.foot-legal {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  font-size: 14px;
  color: var(--text-on-dark-muted);
}

/* ============================================================
   SCHEMES AND MOTION PREFERENCES
   ============================================================ */

@media screen and (prefers-color-scheme: dark) {
  /* Captures of light interfaces glare against a dark page. */
  .shot-img img,
  .window img {
    filter: brightness(0.9);
  }

  .close-panel::after {
    opacity: 0.35;
    background:
      radial-gradient(38% 42% at 56% 52%, rgb(255 107 53 / 0.3), transparent),
      radial-gradient(34% 62% at 26% 50%, rgb(68 64 60 / 0.8), transparent),
      radial-gradient(30% 60% at 92% 46%, rgb(68 64 60 / 0.8), transparent);
  }

  .foot-card {
    box-shadow: 0 0 0 1px var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  .window {
    transform: none;
  }

  .window-head {
    opacity: 1;
  }

  .js .matrix:not(.is-in) td.y::before {
    scale: 1;
  }

  .t-cursor {
    animation: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .cap {
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
  }

  .cap span {
    grid-column: 1;
    grid-row: 2;
  }

  .cap a {
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 1000px) {
  .axis-years span:nth-child(4) {
    display: none;
  }

  .exp-body {
    column-gap: 40px;
  }

  .axis {
    padding: 18px;
  }

  .axis-years,
  .axis-row {
    grid-template-columns: 76px repeat(var(--cols), minmax(0, 1fr));
  }

  .gallery-note {
    grid-column: 8 / span 5;
  }

  .close-panel {
    padding: 56px 48px;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }

  .paper {
    padding-top: 72px;
  }

  .sec {
    padding-bottom: 96px;
  }

  .sec-head {
    grid-template-columns: 1fr;
    row-gap: 14px;
    margin-bottom: 40px;
  }

  .sec-head h2 br {
    display: none;
  }

  /* The pin collapses: the axis shows once above the roles, unpinned. */
  .exp-body {
    display: flex;
    flex-direction: column-reverse;
    gap: 48px;
  }

  .exp-pin {
    position: static;
  }

  .axis-fact {
    display: none;
  }

  /* Unpinned, the axis is a plain career chart: every row reads. */
  .axis-row {
    color: color-mix(in srgb, var(--text-primary) 55%, transparent);
  }

  .axis-row i {
    color: var(--text-secondary);
  }

  .exp.is-pinned .role:not(.is-on) {
    opacity: 1;
  }

  .role {
    padding-bottom: 64px;
  }

  .window-track {
    height: auto;
    margin-bottom: 96px;
  }

  .window-stage {
    position: static;
    height: auto;
    overflow: visible;
    padding-inline: var(--gutter);
  }

  .window {
    width: 100%;
    transform: none;
  }

  .window-head {
    opacity: 1;
    padding: 0;
  }

  .gallery {
    display: block;
  }

  .shot {
    margin-bottom: 48px;
  }

  .term-body {
    font-size: 12px;
    padding: 14px;
  }

  .gallery-note,
  .gallery-note small {
    font-size: 19px;
  }

  .gallery-note {
    padding-bottom: 0;
  }

  .sim-top {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }

  .sim-steps {
    justify-content: space-between;
  }

  .sim-steps li + li::before {
    width: 8px;
  }

  .sim-steps button {
    padding: 0 6px;
    gap: 6px;
    font-size: 14px;
  }

  .sim-ctl {
    justify-content: flex-end;
  }

  .sim-main {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .sim-console {
    min-height: 330px;
    padding: 18px;
    font-size: 12.5px;
  }

  .sim-pane p {
    padding-left: 70px;
    text-indent: -70px;
  }

  .sim-pane b {
    min-width: 62px;
    margin-right: 8px;
  }

  .matrix tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    font-size: 14px;
    white-space: normal;
    min-width: 150px;
  }

  .matrix thead th {
    writing-mode: vertical-rl;
    rotate: 180deg;
    text-align: left;
    padding: 4px 0;
    height: 92px;
  }

  .matrix thead th small {
    display: inline;
    margin: 0 0 0 6px;
  }

  .form {
    margin-left: 0;
  }

  .close {
    padding-inline: 12px;
  }

  .close-panel {
    grid-template-columns: 1fr;
    padding: 40px 24px 24px;
    border-radius: 22px;
    min-height: 0;
  }

  .close-panel::after {
    left: -10%;
    right: -30%;
    top: 50%;
    bottom: -40%;
  }

  .pages {
    height: 280px;
    margin-top: 24px;
  }

  .pages img {
    width: 160px;
  }

  .pages img:nth-child(1) { translate: calc(-50% + 48px) calc(-50% + 10px); }
  .pages img:nth-child(2) { translate: calc(-50% - 30px) calc(-50% - 4px); }

  .foot {
    padding: 12px;
  }

  .foot-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 40px;
    padding: 28px 24px;
    min-height: 0;
  }

  .foot-cols,
  .foot-mark,
  .foot-legal {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .foot-cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }

  .foot-cols a {
    line-height: 44px;
  }
}
