/* ==============================================================
   RISHABH SISODIYA · "RELEASE NOTES" DESIGN SYSTEM (approved 2026-10-22)
   Idea: the career reads like printed release notes. Each job is a
   release, each result a labelled change, the resume is the release asset.

   Colour (printed release notes on paper):
     --paper      page background
     --sheet      raised document surfaces (release box, diff)
     --ink        text and the primary button
     --graphite   secondary text (≥ 4.5:1 on paper and sheet)
     --rule       hairlines between entries
     --owned      links, focus ring, "Owned" label, "my work" in the diagram
     --shipped    "Shipped" label and diff additions
     --automated  "Automated" label
     --led        "Led" label
     --removed    diff removals
   Labels always pair colour with a word and a square mark, never colour alone.

   Type: IBM Plex Sans for everything you read (engineering-doc voice);
         IBM Plex Mono for dates, versions, counts, file names and stack lists,
         so figures line up and they read as "metadata".
   Shape: 4px on documents and buttons (crisp, printed), full round only on
          filter chips (they are toggles, not documents).
   Motion: only on theme change, chip press and the copy confirmation.
           Off under prefers-reduced-motion.
   ============================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f6f5f1;
  --sheet: #ffffff;
  --ink: #17181c;
  --graphite: #55585f;
  --rule: #dedbd2;
  --owned: #1f4fb8;
  --shipped: #1e6b46;
  --automated: #8a5300;
  --led: #6a3e8f;
  --removed: #a12c2c;
  --add-bg: #e9f3ec;
  --del-bg: #f8eceb;
  --on-ink: #f6f5f1;

  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.625rem, 3vw, 2.125rem);
  --text-hero: clamp(2rem, 4.6vw, 3.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius: 4px;
  --page: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --bar-height: 3.75rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* Dark: warm charcoal, never pure black. Same tokens, same meanings. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16171a;
    --sheet: #1e2024;
    --ink: #ecebe6;
    --graphite: #a5a7ad;
    --rule: #2f3136;
    --owned: #86a8ff;
    --shipped: #63c595;
    --automated: #e3a94f;
    --led: #c5a0e8;
    --removed: #f08f86;
    --add-bg: #19221d;
    --del-bg: #241b1b;
    --on-ink: #16171a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16171a;
  --sheet: #1e2024;
  --ink: #ecebe6;
  --graphite: #a5a7ad;
  --rule: #2f3136;
  --owned: #86a8ff;
  --shipped: #63c595;
  --automated: #e3a94f;
  --led: #c5a0e8;
  --removed: #f08f86;
  --add-bg: #19221d;
  --del-bg: #241b1b;
  --on-ink: #16171a;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-height) + var(--space-4));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

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

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

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-4);
}

.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}

.link {
  color: var(--owned);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 var(--text-sm) / 1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--owned));
}
.btn-primary:active {
  background: color-mix(in srgb, var(--ink) 75%, var(--owned));
}
.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--graphite);
}
.btn-small {
  min-height: 2.25rem;
  padding: 0 var(--space-3);
}
.btn-large {
  min-height: 3.25rem;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
}

/* ---------- Top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--bar-height);
}
.bar-name {
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.bar-links {
  display: flex;
  gap: var(--space-6);
  margin-left: auto;
  font-size: var(--text-sm);
}
.bar-links a {
  color: var(--graphite);
  text-decoration: none;
  padding-block: var(--space-2);
}
.bar-links a:hover {
  color: var(--ink);
}
.bar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--ink);
}
.theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}
.icon-sun {
  display: none;
}
:root[data-theme="dark"] .icon-sun {
  display: block;
}
:root[data-theme="dark"] .icon-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
  gap: var(--space-16);
  align-items: center;
  padding-block: var(--space-16) var(--space-12);
}
.identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.identity img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--rule);
}
.identity-name {
  font-weight: 600;
}
.identity-role {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--graphite);
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 19ch;
  text-wrap: balance;
}
.hero-lead {
  margin-top: var(--space-6);
  max-width: 46ch;
  font-size: var(--text-lg);
  color: var(--graphite);
}

/* Release box: the resume is this release's downloadable asset. */
.release-box {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.release-box-title {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.release-box-meta {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--graphite);
}
.assets-label {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
}
.assets {
  margin-top: var(--space-3);
  display: grid;
  gap: var(--space-3);
}
.asset {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.asset .btn {
  grid-column: 1 / -1;
}
.asset-main .btn {
  width: 100%;
}
.asset:not(.asset-main) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.asset:not(.asset-main) .btn {
  grid-column: auto;
}
.asset-icon {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--graphite);
}
.asset-name {
  display: grid;
  min-width: 0;
}
.file {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-size {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--graphite);
}
.copy-email[data-state="copied"] {
  border-color: var(--shipped);
  color: var(--shipped);
}
.copy-email[data-state="failed"] {
  border-color: var(--removed);
  color: var(--removed);
}

/* ---------- Impact diff ---------- */
.impact {
  padding-bottom: var(--space-8);
}
.diff {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.diff-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--rule);
}
.diff-head h2 {
  font-size: var(--text-base);
  font-weight: 600;
}
.diff-count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--graphite);
}
.diff-change {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.diff-change + .diff-change {
  border-top: 1px solid var(--rule);
}
.line {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  padding: var(--space-3) var(--space-6) var(--space-3) var(--space-3);
  font-size: var(--text-sm);
}
.line.del {
  background: var(--del-bg);
  color: var(--graphite);
}
.line.add {
  background: var(--add-bg);
}
.sign {
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: center;
}
.del .sign {
  color: var(--removed);
}
.add .sign {
  color: var(--shipped);
}
.line strong {
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--space-16);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4) var(--space-8);
  margin-bottom: var(--space-8);
}
.section-head h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-sub {
  margin-top: var(--space-1);
  color: var(--graphite);
}

/* ---------- Filter chips (signature) ---------- */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  font: 500 var(--text-sm) / 1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    transform 0.1s var(--ease);
}
.chip:hover {
  border-color: var(--graphite);
}
.chip:active {
  transform: scale(0.97);
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.chip-count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  opacity: 0.75;
}
.filter-status {
  min-height: 1.5rem;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--graphite);
}

/* Label marks: a square, coloured per kind. */
.mark,
.kind::before {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  flex: none;
}
.mark-shipped,
[data-kind="shipped"] .kind::before {
  background: var(--shipped);
}
.mark-automated,
[data-kind="automated"] .kind::before {
  background: var(--automated);
}
.mark-owned,
[data-kind="owned"] .kind::before {
  background: var(--owned);
}
.mark-led,
[data-kind="led"] .kind::before {
  background: var(--led);
}

/* ---------- Releases ---------- */
.release {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-top: 1px solid var(--rule);
}
.release-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
.release-date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--graphite);
}
.badge-current {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius);
  background: var(--add-bg);
  color: var(--shipped);
}
.release-body h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.at {
  font-weight: 400;
  color: var(--graphite);
}
.release-client {
  margin-top: var(--space-1);
  color: var(--graphite);
}
.changes {
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-4);
}
.more .changes {
  margin-top: var(--space-4);
}
.changes li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--space-4);
  max-width: 50rem;
}
.changes li.is-hidden,
.changes:not(:has(li:not(.is-hidden))) {
  display: none;
}
.kind {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 1.6em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
}
.kind::before {
  content: "";
}

.more {
  margin-top: var(--space-4);
}
.more summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--owned);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.more summary::-webkit-details-marker {
  display: none;
}
.more summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: var(--space-2);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.more[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.when-open,
.more[open] .when-closed {
  display: none;
}
.more[open] .when-open {
  display: inline;
}
/* While a filter is on, every matching item is shown, so the toggle hides,
   and the drawing steps aside so the filtered list reads as one list. */
.is-filtered .more summary,
.is-filtered .flows {
  display: none;
}

.empty-note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--graphite);
}

.release-foot {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--rule);
  display: grid;
  gap: var(--space-3);
  max-width: 50rem;
}
.release-foot div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--space-4);
}
.release-foot dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  line-height: 1.9;
}
.release-foot dd {
  font-size: var(--text-sm);
}
.release-foot div:first-child dd {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.release-first {
  padding-bottom: 0;
}
.release-first h3 {
  font-size: var(--text-lg);
}

/* ---------- Pipeline drawing (inside the Wipro release) ---------- */
/* Two rows: the retired setup ("Before") above the live one ("Now"). */
.flows {
  margin-top: var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sheet);
  max-width: 50rem;
}
.flow-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}
.flow-row + .flow-row {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--rule);
}
.flow-label {
  display: grid;
  font-weight: 600;
  font-size: var(--text-sm);
}
.flow-label span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--graphite);
}
.flow-now .flow-label span {
  color: var(--shipped);
}
.flow {
  display: flex;
  align-items: center;
}
.flow-stage {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  gap: var(--space-2);
}
.node {
  display: grid;
  padding: var(--space-2) var(--space-3);
  border: 1px dashed var(--graphite);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  color: var(--graphite);
}
.node small {
  font-size: inherit;
  font-weight: 400;
}
.node-mine {
  border: 1.5px solid var(--owned);
  background: color-mix(in srgb, var(--owned) 9%, var(--sheet));
  color: var(--ink);
}
/* Retired row: my boxes keep their outline but lose the fill. */
.flow-before .node-mine {
  background: transparent;
  color: var(--graphite);
}
.flow-arrow {
  position: relative;
  flex: 0 0 1.5rem;
  height: 1px;
  margin-inline: 0.35rem;
  background: var(--graphite);
}
.flow-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3.5px;
  border-left: 6px solid var(--graphite);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.flows figcaption {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--graphite);
}
.mine-key {
  width: 0.9rem;
  height: 0.6rem;
  flex: none;
  border: 1.5px solid var(--owned);
  border-radius: 2px;
  background: color-mix(in srgb, var(--owned) 9%, var(--sheet));
}

/* ---------- Open source ---------- */
.repos {
  border-top: 1px solid var(--rule);
}
.repo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem 9rem;
  gap: var(--space-4) var(--space-8);
  align-items: baseline;
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--rule);
}
.repo h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
.repo h3 a {
  text-decoration: none;
}
.repo h3 a:hover {
  color: var(--owned);
}
.repo-main p {
  margin-top: var(--space-1);
  max-width: 56ch;
  color: var(--graphite);
}
.repo-stack {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--graphite);
}
.repo-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}
.repo-links .link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.skills div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) var(--space-4) 0;
  border-bottom: 1px solid var(--rule);
}
.skills dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite);
  line-height: 2;
}
.skills dd {
  font-size: var(--text-sm);
}

/* ---------- Contact ---------- */
.contact {
  border-top: 1px solid var(--rule);
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: end;
}
.contact h2 {
  margin-top: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}
.contact-lead {
  margin-top: var(--space-3);
  max-width: 44ch;
  color: var(--graphite);
}
.contact-actions {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
}
.contact-email {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  word-break: break-all;
  padding-block: var(--space-2);
}
.contact-links {
  display: flex;
  gap: var(--space-6);
  font-size: var(--text-sm);
}
.contact-links .link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* ---------- Footer ---------- */
.footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--graphite);
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
    padding-top: var(--space-12);
  }
  .release-box {
    max-width: 32rem;
  }
  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .release-rail {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }
  .repo {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .repo-stack {
    grid-column: 1;
  }
  .repo-links {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .skills {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
  }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .bar-links {
    display: none;
  }
  .bar-actions {
    margin-left: auto;
  }
  .hero {
    padding-top: var(--space-8);
  }
  .identity {
    margin-bottom: var(--space-6);
  }
  .hero-lead {
    font-size: var(--text-base);
  }
  .release-box {
    padding: var(--space-4);
  }
  /* Never truncate the email address: it must stay readable and selectable. */
  .asset:not(.asset-main) .file {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
  }

  .diff-head {
    padding-inline: var(--space-4);
  }
  .diff-change {
    grid-template-columns: minmax(0, 1fr);
  }
  .line {
    padding-right: var(--space-4);
  }

  .section {
    padding-block: var(--space-12);
  }
  .section-head {
    margin-bottom: var(--space-6);
  }
  /* Chips scroll sideways inside their own row, never the page. */
  .filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: var(--space-1);
    scrollbar-width: none;
  }
  .filter::-webkit-scrollbar {
    display: none;
  }
  .chip {
    flex: none;
  }

  .changes li,
  .release-foot div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }

  .flows {
    padding: var(--space-4);
  }
  .flow-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }
  .flow-label {
    display: flex;
    gap: var(--space-2);
    align-items: baseline;
  }
  .flow {
    flex-direction: column;
    align-items: stretch;
  }
  .flow-stage {
    flex: none;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
  }
  .flow-arrow {
    flex: none;
    align-self: center;
    width: 1px;
    height: 1.25rem;
    margin: 0.3rem 0;
  }
  .flow-arrow::after {
    right: auto;
    top: auto;
    left: -3.5px;
    bottom: -1px;
    border-top: 6px solid var(--graphite);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 0;
  }

  .repo {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }
  .repo-links {
    grid-column: 1;
    grid-row: auto;
  }

  .skills div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-right: 0;
  }

  .contact-actions,
  .contact-actions .btn {
    width: 100%;
  }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .bar,
  .skip-link,
  .filter,
  .filter-status,
  .more summary,
  .copy-email,
  .contact-actions .btn {
    display: none !important;
  }
  .more > .changes {
    display: grid;
  }
  body {
    background: #fff;
    color: #000;
  }
}
