/* ==========================================================================
   Tokens — light by default; dark via system preference or [data-theme]
   ========================================================================== */
:root {
  --bg: #f7f7f9;
  --bg-elev: #ffffff;
  --bg-sunken: #eeeef2;
  --text: #0f0f12;
  --text-2: #55555f;
  --text-3: #8a8a95;
  --border: rgba(15, 15, 25, 0.08);
  --border-strong: rgba(15, 15, 25, 0.14);
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --coffee: #ff813f;
  --star: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(15, 15, 25, 0.05);
  --shadow-md: 0 1px 2px rgba(15, 15, 25, 0.04), 0 8px 24px -8px rgba(15, 15, 25, 0.12);
  --shadow-lg: 0 2px 4px rgba(15, 15, 25, 0.04), 0 24px 48px -16px rgba(15, 15, 25, 0.2);
  --nav-bg: rgba(247, 247, 249, 0.72);
  --glow-1: rgba(99, 102, 241, 0.22);
  --glow-2: rgba(14, 165, 233, 0.18);

  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0c;
    --bg-elev: #141418;
    --bg-sunken: #1c1c22;
    --text: #f4f4f6;
    --text-2: #a9a9b4;
    --text-3: #75757f;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --accent: #818cf8;
    --accent-2: #38bdf8;
    --accent-soft: rgba(129, 140, 248, 0.14);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.8);
    --nav-bg: rgba(10, 10, 12, 0.7);
    --glow-1: rgba(99, 102, 241, 0.28);
    --glow-2: rgba(14, 165, 233, 0.16);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-elev: #141418;
  --bg-sunken: #1c1c22;
  --text: #f4f4f6;
  --text-2: #a9a9b4;
  --text-3: #75757f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #818cf8;
  --accent-2: #38bdf8;
  --accent-soft: rgba(129, 140, 248, 0.14);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.8);
  --nav-bg: rgba(10, 10, 12, 0.7);
  --glow-1: rgba(99, 102, 241, 0.28);
  --glow-2: rgba(14, 165, 233, 0.16);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600;
  transform: translateY(-200%); transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ==========================================================================
   Buttons & controls
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

.btn-primary { background: var(--text); color: var(--bg); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--bg-elev); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-coffee { background: var(--coffee); color: #fff; box-shadow: 0 6px 16px -6px rgba(255, 129, 63, 0.6); }
.btn-coffee:hover { box-shadow: 0 10px 22px -8px rgba(255, 129, 63, 0.7); }

.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev);
  color: var(--text); cursor: pointer; transition: border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 999px;
}
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-md); }
.seg .count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 18px;
  background: var(--border); color: var(--text-2); text-align: center;
}
.seg button[aria-pressed="true"] .count { background: var(--accent-soft); color: var(--accent); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0;
  box-shadow: 0 4px 12px -4px var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 4px; margin-right: auto; margin-left: 20px; }
.nav-links a {
  padding: 6px 12px; border-radius: 999px; color: var(--text-2);
  font-size: 14px; font-weight: 600; text-decoration: none; transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-sunken); }
@media (max-width: 860px) { .nav-links { display: none; } }
.nav .btn { height: 36px; padding: 0 14px; font-size: 13px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; isolation: isolate;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero-glow {
  position: absolute; inset: -10% 0 auto; height: 560px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 60% at 25% 30%, var(--glow-1), transparent 70%),
    radial-gradient(40% 60% at 75% 40%, var(--glow-2), transparent 70%);
  filter: blur(20px);
}
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-id { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-soft), var(--shadow-md);
}
.hero-loc {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  color: var(--text-2); font-size: 13px; font-weight: 600;
}
.hero-loc svg { width: 14px; height: 14px; }
.hero-loc .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
.hero-role {
  margin-top: 10px; font-size: clamp(17px, 2vw, 20px); font-weight: 600;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 18px; max-width: 520px; font-size: clamp(16px, 1.6vw, 17px); color: var(--text-2); text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn-icon { width: 40px; padding: 0; }

/* Code window — stays dark in both themes, like a real editor. */
.term {
  max-width: 100%; min-width: 0;
  border-radius: 14px; overflow: hidden;
  background: #0d0e12; color: #e6e6ea;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 30px 80px -20px rgba(15, 15, 40, 0.55), 0 0 120px -40px var(--glow-1);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transform: perspective(1600px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.6s var(--ease);
}
.term:hover { transform: none; }
.term-bar {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 38px; background: #17181e; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.term-dots { position: absolute; left: 14px; display: flex; gap: 8px; }
.term-dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title { font-size: 12px; color: #8b8d98; }
.term-body { height: 260px; padding: 18px 20px; overflow: hidden; }
.code {
  margin: 0; font: inherit; font-size: 13.5px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; tab-size: 4;
}
.term-status {
  display: flex; justify-content: space-between; padding: 6px 14px;
  background: #4f46e5; color: #e0e7ff; font-size: 11px;
}
.tk-k { color: #c084fc; }   /* keywords */
.tk-t { color: #67e8f9; }   /* types */
.tk-s { color: #fca5a5; }   /* strings */
.tk-c { color: #6b7280; font-style: italic; } /* comments */
.tk-n { color: #fbbf24; }   /* numbers */
.tk-f { color: #93c5fd; }   /* .members / calls */
.tk-p { color: #4ade80; font-weight: 700; } /* shell prompt */
.tk-ok { color: #4ade80; }
.caret {
  display: inline-block; width: 0.55em; height: 1.2em; margin-left: 1px; vertical-align: text-bottom;
  background: #4ade80; animation: blink 1s steps(1) infinite;
}
.caret.is-typing { animation: none; }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .term { transform: none; }
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects, .section { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 48px; }
.section-sub { color: var(--text-3); font-size: 14px; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.search {
  position: relative; display: flex; align-items: center;
  height: 38px; padding: 0 10px 0 36px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--text-3); }
.search input {
  width: 180px; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search kbd {
  font: 600 11px/1 inherit; padding: 4px 6px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--text-3);
}
.search:focus-within kbd { display: none; }
@media (hover: none) { .search kbd { display: none; } }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.card {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 22px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(400px circle at var(--mx) var(--my), var(--accent-soft), transparent 45%);
  transition: opacity 0.35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }
.card[hidden] { display: none; }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-icon {
  width: 72px; height: 72px; border-radius: 22.5%;
  background: var(--bg-sunken); object-fit: cover;
  box-shadow: 0 0 0 1px var(--border), 0 6px 16px -6px rgba(0, 0, 0, 0.25);
}
.card-icon.is-ext { padding: 10px; border-radius: 18px; object-fit: contain; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--bg-sunken); color: var(--text-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; }
.chip-new { background: var(--accent-soft); color: var(--accent); }

.card-title { font-size: 18px; font-weight: 700; }
.card-desc { color: var(--text-2); font-size: 15px; flex: 1; }

.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border);
}
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; }
.rating svg { color: var(--star); width: 15px; height: 15px; }
.rating small { color: var(--text-3); font-weight: 500; font-size: 12px; }

.store-link {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text);
}
.store-link::after { content: ""; position: absolute; inset: -400px -400px -14px; } /* whole card clickable */
.card { cursor: pointer; }
.store-link svg { width: 15px; height: 15px; }
.store-link .arrow { color: var(--text-3); transition: transform 0.25s var(--ease), color 0.25s; }
.card:hover .store-link .arrow { transform: translate(2px, -2px); color: var(--accent); }

@media (min-width: 720px) {
  .card.is-featured { grid-column: span 2; }
  .card.is-featured .card-title { font-size: 22px; }
  .card.is-featured .card-desc { font-size: 16px; max-width: 52ch; }
  .card.is-featured::after {
    content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, var(--glow-1), transparent 70%);
  }
}

.empty { padding: 48px 0; text-align: center; color: var(--text-3); }

/* ==========================================================================
   Résumé
   ========================================================================== */
.resume { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.resume-side { display: grid; gap: 16px; }
.panel {
  padding: 24px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.panel h4 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.panel p { color: var(--text-2); font-size: 15px; }
.panel-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3);
}
.panel-title svg { width: 18px; height: 18px; color: var(--accent); }
.tl-org { margin: 2px 0 8px; font-size: 14px !important; color: var(--text-3) !important; font-weight: 500; }
.muted { color: var(--text-3) !important; font-size: 14px !important; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--border); border-radius: 2px; }
.timeline > li { position: relative; padding-bottom: 26px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -22px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-elev); border: 2px solid var(--accent);
}
.timeline > li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-date { display: block; margin-bottom: 2px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--accent); font-weight: 500; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tags li {
  padding: 3px 10px; border-radius: 999px; background: var(--bg-sunken);
  color: var(--text-2); font-size: 12px; font-weight: 600;
}
.panel > .tags { margin-top: 0; }

.langs { display: grid; gap: 10px; margin: 0; }
.langs div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.langs div:last-child { padding-bottom: 0; border-bottom: 0; }
.langs dt { font-weight: 600; }
.langs dd { margin: 0; color: var(--text-2); font-size: 14px; }

@media (max-width: 860px) { .resume { grid-template-columns: 1fr; } }

/* ==========================================================================
   Documents
   ========================================================================== */
.docs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.doc {
  display: flex; align-items: center; gap: 16px; padding: 18px 18px 18px 20px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.doc:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doc-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.doc-icon svg { width: 22px; height: 22px; }
.doc-body { flex: 1; min-width: 0; }
.doc-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.doc-desc { color: var(--text-2); font-size: 14px; }
.doc-meta { margin-top: 2px; color: var(--text-3); font-size: 12px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.doc-private { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; }
.doc-private svg { width: 12px; height: 12px; }
.doc-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
@media (max-width: 480px) {
  .doc { flex-wrap: wrap; }
  .doc-actions { width: 100%; }
  .doc-actions .btn { flex: 1; }
}

/* ==========================================================================
   Support & footer
   ========================================================================== */
.support { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 64px; }
.support-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(24px, 4vw, 40px); border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(255, 129, 63, 0.16), transparent 60%),
    var(--bg-elev);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.support-card h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 6px; }
.support-card p { color: var(--text-2); max-width: 520px; }

.footer {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border); color: var(--text-3); font-size: 13px;
}
.footer-links { display: flex; gap: 6px; }
.footer-links a {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  color: var(--text-2); transition: background-color 0.2s, color 0.2s;
}
.footer-links a:hover { background: var(--bg-sunken); color: var(--text); }
.footer-links svg { width: 16px; height: 16px; }

/* ==========================================================================
   Motion
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 50ms);
}
/* Cards keep their hover transition after revealing. */
.js .card.reveal.is-in { transition: opacity 0.6s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s; }

@media print {
  .js .reveal { opacity: 1; transform: none; }
  .nav, .hero-glow, .toolbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .nav .btn-coffee { width: 36px; padding: 0; }
  .brand-name { display: none; }
  .section-head { flex-direction: column; align-items: stretch; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .seg-filter { justify-content: space-between; }
  .seg-filter button { flex: 1; justify-content: center; }
  .search input { width: 100%; }
  .term-body { height: 240px; padding: 14px; }
  .code { font-size: 12px; }
  .support-card .btn { width: 100%; }
}
