/* Not A Coder Lab — a small lab that only works at night.
   Palette: indigo night wall, paper labels, desk-lamp amber, glow-in-the-dark mint. */
:root {
  --night: #160f3a;
  --night-deep: #0e0a26;
  --wall-line: #ffffff0d;
  --paper: #fff3d6;
  --paper-ink: #2a1f4d;
  --lamp: #ffb04a;
  --glow: #9be8c4;
  --text: #f3eefc;
  --muted: #b8afd9;
  --tape: #e9dfb8cc;
  --radius: 10px;
  --font-head: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 60% 40% at 85% 0%, #ffb04a1f, transparent 70%),
    linear-gradient(var(--wall-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--wall-line) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--lamp); }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-head { padding: 22px 0 10px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.35rem;
  color: var(--text); text-decoration: none; letter-spacing: .2px;
}
.logo svg { width: 34px; height: 34px; flex: none; }
.logo:hover { color: var(--text); }
.logo:hover .flask-liquid { fill: var(--lamp); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
nav a {
  display: block; padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  color: var(--muted); text-decoration: none;
}
nav a:hover { color: var(--text); background: #ffffff12; }
nav a[aria-current="page"] { color: var(--night-deep); background: var(--glow); }

main { flex: 1; padding: 28px 0 64px; }

/* Type */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 600; margin-top: 1.8em; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 65ch; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 52ch; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; padding: 20px 0 10px; }
.hero h1 { margin-bottom: .35em; }
.hero-flask { justify-self: center; width: min(260px, 100%); }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 10px; }
  .hero-flask { order: -1; width: 150px; justify-self: start; }
}

/* Paper label: the lab's one signature object */
.label {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 4px;
  padding: 22px 22px 18px;
  box-shadow: 0 14px 30px -12px #00000099;
  transform: rotate(var(--tilt, -1deg));
}
.label::before {
  content: ""; position: absolute; top: -11px; left: 50%;
  width: 92px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: var(--tape); border-radius: 2px;
}
.label a { color: #5a2fb3; }
.label a:hover { color: #b0461a; }
.label h3 { color: var(--paper-ink); margin-bottom: .3em; }
.label p { color: #4b4170; margin-bottom: .8em; }
.label dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; font-size: .98rem; }
.label dt { color: #7a6fa0; }
.label dd { margin: 0; color: var(--paper-ink); font-weight: 700; }

.hero .label { max-width: 440px; margin-top: 26px; --tilt: -1.2deg; }

/* Stamps show a project's real status */
.stamp {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: 2px 10px; border: 2.5px solid currentColor; border-radius: 6px;
  transform: rotate(-4deg);
}
.stamp.ready { color: #1d7a52; }
.stamp.brewing { color: #b0461a; }
.stamp.ongoing { color: #5a2fb3; }

/* The bench: labels taped to the wall, each slightly askew */
.bench { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; margin-top: 30px; }
.bench .label:nth-child(1) { --tilt: -1.6deg; }
.bench .label:nth-child(2) { --tilt: 1.1deg; margin-top: 18px; }
.bench .label:nth-child(3) { --tilt: -.6deg; }
@media (max-width: 820px) { .bench { grid-template-columns: 1fr; } .bench .label:nth-child(2) { margin-top: 0; } }
.label .go { font-family: var(--font-head); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem;
  background: var(--lamp); color: var(--night-deep); text-decoration: none;
  border: 3px solid var(--night-deep); box-shadow: 0 5px 0 #00000088;
}
.btn:hover { color: var(--night-deep); background: #ffc673; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #00000088; }
.btn.ghost { background: transparent; color: var(--text); border-color: #ffffff55; box-shadow: none; }

/* Sticky note for the ironic asides */
.note {
  background: #ffe36b; color: #3b2e05; border-radius: 3px;
  padding: 14px 16px; max-width: 340px; font-size: .98rem;
  transform: rotate(1.5deg); box-shadow: 0 10px 20px -10px #000000aa;
}
.note p { margin: 0; color: inherit; }

/* Game page */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.game-frame {
  width: 100%; max-width: 380px; aspect-ratio: 380 / 676;
  border: 0; border-radius: 16px; background: #120c33; display: block;
  box-shadow: 0 0 0 3px #ffffff22, 0 20px 50px -16px #000;
}
.skins { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 6px; }
.skins li { display: flex; gap: 10px; align-items: baseline; }
.skins b { font-family: var(--font-head); font-weight: 600; min-width: 5.5em; }
.skins span { color: var(--muted); }
.only-mobile { display: none; }
@media (max-width: 820px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-frame { display: none; }
  .only-mobile { display: inline-block; }
}

/* Journal + prose pages */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; }
.entries { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; max-width: 640px; }
.entries .label { --tilt: -.5deg; }
.entries time, .meta { color: var(--muted); font-size: .95rem; }
.label time { color: #7a6fa0; }
.back { display: inline-block; margin-bottom: 18px; font-family: var(--font-head); }

/* Footer */
.site-foot { border-top: 1px solid #ffffff1a; padding: 22px 0 30px; color: var(--muted); font-size: .95rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }
.site-foot ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }

/* Flask bubbles: the one ambient motion */
.bubble { animation: rise 3.6s ease-in infinite; transform-box: fill-box; }
.bubble:nth-of-type(2) { animation-delay: 1.2s; animation-duration: 4.2s; }
.bubble:nth-of-type(3) { animation-delay: 2.3s; animation-duration: 3.1s; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }
@media (max-width: 480px) {
  nav ul { gap: 2px; }
  nav a { padding: 5px 9px; font-size: .95rem; }
}
