/* =========================================================================
   COMPUTERWELT — stylesheet for lukasz-pudlo
   1981 computer-magazine page x Kraftwerk visual language.
   Cream paper, hard black ink, traffic-red accent, sparing phosphor green.
   Two typefaces: Hanken Grotesk (display & UI), IBM Plex Mono (computer voice).
   ========================================================================= */

/* ---------- 1. Tokens ---------- */

:root {
  --paper: #ece3cc;
  --paper-deep: #ddd2b4;
  --paper-edge: #c8bb96;
  --ink: #141414;
  --ink-soft: #4a4538;
  --ink-faint: #6f6957;
  --red: #d52b1e;
  --red-deep: #a51e14;
  --phosphor: #2bb673;
  --phosphor-dark: #07120b;
  --hairline: rgba(20, 20, 20, 0.22);
  --hairline-soft: rgba(20, 20, 20, 0.12);

  --font-display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --shell-max: 1180px;
  --shell-gutter: clamp(1rem, 3.5vw, 2.25rem);
  --rule: 1px solid var(--hairline);
  --rule-ink: 1px solid var(--ink);
}

/* ---------- 2. Reset ---------- */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(213, 43, 30, 0.04), transparent 50%),
    radial-gradient(ellipse at 90% 110%, rgba(20, 20, 20, 0.05), transparent 60%),
    var(--paper);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Paper halftone — sits between the page and the world. */
body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image: radial-gradient(rgba(20, 20, 20, 0.12) 1px, transparent 1.4px);
  background-size: 6px 6px;
  opacity: 0.35;
  mix-blend-mode: multiply;
}

/* A faint paper grain, very subtle */
body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    97deg,
    transparent 0 9px,
    rgba(20, 20, 20, 0.018) 9px 10px
  );
  mix-blend-mode: multiply;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

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

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.96;
}

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

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

.masthead__nav a:focus-visible,
.case-tabs__item a:focus-visible,
.contents__list a:focus-visible {
  outline-offset: -2px;
}

/* ---------- 3. Shell ---------- */

.magazine-shell {
  position: relative;
  z-index: 1;
  width: min(var(--shell-max), 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--shell-gutter) clamp(2rem, 6vw, 4rem);
}

.page-shell {
  padding: clamp(2rem, 5vw, 4rem) 0 0;
}

/* ---------- 4. Masthead ---------- */

.masthead {
  padding-bottom: 1.25rem;
  border-bottom: var(--rule-ink);
}

.masthead__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  border-bottom: var(--rule);
}

.masthead__top span + span::before {
  content: "·";
  padding: 0 0.45rem;
  color: var(--red);
}

.masthead__top .masthead__top-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.masthead__top .masthead__top-right::before {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--red);
  content: "";
  border-radius: 50%;
}

.masthead__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
  margin-top: 1rem;
}

.masthead__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.masthead__brand-glyph {
  display: inline-grid;
  place-items: center;
  width: 1.5em;
  height: 1em;
  padding-inline: 0.15em;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.38em;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.masthead__brand-name {
  font-feature-settings: "ss01";
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.masthead__nav a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--ink);
  transition: color 120ms ease;
}

.masthead__nav a::after {
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  background: var(--ink);
  content: "";
  transition: width 220ms ease;
}

.masthead__nav a:hover::after,
.masthead__nav a:focus-visible::after {
  width: 100%;
}

.masthead__nav a[aria-current="page"] {
  color: var(--red);
}

.masthead__nav a[aria-current="page"]::after {
  width: 100%;
  height: 3px;
  background: var(--red);
}

/* ---------- 5. Magazine furniture ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.eyebrow::before {
  display: inline-block;
  width: 1.4rem;
  height: 2px;
  background: var(--red);
  content: "";
}

.folio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.folio__num {
  padding: 0.18rem 0.4rem;
  background: var(--ink);
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.folio__sep {
  color: var(--ink-faint);
}

.red-bar {
  display: block;
  width: clamp(2.5rem, 6vw, 4.5rem);
  height: 4px;
  margin-bottom: 1.1rem;
  background: var(--red);
}

.headline {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.04em;
}

.headline--display {
  font-size: clamp(3.5rem, 12vw, 9rem);
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.standfirst {
  max-width: 36ch;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.4;
  color: var(--ink);
}

.standfirst--wide {
  max-width: 52ch;
}

.copy {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.copy p + p {
  margin-top: 1em;
}

.copy strong {
  font-weight: 800;
}

.columns-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 2.25rem);
}

@media (min-width: 760px) {
  .columns-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.rule {
  width: 100%;
  height: 1px;
  margin: clamp(2rem, 5vw, 3rem) 0;
  background: var(--ink);
  border: 0;
}

.rule--soft {
  background: var(--hairline);
}

.section-runner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1rem;
  border-top: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.section-runner__next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.2rem;
  transition: border-color 180ms ease;
}

.section-runner__next:hover,
.section-runner__next:focus-visible {
  border-bottom-color: var(--red);
}

/* ---------- 6. Buttons & links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: 1px solid var(--ink);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button::after {
  content: "▸";
  font-size: 0.85em;
  transform: translateY(-0.05em);
  transition: transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.button:hover::after,
.button:focus-visible::after {
  transform: translate(0.25em, -0.05em);
}

.button:active {
  transform: translateY(1px);
}

.button--ghost {
  background: transparent;
  color: var(--ink);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.button--ghost::after {
  display: none;
}

.button--large {
  padding: 1.15rem 1.8rem;
  font-size: 0.85rem;
}

.link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid var(--ink);
  transition: color 160ms ease, border-color 160ms ease;
}

.link::after {
  content: " ▸";
}

.link:hover,
.link:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---------- 7. Cover (home) ---------- */

.cover {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
}

@media (min-width: 880px) {
  .cover {
    grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr);
    align-items: start;
  }
}

.cover__lead {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}

.cover__headline {
  font-size: clamp(2.6rem, 8.2vw, 6rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
  overflow-wrap: break-word;
  hyphens: manual;
}

.cover__headline span {
  display: block;
}

.cover__headline .accent {
  color: var(--red);
}

.cover__ctas {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cover__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 4px;
  border-top-color: var(--red);
}

.cover__sidebar h2 {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.cover__sidebar .editors-mark {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.contents {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.25rem;
  border-top: var(--rule-ink);
}

.contents__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.contents__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contents__list li {
  border-top: var(--rule);
}

.contents__list li:last-child {
  border-bottom: var(--rule);
}

.contents__list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.95rem 0.25rem;
  color: var(--ink);
  transition: background-color 160ms ease, color 160ms ease, padding 160ms ease;
}

.contents__list a:hover,
.contents__list a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.contents__list a:hover .contents__num,
.contents__list a:focus-visible .contents__num {
  color: var(--paper);
}

.contents__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.18em;
}

.contents__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1;
}

.contents__desc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-align: right;
}

/* ---------- 8. Spread header (used on portfolio/about/contact) ---------- */

.spread-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.spread-header__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* ---------- 9. Portfolio tabs (case strip) ---------- */

.case-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-ink);
  border-bottom: var(--rule-ink);
}

.case-tabs__item {
  position: relative;
  flex: 1 1 auto;
  border-right: var(--rule);
}

.case-tabs__item:last-child {
  border-right: 0;
}

.case-tabs__item a {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease;
}

.case-tabs__item a:hover,
.case-tabs__item a:focus-visible {
  background: var(--paper-deep);
}

.case-tabs__item a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.case-tabs__item--index a {
  text-align: right;
}

.case-tabs__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.case-tabs__item a[aria-current="page"] .case-tabs__num {
  color: var(--paper);
}

.case-tabs__item a[aria-current="page"]::before {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  content: "";
}

.case-tabs__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- 10. Portfolio index ---------- */

.index-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: var(--rule-ink);
}

.story-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding: clamp(1.5rem, 4vw, 2.25rem) 0;
  border-bottom: var(--rule-ink);
}

@media (min-width: 760px) {
  .story-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.story-card__thumb {
  display: block;
  position: relative;
  padding: 0.5rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
  box-shadow:
    6px 6px 0 -1px var(--ink),
    6px 6px 0 0 var(--paper-edge);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.story-card__thumb:hover,
.story-card:focus-within .story-card__thumb {
  transform: translate(-2px, -2px);
  box-shadow:
    8px 8px 0 -1px var(--ink),
    8px 8px 0 0 var(--red);
}

.story-card__thumb-inner {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(45deg, rgba(20, 20, 20, 0.06) 0 2px, transparent 2px 7px),
    var(--paper);
  border: var(--rule);
  color: var(--ink);
  text-align: center;
  overflow: hidden;
}

.story-card__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--paper);
  pointer-events: none;
}

.story-card__thumb-glyph {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.story-card__thumb-tag {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.45rem 0.6rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.story-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.story-card__meta {
  display: flex;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.story-card__meta span + span {
  padding-left: 1rem;
  border-left: var(--rule);
}

.story-card__title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.story-card__strap {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--ink);
  max-width: 38ch;
}

.story-card__cta {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* ---------- 11. Article (project detail) ---------- */

.article-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

@media (min-width: 880px) {
  .article-header {
    grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr);
  }
}

.article-header__title {
  font-size: clamp(2.6rem, 7.5vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.article-header__strap {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.4;
  max-width: 40ch;
}

.meta-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--phosphor-dark);
  color: var(--phosphor);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  border: 1px solid var(--phosphor-dark);
  position: relative;
  overflow: hidden;
}

.meta-block::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(43, 182, 115, 0.06) 1px, transparent 1px);
  background-size: 100% 3px;
  mix-blend-mode: screen;
}

.meta-block dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
}

.meta-block dt {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(43, 182, 115, 0.7);
}

.meta-block dd {
  margin: 0;
  color: var(--phosphor);
}

.meta-block__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(43, 182, 115, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: rgba(43, 182, 115, 0.8);
}

.meta-block__head .led {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(43, 182, 115, 0.6);
}

.meta-block__head .led::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 6px rgba(43, 182, 115, 0.8);
}

.meta-block__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(43, 182, 115, 0.35);
}

.meta-block__ctas a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--phosphor);
  border-bottom: 1px solid rgba(43, 182, 115, 0.45);
  padding-bottom: 0.2rem;
  align-self: flex-start;
  transition: color 160ms ease, border-color 160ms ease;
}

.meta-block__ctas a:hover,
.meta-block__ctas a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

/* ---------- 12. Figure (printed-insert iframe) ---------- */

.figure-print {
  margin: 0;
  padding: clamp(0.6rem, 1.5vw, 1rem);
  background: var(--paper);
  border: var(--rule-ink);
  box-shadow:
    10px 10px 0 -1px var(--ink),
    10px 10px 0 0 var(--paper-edge);
  overflow: hidden;
}

.figure-print__caption-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  border-bottom: var(--rule);
  flex-wrap: wrap;
  min-width: 0;
}

.figure-print__caption-top > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.figure-print__caption-top .reload {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.figure-print__caption-top .reload:hover,
.figure-print__caption-top .reload:focus-visible {
  background: var(--red);
  border-color: var(--red);
}

.figure-print__frame {
  position: relative;
  background: #fff;
  border: var(--rule);
  overflow: hidden;
  margin-top: 0.6rem;
}

.figure-print__frame iframe {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 28rem;
  border: 0;
  display: block;
  background: #fff;
}

.figure-print__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.85rem;
  padding: 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.figure-print__caption .figure-print__label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.figure-print__caption em {
  font-style: italic;
  color: var(--ink-soft);
}

.fallback-note {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--paper-deep);
  border-left: 3px solid var(--red);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- 13. Body sections (project body, about, contact) ---------- */

.body-section {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.body-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  font-weight: 600;
}

.body-section__head .num {
  color: var(--ink-soft);
}

.body-section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.body-section .copy {
  max-width: 64ch;
}

/* About / contact specific layouts */

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 880px) {
  .about-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(15rem, 1fr);
  }
}

.about-sidebar {
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper-deep);
  border: var(--rule-ink);
}

.about-sidebar h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.about-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.about-sidebar li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.about-sidebar li:last-child {
  border-bottom: var(--rule);
}

.about-sidebar li span:last-child {
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.about-mark {
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  aspect-ratio: 1 / 1;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  position: relative;
}

.about-mark::before {
  position: absolute;
  inset: 0.5rem;
  content: "";
  border: 1px solid rgba(236, 227, 204, 0.35);
}

.about-mark__initials {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Contact */

.contact-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--paper-deep);
  border: var(--rule-ink);
  border-top-width: 6px;
  border-top-color: var(--red);
  position: relative;
}

.contact-card::before {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  content: "P.12 ▸ FORM";
}

.contact-email-button {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
}

.contact-email-button__link {
  border-right: 0;
}

.contact-email-button__link::after {
  display: none;
}

.contact-email-button__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 3.45rem;
  padding: 0 0.85rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-left-color: color-mix(in srgb, var(--paper) 35%, var(--ink));
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.contact-email-button:hover .contact-email-button__link,
.contact-email-button:focus-within .contact-email-button__link,
.contact-email-button__copy:hover,
.contact-email-button__copy:focus-visible,
.contact-email-button__copy--done {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.contact-email-button__copy:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.contact-email-button__copy:active {
  transform: translateY(1px);
}

.contact-email-button__icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: miter;
}

.contact-email-button__status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.contact-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.25rem;
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
}

@media (min-width: 760px) {
  .contact-meta {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-meta dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.contact-meta dd {
  margin: 0;
}

/* ---------- 14. Colophon (footer) ---------- */

.colophon {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 1.25rem 0 0;
  border-top: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

@media (min-width: 760px) {
  .colophon {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .colophon__right {
    text-align: right;
  }
}

.colophon__centre {
  text-align: center;
  color: var(--red);
}

/* ---------- 15. Motion ---------- */

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger > * {
  opacity: 0;
  animation: slide-up 520ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.stagger > :nth-child(1) { animation-delay: 40ms; }
.stagger > :nth-child(2) { animation-delay: 120ms; }
.stagger > :nth-child(3) { animation-delay: 200ms; }
.stagger > :nth-child(4) { animation-delay: 280ms; }
.stagger > :nth-child(5) { animation-delay: 360ms; }
.stagger > :nth-child(6) { animation-delay: 440ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stagger > * { opacity: 1; }
}

/* ---------- 16. Mobile ---------- */

@media (max-width: 760px) {
  .masthead__row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .masthead__nav {
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
  }

  .cover__sidebar {
    margin-top: 0.5rem;
  }

  .story-card__thumb {
    box-shadow: 4px 4px 0 -1px var(--ink), 4px 4px 0 0 var(--paper-edge);
  }

  .figure-print {
    box-shadow: 5px 5px 0 -1px var(--ink), 5px 5px 0 0 var(--paper-edge);
  }

  .case-tabs {
    flex-direction: column;
  }

  .case-tabs__item {
    border-right: 0;
    border-bottom: var(--rule);
  }

  .case-tabs__item:last-child {
    border-bottom: 0;
  }
}

/* ---------- 17. Utility ---------- */

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