/* ─────────────────────────────────────────────
   Mehdi Ghalime — portfolio
   1. Tokens   2. Base   3. Layout   4. Floating menu
   5. Profile card   6. Titles   7. Hero   8. Rows (projects, experience, education)
   9. Skills   10. Contact   11. Reveal   12. Guides   13. Responsive   14. Reduced motion
   ───────────────────────────────────────────── */

/* ───────── 1. Tokens ───────── */
:root {
  --bg: #0f0f0f;
  --surface: #171717;
  --line: #262626;
  --text: #f4f3ef;
  --muted: #9b9a95;
  --ghost: #3a3a3a;
  --orange: #ff6a2b;
  --lime: #c8f43c;
  --paper: #ece8df;
  --ink: #111111;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --gutter: clamp(18px, 4vw, 40px);
  --wrap: 1120px;
  --col-gap: 24px;
}

/* ───────── 2. Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--orange); color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ───────── 3. Layout ───────── */
.page {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-block: 104px 80px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.side { grid-column: 1 / 5; position: sticky; top: 28px; }
.main { grid-column: 6 / 13; min-width: 0; }
section { scroll-margin-top: 96px; }
.block { margin-top: 112px; }

/* ───────── 4. Floating menu ───────── */
.dock {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(23, 23, 23, .78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.dock a {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--muted);
  transition: color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}
.dock a svg { width: 19px; height: 19px; }
.dock a:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.dock a[aria-current="true"] { color: var(--ink); background: var(--orange); }
.dock a::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--text);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
@media (hover: hover) {
  .dock a:hover::after, .dock a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
}

/* ───────── 5. Profile card (printed proof sheet) ───────── */
.card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 26px;
  padding: 16px 16px 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.proof { position: relative; padding: 16px; }
.photo {
  margin: 0;
  height: clamp(220px, 44vh, 440px);
  border-radius: 3px;
  overflow: hidden;
  background: #3a3a3c;
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.crop {
  position: absolute;
  width: 17px; height: 17px;
  --c: linear-gradient(var(--ink), var(--ink));
}
.crop.tl { top: 0; left: 0;
  background: var(--c) 0 16px / 11px 1px no-repeat, var(--c) 16px 0 / 1px 11px no-repeat; }
.crop.tr { top: 0; right: 0;
  background: var(--c) right 0 top 16px / 11px 1px no-repeat, var(--c) right 16px top 0 / 1px 11px no-repeat; }
.crop.bl { bottom: 0; left: 0;
  background: var(--c) 0 bottom 16px / 11px 1px no-repeat, var(--c) 16px bottom 0 / 1px 11px no-repeat; }
.crop.br { bottom: 0; right: 0;
  background: var(--c) right 0 bottom 16px / 11px 1px no-repeat, var(--c) right 16px bottom 0 / 1px 11px no-repeat; }

.id { padding: 6px 6px 0; }
.name {
  font-size: 1.7rem;
  font-weight: 760;
  font-stretch: 90%;
  letter-spacing: -.015em;
  line-height: 1.1;
}
.role { margin-top: 4px; font-size: .95rem; font-weight: 500; color: #3d3c38; line-height: 1.35; }
.where { margin-top: 8px; color: #6a6862; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 8px 13px 8px 11px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--text);
  font-size: .8rem;
  line-height: 1.3;
}
.status .dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(200, 244, 60, .6);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200, 244, 60, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(200, 244, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 244, 60, 0); }
}

.links { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.icon-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--orange); transform: translateY(-2px); }
.cv-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px;
  border-radius: 999px;
  background: var(--ink); color: var(--text);
  font-size: .85rem; font-weight: 600;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.cv-btn svg { width: 15px; height: 15px; }
.cv-btn:hover { background: var(--orange); color: var(--ink); transform: translateY(-2px); }

.press {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding: 12px 6px 0;
  border-top: 1px dashed rgba(17, 17, 17, .35);
}
.bar { display: flex; align-items: center; gap: 4px; }
.bar i { width: 13px; height: 13px; border: 1px solid var(--ink); display: block; }
.bar i:nth-child(1) { background: var(--ink); }
.bar i:nth-child(2) { background: var(--orange); }
.bar i:nth-child(3) { background: var(--lime); }
.bar i:nth-child(4) { background: #8a8880; }
.bar svg { width: 17px; height: 17px; margin-left: 8px; }
.guides-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 4px 5px 8px;
  background: none; border: 0; cursor: pointer;
  color: #3d3c38;
}
.guides-toggle .sw {
  position: relative; width: 28px; height: 16px; border-radius: 999px;
  border: 1px solid var(--ink);
  transition: background-color .25s var(--ease);
}
.guides-toggle .sw::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--ink);
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.guides-toggle[aria-pressed="true"] .sw { background: var(--ink); }
.guides-toggle[aria-pressed="true"] .sw::after { transform: translateX(12px); background: var(--lime); }

/* ───────── 6. Section titles ───────── */
.title {
  font-size: clamp(2.2rem, 11vw, 4.2rem);
  font-weight: 800;
  font-stretch: 88%;
  line-height: .92;
  letter-spacing: -.012em;
  text-transform: uppercase;
}
.title span { display: block; }
.title .l1 { color: var(--text); }
.title .l2 { color: var(--ghost); }

/* ───────── 7. Hero ───────── */
.hero .title {
  font-size: clamp(2.4rem, 14.2vw, 5.6rem);
  line-height: .9;
}
.tagline { margin-top: 22px; color: var(--orange); }
.lead { margin-top: 14px; max-width: 52ch; color: var(--muted); font-size: 1.02rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
  margin-top: 44px;
}
.stat b {
  display: block;
  font-size: clamp(2.2rem, 7.4vw, 3.3rem);
  font-weight: 760;
  font-stretch: 92%;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat b small {
  font-size: .42em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: .08em;
}
.stat .lbl { display: block; margin-top: 10px; color: var(--muted); line-height: 1.5; font-size: .66rem; }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 252px;
  padding: 22px;
  border-radius: 22px;
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.feature.orange { background: var(--orange); }
.feature.lime { background: var(--lime); }
.feature .pattern {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  color: rgba(17, 17, 17, .22);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 28%, transparent 68%);
  mask-image: linear-gradient(to bottom, #000 28%, transparent 68%);
}
.feature .pattern * { vector-effect: non-scaling-stroke; }
.feature .glyph { width: 28px; height: 28px; }
.feature h3 {
  margin-top: auto;
  padding-top: 26px;
  font-size: clamp(1.15rem, 2.3vw, 1.38rem);
  font-weight: 760;
  font-stretch: 90%;
  line-height: 1.08;
  letter-spacing: -.005em;
  text-transform: uppercase;
  max-width: 14ch;
}
.feature p { margin-top: 8px; max-width: 28ch; font-size: .82rem; line-height: 1.4; color: rgba(17, 17, 17, .78); }
.feature .go {
  position: absolute; right: 18px; bottom: 18px;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ink); color: var(--text);
  transition: transform .4s var(--ease);
}
.feature .go svg { width: 16px; height: 16px; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .7); }
.feature:hover .go { transform: translate(2px, -2px) rotate(-45deg); }
.feature .txt { padding-right: 46px; }

/* ───────── 8. Rows: projects, experience, education ───────── */
.rows { margin-top: 40px; }
.row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas: "thumb head" "thumb body";
  column-gap: 22px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.rows-sub {
  margin-top: 48px;
  padding-bottom: 14px;
  color: var(--muted);
}
.rows-sub + .rows { margin-top: 0; }

/* Thumbnails: small abstract tiles, one per entry */
.thumb {
  grid-area: thumb;
  display: grid;
  place-items: center;
  width: 96px; height: 96px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.thumb:not(.cells) { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: stretch; }
.thumb svg { width: 100%; height: 100%; overflow: visible; }
.thumb.cells { grid-template-columns: repeat(3, 1fr); place-items: stretch; gap: 5px; }
.thumb.cells.eight { grid-template-columns: repeat(4, 1fr); align-content: center; gap: 4px; }
.thumb.cells.eight i { aspect-ratio: 1; }
.thumb i {
  display: block; border-radius: 3px;
  background: #2a2a2a;
  transition: background-color .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 250ms);
}
.thumb i.on { background: var(--orange); }
.thumb i.on.alt { background: var(--lime); }
.thumb i.lit { background: #5c5b57; }
.js .thumb i { background: #232323; transform: scale(.6); }
.js .thumb.in i { transform: none; }
.js .thumb:not(.in) i.on, .js .thumb:not(.in) i.lit { background: #232323; }
.js .thumb.in i { background: #2a2a2a; }
.js .thumb.in i.on { background: var(--orange); }
.js .thumb.in i.on.alt { background: var(--lime); }
.js .thumb.in i.lit { background: #5c5b57; }

/* Parts of SVG thumbnails fade/slide in; paths draw themselves */
.thumb .t {
  transition: opacity .6s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms + 200ms);
  transform-box: fill-box;
  transform-origin: center;
}
.js .thumb:not(.in) .t { opacity: 0; transform: scale(.6); }
.js .thumb:not(.in) .t.slide { transform: translateX(-16px); }
.thumb .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms + 150ms);
}
.js .thumb:not(.in) .draw { stroke-dashoffset: 1; }

.r-head { grid-area: head; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.r-head h3 { font-size: 1.5rem; font-weight: 740; font-stretch: 92%; letter-spacing: -.01em; line-height: 1.15; }
.r-head .when { color: var(--muted); flex: none; }
.r-sub { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.r-sub.org { color: var(--orange); font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }
.r-body { grid-area: body; margin-top: 14px; }
.r-body > p { color: #c9c8c3; font-size: .95rem; max-width: 60ch; }
.r-body > p + p { margin-top: 10px; }

.facts { margin-top: 18px; }
.facts > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  column-gap: 14px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px dashed #2f2f2f;
}
.facts dt { color: var(--muted); padding-top: 3px; }
.facts dd { color: #c9c8c3; font-size: .92rem; max-width: 60ch; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips li {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid #333;
  color: #d8d7d2;
  font-size: .78rem;
  line-height: 1.5;
}
.chips.stack li { border-color: transparent; background: #1f1f1f; color: var(--muted); font-family: var(--mono); font-size: .7rem; letter-spacing: .02em; }
.chips li.more { border-style: dashed; color: var(--muted); }
.facts .chips { margin-top: 1px; }

.r-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; }
.pill-link, .pill-tag {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  max-width: 100%;
}
.pill-link {
  border: 1px solid #3a3a3a;
  color: var(--text);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.pill-link svg { width: 13px; height: 13px; flex: none; transition: transform .3s var(--ease); }
.pill-link:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.pill-link:hover svg { transform: translate(2px, -2px); }
.pill-tag { border: 1px dashed #4a4a4a; color: var(--muted); text-transform: uppercase; }
.eval { color: var(--muted); }
.live {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--orange);
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex: none; }

.built { display: grid; gap: 10px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.built li { font-size: .9rem; color: #c9c8c3; line-height: 1.45; }
.built b { display: block; font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .04em; color: var(--lime); }

.langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.lang {
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.lang b { display: block; font-size: 1.35rem; font-weight: 740; font-stretch: 92%; letter-spacing: -.01em; line-height: 1.15; }
.lang .mono { display: block; margin-top: 8px; color: var(--orange); }
.lang p { margin-top: 6px; color: var(--muted); font-size: .82rem; line-height: 1.45; }

/* ───────── 9. Skills ───────── */
.skills { margin-top: 40px; border-bottom: 1px solid var(--line); }
.skill {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 22px;
  align-items: baseline;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.skill dt { color: var(--muted); }
.skill .chips li { font-size: .88rem; padding: 5px 13px; }

/* ───────── 10. Contact ───────── */
.contact-lead { margin-top: 24px; max-width: 46ch; color: var(--muted); font-size: 1.02rem; }
.contact-list { margin-top: 36px; border-bottom: 1px solid var(--line); }
.crow {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  transition: padding-left .4s var(--ease);
}
.crow .lab { color: var(--muted); }
.crow .val {
  font-size: clamp(1.05rem, 4.6vw, 1.7rem);
  font-weight: 700;
  font-stretch: 92%;
  letter-spacing: -.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: color .25s var(--ease);
}
.crow .arr {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .4s var(--ease);
}
.crow .arr svg { width: 15px; height: 15px; }
.crow:hover { padding-left: 8px; }
.crow:hover .val { color: var(--orange); }
.crow:hover .arr { background: var(--orange); border-color: var(--orange); color: var(--ink); transform: rotate(-45deg); }
.dl-btn {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 36px;
  height: 56px; padding: 0 26px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  transition: background-color .25s var(--ease), transform .3s var(--ease);
}
.dl-btn svg { width: 18px; height: 18px; }
.dl-btn:hover { background: var(--orange); transform: translateY(-2px); }
.foot { margin-top: 96px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }

/* ───────── 11. Reveal ───────── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].in { opacity: 1; transform: none; will-change: auto; }

/* ───────── 12. Guides overlay (designer's grid) ───────── */
.guides {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.guides.on { opacity: 1; }
.guides-grid {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  height: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  box-shadow: -1px 0 0 rgba(255, 0, 170, .7), 1px 0 0 rgba(255, 0, 170, .7);
}
.guides-grid i {
  background: rgba(0, 190, 255, .07);
  box-shadow: inset 1px 0 0 rgba(0, 190, 255, .35), inset -1px 0 0 rgba(0, 190, 255, .35);
}

/* ───────── 13. Responsive ───────── */
@media (min-width: 961px) and (max-height: 700px) {
  .photo { height: clamp(160px, 34vh, 440px); }
}
@media (max-width: 960px) {
  .page { display: block; padding-block: 92px 64px; }
  .side { position: static; }
  .main { margin-top: 44px; }
  .card {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    column-gap: 14px;
    padding: 12px 14px 14px 12px;
    border-radius: 22px;
  }
  .proof { padding: 14px; align-self: start; }
  .photo { height: 184px; }
  .id { padding: 12px 0 0; display: flex; flex-direction: column; }
  .name { font-size: 1.45rem; }
  .role { font-size: .88rem; }
  .status { align-self: flex-start; font-size: .74rem; margin-top: 10px; }
  .links { grid-column: 1 / -1; margin-top: 12px; }
  .press { grid-column: 1 / -1; margin-top: 14px; }
  .links .cv-btn { margin-left: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; margin-top: 38px; }
  .stat b { font-size: clamp(2.5rem, 12vw, 3.4rem); }
  .features { margin-top: 38px; }
  .block { margin-top: 88px; }
  .guides-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 14px; }
  .guides-grid i:nth-child(n+5) { display: none; }
}
@media (max-width: 640px) {
  .skill { grid-template-columns: 1fr; row-gap: 12px; }
  .langs { grid-template-columns: 1fr; }
  .crow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .crow .lab { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .feature { min-height: 208px; }
  .feature h3 { max-width: 18ch; }
  .row { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "thumb head" "body body"; column-gap: 16px; }
  .thumb { width: 72px; height: 72px; padding: 9px; border-radius: 12px; }
  .thumb.cells { gap: 4px; }
  .thumb.cells.eight { gap: 3px; }
  .r-head { flex-direction: column; align-items: flex-start; gap: 2px; align-self: center; }
  .r-head h3 { font-size: 1.3rem; }
  .r-body { margin-top: 18px; }
  .facts > div { grid-template-columns: 1fr; row-gap: 8px; }
  .facts dt { padding-top: 0; }
  .built { grid-template-columns: 1fr; }
  .dl-btn { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  .card { grid-template-columns: 116px minmax(0, 1fr); }
  .photo { height: 156px; }
  .name { font-size: 1.25rem; }
  .dock a { width: 40px; height: 40px; }
}

/* ───────── 14. Reduced motion: everything static ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .js .thumb i { transform: none !important; }
  .js .thumb:not(.in) i.on { background: var(--orange); }
  .js .thumb:not(.in) i.on.alt { background: var(--lime); }
  .js .thumb:not(.in) i.lit { background: #5c5b57; }
  .js .thumb:not(.in) .t { opacity: 1 !important; transform: none !important; }
  .js .thumb:not(.in) .draw { stroke-dashoffset: 0 !important; }
  .feature:hover, .icon-btn:hover, .cv-btn:hover, .dl-btn:hover { transform: none; }
  .feature:hover .go, .crow:hover .arr, .pill-link:hover svg { transform: none; }
  .crow:hover { padding-left: 0; }
}
