:root {
  --stone: #0f1419;
  --paper: #151b22;
  --ink: #e0e6ed;
  --muted: #8899a6;
  --line: #2a3540;
  --cobalt: #7d96ff;
  --cobalt-soft: #1f2a4d;
  --amber: #f0bc4a;
  --amber-soft: #3a2f14;
  --green: #5fd08e;
  --red: #ff8a73;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font: 16px/1.55 var(--body); font-feature-settings: "tnum" 0;
}
a { color: var(--cobalt); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { font: 700 18px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--muted); font-weight: 500; }
.site-head nav { display: flex; gap: 20px; margin-left: auto; }
.site-head nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-head nav a[aria-current="page"], .site-head nav a:hover { color: var(--ink); }

/* Buy me a coffee: always directly below the header */
.coffee {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin-top: 16px; padding: 12px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.coffee p { margin: 0; font-weight: 600; }
.coffee-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px;
  background: #ffdd00; color: #0f1419; font-weight: 700; font-size: 15px; text-decoration: none;
}
.coffee-btn:hover { filter: brightness(1.08); }
.coffee-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* The cup itself steams gently, like it's fresh and hot: two small wisps rising and fading
   off the icon, staggered so they don't move in lockstep. Ties the nudge to what's actually
   being asked for (a coffee) instead of a generic "look at me" glow. */
.coffee-steam { position: relative; display: inline-flex; }
.coffee-steam::before, .coffee-steam::after {
  content: ''; position: absolute; top: -3px; width: 2px; height: 6px;
  background: currentColor; border-radius: 1px; opacity: 0;
  animation: coffee-steam 2.6s ease-in infinite;
}
.coffee-steam::before { left: 4px; animation-delay: 0s; }
.coffee-steam::after { left: 10px; animation-delay: 1.1s; }
@keyframes coffee-steam {
  0% { opacity: 0; transform: translateY(0) scaleY(0.6); }
  25% { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(-9px) scaleY(1.4); }
}
.coffee-btn:hover .coffee-steam::before, .coffee-btn:hover .coffee-steam::after { animation-play-state: paused; }

/* One tiny nudge every few seconds, like the cup's just been set down. Mostly still. */
@keyframes coffee-nudge {
  0%, 90%, 100% { transform: translateY(0); }
  95% { transform: translateY(-2px); }
}
.coffee-btn { animation: coffee-nudge 6s ease-in-out infinite; }
.coffee-btn:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .coffee-steam::before, .coffee-steam::after { animation: none; }
  .coffee-btn { animation: none; }
}

/* hero sentence */
.finder { padding: clamp(20px, 4vw, 40px) 0 16px; }
.sentence {
  font: 600 clamp(22px, 3vw, 34px)/1.25 var(--display); letter-spacing: -0.02em;
  margin: 0; max-width: 34ch;
}
.pick { position: relative; display: inline-block; }
.pick select {
  appearance: none; -webkit-appearance: none; font: inherit; letter-spacing: inherit; color: var(--cobalt);
  background: transparent; border: 0; border-bottom: 3px solid currentColor; padding: 0 1.05em 0 0;
  cursor: pointer; max-width: 100%; border-radius: 0;
}
.pick::after {
  content: ""; position: absolute; right: 0.15em; top: 50%; width: 0.32em; height: 0.32em;
  border-right: 0.08em solid var(--cobalt); border-bottom: 0.08em solid var(--cobalt);
  transform: translateY(-75%) rotate(45deg); pointer-events: none;
}
.pick select:hover { color: var(--ink); }
/* the open list should not inherit the big sentence font */
.pick select { color-scheme: dark; }
.pick select option { font: 400 15px/1.4 var(--body); letter-spacing: normal; color: var(--ink); background: var(--paper); }
.count-line { margin: 20px 0 0; font-size: 18px; color: var(--muted); }
.count-line strong { font: 700 22px var(--display); color: var(--ink); }

/* secondary filters */
.last-update { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.last-update:empty { display: none; }
.last-update .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(95, 208, 142, 0.18); }
.refine { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.refine input[type="search"], .refine select {
  font: 15px var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; min-height: 42px;
}
.refine input[type="search"]::placeholder { color: var(--muted); }
.refine input[type="search"] { flex: 1 1 240px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; padding: 0 6px; cursor: pointer; min-height: 42px; }
.toggle input { width: 17px; height: 17px; accent-color: var(--cobalt); }
.clear { background: none; border: 0; color: var(--cobalt); font: 500 15px var(--body); cursor: pointer; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }

/* job list */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.job-title { font: 600 18px/1.3 var(--display); margin: 0; letter-spacing: -0.005em; }
.job-title a { color: var(--ink); text-decoration: none; }
.job-title a:hover { color: var(--cobalt); text-decoration: underline; }
.job-meta { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.job-meta .studio { color: var(--ink); font-weight: 600; }
.job-meta .studio a { color: inherit; text-decoration: none; }
.job-meta .studio a:hover { text-decoration: underline; }
.job-meta .source-tag { font-size: 12px; color: var(--muted); opacity: 0.7; }
.job-side { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 4px; background: var(--cobalt-soft); color: var(--cobalt); }
.tag.new { background: var(--amber-soft); color: var(--amber); }
.salary { color: var(--ink); font-weight: 600; }
.more { display: block; margin: 28px auto 60px; font: 600 16px var(--body); color: var(--stone); background: var(--ink); border: 0; border-radius: 8px; padding: 12px 24px; cursor: pointer; }
.more:hover { background: var(--cobalt); }
.empty { padding: 48px 0; max-width: 52ch; }
.empty h2 { font: 600 24px var(--display); margin: 0 0 8px; }

/* studios + stats pages */
.page-head { padding: clamp(32px, 6vw, 56px) 0 16px; }
.page-head h1 { font: 600 clamp(30px, 4.6vw, 48px)/1.1 var(--display); letter-spacing: -0.025em; margin: 0 0 10px; }
.page-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.table { width: 100%; border-collapse: collapse; margin: 16px 0 60px; font-size: 15px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--ink); cursor: pointer; user-select: none; white-space: nowrap; }
.table th[aria-sort] { color: var(--ink); }
.table td { padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a:hover { color: var(--cobalt); text-decoration: underline; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }

.stat-row { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 8px 0 32px; }
.stat-row div { font-size: 15px; color: var(--muted); }
.stat-row b { display: block; font: 700 32px/1.1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px 56px; margin-bottom: 64px; }
.section-title { font: 600 22px var(--display); margin: 0 0 14px; letter-spacing: -0.01em; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 54px; gap: 10px; align-items: center; padding: 5px 0; font-size: 15px; }
.bars a { color: var(--ink); text-decoration: none; }
.bars a:hover { color: var(--cobalt); text-decoration: underline; }
.bar { height: 10px; background: var(--cobalt); border-radius: 2px; min-width: 2px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.trend svg { width: 100%; height: auto; display: block; }
.trend .note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.site-foot { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot p { margin: 0 0 6px; max-width: 70ch; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--cobalt); }

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

/* ASGC / resource cards */
.res-card {
  padding: 24px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.res-featured { border-left: 3px solid var(--amber); }
.res-tag { font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); margin-bottom: 10px; }
.res-title { font: 700 24px/1.1 var(--display); color: var(--ink); margin-bottom: 4px; letter-spacing: -0.01em; }
.res-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.res-body { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.res-stats { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.res-stats div { display: flex; flex-direction: column; }
.res-stats strong { font: 700 20px var(--display); color: var(--ink); }
.res-stats span { font-size: 13px; color: var(--muted); }
.res-quote { font: 500 15px/1.45 var(--display); color: var(--muted); font-style: italic; margin-bottom: 16px; }
.res-link { font: 600 15px var(--body); color: var(--amber); text-decoration: none; }
.res-link:hover { text-decoration: underline; }

/* ASGC community ad (kept for reuse) */
.asgc-ad {
  display: flex; gap: 24px; align-items: center; justify-content: space-between;
  margin: 32px 0; padding: 24px 28px; background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: 10px;
}
.asgc-tag { font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); margin-bottom: 6px; }
.asgc-title { font: 700 24px/1 var(--display); color: var(--ink); margin-bottom: 8px; letter-spacing: -0.01em; }
.asgc-body { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 520px; }
.asgc-link { font: 600 15px var(--body); color: var(--amber); text-decoration: none; }
.asgc-link:hover { text-decoration: underline; }
.asgc-quote { font: 500 15px/1.45 var(--display); color: var(--muted); font-style: italic; max-width: 200px; text-align: right; flex-shrink: 0; }
@media (max-width: 720px) {
  .asgc-ad { flex-direction: column; align-items: flex-start; }
  .asgc-quote { text-align: left; max-width: none; }
}

@media (max-width: 640px) {
  .job { grid-template-columns: 1fr; }
  .job-side { grid-row: auto; grid-column: 1; flex-wrap: wrap; gap: 6px 12px; white-space: normal; }
  .site-head nav { margin-left: 0; width: 100%; padding-bottom: 12px; }
  .site-head .wrap { gap: 8px; padding-top: 14px; }
  .table .hide-sm { display: none; }
  .sentence { max-width: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .job-list-enter { animation: rise .35s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
}

/* sidebar layout */
.with-sidebar { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; }
.ad-pod { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; transition: border-color 0.15s; }
.ad-pod:hover { border-color: var(--amber); }
.ad-pod img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ad-pod-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ad-pod-label { font: 700 10px/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ad-pod-title { font: 600 14px/1.3 var(--body); color: var(--ink); }
.ad-pod-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.ad-pod-cta { font: 600 13px var(--body); color: var(--amber); margin-top: 4px; }
@media (max-width: 820px) {
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .ad-pod { flex: 1 1 240px; }
}
