/*
 * Base styles: reset, type, layout, header, footer and the shared components
 * (buttons, chips, app icons, project cards, post cards, banners, pagination).
 * Page layouts live in home.css, work.css, writing.css and article.css.
 */

/* ------------------------------------------------------------ reset + type */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--saffron-tint); color: var(--ink); }

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

button { font: inherit; color: inherit; }

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

.skip-link:focus {
  position: fixed !important;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 0 0 0 2px var(--teal);
  font-weight: 600;
  text-decoration: none;
}

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

.wrap--narrow { max-width: calc(48rem + 2 * var(--gutter)); }

.site-main { display: block; min-height: 50vh; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.section--rule { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-7);
}
.section-head h2 {
  font-size: var(--fs-xl);
  font-weight: 760;
  letter-spacing: -0.024em;
  line-height: 1.08;
}
.section-head p {
  max-width: 40rem;
  margin: var(--s-3) 0 0;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.5;
}
.section-head__text { flex: 1 1 28rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-weight: 650;
  text-decoration: none;
  color: var(--teal);
}
.text-link:hover { text-decoration: underline; }

.muted { color: var(--muted); }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 760;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-icon);
  background: linear-gradient(150deg, #0e7480, #0b4d55);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: var(--icon-shadow);
}

.site-nav ul { display: flex; align-items: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
}

.header-tools { display: flex; align-items: center; gap: 0.25rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .glyph { width: 20px; height: 20px; }

.theme-toggle span { display: grid; place-items: center; }
.theme-toggle .glyph-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .glyph-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .glyph-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .glyph-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .glyph-moon { display: block; }
}

.site-search {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: var(--s-4);
}
.site-search[hidden] { display: none; }

.search-form { display: flex; gap: var(--s-2); max-width: 40rem; }
.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.search-form input[type="search"]:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

@media (max-width: 640px) {
  .brand-name { display: none; }
  .header-bar { gap: var(--s-2); }
  .site-nav a { padding: 0 0.55rem; }
  .header-github { display: none; }
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn .glyph { width: 18px; height: 18px; }
.btn--primary { background: var(--teal); color: var(--on-teal); }
.btn--primary:hover { background: var(--teal-hi); color: var(--on-teal); }
.btn--quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--quiet:hover { border-color: var(--ink-2); color: var(--ink); }

/* ------------------------------------------------------------ chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.5rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.status--published,
.status--live { background: var(--st-pub-bg); color: var(--st-pub-fg); }
.status--published::before,
.status--live::before { background: var(--st-pub-dot); }
.status--released { background: var(--st-rel-bg); color: var(--st-rel-fg); }
.status--released::before { background: var(--st-rel-dot); }
.status--merged { background: var(--c-oss-tint); color: var(--c-oss); }
.status--merged::before { background: var(--c-oss); }
.status--in-review,
.status--in-testing { background: var(--st-rev-bg); color: var(--st-rev-fg); }
.status--in-review::before,
.status--in-testing::before { background: var(--st-rev-dot); }
.status--in-development { background: var(--st-dev-bg); color: var(--st-dev-fg); }
.status--in-development::before { background: var(--st-dev-dot); }

.kind {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cat, var(--muted));
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1.35;
}
.kind::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: currentColor;
}

/* ------------------------------------------------------------ app icons */
.app-icon {
  --size: 56px;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: var(--r-icon);
}
.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Square artwork: clip to the rounded square, like a home screen */
.app-icon--bleed { box-shadow: var(--icon-shadow); }
.app-icon--bleed::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(20 32 43 / 0.08);
  pointer-events: none;
}

/* Dark theme: a faint light edge so dark icons don't melt into dark surfaces */
:root[data-theme="dark"] .app-icon--bleed::after { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
:root[data-theme="dark"] .app-icon--shaped img { filter: drop-shadow(0 0 0.6px rgb(255 255 255 / 0.55)) drop-shadow(0 6px 10px rgb(0 0 0 / 0.5)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-icon--bleed::after { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
  :root:not([data-theme="light"]) .app-icon--shaped img { filter: drop-shadow(0 0 0.6px rgb(255 255 255 / 0.55)) drop-shadow(0 6px 10px rgb(0 0 0 / 0.5)); }
}

/* Icons that carry their own silhouette (macOS, adaptive Android): trimmed to the canvas, shadow follows the shape */
.app-icon--shaped img {
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 1px 1.5px rgb(20 32 43 / 0.14)) drop-shadow(0 6px 10px rgb(20 32 43 / 0.18));
}

/* Logos on transparency sit on a white tile */
.app-icon--glyph {
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: var(--icon-shadow), inset 0 0 0 1px rgb(20 32 43 / 0.08);
}
.app-icon--glyph img {
  width: 64%;
  height: 64%;
  object-fit: contain;
  border-radius: 0;
}

/* No artwork: a monogram tile in the product's category colour */
.app-icon--mono {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: calc(var(--size) * 0.36);
  letter-spacing: -0.03em;
  line-height: 1;
  box-shadow: var(--icon-shadow);
  background: linear-gradient(150deg, var(--mono-a, #0e7480), var(--mono-b, #0b4d55));
}
.app-icon--mono[data-cat="apps"]  { --mono-a: #3d66d6; --mono-b: #1d3a91; }
.app-icon--mono[data-cat="web"]   { --mono-a: #7d55d6; --mono-b: #47288f; }
.app-icon--mono[data-cat="ext"]   { --mono-a: #d86a28; --mono-b: #8f3d12; }
.app-icon--mono[data-cat="tools"] { --mono-a: #12808c; --mono-b: #0b4d55; }
.app-icon--mono[data-cat="oss"]   { --mono-a: #c43a70; --mono-b: #7d1c42; }

/* ------------------------------------------------------------ venues */
.venues { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.venue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.45rem 0.9rem 0.45rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}
.venue:hover { border-color: var(--ink-2); color: var(--ink); }
.venue .glyph { width: 18px; height: 18px; }
.venue--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.venue--primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--bg); }

/* ------------------------------------------------------------ project card */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.15s ease;
}
.pcard:hover { border-color: var(--line-strong); }
.pcard:focus-within { border-color: var(--teal); }

.pcard-top { display: flex; align-items: center; gap: var(--s-4); }
.pcard-id { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pcard-name {
  font-size: var(--fs-md);
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.pcard-name a { color: var(--ink); text-decoration: none; }
/* The name link covers the card; venue links inside stay clickable above it */
.pcard-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.pcard-name a:focus-visible { outline: none; }
.pcard-name a:focus-visible::after { outline: 2px solid var(--teal); outline-offset: 2px; }

.pcard-tagline { margin: 0; color: var(--ink-2); line-height: 1.5; }

.pcard-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-3);
  margin-top: auto;
  padding-top: var(--s-2);
}

.pmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.pmeta-metric { color: var(--ink-2); }

/* ------------------------------------------------------------ project row */
.prow {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.prow-main { min-width: 0; }
.prow-name { font-size: var(--fs-base); font-weight: 700; line-height: 1.3; }
.prow-name a { color: var(--ink); text-decoration: none; }
.prow-name a::after { content: ""; position: absolute; inset: 0; }
.prow:hover .prow-name a { color: var(--teal); }
.prow-tagline {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.prow-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}
.prow-metric { font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); white-space: nowrap; }

@media (max-width: 560px) {
  .prow { grid-template-columns: auto 1fr; }
  .prow-side { grid-column: 2; flex-direction: row; align-items: center; gap: var(--s-3); text-align: left; }
}

/* ------------------------------------------------------------ project tile */
.ptile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.ptile:hover { color: var(--ink); }
.ptile-name { max-width: 7rem; line-height: 1.25; }

/* ------------------------------------------------------------ post category chip */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.6rem;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--pc, var(--teal)) 13%, var(--surface));
  color: color-mix(in srgb, var(--pc, var(--teal)) 88%, var(--ink));
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
a.cat-chip:hover { background: color-mix(in srgb, var(--pc, var(--teal)) 22%, var(--surface)); color: color-mix(in srgb, var(--pc, var(--teal)) 88%, var(--ink)); }
:root[data-theme="dark"] .cat-chip { color: color-mix(in srgb, var(--pc, var(--teal)) 45%, #fff); background: color-mix(in srgb, var(--pc, var(--teal)) 28%, var(--surface)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cat-chip { color: color-mix(in srgb, var(--pc, var(--teal)) 45%, #fff); background: color-mix(in srgb, var(--pc, var(--teal)) 28%, var(--surface)); }
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* ------------------------------------------------------------ banners (gradient or photo) */
.dp-banner-media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--dp-a, #0b5d66), var(--dp-b, #364452));
  filter: hue-rotate(var(--dp-hue, 0deg));
}
.dp-banner-media.has-image { filter: none; background: var(--surface-3); }
.dp-banner-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(60% 90% at 82% 18%, rgb(255 255 255 / 0.26), transparent 60%),
    radial-gradient(70% 120% at 12% 8%, rgb(240 180 60 / 0.18), transparent 55%),
    radial-gradient(90% 130% at 60% 120%, rgb(14 22 30 / 0.55), transparent 60%);
}
.dp-banner-media.has-image::before { background: none; }
.dp-banner-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dp-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, transparent 40%, rgb(14 22 30 / 0.45) 100%);
}
.dp-banner-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 7%;
  transform: translateY(-50%);
  color: #fff;
  opacity: 0.28;
  pointer-events: none;
}
.dp-banner-icon svg { width: clamp(56px, 9vw, 120px); height: auto; stroke: currentColor; }

/* ------------------------------------------------------------ post card */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.post-card:hover { border-color: var(--line-strong); }
.post-card__media { position: relative; aspect-ratio: 16 / 7; }
.post-card__media .dp-banner-media { position: absolute; inset: 0; }
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
  padding: var(--s-5);
}
.post-card__title {
  font-size: var(--fs-md);
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card:hover .post-card__title a { color: var(--teal); }
.post-card__excerpt { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.post-card .post-meta { margin-top: auto; }
.post-card .cat-chip { position: relative; z-index: 2; align-self: flex-start; }

/* ------------------------------------------------------------ post row */
.post-row {
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--s-5);
  align-items: start;
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.post-row__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
}
.post-row__thumb .dp-banner-media { position: absolute; inset: 0; }
.post-row__thumb .dp-banner-icon svg { width: 30px; }
.post-row__body { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.post-row__title { font-size: var(--fs-md); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.post-row__title a { color: var(--ink); text-decoration: none; }
.post-row__title a::after { content: ""; position: absolute; inset: 0; }
.post-row:hover .post-row__title a { color: var(--teal); }
.post-row__excerpt { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.post-row .cat-chip { position: relative; z-index: 2; }

@media (max-width: 560px) {
  .post-row { grid-template-columns: 5.25rem 1fr; gap: var(--s-4); }
  .post-row__excerpt { display: none; }
  .post-row__title { font-size: var(--fs-base); }
}

/* Bigger hit area for small chips inside cards on touch screens */
@media (pointer: coarse), (max-width: 760px) {
  .post-card .cat-chip::after,
  .post-row .cat-chip::after { content: ""; position: absolute; inset: -10px -6px; }
}

/* ------------------------------------------------------------ pagination */
.pagination { margin-top: var(--s-7); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 650;
  text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--line-strong); color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pagination .page-numbers.dots { border: 0; background: none; min-width: auto; }

/* ------------------------------------------------------------ admin edit button */
.admin-edit-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--muted);
  font-size: var(--fs-xs);
  text-decoration: none;
}
.admin-edit-button:hover { color: var(--teal); border-color: var(--teal); }

/* ------------------------------------------------------------ footer */
.site-footer {
  margin-top: var(--section-y);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-hello {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s-6);
  align-items: end;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}
.footer-hello h2 {
  font-size: var(--fs-xl);
  font-weight: 760;
  letter-spacing: -0.024em;
  line-height: 1.08;
}
.footer-hello p { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--fs-md); max-width: 34rem; }
.footer-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-end; }

.footer-shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
  padding-block: var(--s-6);
  border-top: 1px solid var(--line);
}
.footer-shelf h2 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0;
}
.shelf-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.shelf-row a { display: block; border-radius: var(--r-icon); }
.shelf-row a:hover .app-icon { transform: translateY(-2px); }
.shelf-row .app-icon { transition: transform 0.15s var(--ease-out); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  padding-block: var(--s-5) var(--s-6);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.footer-bottom p { margin: 0; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-bottom a:hover { color: var(--teal); text-decoration: underline; }

@media (max-width: 760px) {
  .footer-hello { grid-template-columns: 1fr; align-items: start; }
  .footer-actions { justify-content: flex-start; }
}

/* ------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
