/* slowatcoding — shared neobrutalist tokens, base, chrome. Same system as abhisawant.me. */
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Martian";
  src: url("fonts/martian.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cobalt: #2a3bff;
  --night: #0d0b1e;
  --mint: #9bf05a;
  --pink: #ff4fa3;
  --yellow: #ffd92e;
  --lavender: #b7a4ff;
  --sky: #5fd0ff;
  --coral: #ff7a45;
  --paper: #f1efff;
  --surface: #fff;
  --ink: #0d0b1e;
  --muted: #4a4670;
  --line: #d6d2f3;
  --tint: #dcd8ff;

  --f-display: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian", ui-monospace, "SF Mono", Menlo, monospace;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);

  --bw: 3px;
  --shadow-sm: 3px 3px 0 0 var(--ink);
  --shadow: 5px 5px 0 0 var(--ink);
  --shadow-lg: 8px 8px 0 0 var(--ink);

  --focus: var(--ink);
  --gutter: clamp(16px, 4vw, 40px);

  accent-color: var(--cobalt);
  caret-color: var(--pink);
  scrollbar-color: var(--cobalt) var(--paper);
  text-underline-offset: 0.2em;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--pink); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.mono { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0; }

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

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--yellow); color: var(--ink); border: var(--bw) solid var(--ink);
  padding: 8px 14px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 10px; z-index: 50;
  margin: 10px var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 10px 8px 12px;
  background: var(--surface); color: var(--ink);
  border: var(--bw) solid var(--ink); box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--yellow); border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--pink);
  font-weight: 800; font-size: 0.95rem; letter-spacing: -0.04em;
  transition: transform 0.3s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.head-nav { display: flex; align-items: center; gap: clamp(10px, 2.2vw, 26px); }
.head-nav a:not(.btn) { font-weight: 700; text-decoration: none; padding: 6px 2px; background: linear-gradient(var(--pink), var(--pink)) 0 100% / 0 3px no-repeat; transition: background-size 0.25s var(--expo); }
.head-nav a:not(.btn):hover { background-size: 100% 3px; }

.icon-link {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: var(--bw) solid var(--ink); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--expo), box-shadow 0.2s var(--expo), background 0.2s;
}
.icon-link:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: var(--mint); }
.icon-link:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.icon-link svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--yellow);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.65em 1.05em; min-height: 44px;
  background: var(--bg); color: var(--ink);
  border: var(--bw) solid var(--ink); box-shadow: var(--shadow);
  font-weight: 800; font-size: 0.98rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--expo), box-shadow 0.2s var(--expo);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn svg { width: 1em; height: 1em; transition: transform 0.25s var(--spring); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--pink { --bg: var(--pink); }
.btn--mint { --bg: var(--mint); }
.btn--paper { --bg: var(--surface); }
.btn--ink { --bg: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm), 5px 5px 0 var(--pink); }
.btn--ink:hover { box-shadow: 7px 7px 0 var(--pink); }
.btn--ink:active { box-shadow: 0 0 0 var(--pink); }
.btn--sm { min-height: 40px; padding: 0.5em 0.85em; font-size: 0.9rem; box-shadow: var(--shadow-sm); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block; padding: 0.2em 0.6em;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  font-family: var(--f-mono); font-size: 0.76rem; font-weight: 600; line-height: 1.4;
}
.tag--fork { background: var(--yellow); }

/* ---------- Footer ---------- */
.site-foot {
  background: var(--night); color: #f3f0ff;
  --focus: var(--yellow);
  padding: clamp(40px, 7vw, 88px) var(--gutter) 28px;
  border-top: var(--bw) solid var(--ink);
}
.site-foot a { color: inherit; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr; align-items: end; max-width: 1280px; margin: 0 auto; }
.foot-big { font-weight: 800; font-size: clamp(2.6rem, 9vw, 6rem); line-height: 0.92; letter-spacing: -0.035em; font-variation-settings: "opsz" 96; }
.foot-big em { font-style: normal; color: var(--yellow); }
.foot-links { display: grid; gap: 12px; justify-items: start; }
.foot-links a.flink { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; border-bottom: 3px solid var(--pink); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.foot-links a.flink:hover { color: var(--yellow); border-color: var(--yellow); }
.foot-links svg { width: 20px; height: 20px; }
.foot-small { max-width: 1280px; margin: clamp(32px, 5vw, 56px) auto 0; padding-top: 18px; border-top: 2px solid #2e2a55; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: #c9c3ee; font-size: 0.82rem; }

@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; }
  .head-nav a.hide-sm { display: none; }
  .brand-word { display: none; }
}
@media (max-width: 420px) {
  .head-nav .icon-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* logo image (same construct as abhisawant.me) */
.brand-logo { width: 38px; height: 38px; overflow: visible; transition: transform 0.3s var(--spring); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }
html { interpolate-size: allow-keywords; }
html:has(dialog[open]) { overflow: hidden; }

/* ---------- Satirical cookie notice (same as abhisawant.me) ---------- */
dialog.cookie {
  --focus: var(--ink);
  position: fixed; inset: 0; margin: auto; padding: 32px 24px 24px;
  width: calc(100% - 32px); max-width: 32rem; height: fit-content; max-height: calc(100dvh - 32px); overflow: visible;
  background: var(--surface); color: var(--ink);
  border: var(--bw) solid var(--ink); box-shadow: 12px 12px 0 var(--ink);
  transform: rotate(-1deg); opacity: 1;
  transition: opacity 0.3s var(--expo), transform 0.4s var(--spring), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}
dialog.cookie::backdrop { background: rgb(0 0 0 / 0.6); transition: opacity 0.25s, overlay 0.25s allow-discrete, display 0.25s allow-discrete; }
@starting-style {
  dialog.cookie[open] { opacity: 0; transform: translateY(24px) scale(0.9) rotate(-1deg); }
  dialog.cookie[open]::backdrop { opacity: 0; }
}
dialog.cookie:not([open]) { opacity: 0; transform: scale(0.9) rotate(-1deg); }
@media (min-width: 640px) { dialog.cookie { padding: 40px 32px 32px; } }
dialog.cookie .tape { position: absolute; top: -14px; width: 96px; height: 28px; border-inline: 2px dashed rgb(0 0 0 / 0.3); pointer-events: none; }
dialog.cookie .tape-l { left: -24px; background: rgb(255 255 255 / 0.75); transform: rotate(-35deg); }
dialog.cookie .tape-r { right: -24px; background: rgb(255 217 46 / 0.8); transform: rotate(33deg); }
dialog.cookie h2 { font-weight: 800; font-size: 1.875rem; line-height: 1; letter-spacing: -0.05em; }
dialog.cookie .cookie-body { margin-top: 12px; display: grid; gap: 16px; font-weight: 500; font-size: 1rem; line-height: 1.6; }
dialog.cookie .sign { font-family: var(--f-mono); font-size: 0.9rem; color: #2e2a55; text-decoration: underline 3px var(--pink); text-underline-offset: 0.3em; }
dialog.cookie .cookie-acts { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
