/* eigensound|lab — site styles
   Colours: glass navy ground, one cool accent for links, one warm accent
   (--warm, set in _config.yml) used only for attention. */

:root {
  --text: #e6e8ee;
  --muted: #c2c9da;
  --meta: #a8b3cc;
  --accent: #79b8ff;
  --ink: #070912;
  --warm: #f5a85a;
  --line: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.05);
  --glass: rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --gap: clamp(36px, 4.6vw, 60px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: #16213e;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* fixed gradient that also behaves on phones */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 10px 16px; border-radius: 22px; background: #fff; color: var(--ink); }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(12px, 2.6vw, 28px) clamp(16px, 3.4vw, 40px) clamp(28px, 4vw, 44px);
}
main { display: flex; flex-direction: column; gap: var(--gap); margin-top: var(--gap); }
main > * { min-width: 0; }

/* ---------- header and navigation ---------- */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.logo-link { display: inline-flex; align-items: center; min-height: 44px; }
.logo-link img { display: block; height: 44px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a, .pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 22px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.nav a:hover, .pill:hover { background: rgba(255, 255, 255, 0.15); color: #fff; transform: translateY(-2px); }
.nav a.is-on { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.pill.is-on { background: var(--text); border-color: var(--text); color: #0b1020; }

/* ---------- type ---------- */
.kicker, .label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--meta);
}
.meta { font-size: 14px; color: var(--meta); }
.lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 38em; }
.hero, .page-head { display: flex; flex-direction: column; gap: 16px; }
.hero h1, .page-head h1, .post-head h1 {
  font-weight: 300; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.14; letter-spacing: -0.02em;
  max-width: 18em; text-wrap: balance;
}
main h2 { font-size: clamp(24px, 2.8vw, 30px); font-weight: 300; letter-spacing: -0.01em; line-height: 1.25; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; }
.more-link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: var(--text);
  font: inherit; font-size: 15px; cursor: pointer; position: relative; z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #0b1020; font-weight: 600; }
.btn--primary:hover { background: #fff; border-color: #fff; color: #0b1020; }

/* ---------- icons ---------- */
.icon { display: block; color: var(--ink); }
.icon .i-dash { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-dasharray: 5 3; }
.icon .i-solid { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.icon .i-fill { fill: currentColor; stroke: none; }
.icon-tile {
  position: relative; flex: none; display: flex; padding: 6px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid transparent;
}
.icon-tile--lg { padding: 8px; border-radius: 16px; }
.icon-tile--lg .i-dash { stroke-width: 2; }
.icon-tile--lg .i-solid { stroke-width: 2.5; }

/* ---------- the tile hover from the original site: lift, shadow, light sweep ---------- */
.tile, .feature, .video-card {
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.tile::before, .feature::before, .video-card::before {
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease; pointer-events: none;
}
.tile:hover::before, .tile:focus-within::before,
.feature:hover::before, .feature:focus-within::before,
.video-card:hover::before, .video-card:focus-within::before { left: 100%; }
.tile:hover, .tile:focus-within, .feature:hover, .feature:focus-within, .video-card:hover, .video-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}
.tile:hover, .tile:focus-within { background: rgba(255, 255, 255, 0.1); }
.tile:active, .feature:active { transform: translateY(-1px); }

/* ---------- featured ---------- */
.featured { display: flex; flex-direction: column; gap: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.feature {
  display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 16px 20px; padding: clamp(18px, 2vw, 24px);
  border-radius: 18px; background: var(--glass); border: 1px solid var(--line); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.feature-body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.feature h3 { font-size: 22px; font-weight: 350; line-height: 1.25; }
.feature p { font-size: 15.5px; color: var(--muted); }

/* ---------- catalogue ---------- */
.catalogue { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters[hidden], .more[hidden], .tile[hidden], .fresh-label[hidden] { display: none; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.tile {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px; border-radius: 15px;
  background: var(--card); border: 1px solid var(--line);
}
.tile-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-name { font-size: 16px; font-weight: 500; line-height: 1.3; }
.tile-link { color: var(--text); }
.tile-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }  /* whole tile is the launch link */
.tile-blurb { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.tile-meta { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 13px; }
.tile-meta a { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 32px; }
.tile-meta:empty { display: none; }
.fresh-label { display: inline-flex; align-items: center; min-height: 32px; color: var(--warm); }
.more { align-self: center; }
.note { font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.note summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--meta); }
.note summary::before { content: "ⓘ"; }
.note p { max-width: 60em; margin-bottom: 8px; }

/* ---------- panels: news, papers, GitHub ---------- */
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; align-items: start; }
.panel { display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); min-width: 0; scroll-margin-top: 16px; }
.panel > h2 { font-size: 20px; font-weight: 350; margin-bottom: 8px; }
.panel .section-head h2 { font-size: 20px; font-weight: 350; }
.panel--live { background: rgba(0, 0, 0, 0.2); border: 2px dashed rgba(255, 255, 255, 0.2); }
.panel--live > .meta { margin: 2px 0 8px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rows { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows + .more-link { border-top: 1px solid var(--line); }
.row-title { font-size: 16px; font-weight: 500; }
.row { position: relative; }
.row-title a { color: var(--text); }
.row-title a::after { content: ""; position: absolute; inset: 0; }  /* the whole row is the tap target */
.row-title a:hover, .row-title a.accent { color: var(--accent); }
.row-title a.accent:hover { color: #fff; }
.row-title--light { font-size: 15.5px; font-weight: 400; line-height: 1.45; }
.row-text { font-size: 15px; color: var(--muted); }
.row--paper { flex-direction: row; gap: 12px; }
.paper-id { flex: none; width: 26px; font-size: 14px; font-weight: 600; color: var(--meta); padding-top: 1px; }
.row-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 13px; }
.chip { font-size: 13px; padding: 1px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.22); color: var(--muted); }

/* ---------- articles (journal rows) and the watch rail ---------- */
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 56px; }
.split-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; scroll-margin-top: 16px; }
.split-main > h2 { margin-bottom: 6px; }
.split-rail { flex: 1 1 300px; }
.journal { display: flex; flex-direction: column; }
.journal-row { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); color: var(--text); }
.journal-title { font-size: clamp(20px, 2.2vw, 24px); font-weight: 350; line-height: 1.3; transition: color 0.2s ease; }
.journal-text { font-size: 16px; color: var(--muted); max-width: 36em; }
.journal-row .read { color: var(--accent); }
.journal-row:hover .journal-title { color: #fff; }
.journal + .more-link { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.row--video { flex-direction: row; align-items: center; gap: 14px; }
.video-thumb, .video-frame {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
}
.video-thumb { flex: none; width: 128px; height: 72px; border-radius: 10px; }
.video-thumb img, .video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-thumb .icon, .video-frame .icon { opacity: 0.85; }
.play {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(7, 9, 18, 0.72);
}
.play::after { content: ""; position: absolute; left: 11px; top: 8px; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent #fff; }
.play--lg { right: 16px; bottom: 16px; width: 56px; height: 56px; background: var(--accent); }
.play--lg::after { left: 22px; top: 17px; border-width: 11px 0 11px 17px; border-left-color: #0b1020; }

/* ---------- videos page ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.video-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); scroll-margin-top: 16px; }
.video-frame { aspect-ratio: 16 / 9; border-radius: 10px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card h2 { font-size: 18px; font-weight: 500; }
.video-card .meta a { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- papers page ---------- */
.papers { display: flex; flex-direction: column; gap: 16px; }
.paper { gap: 10px; }
.paper > h2 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 400; margin: 0; }
.paper > p { color: var(--muted); max-width: 70em; }
.paper .row-status { margin-top: 0; }
.keywords { max-width: 70em; }

/* ---------- long-form text: about, guides, README pages, posts ---------- */
.post { display: flex; flex-direction: column; gap: 28px; max-width: 760px; }
.post-head { display: flex; flex-direction: column; gap: 14px; }
.prose { font-size: 17px; line-height: 1.7; color: #dfe3ec; overflow-wrap: break-word; }
.prose.panel { display: block; padding: clamp(18px, 4vw, 44px); }
.prose > * { max-width: 46rem; }
.prose > table, .prose > pre, .prose > .figure-row { max-width: 100%; }
.prose h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 300; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.6em; }
.prose h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 350; margin: 1.8em 0 0.5em; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.prose h3 { font-size: 20px; font-weight: 500; margin: 1.5em 0 0.4em; }
.prose h4 { font-size: 17px; font-weight: 600; margin: 1.3em 0 0.3em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose li { margin: 0.25em 0; }
.prose strong { color: #fff; font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(121, 184, 255, 0.5); }
.prose img { height: auto; border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); margin: 2em 0; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 2px solid rgba(255, 255, 255, 0.25); color: var(--muted); }
.prose code { font-family: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace; font-size: 0.9em; padding: 0.1em 0.35em; border-radius: 6px; background: rgba(255, 255, 255, 0.1); }
.prose pre { padding: 14px 16px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.14); text-align: left; }
.prose th { background: rgba(255, 255, 255, 0.06); }
/* the dark line drawings sit on a lighter tile so they read on the navy ground */
.about-mark svg, .figure-row svg { display: block; width: 140px; height: 140px; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.1); }
.about-mark { margin-bottom: 20px; }
.figure-row { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 1.4em 0; }
.figure-row figure { display: flex; flex-direction: column; gap: 8px; width: 140px; }
.figure-row figcaption { font-size: 13px; line-height: 1.4; color: var(--meta); }

/* ---------- footer ---------- */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px;
  margin-top: var(--gap); padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 15px; color: var(--muted);
}
.site-foot p { max-width: 36em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-logo { height: 30px; width: auto; opacity: 0.9; }

/* ---------- warm accent: spotlight pulse (hub.spotlight_pulse in _config.yml) ---------- */
@keyframes es-halo {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warm) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 18px transparent; }
}
@keyframes es-breathe {
  0%, 100% { border-color: var(--line); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
  50% { border-color: var(--warm); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 26px color-mix(in srgb, var(--warm) 32%, transparent); }
}
@keyframes es-orbit { to { stroke-dashoffset: -32; } }
@keyframes es-ping { 0% { transform: scale(1); opacity: 0.9; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes es-ring {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warm) 35%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--warm); }
}
[data-pulse="halo"] .is-spotlight .icon-tile { border-color: var(--warm); animation: es-halo 2.6s ease-out infinite; }
[data-pulse="border"] .feature.is-spotlight { animation: es-breathe 4s ease-in-out infinite; }
[data-pulse="border"] .feature.is-spotlight:hover { animation: none; border-color: var(--warm); }
[data-pulse="orbit"] .is-spotlight .i-dash { stroke: var(--warm); animation: es-orbit 5s linear infinite; }

/* ---------- warm accent: recently updated tools (hub.fresh_marker) ---------- */
[data-fresh="dot"] .tile.is-fresh .icon-tile::before,
[data-fresh="dot"] .tile.is-fresh .icon-tile::after {
  content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--warm);
}
[data-fresh="dot"] .tile.is-fresh .icon-tile::before { animation: es-ping 2.2s ease-out infinite; }
[data-fresh="ink"] .tile.is-fresh .icon { color: var(--warm); }
[data-fresh="ring"] .tile.is-fresh .icon-tile { animation: es-ring 3.2s ease-in-out infinite; }

@media (max-width: 520px) {
  .nav a { padding: 0 13px; }
  /* featured cards: small icon beside the name, text and buttons below */
  .feature { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; }
  .feature-body { display: contents; }
  .feature h3 { grid-column: 2; }
  .feature-body > p { grid-column: 1 / -1; }
  .icon-tile--lg { padding: 6px; border-radius: 12px; }
  .icon-tile--lg .icon { width: 48px; height: 48px; }
  .video-thumb { width: 104px; height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile:hover, .feature:hover, .video-card:hover, .nav a:hover, .pill:hover { transform: none; }
}
