/* ==========================================================================
   alkuzaei.com
   VOICE    Formal, quiet and exact: an operations manager's own record.
   IDEA     An executive masthead: the name set large, a portrait in a
            document mount, and a thick-over-thin double rule beneath,
            as on formal stationery.
   COLOUR   Warm ivory paper, charcoal ink, burgundy used sparingly.
   TYPE     Newsreader (headings, statements) + IBM Plex Sans (text).
   LAYOUT   Start-aligned editorial grid, wide reading column, generous air.

   Layout uses logical properties (margin-inline-start, inset-inline-start),
   so a future right-to-left edition can reuse this file. See
   docs/ARCHITECTURE.md.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  --paper: #f7f4ee;
  --paper-deep: #efe9df;
  --sheet: #fffdf9;
  --ink: #24211f;
  --ink-soft: #57514b;
  --rule: #ddd5c9;
  --rule-strong: #bdb3a5;
  --wine: #6e1f2e;
  --wine-deep: #561623;

  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --size-small: 0.875rem;
  --size-body: 1.0625rem;
  --size-lead: 1.25rem;
  --size-h2: clamp(1.625rem, 1.15rem + 1.5vw, 2.25rem);
  --size-h1: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);

  --measure: 40rem;
  --wrap: 75rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(3.5rem, 7vw, 6.5rem);
}

/* ------------------------------------------------------------------ base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--size-body);
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.12;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--size-h1);
  letter-spacing: -0.012em;
}

h2 {
  font-size: var(--size-h2);
  letter-spacing: -0.006em;
}

h3 {
  font-family: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--wine);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(110, 31, 46, 0.4);
  text-underline-offset: 0.22em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--wine-deep);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection {
  background: rgba(110, 31, 46, 0.16);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* The identity's signature: thick over thin, as on formal stationery. */
.double-rule {
  display: block;
  height: 6px;
  border-top: 2px solid var(--wine);
  border-bottom: 1px solid var(--wine);
}

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.55rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover {
  background: var(--wine-deep);
  border-color: var(--wine-deep);
  color: var(--paper);
}

.button-quiet {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink);
}

.button-quiet:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------------------------------------------------------- preview bar */

.preview-bar {
  margin: 0;
  padding: 0.45rem var(--gutter);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
}

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

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem 1.75rem;
  min-height: 4.5rem;
}

.brand {
  margin-inline-end: auto;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover {
  border-bottom-color: var(--rule-strong);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--wine);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1rem;
  height: 1px;
  background: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.menu-icon::before {
  top: -0.3rem;
}

.menu-icon::after {
  top: 0.3rem;
}

@media (max-width: 53.99rem) {
  .header-inner {
    flex-wrap: wrap;
  }

  .js .menu-button {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    padding: 0.25rem var(--gutter) 1.25rem;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    box-shadow: 0 18px 30px -24px rgba(36, 33, 31, 0.45);
  }

  .js .site-nav[data-open="true"] {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav a {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--rule);
    font-size: 1rem;
  }

  .js .site-nav a[aria-current="page"] {
    border-bottom-color: var(--rule);
    color: var(--wine);
  }

  /* Without the script, the menu stays visible on its own line. */
  html:not(.js) .site-nav {
    order: 3;
    width: 100%;
    padding-bottom: 0.75rem;
  }
}

/* -------------------------------------------------------------- masthead */

.masthead {
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--section);
}

.masthead-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta mark"
    "name mark";
  align-items: end;
  column-gap: clamp(1.25rem, 4vw, 3rem);
}

.masthead-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: clamp(0.9rem, 2vw, 1.4rem);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.masthead-name {
  grid-area: name;
}

.masthead-mark {
  grid-area: mark;
}

.masthead-role {
  color: var(--wine);
  font-weight: 500;
}

.masthead-place {
  margin-inline-start: 0.85rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 1px solid var(--rule-strong);
  color: var(--ink-soft);
}

.masthead-name {
  font-family: var(--display);
  font-size: clamp(2.75rem, 1.4rem + 5.4vw, 6rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.portrait,
.monogram {
  width: clamp(5rem, 8.5vw, 8.25rem);
  padding: 5px;
  border: 1px solid var(--rule-strong);
  background: var(--sheet);
}

/* The photo keeps its own proportions: it is never cropped or stretched. */
.portrait img {
  width: 100%;
  height: auto;
}

.monogram {
  aspect-ratio: 4 / 5;
}

.monogram {
  display: grid;
}

.monogram span {
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--wine);
  font-family: var(--display);
  font-size: clamp(1.35rem, 1rem + 1.1vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.masthead-rule {
  margin-block: clamp(1.5rem, 3vw, 2.25rem) clamp(2.25rem, 4.5vw, 3.5rem);
}

/* The site's one entrance: on the home page the rule draws across once. */
@media (prefers-reduced-motion: no-preference) {
  .masthead-rule {
    transform-origin: left center;
    animation: rule-draw 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
  }

  @keyframes rule-draw {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
}

.masthead-body {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 2.75rem clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.masthead-lead {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}

.statement {
  max-width: 31ch;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.26;
  text-wrap: pretty;
}

.masthead-intro {
  max-width: 37rem;
  color: var(--ink-soft);
}

.masthead-lead .actions {
  align-items: center;
  margin-top: 0.5rem;
}

.text-link {
  margin-inline-start: 0.5rem;
  font-size: 0.9375rem;
}

.masthead-record {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.record-list > div {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.record-list dd {
  margin-top: 0.15rem;
  font-weight: 500;
  line-height: 1.45;
}

@media (max-width: 53.99rem) {
  .masthead-body {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 30rem) {
  .masthead-top {
    grid-template-areas:
      "meta meta"
      "name mark";
  }

  .masthead-meta {
    font-size: 0.875rem;
  }

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

/* -------------------------------------------------------------- sections */

.band {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}

.band-alt,
.band-contact {
  border-top: 0;
  background: var(--paper-deep);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 0.75rem 2rem;
  align-items: baseline;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head > p {
  max-width: var(--measure);
  color: var(--ink-soft);
}

.more {
  margin-top: 2rem;
  font-size: 0.9375rem;
}

@media (max-width: 53.99rem) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------- achievements */

.achievements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4.5rem);
  padding: 0;
  list-style: none;
}

.achievements li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding-block: 1.35rem 1.6rem;
  border-top: 1px solid var(--rule-strong);
}

.achievements a {
  font-size: var(--size-small);
}

@media (max-width: 45rem) {
  .achievements {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------- case studies */

.case-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.case-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 0.9rem 2rem;
  padding-block: 1.75rem 1.9rem;
  border-bottom: 1px solid var(--rule-strong);
}

.case-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 0.3rem;
}

.case-period {
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.case-title {
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
}

.case-title a {
  color: var(--ink);
  text-decoration: none;
}

/* The whole row is the link target. */
.case-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.case-title a:focus-visible {
  outline: none;
}

.case-item:has(a:focus-visible) {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
}

.case-item:hover .case-title a {
  color: var(--wine);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(110, 31, 46, 0.4);
}

.case-summary {
  max-width: var(--measure);
  color: var(--ink-soft);
}

@media (max-width: 45rem) {
  .case-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    padding-top: 0;
  }
}

/* Status: a small shape plus words, so colour is never the only signal. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: var(--size-small);
  font-weight: 500;
  line-height: 1.4;
}

.status::before {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border: 1.5px solid var(--wine);
}

.status-experience::before {
  background: var(--wine);
}

.status-production::before {
  border-radius: 50%;
  background: var(--wine);
}

.status-prototype::before {
  border-radius: 50%;
  background: linear-gradient(90deg, var(--wine) 50%, transparent 50%);
}

.status-archived::before {
  border-radius: 50%;
}

.status-concept::before {
  border-style: dashed;
  border-radius: 50%;
}

.legend {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.legend-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.25rem 2rem;
}

.legend-list dd {
  margin-top: 0.3rem;
}

/* ---------------------------------------------------------- capabilities */

.capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 2.5rem);
}

.capability h3 {
  margin-bottom: 0.6rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule-strong);
}

.capability ul {
  padding: 0;
  list-style: none;
}

.capability li {
  padding-block: 0.32rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.tools strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 62rem) {
  .capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 34rem) {
  .capabilities {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------- contact band */

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 1rem 2rem;
  align-items: baseline;
}

.contact-band-body > * + * {
  margin-top: 0.85rem;
}

.contact-email {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.contact-email a {
  color: var(--ink);
  text-decoration-color: var(--wine);
}

.availability {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

@media (max-width: 53.99rem) {
  .contact-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------ inner pages */

.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  max-width: 22em;
}

.standfirst {
  max-width: 38rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: var(--size-lead);
  line-height: 1.55;
}

.page-body {
  padding-block: clamp(2.5rem, 5vw, 4rem) var(--section);
}

.page-body.narrow > * {
  max-width: 52rem;
}

.page-section ~ .page-section {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-head .section-title {
  margin-bottom: 0;
}

.aside-title {
  margin-bottom: 0.75rem;
  font-family: var(--text);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

.facts dt,
.glance dt,
.record-list dt,
.contact-list dt,
.legend-list dd {
  color: var(--ink-soft);
  font-size: var(--size-small);
  line-height: 1.5;
}

/* Two columns: facts beside the text on wide screens. */
.split {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 17rem);
  justify-content: space-between;
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.split > .profile {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 1.5rem;
}

.split > .prose {
  grid-column: 1;
  grid-row: 1;
}

@media (max-width: 53.99rem) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split > .profile,
  .split > .prose {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
}

.profile,
.glance {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.facts > div,
.glance dl > div {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.facts dd,
.glance dd {
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.glance ul {
  padding: 0;
  list-style: none;
}

.glance li + li {
  margin-top: 0.15rem;
}

/* ----------------------------------------------------------------- prose */

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose > h2 {
  margin-top: 2.4em;
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem);
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose > h3 {
  margin-top: 2em;
}

.prose > h2 + *,
.prose > h3 + * {
  margin-top: 0.75em;
}

.prose ul,
.prose ol {
  padding-inline-start: 1.25em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--wine);
}

.prose code {
  padding: 0.05em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--sheet);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.prose blockquote {
  padding-inline-start: 1.25rem;
  border-inline-start: 2px solid var(--wine);
  font-family: var(--display);
  font-size: 1.25rem;
}

.figure img {
  border: 1px solid var(--rule-strong);
  background: var(--sheet);
}

.figure figcaption,
.structure figcaption {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

/* Note box */
.note {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--rule-strong);
  background: var(--sheet);
  font-size: 0.9375rem;
}

.note > * + * {
  margin-top: 0.5rem;
}

.note-label {
  color: var(--wine);
  font-weight: 600;
}

/* Process steps */
.prose .steps {
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.prose > .steps {
  margin-top: 2rem;
}

.prose .steps li {
  position: relative;
  margin: 0;
  padding-inline-start: 3.25rem;
  padding-bottom: 1.5rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border: 1px solid var(--wine);
  border-radius: 50%;
  background: var(--paper);
  color: var(--wine);
  font-family: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
}

.steps li::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(1.0625rem - 0.5px);
  top: 2.375rem;
  bottom: 0.25rem;
  border-inline-start: 1px solid var(--rule-strong);
}

.prose .steps li:last-child {
  padding-bottom: 0;
}

.steps li:last-child::after {
  display: none;
}

.step-title {
  display: block;
  padding-top: 0.2rem;
  font-weight: 600;
  line-height: 1.5;
}

.step-text {
  display: block;
  color: var(--ink-soft);
}

/* Team structure diagram */
.structure {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--sheet);
  text-align: center;
}

.structure-head {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.structure-head strong {
  display: block;
  font-weight: 600;
  line-height: 1.4;
}

.structure-head span {
  display: block;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.prose .structure-units {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
}

/* Connector lines from the manager to each unit. */
.structure-units::before {
  content: "";
  position: absolute;
  top: -2.5rem;
  left: 50%;
  height: 1.25rem;
  border-left: 1px solid var(--rule-strong);
}

.structure-units::after {
  content: "";
  position: absolute;
  top: -1.25rem;
  left: 12.5%;
  right: 12.5%;
  border-top: 1px solid var(--rule-strong);
}

.prose .structure-units li {
  position: relative;
  margin: 0;
  padding: 0.65rem 0.4rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.structure-units li::before {
  content: "";
  position: absolute;
  top: calc(-1.25rem - 1px);
  left: 50%;
  height: 1.25rem;
  border-left: 1px solid var(--rule-strong);
}

@media (max-width: 34rem) {
  .prose .structure-units {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
  }

  .structure-units::before,
  .structure-units::after,
  .structure-units li::before {
    display: none;
  }
}

/* Principles grid (About page) */
.prose .principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  padding: 0;
  list-style: none;
}

.prose .principles li {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-strong);
  color: var(--ink-soft);
}

.principles strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 40rem) {
  .prose .principles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------ case pages */

.crumb {
  margin-bottom: 1.5rem;
  font-size: var(--size-small);
}

.case-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
}

.status-note {
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 16.5rem) minmax(0, var(--measure));
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4rem) var(--section);
}

.glance {
  position: sticky;
  top: 1.5rem;
}

@media (max-width: 53.99rem) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .glance {
    position: static;
  }
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  padding-bottom: var(--section);
}

.pager-link {
  display: block;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.pager-next {
  text-align: end;
}

.pager-label {
  display: block;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.pager-title {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.3;
}

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

@media (max-width: 40rem) {
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager-next {
    text-align: start;
  }

  .pager-empty {
    display: none;
  }
}

/* ------------------------------------------------------------ experience */

.timeline,
.seasons,
.credentials {
  padding: 0;
  list-style: none;
}

.timeline {
  border-top: 1px solid var(--ink);
}

.role,
.season {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem 2.5rem;
}

.role {
  padding-block: 2rem 2.25rem;
  border-bottom: 1px solid var(--rule-strong);
}

.role-period {
  padding-top: 0.3rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.role-body {
  max-width: 46rem;
}

.role-title {
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.3;
}

.role-featured .role-title {
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem);
}

.role-org {
  margin-top: 0.35rem;
  font-weight: 500;
}

.role-place {
  color: var(--ink-soft);
  font-weight: 400;
}

.role-note {
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.role-points {
  margin-top: 1rem;
  padding-inline-start: 1.15em;
}

.role-points li + li {
  margin-top: 0.4rem;
}

.role-points li::marker {
  color: var(--wine);
}

.role-link {
  margin-top: 1.1rem;
  font-size: 0.9375rem;
}

.role-secondary .role-title {
  font-size: 1.2rem;
}

.seasons {
  border-top: 1px solid var(--ink);
}

.season {
  padding-block: 1.75rem 2rem;
  border-bottom: 1px solid var(--rule);
}

.season-year {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.05;
  white-space: nowrap;
}

.season-body {
  max-width: 46rem;
}

.season-title {
  font-size: 1.125rem;
}

.season-meta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.season-meta span + span {
  margin-inline-start: 0.75rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid var(--rule-strong);
}

.season-body > p:not(.season-meta),
.season-body > ul {
  margin-top: 0.75rem;
}

.season-body > ul {
  padding-inline-start: 1.15em;
}

.season-body li + li {
  margin-top: 0.35rem;
}

.season-body li::marker {
  color: var(--wine);
}

.season-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.9375rem;
}

@media (max-width: 45rem) {
  .role,
  .season {
    grid-template-columns: minmax(0, 1fr);
  }

  .role-period {
    padding-top: 0;
  }
}

/* --------------------------------------------------------- qualifications */

.credentials {
  border-top: 1px solid var(--ink);
}

.credential {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 2rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--rule-strong);
}

.credential-title {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
}

.credential-meta {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.credential-meta span + span {
  margin-inline-start: 0.75rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid var(--rule-strong);
}

.credential-year {
  padding-top: 0.3rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.credential-link {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

.credential .review-note {
  margin-top: 0.85rem;
}

.group-note,
.group-text {
  max-width: var(--measure);
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- contact */

.contact-list {
  max-width: 48rem;
  border-top: 1px solid var(--ink);
}

.contact-list > div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule-strong);
}

.contact-list dt {
  padding-top: 0.35rem;
}

.contact-list dd {
  font-size: var(--size-lead);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.page-contact .availability {
  max-width: 48rem;
  margin-top: 1.75rem;
}

.pending {
  color: var(--ink-soft);
  font-size: 1rem;
  font-style: italic;
}

@media (max-width: 40rem) {
  .contact-list > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-list dt {
    padding-top: 0;
  }
}

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

.site-footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2.5rem;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.footer-sign {
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-bottom: 1.75rem;
}

.sign-name {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1.25;
}

.sign-rule {
  opacity: 0.7;
}

.sign-role {
  color: var(--wine);
  font-size: 0.9375rem;
  font-weight: 500;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--ink-soft);
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-meta {
  display: grid;
  gap: 0.15rem;
  text-align: end;
}

@media (max-width: 45rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-meta {
    text-align: start;
  }
}

@media (max-width: 34rem) {
  .footer-sign {
    grid-template-columns: minmax(0, 1fr);
  }

  .sign-rule {
    order: 3;
  }
}

/* ------------------------------------------------------ featured project */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.feature-figure img,
.figure img {
  width: 100%;
  border: 1px solid var(--rule-strong);
  background: var(--sheet);
}

.feature-figure figcaption {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.feature-text {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.feature-title {
  margin-bottom: 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.875rem);
  font-weight: 500;
  line-height: 1.2;
}

.feature-title a {
  color: var(--ink);
  text-decoration: none;
}

.feature-title a:hover {
  color: var(--wine);
}

.feature-summary {
  color: var(--ink-soft);
}

.feature-facts {
  margin-block: 1.25rem 1.5rem;
  border-top: 1px solid var(--rule);
}

.feature-facts > div {
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--rule);
}

.feature-facts dt {
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.feature-facts dd {
  font-weight: 500;
  line-height: 1.45;
}

@media (max-width: 53.99rem) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------- evidence: images, galleries */

/* Images open enlarged; the cursor says so. */
a.zoom {
  display: block;
  cursor: zoom-in;
}

a.zoom:focus-visible {
  outline-offset: 4px;
}

.figure figcaption {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
}

.figure-hint {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

/* Tall phone screenshots stay a readable size inside the text column. */
.figure-phone {
  max-width: 19rem;
}

/* Blocks that leave the text column to use the full width. */
.case-wide {
  padding-block: 0.5rem 2.5rem;
}

.case-head + .case-wide {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.case-layout:has(+ .case-wide) {
  padding-bottom: 2.5rem;
}

.case-wide + .case-layout {
  padding-top: 0.5rem;
}

.case-continue > .prose {
  grid-column: 2;
}

@media (max-width: 53.99rem) {
  .case-continue > .prose {
    grid-column: 1;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2rem clamp(1rem, 2vw, 1.75rem);
  padding: 0;
  list-style: none;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Every screen sits in the same tall box, so the captions line up. The
   screenshots are only scaled to fit, never cropped or stretched. */
.gallery-item a.zoom {
  aspect-ratio: 1 / 2.12;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.gallery-item a.zoom:hover img {
  opacity: 0.9;
}

.gallery-caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  color: var(--ink-soft);
  font-size: var(--size-small);
  line-height: 1.5;
}

.gallery-number {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--wine);
  border-radius: 50%;
  color: var(--wine);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.gallery-caption strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 62rem) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 34rem) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
  }
}

/* -------------------------------------------------------------- lightbox */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(28, 25, 23, 0.96);
  color: #f1ece4;
}

.lightbox::backdrop {
  background: rgba(28, 25, 23, 0.6);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem clamp(1rem, 6vw, 5rem) 1.5rem;
}

.lightbox-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 100%;
}

.lightbox-image {
  flex: none;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  max-height: calc(100dvh - 10rem);
}

.lightbox.can-enlarge .lightbox-image {
  cursor: zoom-in;
}

.lightbox-caption {
  max-width: 44rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox-hint {
  margin-top: -0.4rem;
  color: #b9b0a4;
  font-size: 0.8125rem;
  text-align: center;
}

/* Full size: the image at its own resolution, scrollable in both directions. */
.lightbox.is-actual .lightbox-stage {
  justify-content: flex-start;
  width: 100%;
  height: calc(100vh - 10rem);
  height: calc(100dvh - 10rem);
  overflow: auto;
}

.lightbox.is-actual .lightbox-image {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.lightbox-button {
  position: fixed;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 0 0.15rem;
  border: 1px solid rgba(241, 236, 228, 0.4);
  border-radius: 50%;
  background: rgba(28, 25, 23, 0.7);
  color: #f1ece4;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-button:hover {
  border-color: #f1ece4;
}

.lightbox-button:focus-visible {
  outline: 2px solid #f1ece4;
  outline-offset: 2px;
}

.lightbox-close {
  top: 0.85rem;
  inset-inline-end: 0.85rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  inset-inline-start: 0.85rem;
}

.lightbox-next {
  inset-inline-end: 0.85rem;
}

.lightbox-button[hidden] {
  display: none;
}

@media (max-width: 40rem) {
  .lightbox[open] {
    padding: 3.75rem 0.75rem 4.5rem;
  }

  .lightbox-image {
    max-height: calc(100vh - 13rem);
    max-height: calc(100dvh - 13rem);
  }

  .lightbox.is-actual .lightbox-stage {
    height: calc(100vh - 13rem);
    height: calc(100dvh - 13rem);
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 0.85rem;
    transform: none;
  }
}

/* ------------------------------------------------- preview-only elements */

.review-note,
.placeholder-inline {
  padding: 0.9rem 1.1rem;
  border: 1px dashed #a07400;
  background: #fff7e0;
  color: #4a3700;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.review-note > * + *,
.placeholder-inline > * + * {
  margin-top: 0.35rem;
}

.review-label {
  font-weight: 700;
}

.placeholder-inline {
  margin-top: 2rem;
}

.placeholder-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 1px dashed #a07400;
  background: repeating-linear-gradient(-45deg, #fff7e0 0 12px, #fbefcc 12px 24px);
  color: #4a3700;
  font-size: var(--size-small);
  font-weight: 700;
}

.placeholder figcaption {
  margin-top: 0.6rem;
  color: #4a3700;
  font-size: var(--size-small);
}

/* ----------------------------------------------------------------- print */

@media print {
  .site-header nav,
  .menu-button,
  .skip-link,
  .preview-bar,
  .footer-nav,
  .pager,
  .review-note,
  .placeholder,
  .lightbox {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .band-alt,
  .band-contact {
    background: none;
  }

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

  .glance,
  .profile {
    position: static;
  }
}

/* ------------------------------------------------------- reduced motion */

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