/*
  madiq.ca
  One typeface (Archivo) used at three widths:
    wide      = identity (brand, names, headings)
    normal    = reading text
    condensed = data (dates, axis labels, counts)

  The "funk" comes from one device used everywhere: an ink outline with a
  hard offset shadow that grows when you hover.
*/

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette: beige, cedar green, burgundy */
  --paper: #ede4d3;      /* beige page */
  --surface: #f8f2e6;    /* lighter beige: cards, the selected timeline row */
  --ink: #1e2a22;        /* body text and outlines, a green-black */
  --cedar: #2f5140;      /* headings, shadows, selected bar */
  --muted: #57604f;
  --line: #d6cab3;
  --bar: #a3b19f;        /* unselected bars, a pale cedar */
  --run: #6d1f2f;        /* burgundy: buttons, live marker, link hover */
  --mark: #6d1f2f;       /* burgundy: selected skill, match counts */
  --on-mark: #f8f2e6;
  --mark-wash: #ecd5cd;  /* burgundy tint: matching lines */
  --sand: #e2cf9f;

  --wide: 118%;
  --condensed: 78%;
  --pop: cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--run); }

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

.wrap { max-width: 70rem; margin-inline: auto; padding-inline: 1.25rem; }
.section { margin-top: 4.5rem; }
.data { font-stretch: var(--condensed); font-variant-numeric: tabular-nums; }
.quiet { color: var(--muted); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--cedar); color: var(--surface);
  padding: 0.5rem 0.9rem; border-radius: 2px;
}
.skip:focus { top: 1rem; }

h1, h2 { color: var(--cedar); }

h2 {
  font-size: 1.75rem;
  font-weight: 660;
  font-stretch: var(--wide);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem 1.5rem;
}

.text-button {
  font: inherit; font-size: 0.9375rem; font-weight: 550;
  color: var(--ink); background: none; border: 0; padding: 0.25rem 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  cursor: pointer;
}
.text-button:hover { color: var(--run); }

/* ---------- Buttons ---------- */

.button, .menu-button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1.05rem;
  font: inherit; font-weight: 650; font-stretch: 108%; line-height: 1.4;
  color: var(--on-mark); background: var(--run); text-decoration: none;
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--cedar);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover, .menu-button:hover { color: var(--on-mark); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--cedar); }
.button:active, .menu-button[aria-expanded="true"] { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--cedar); }
.button-quiet { color: var(--ink); background: var(--surface); }
.button-quiet:hover { color: var(--ink); }
.button svg { width: 1rem; height: 1rem; }

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

.site-head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem 2rem;
  padding-top: 1.5rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--cedar); text-decoration: none; }
.brand:hover { color: var(--cedar); }
.brand-mark { width: 2.4rem; height: 2.4rem; flex: none; transition: transform 0.25s var(--pop); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.3125rem; font-weight: 700; font-stretch: 122%; letter-spacing: -0.015em; }
.brand-by { margin-top: 0.15rem; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.brand-by a { color: inherit; }

/* The home page shows the brand at full size. */
.site-head--home { align-items: flex-end; padding-top: 2.5rem; }
.site-head--home .brand { align-items: center; gap: 1rem; }
.site-head--home .brand-mark { width: clamp(3.25rem, 2.4rem + 4vw, 5.25rem); height: auto; aspect-ratio: 1; }
.site-head--home .brand-name { font-size: clamp(2.25rem, 1.4rem + 4.4vw, 4.25rem); line-height: 1; letter-spacing: -0.025em; }
.site-head--home .brand-by { margin-top: 0.5rem; font-size: 1.1875rem; font-weight: 550; color: var(--ink); }

.site-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 0.7rem; }
.site-head nav .button { padding: 0.35rem 0.9rem; font-size: 0.9375rem; }
/* The page you are on looks pressed in. */
.site-head nav [aria-current="page"] { color: var(--on-mark); background: var(--cedar); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--cedar); }

/* ---------- Projects dropdown ---------- */

.menu { position: relative; }
.menu-chevron { width: 0.8rem; height: 0.8rem; transition: transform 0.2s ease; }
.menu-button[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }

.menu-panel {
  position: absolute; z-index: 20; top: calc(100% + 0.9rem); left: 0;
  width: min(25rem, calc(100vw - 2.5rem));
  padding: 0.6rem;
  background: var(--surface);
  border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 7px 7px 0 var(--cedar);
  transform-origin: 2rem 0;
  animation: menu-in 0.22s var(--pop);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) rotate(-2deg) scale(0.96); } }

/* Entries are dealt in one after another. */
.menu-entry {
  animation: entry-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  animation-delay: calc(var(--i) * 55ms + 60ms);
}
@keyframes entry-in { from { opacity: 0; transform: translateX(-10px) rotate(-1.5deg); } }

.menu-item {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0.85rem; align-items: center;
  padding: 0.6rem; border-radius: 12px;
  color: var(--ink); text-decoration: none;
}
.menu-title { display: block; font-weight: 660; font-stretch: 108%; line-height: 1.2; }
.menu-line { display: block; margin-top: 0.15rem; font-size: 0.875rem; font-weight: 450; line-height: 1.3; color: var(--muted); }

.menu-item:hover, .menu-item:focus-visible { color: var(--surface); background: var(--cedar); outline: none; }
.menu-item:hover .menu-line, .menu-item:focus-visible .menu-line { color: inherit; opacity: 0.85; }
.menu-item:hover .glyph, .menu-item:focus-visible .glyph { transform: rotate(0deg) scale(1.06); background: var(--surface); }

.menu-sub { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.1rem 0.6rem 0.6rem 4.45rem; }
.menu-sub a {
  display: block; padding: 0.2rem 0.65rem;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.4;
  color: var(--ink); text-decoration: none;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px;
}
.menu-sub a:hover, .menu-sub a:focus-visible { color: var(--on-mark); background: var(--run); border-color: var(--run); }

/* The small drawing on each project tile. */
.glyph {
  display: grid; place-items: center;
  width: 3rem; height: 3rem; flex: none;
  color: var(--ink); border: 2px solid var(--ink); border-radius: 12px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.glyph svg { width: 1.9rem; height: 1.9rem; }
.glyph-house { background: var(--bar); transform: rotate(-4deg); }
.glyph-pin { background: var(--mark-wash); transform: rotate(3deg); }
.glyph-cutout { background: var(--sand); transform: rotate(-2deg); }

/* ---------- Home: intro ---------- */

.intro { margin-top: 2.5rem; }
.tagline {
  font-size: 1.3125rem; font-weight: 550; line-height: 1.3;
  max-width: 34ch;
}
.intro .tagline { max-width: 40ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.5rem; }

/* ---------- Home: project cards ---------- */

.cards {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  margin-top: 1.75rem;
}

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--ink); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--cedar);
  overflow: hidden;
  scroll-margin-top: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover, .card:focus-within { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--cedar); }
.card:nth-child(3n + 2):hover, .card:nth-child(3n + 2):focus-within { box-shadow: 10px 10px 0 var(--run); }

/* The card picture is an album: real screenshots stacked like prints.
   app.js moves the front one to the back while the card is hovered. */
.album {
  position: relative; display: block; aspect-ratio: 16 / 10.5; overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--paper) radial-gradient(circle at 1.5px 1.5px, var(--line) 1.5px, transparent 0) 0 0 / 14px 14px;
}
.album img {
  position: absolute; left: 9%; top: 11%; width: 82%; height: 80%;
  object-fit: cover; object-position: top left;
  background: #fff; border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.5s var(--pop);
}
.album img[data-pos="0"] { z-index: 4; transform: rotate(-1.5deg); }
.album img[data-pos="1"] { z-index: 3; transform: translate(4%, -5%) rotate(3deg); }
.album img[data-pos="2"] { z-index: 2; transform: translate(-4%, -6%) rotate(-4.5deg); }
.album img[data-pos="3"] { z-index: 1; transform: translate(6%, 3%) rotate(6deg); }
.card.is-playing .album img[data-pos="0"] { transform: rotate(0deg) scale(1.04); }
.card.is-playing .album img[data-pos="1"] { transform: translate(8%, -7%) rotate(5deg); }
.card.is-playing .album img[data-pos="2"] { transform: translate(-8%, -8%) rotate(-6.5deg); }
.card.is-playing .album img[data-pos="3"] { transform: translate(10%, 5%) rotate(8deg); }

.card-body { display: flex; flex-direction: column; flex: 1; gap: 0.75rem; padding: 1.25rem 1.25rem 1.4rem; }
.card h3 { font-size: 1.375rem; font-weight: 660; font-stretch: 110%; line-height: 1.15; letter-spacing: -0.01em; }
.card h3 a { text-decoration: none; }
.card-line { font-weight: 550; line-height: 1.35; }
.card-summary { font-size: 0.9375rem; color: var(--muted); }

.stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack li, .chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.8125rem; font-weight: 550; line-height: 1.5;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
}
.stack img, .chip img, .skill-list img { width: 1.05rem; height: 1.05rem; flex: none; }

.card-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; margin-top: auto; padding-top: 0.5rem; font-weight: 550; }

/* Design versions: each link borrows the look of the design it opens. */
.versions { padding-top: 0.9rem; border-top: 1.5px dashed var(--line); }
.versions-label { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.versions ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 0.8rem; margin-top: 0.7rem; }
.v {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.75rem; font-size: 0.875rem; line-height: 1.3; text-decoration: none;
  transition: transform 0.16s var(--pop), box-shadow 0.16s ease;
}
/* Sticker Desk: a pink sticker with a hard black edge */
.v-sticker {
  font-weight: 800; color: #1a1a1a; background: #ff5ca8;
  border: 2.5px solid #1a1a1a; border-radius: 12px;
  box-shadow: 3px 3px 0 #1a1a1a; transform: rotate(-3deg);
}
.v-sticker:hover { color: #1a1a1a; transform: rotate(2deg) scale(1.06); }
/* Floating Layouts: a soft white card hovering over lilac */
.v-floating {
  font-weight: 700; color: #4b3fb5; background: #fff;
  border: 0; border-radius: 12px;
  box-shadow: 0 0 0 5px #e9e4ff, 0 8px 18px rgba(88, 70, 190, 0.35);
}
.v-floating:hover { color: #4b3fb5; transform: translateY(-4px); box-shadow: 0 0 0 5px #e9e4ff, 0 14px 24px rgba(88, 70, 190, 0.4); }
/* Digital Realms: a little desktop window */
.v-realms {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 0.8125rem; font-weight: 600;
  color: #1447e6; background: #fff;
  border: 2px solid #0b1026; border-radius: 8px;
  box-shadow: 3px 3px 0 #0b1026;
}
.v-realms::before {
  content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; flex: none;
  background: #ff5ca8; box-shadow: 0.65rem 0 0 #ffc21a, 1.3rem 0 0 #b7f23a; margin-right: 1.5rem;
}
.v-realms:hover { color: #1447e6; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #0b1026; }
/* Front Page: a newspaper banner */
.v-frontpage {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #e9e4d6; background: #1a1a1a;
  border-radius: 0; padding-inline: 0.85rem;
  box-shadow: 0 -3px 0 #e9e4d6 inset, 0 3px 0 #e9e4d6 inset, 0 0 0 2px #1a1a1a;
}
.v-frontpage:hover { color: #1a1a1a; background: #e9e4d6; box-shadow: 0 -3px 0 #1a1a1a inset, 0 3px 0 #1a1a1a inset, 0 0 0 2px #1a1a1a; }

.empty { margin-top: 1rem; color: var(--muted); }

/* ---------- About: resume header ---------- */

.resume-head { margin-top: 3rem; }
.resume-head h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.6vw, 4.5rem);
  font-weight: 680; font-stretch: var(--wide);
  line-height: 1; letter-spacing: -0.025em;
}
.resume-head .tagline { margin-top: 1rem; }
.resume-intro { display: grid; gap: 1.5rem 2.5rem; margin-top: 1.75rem; }
.contact { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; font-size: 0.9375rem; }
.contact a, .contact span {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.3rem 0.8rem 0.3rem 0.55rem;
  text-decoration: none;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 999px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.contact span { border-color: var(--line); }
.contact a:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--run); }
.contact svg, .contact img { width: 1.1rem; height: 1.1rem; flex: none; }
.summary { max-width: 64ch; color: var(--muted); }
.resume-head .actions { margin-top: 1.75rem; }

/* ---------- About: timeline ---------- */

#gantt { margin-top: 1.5rem; }

.gantt { --label: 100%; --hits: 2rem; }

.gantt-axis { position: relative; height: 1.5rem; margin: 0 0.5rem 0 0.75rem; }
.gantt-axis span {
  position: absolute; bottom: 0.3rem; padding-left: 0.3rem;
  font-size: 0.8125rem; color: var(--muted);
  font-stretch: var(--condensed); font-variant-numeric: tabular-nums;
}
.gantt-axis .minor { display: none; }

.gantt-rows { border-top: 1px solid var(--line); }
.gantt-rows li { border-bottom: 1px solid var(--line); }

.gantt-row {
  display: grid;
  grid-template-columns: 1fr var(--hits);
  grid-template-areas: "label hits" "track track";
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.5rem 0.2rem 0.75rem;
  font: inherit; text-align: left;
  color: var(--muted);
  background: none; border: 0; border-radius: 0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.gantt-label { grid-area: label; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; transition: transform 0.18s var(--pop); }
.gantt-name { font-weight: 620; color: var(--ink); }
.gantt-when { font-size: 0.875rem; font-stretch: var(--condensed); font-variant-numeric: tabular-nums; }

.gantt-track {
  grid-area: track; position: relative; height: 1.75rem;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / var(--years)) 100%;
}

.gantt-bar {
  position: absolute; top: 50%; height: 0.75rem; margin-top: -0.375rem;
  background: var(--bar); border-radius: 3px;
  transition: height 0.18s var(--pop), margin-top 0.18s var(--pop), background-color 0.15s ease, box-shadow 0.15s ease;
}

.gantt-hits {
  grid-area: hits; justify-self: end;
  min-width: 1.5rem; padding: 0 0.35rem;
  font-size: 0.8125rem; font-weight: 650; line-height: 1.5rem; text-align: center;
  font-stretch: var(--condensed); font-variant-numeric: tabular-nums;
  color: var(--on-mark); background: var(--mark); border-radius: 2px;
}

.gantt-row:focus-visible { outline-offset: -2px; }
.gantt-row:hover .gantt-label { transform: translateX(4px); }
.gantt-row:hover .gantt-bar {
  height: 1.15rem; margin-top: -0.575rem;
  background: var(--run); box-shadow: 3px 3px 0 var(--ink);
}

.gantt-row[aria-current="true"] {
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--cedar);
}
.gantt-row[aria-current="true"] .gantt-bar { background: var(--cedar); height: 1.15rem; margin-top: -0.575rem; box-shadow: 3px 3px 0 var(--ink); }

/* The current job has no end date: square end plus a live marker. */
.gantt-row.is-running .gantt-bar { border-radius: 3px 0 0 3px; }
.gantt-row.is-running .gantt-bar::after {
  content: ""; position: absolute; right: -0.3125rem; top: 50%;
  width: 0.625rem; height: 0.625rem; margin-top: -0.3125rem;
  border-radius: 50%; background: var(--run);
  box-shadow: 0 0 0 2px var(--paper);
  animation: running 2.4s ease-out infinite;
}
.gantt-row.is-running:hover .gantt-bar::after,
.gantt-row.is-running[aria-current="true"] .gantt-bar::after { background: var(--sand); box-shadow: 0 0 0 2px var(--ink); }

@keyframes running {
  0%   { outline: 0 solid rgb(109 31 47 / 0.45); outline-offset: 2px; }
  70%  { outline: 6px solid rgb(109 31 47 / 0); outline-offset: 2px; }
  100% { outline: 0 solid rgb(109 31 47 / 0); outline-offset: 2px; }
}

.gantt-row.is-dim .gantt-name,
.gantt-row.is-dim .gantt-when { opacity: 0.6; }
.gantt-row.is-dim .gantt-bar { opacity: 0.4; }

/* ---------- About: highlight status ---------- */

.filter-status {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.25rem;
  margin-top: 1rem; padding: 0.6rem 0.9rem;
  background: var(--mark-wash); box-shadow: inset 3px 0 0 var(--mark);
  font-size: 0.9375rem;
}
.filter-status[hidden] { display: none; }

/* ---------- About: roles ---------- */

.exp-grid { display: grid; gap: 3.5rem; margin-top: 2.5rem; }

.role {
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--surface);
  border: 2px solid var(--ink); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--cedar);
}
.role + .role { margin-top: 2.5rem; }
.role[hidden] + .role { margin-top: 0; }

.role h3 {
  font-size: 1.5rem; font-weight: 650; font-stretch: 108%;
  line-height: 1.2; letter-spacing: -0.01em;
}

.role-meta {
  display: flex; flex-wrap: wrap; gap: 0.1rem 1.25rem;
  margin-top: 0.4rem; color: var(--muted);
}
.role-org { font-weight: 620; color: var(--ink); }

.role-blurb { margin-top: 0.6rem; max-width: 62ch; color: var(--muted); }

.role h4 {
  display: inline-block; margin-top: 1.75rem; padding: 0.1rem 0.7rem;
  font-size: 0.9375rem; font-weight: 650;
  color: var(--on-mark); background: var(--cedar); border-radius: 999px;
}

.log { margin-top: 0.75rem; max-width: 68ch; }
.role-meta + .log, .role-blurb + .log { margin-top: 1.5rem; }
.log li {
  padding: 0.45rem 0.75rem 0.45rem 1rem;
  border-left: 3px solid var(--line);
  transition: border-color 0.15s ease, padding-left 0.18s var(--pop), background-color 0.15s ease;
}
.log li:hover { border-left-color: var(--run); padding-left: 1.4rem; background: var(--paper); }
.log strong { font-weight: 650; }

.log li.is-hit { background: var(--mark-wash); border-left-color: var(--mark); }
[data-filter] .log li:not(.is-hit) { color: var(--muted); }

.role.is-swapping { animation: swap 0.28s var(--pop); }
@keyframes swap { from { opacity: 0; transform: translateY(8px) rotate(-0.4deg); } }

/* ---------- About: skills ---------- */

.skills h3 { margin-top: 1.4rem; font-size: 0.9375rem; font-weight: 650; }
.skills-hint { margin-top: 0.6rem; font-size: 0.9375rem; color: var(--muted); max-width: 40ch; }

.skill-list { display: flex; flex-wrap: wrap; gap: 0.5rem 0.45rem; margin-top: 0.55rem; font-size: 0.875rem; line-height: 1.4; }
.skill-list li, .skill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 999px;
}
.skill-list li:has(> .skill) { padding: 0; border: 0; background: none; }

.skill {
  font: inherit; font-weight: 550; text-align: left; cursor: pointer;
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--cedar);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.skill:hover { transform: translate(-1px, -1px) rotate(-1.5deg); box-shadow: 4px 4px 0 var(--cedar); }
.skill[aria-pressed="true"] {
  color: var(--on-mark); background: var(--mark);
  transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--cedar);
}
.skill[aria-pressed="true"] img { background: var(--on-mark); border-radius: 4px; outline: 2px solid var(--on-mark); }

/* ---------- About: education ---------- */

.edu-grid { display: grid; gap: 2rem; margin-top: 1.75rem; }
.edu {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  padding: 1.25rem;
  background: var(--surface);
  border: 2px solid var(--ink); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--cedar);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.edu:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--run); }
.edu-logo {
  display: grid; place-items: center;
  width: 5rem; height: 5rem; padding: 0.45rem;
  text-decoration: none;
  background: #fff; border: 2px solid var(--ink); border-radius: 14px;
  transform: rotate(-4deg);
  transition: transform 0.25s var(--pop);
}
.edu:nth-child(even) .edu-logo { transform: rotate(3deg); }
.edu:hover .edu-logo { transform: rotate(0deg) scale(1.06); }
.edu-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.edu h3 { font-size: 1.1875rem; font-weight: 650; font-stretch: 108%; line-height: 1.25; }
.edu p { margin-top: 0.3rem; }
.edu .thesis { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1.5px dashed var(--line); font-size: 0.9375rem; }

/* ---------- Project pages (work/...) ---------- */

.page-head { margin-top: 3rem; }
.page-title { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: 680; font-stretch: var(--wide); line-height: 1.05; letter-spacing: -0.02em; }
.page-head .tagline { margin-top: 1rem; max-width: 44ch; }
.page-head .summary { margin-top: 1.25rem; }
.note-list { margin-top: 1.25rem; }

/* Case study: headline numbers */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1.25rem; margin-top: 2.25rem; }
.stat {
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 16px;
  box-shadow: 4px 4px 0 var(--cedar);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat:nth-child(even) { box-shadow: 4px 4px 0 var(--run); }
.stat:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--cedar); }
.stat:nth-child(even):hover { box-shadow: 7px 7px 0 var(--run); }
.stat b { display: block; font-size: 2rem; font-weight: 700; font-stretch: 112%; line-height: 1.1; letter-spacing: -0.02em; color: var(--cedar); }
.stat span { display: block; margin-top: 0.3rem; font-size: 0.9375rem; line-height: 1.35; color: var(--muted); }

/* Case study: one card per discipline */
.sides { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-top: 1.75rem; }
.side {
  padding: 1.4rem 1.25rem 1.5rem;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--cedar);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.side:hover { transform: translate(-3px, -3px); box-shadow: 10px 10px 0 var(--run); }
.side-head { display: flex; align-items: center; gap: 0.85rem; }
.side h3 { font-size: 1.3125rem; font-weight: 660; font-stretch: 110%; line-height: 1.15; }
.side:hover .glyph { transform: rotate(0deg) scale(1.08); }
.glyph-model { background: var(--mark-wash); transform: rotate(-4deg); }
.glyph-server { background: var(--bar); transform: rotate(3deg); }
.glyph-screen { background: var(--sand); transform: rotate(-2deg); }
.side .log { margin-top: 1.1rem; font-size: 0.9688rem; }
.side .stack { margin-top: 1.1rem; }

.version-row .project-links { align-items: flex-start; }

.rows, .projects { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.row, .project { display: grid; gap: 0.35rem 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.project h3 { font-size: 1.1875rem; font-weight: 650; font-stretch: 108%; line-height: 1.2; }
.project p { max-width: 62ch; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-weight: 550; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  margin-top: 5rem; padding-top: 1.5rem; padding-bottom: 3rem;
  color: var(--muted); font-size: 0.9375rem;
}
.site-footer::before { content: ""; flex-basis: 100%; border-top: 1px solid var(--line); margin-bottom: 1rem; }
.site-footer p:last-child { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 44rem) {
  .wrap { padding-inline: 2.5rem; }
  .site-head { padding-top: 2rem; }
  .site-head--home { padding-top: 4rem; }
  .menu-panel { left: auto; right: 0; transform-origin: calc(100% - 2rem) 0; }

  .resume-intro { grid-template-columns: 17rem 1fr; }

  .gantt { --label: 15rem; --hits: 2.25rem; }
  .gantt-axis { margin-left: calc(var(--label) + 0.75rem + 1rem); margin-right: calc(var(--hits) + 0.5rem + 1rem); }
  .gantt-axis .minor { display: inline; }

  .gantt-row {
    grid-template-columns: var(--label) 1fr var(--hits);
    grid-template-areas: "label track hits";
    column-gap: 1rem;
    padding-block: 0;
    min-height: 3.25rem;
  }
  .gantt-label { flex-direction: column; gap: 0; line-height: 1.3; }
  .gantt-track { height: 3.25rem; }
  .gantt-bar { height: 0.875rem; margin-top: -0.4375rem; }

  .role { padding: 2rem 2rem 2.25rem; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 15rem 1fr; }
  .project { grid-template-columns: 15rem 1fr 11rem; padding: 1.5rem 0; }
  .project-links { flex-direction: column; gap: 0.3rem; }
}

@media (min-width: 62rem) {
  .exp-grid { grid-template-columns: minmax(0, 1fr) 20rem; }
  .skills { position: sticky; top: 1.5rem; align-self: start; }
  .skills h2 { font-size: 1.5rem; }
}

/* ---------- Motion and print ---------- */

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

@media print {
  body { background: #fff; font-size: 10.5pt; }
  #gantt, .filter-status, .text-button, .skills-hint, .skip, .site-head nav, .actions { display: none !important; }
  .role[hidden] { display: block !important; }
  .role, .edu, .card { box-shadow: none; break-inside: avoid-page; }
  .section { margin-top: 2rem; }
  .skill { box-shadow: none; }
}
