/* =====================================================================
   robertschilp.com — shared styles
   Dark, data-native, one lime accent.
   ===================================================================== */
:root {
  --bg: #08090b;
  --bg2: #0d0f12;
  --bg3: #14171b;
  --fg: #ecefe6;
  --fg2: #c9cdc3;
  --dim: #8a8f86;
  --line: #1d2024;
  --line2: #ffffff1c;
  --lime: #c6ff3d;
  --cyan: #5ee0ff;
  --pink: #ff6ad5;
  --hot: #ff5a3c;
  --pad: clamp(20px, 3vw, 40px);
  --max: 1320px;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--lime); color: #000; }
.mono { font-family: var(--mono); }
.lime { color: var(--lime); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: space-between; align-items: center;
       padding: 16px var(--pad); transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: #08090bcc; backdrop-filter: blur(14px); border-color: var(--line); }
.nav .logo { font-weight: 700; letter-spacing: -.02em; text-decoration: none; font-size: 18px; }
.nav ul { display: flex; gap: 26px; list-style: none; font-family: var(--mono); font-size: 13px; align-items: center; }
.nav ul a { text-decoration: none; opacity: .75; transition: opacity .15s, color .15s; }
.nav ul a:hover, .nav ul a.on { opacity: 1; color: var(--lime); }
.kbtn { font-family: var(--mono); font-size: 12px; color: var(--fg); background: none; border: 1px solid var(--line2); border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.kbtn:hover { border-color: var(--lime); }

/* ---------- section scaffolding ---------- */
section { position: relative; }
.sec { padding: clamp(80px, 11vw, 150px) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(42px, 7vw, 96px); letter-spacing: -.045em; line-height: .9; font-weight: 700; }
.sec-head .idx { font-family: var(--mono); color: var(--dim); font-size: 13px; white-space: nowrap; }
.lede { font-size: clamp(17px, 1.6vw, 21px); color: var(--fg2); line-height: 1.5; max-width: 640px; }
.eyebrow { font-family: var(--mono); color: var(--lime); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* reveal-on-scroll */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .08s; } .rv.d2 { transition-delay: .16s; } .rv.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bg3); color: var(--fg); border: 1px solid var(--line2); border-radius: 10px;
       padding: 10px 16px; font: 500 14px var(--sans); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.btn:hover { border-color: var(--lime); transform: translateY(-1px); }
.btn.primary { background: var(--lime); color: #0a0b0c; border-color: var(--lime); }
.btn.primary:hover { background: #d4ff6a; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 11px; color: var(--fg2); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 10px; }

/* ---------- cards ---------- */
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--bg2); position: relative; overflow: hidden; }
.badge { font-family: var(--mono); font-size: 11px; color: var(--lime); border: 1px solid #c6ff3d55; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.foot .big { font-size: clamp(40px, 8vw, 120px); letter-spacing: -.05em; line-height: .9; font-weight: 700; }
.foot .big a { text-decoration: none; background: linear-gradient(var(--lime), var(--lime)) 0 100% / 0 4px no-repeat; transition: background-size .4s; }
.foot .big a:hover { background-size: 100% 4px; }
.foot .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 48px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.foot .row nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot .row a { text-decoration: none; } .foot .row a:hover { color: var(--lime); }

/* ---------- command palette ---------- */
.pal-bg { position: fixed; inset: 0; z-index: 100; background: #000a; backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.pal-bg.open { display: flex; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.pal { width: min(620px, 92vw); background: #0f1114; border: 1px solid var(--line2); border-radius: 16px; overflow: hidden; box-shadow: 0 40px 100px -20px #000; animation: pop .2s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.pal input { width: 100%; background: none; border: 0; outline: 0; color: var(--fg); font: 16px var(--mono); padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pal ul { list-style: none; max-height: 50vh; overflow: auto; padding: 6px; }
.pal li { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 9px; cursor: pointer; font-size: 15px; }
.pal li small { font-family: var(--mono); color: var(--dim); font-size: 11px; }
.pal li.sel { background: #ffffff10; } .pal li.sel small { color: var(--lime); }
.pal .term { font: 13px/1.7 var(--mono); padding: 16px 20px; max-height: 50vh; overflow: auto; }
.pal .term .p { color: var(--lime); }
.pal .hint { font: 11px var(--mono); color: var(--dim); padding: 10px 20px; border-top: 1px solid var(--line); display: flex; gap: 16px; }

.fish { position: fixed; width: 72px; image-rendering: pixelated; z-index: 200; pointer-events: none; }

@media (max-width: 820px) {
  .nav ul li.hide-m { display: none; }
  .nav ul { gap: 14px; }
}
