
/* ══════════════════════════════════════════════════════════
   v6 — metorex.org structure, nautical palette, semantic color
   Structure: clean canvas, soft rounded cards, icon tiles,
   inline chips, arrow links, restrained accent system.
   Color semantics: signal-orange = ruby/code topics,
   sea-green = homelab/infra topics, navy = brand/neutral.
   ══════════════════════════════════════════════════════════ */
:root {
  --font-sans: "Public Sans", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Sometype Mono", "IBM Plex Mono", monospace;

  /* Light — chart paper canvas */
  --bg: #f1eeea;              /* soft cool gray canvas */
  --bg-header: #f8f6f3;
  --bg-card: #fdfcfa;
  --bg-card-alt: #eae6e1;
  --ink: #22344a;             /* deep navy ink */
  --ink-muted: #51637a;
  --ink-faint: #5a6a82;

  --accent: #25639e;          /* signal orange — ruby/code topics, brand */
  --accent-soft: #dfe9f5;     /* pale chip background */
  --accent-2: #a84e2f;        /* sea green — homelab/infra topics */
  --accent-2-soft: #f7eae2;
  --navy: #22344a;
  --border: #ddd7d0;
  --border-strong: #c1b8ae;
  --shadow: 0 1px 3px rgba(22, 36, 46, 0.06), 0 4px 14px rgba(22, 36, 46, 0.05);
}

[data-theme="dark"] {
  --bg: #0e1621;              /* deep sea night */
  --bg-header: #131e2b;
  --bg-card: #182534;
  --bg-card-alt: #1d2c3d;
  --ink: #e8ebee;
  --ink-muted: #a7b4bf;
  --ink-faint: #71808d;

  --accent: #5f9fdd;          /* signal orange, lifted for dark */
  --accent-soft: #1c3048;
  --accent-2: #d8b4a0;        /* sea green, lifted */
  --accent-2-soft: #33261f;
  --navy: #0e1621;
  --border: #243444;
  --border-strong: #33465a;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  transition: background-color 0.35s, color 0.35s;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-header) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--navy);
  color: var(--bg-header);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name { color: var(--accent); }
[data-theme="dark"] .brand-mark { background: var(--accent); color: var(--bg); }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }

.icon-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 4rem 0 2.5rem; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.hero h1 .hl-ruby { color: var(--accent); }
.hero h1 .hl-infra { color: var(--accent-2); }
.hero h1 .hl-accent2 { color: var(--accent-2); }

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-top: 1rem;
  max-width: 52ch;
}
.hero-sub .acronym { color: var(--accent); font-weight: 700; }

.hero-body {
  margin-top: 1.1rem;
  color: var(--ink-muted);
  max-width: 56ch;
}

.hero-actions { margin-top: 1.6rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  min-height: 44px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); color: var(--ink); background: var(--bg-card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Section headings ───────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0 1.25rem;
}
.section-head h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-head .see-all {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
.section-head .see-all:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Post cards (featured) ──────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100% - 2rem), 1fr));
  gap: 1.25rem;
  list-style: none;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.45s;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(22, 36, 46, 0.2), 0 4px 10px rgba(22, 36, 46, 0.1);
}
[data-theme="dark"] .post-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.post-card-photo {
  height: 9.5rem;
  overflow: hidden;
  position: relative;
}
.post-card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.02);
  transition: transform 0.5s ease, filter 0.5s ease;
}
.post-card:hover .post-card-photo img { transform: scale(1.06); filter: saturate(1); }

/* Category tile overlaid on photo corner */
.cat-tile {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  min-width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 0.5rem;
  color: #fff;
}
.cat-tile.ruby { background: var(--accent); }
.cat-tile.infra { background: var(--accent-2); }
.cat-tile.dark { background: var(--navy); }
/* Tile text must contrast against the tile's own background, per theme.
   ruby/infra tile colors flip between themes (dark->light), so their text
   color flips with them; --navy stays dark in both themes, so it keeps light text. */
.cat-tile { color: #fff; }
[data-theme="dark"] .cat-tile.ruby,
[data-theme="dark"] .cat-tile.infra { color: #0e1621; }
.cat-tile.dark { color: #f8f6f3; }
[data-theme="dark"] .cat-tile.dark { color: #f8f6f3; }

/* No-photo fallback: patterned gradient banner in place of the image (option B).
   Soft diagonal stripes in the category color, so the banner reads as texture
   rather than a flat fill, and the category tile still stands out against it. */
.post-card-photo.no-photo {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 100%);
  position: relative;
  overflow: hidden;
}
.post-card-photo.no-photo::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--accent) 12%, transparent) 10px 11px);
  opacity: 0.6;
}
.post-card-photo.no-photo.cat-infra {
  background: linear-gradient(135deg, var(--accent-2-soft) 0%, var(--bg-card) 100%);
}
.post-card-photo.no-photo.cat-infra::before {
  background-image: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--accent-2) 14%, transparent) 10px 11px);
}
.post-card-photo.no-photo.cat-dark {
  background: linear-gradient(135deg, var(--bg-card-alt) 0%, var(--bg-card) 100%);
}
.post-card-photo.no-photo.cat-dark::before {
  background-image: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--ink) 8%, transparent) 10px 11px);
}

.post-card-body { padding: 1.1rem 1.2rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }

.post-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.post-card:hover h3 { color: var(--accent); }

.post-excerpt { font-size: 0.88rem; color: var(--ink-muted); }

/* Inline code chips — metorex signature */
.chip {
  font-family: var(--font-mono);
  font-size: 0.78em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  white-space: nowrap;
}
.chip.infra { background: var(--accent-2-soft); color: var(--accent-2); }

.post-meta {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
}
.post-meta .read-more { color: var(--accent); font-weight: 700; }
.post-card:hover .read-more { text-decoration: underline; text-underline-offset: 3px; }
.post-meta.infra-meta .read-more { color: var(--accent-2); }

/* ── Recent list ────────────────────────────────────────── */
.recent-list { list-style: none; border-top: 1px solid var(--border); }
.recent-row { border-bottom: 1px solid var(--border); }
.recent-row a {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 1rem;
  padding: 0.85rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 8px;
  transition: background 0.18s;
  align-items: baseline;
}
.recent-row a:hover { background: var(--bg-card); }
.recent-row time { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); white-space: nowrap; }
.recent-row h3 { font-size: 0.95rem; font-weight: 600; transition: color 0.18s; }
.recent-row a:hover h3 { color: var(--accent); }
.recent-row .row-cat { font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
.row-cat.ruby { color: var(--accent); }
.row-cat.infra { color: var(--accent-2); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  background: var(--bg-card-alt);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}
.footer-brand h2 { font-size: 1.1rem; font-weight: 800; color: var(--accent); margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.85rem; color: var(--ink-muted); max-width: 30ch; }
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col a { font-size: 0.88rem; color: var(--ink-muted); transition: color 0.18s; display: inline-flex; align-items: center; gap: 0.45em; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.social-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: 0 0 auto;
  vertical-align: -0.125em;
}
.footer-legal {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.footer-legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── Back to top ────────────────────────────────────────── */
.to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.2s;
  z-index: 60;
}
.to-top.visible { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .recent-row a { grid-template-columns: 1fr; gap: 0.1rem; }
  .hero { padding: 2.5rem 0 1.5rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

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

/* ── Mobile outer space ────────────────────────────────── */
@media (max-width: 640px) {
  .wrap {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    max-width: 100%;
  }
  /* Grids must not overflow the padded wrap */
  .post-grid, .project-grid, .interests, .stack-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  /* Post body shouldn't overflow either */
  .post-body { max-width: 100%; }
  .post-page-header, .post-hero { max-width: 100%; }
  .post-body pre { 
    margin-left: 0; 
    margin-right: 0;
    overflow-x: auto;
  }
}

/* ── Post page layout & typography ──────────────────────
   Matches the locked post-template design.                  */
.post-page { padding: 3rem 0 4rem; }
.post-page-header { margin-bottom: 2.5rem; max-width: none; }
.post-page-header .kicker { margin-bottom: 0.75rem; }
.post-page-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.post-page-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.post-page-meta .tag {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15em 0.5em;
  border-radius: 5px;
  font-weight: 600;
}
.reading-time { color: var(--ink-faint); }
.article-footer { margin-top: 3rem; }
.article-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag-link { text-decoration: none; }

/* Post body typography */
.post-body {
  max-width: 65ch;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.75;
}
.post-body p { margin-bottom: 1.25rem; color: var(--ink); }
.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.post-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}
.post-body ul, .post-body ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--ink);
}
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
  color: var(--ink-muted);
  font-style: italic;
}
.post-body blockquote p { margin-bottom: 0.5rem; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body img {
  border-radius: 10px;
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

/* Post hero image (from photo front matter) — centered over column */
.post-hero {
  max-width: 65ch;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  border-radius: 10px;
  overflow: hidden;
  font-size: 1.05rem; /* match .post-body so 65ch resolves identically */
}
.post-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Post navigation (prev/next) */
.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.post-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.post-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Newer post link sits on the left, older on the right */
.post-nav-newer { text-align: left; }
.post-nav-older { text-align: right; }
.post-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  max-width: 33%;
  min-width: 0;
}
/* Title truncates with ellipsis; arrow never does */
.post-nav-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.post-nav .arrow { flex: 0 0 auto; }
.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Code blocks & syntax highlighting ─────────────────────
   Chroma emits token classes (.c1 comment, .k keyword, .n name,
   .o operator, .p punctuation, .m number, .no/name-constant,
   .nc class, .s string, .gi/.gd diff). Map them to the design's
   light-mode palette via variables so dark mode adapts.        */
.post-body pre,
.article-wrap pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}
.post-body code,
.article-wrap code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.post-body pre code,
.article-wrap pre code {
  background: none;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
/* Chroma token palette — light mode */
.chroma .c1, .chroma .c, .chroma .ch, .chroma .cm, .chroma .cp { color: #8a95a5; } /* comments */
.chroma .k, .chroma .kd, .chroma .kn, .chroma .kr, .chroma .kt { color: var(--accent); } /* keywords */
.chroma .o, .chroma .p { color: var(--ink-muted); } /* operators, punctuation */
.chroma .n, .chroma .na, .chroma .nb, .chroma .nc, .chroma .nd, .chroma .ne { color: var(--ink); } /* names */
.chroma .nf, .chroma .fm { color: var(--accent); } /* function names */
.chroma .m, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il { color: #7a5ea8; } /* numbers */
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sb, .chroma .sc, .chroma .sd, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr, .chroma .ss { color: var(--accent-2); } /* strings */
.chroma .no, .chroma .vc, .chroma .vg, .chroma .vi { color: var(--accent-2); } /* constants / symbols */
.chroma .err { color: #b3423a; } /* errors */

/* ── About page ────────────────────────────────────────── */
.about-page { padding-top: 3rem; padding-bottom: 4rem; }
.about-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 760px) {
  .about-hero { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.about-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.about-hero .lead {
  font-size: 1.15rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 52ch;
}
.about-body {
  margin-top: 1.25rem;
}
.about-body p {
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.about-body p:last-child { margin-bottom: 0; }
.about-photo {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  /* Top-align with the lead paragraph, not the H1: push down by the H1's
     block height (font-size × line-height + margin-bottom). Matches the
     H1 clamp so it tracks across viewports. */
  margin-top: calc(clamp(2rem, 5vw, 3rem) * 1.1 + 1rem);
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.8);
}

/* Interest cards */
.interests {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100% - 2rem), 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}
.interest-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
.interest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(22, 36, 46, 0.2);
}
.interest-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.interest-card h3 .tile {
  width: 2rem; height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.tile.ruby { background: var(--accent); }
.tile.infra { background: var(--accent-2); }
.tile.navy { background: var(--navy); }
.interest-card p { font-size: 0.9rem; color: var(--ink-muted); line-height: 1.6; }

/* Stack + Elsewhere sections */
.about-section { margin: 3rem 0; }
.about-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}
.stack-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100% - 2rem), 1fr));
  grid-auto-rows: 1fr;
  gap: 1.25rem;
}
.stack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 8px solid var(--accent);
  border-radius: 0;
  padding: 1rem 1.1rem;
  padding-right: 6.5rem; /* room for the large right-aligned icon */
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
  transition: border-color 0.2s;
  overflow: hidden;
}
.stack-card:hover { border-color: var(--accent); }
/* Semantic hue tints per category (Strategy 4): compute=blue, storage=earth,
   network=cyan, languages=violet, editors=green, os=slate. Dark theme gets a
   stronger mix so the hues don't vanish on the dark card background. */
.stack-card:nth-child(1) { background: color-mix(in srgb, #25639e 22%, var(--bg-card)); } /* Compute */
.stack-card:nth-child(2) { background: color-mix(in srgb, #92400e 22%, var(--bg-card)); } /* Storage */
.stack-card:nth-child(3) { background: color-mix(in srgb, #0e7490 22%, var(--bg-card)); } /* Network */
.stack-card:nth-child(4) { background: color-mix(in srgb, #6d28d9 22%, var(--bg-card)); } /* Languages */
.stack-card:nth-child(5) { background: color-mix(in srgb, #15803d 22%, var(--bg-card)); } /* Editors */
.stack-card:nth-child(6) { background: color-mix(in srgb, #475569 22%, var(--bg-card)); } /* OS */
[data-theme="dark"] .stack-card:nth-child(1) { background: color-mix(in srgb, #25639e 30%, var(--bg-card)); }
[data-theme="dark"] .stack-card:nth-child(2) { background: color-mix(in srgb, #92400e 30%, var(--bg-card)); }
[data-theme="dark"] .stack-card:nth-child(3) { background: color-mix(in srgb, #0e7490 30%, var(--bg-card)); }
[data-theme="dark"] .stack-card:nth-child(4) { background: color-mix(in srgb, #6d28d9 30%, var(--bg-card)); }
[data-theme="dark"] .stack-card:nth-child(5) { background: color-mix(in srgb, #15803d 30%, var(--bg-card)); }
[data-theme="dark"] .stack-card:nth-child(6) { background: color-mix(in srgb, #475569 30%, var(--bg-card)); }
.stack-card-text { flex: 1 1 auto; position: relative; z-index: 1; }
.stack-card-icon {
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  color: var(--accent);
  opacity: 0.12;
  line-height: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stack-card:hover .stack-card-icon { opacity: 0.22; transform: scale(1.18); }
.stack-card:not(:hover) .stack-card-icon { transform: scale(1); }
.stack-card-icon svg { width: 7rem; height: 7rem; }
.stack-list li strong { color: var(--accent); font-weight: 700; display: block; margin-bottom: 0.5rem; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stack-values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stack-values li { position: relative; padding: 0 0 0 1rem; background: none; border: none; font-size: 0.9rem; }
.stack-values li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Elsewhere pills (about page): three columns, each centered */
.elsewhere-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.elsewhere-pills li { display: flex; justify-content: center; }
.elsewhere-pills a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border-strong));
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  transition: border-color 0.18s, color 0.18s;
}
.elsewhere-pills a:hover { border-color: var(--accent); color: var(--accent); }
.stack-list li a {
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  transition: color 0.18s;
}
.stack-list li a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Elsewhere link list (shared: footer + about page) */
.elsewhere-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.elsewhere-list a {
  font-size: 0.88rem;
  color: var(--ink-muted);
  transition: color 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.elsewhere-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .interests, .stack-list { grid-template-columns: 1fr; gap: 1rem; }
}
