:root {
  --bg: #12002b;
  --paper: #fffef7;
  --ink: #151018;
  --muted: #3f3a4a;
  --line: #151018;
  --pink: #ff3ea5;
  --acid: #dfff2f;
  --blue: #25c2ff;
  --violet: #8b5cf6;
  --green: #14f195;
  --orange: #ff9f1c;
  --shadow: 10px 10px 0 var(--ink);
  --radius: 24px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 62, 165, .55) 0 13%, transparent 14%),
    radial-gradient(circle at 86% 8%, rgba(37, 194, 255, .55) 0 11%, transparent 12%),
    radial-gradient(circle at 80% 88%, rgba(20, 241, 149, .45) 0 15%, transparent 16%),
    linear-gradient(135deg, #fff275 0%, #ffb3c7 34%, #a5f3fc 70%, #bbf7d0 100%);
}

body::before {
  content: "∀  ∃  ≠  ∫  ∇  ⟹  π  z²  curl  proof?  lim  ∴  ∑  graph gremlin  f(z)";
  position: fixed;
  inset: 0;
  z-index: -1;
  padding: 42px;
  color: rgba(21, 16, 24, .12);
  font-size: clamp(2.2rem, 8vw, 8rem);
  font-weight: 950;
  line-height: 1.25;
  letter-spacing: -.08em;
  word-spacing: .35em;
  transform: rotate(-8deg) scale(1.08);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(21, 16, 24, .08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(21, 16, 24, .08) 2px, transparent 2px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, transparent 0 28%, #000 70%);
  pointer-events: none;
}

a { color: inherit; }

.lab {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 84px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 26px 0 18px;
}

.brand {
  position: relative;
  color: var(--ink);
  font-size: clamp(2.4rem, 7vw, 5.3rem);
  font-weight: 1000;
  letter-spacing: -0.12em;
  text-decoration: none;
  text-shadow: 4px 4px 0 #fff, 8px 8px 0 var(--pink);
}

.brand::after {
  content: "learn by poking";
  position: absolute;
  left: 8px;
  bottom: -10px;
  padding: 3px 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--acid);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tape, .stamp, .warning, .status {
  display: inline-flex;
  align-items: center;
  border: 3px solid var(--line);
  color: var(--ink);
  background: var(--acid);
  padding: 9px 13px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 5px 5px 0 var(--ink);
}

.tape { transform: rotate(2deg); background: #fff; }
.stamp { margin: 0 0 18px; background: var(--pink); color: #fff; }

.note, .door, .path-board {
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 7vw, 76px);
  margin: 26px 0 34px;
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 62, 165, .25) 0 15%, transparent 16%),
    radial-gradient(circle at 92% 78%, rgba(37, 194, 255, .25) 0 12%, transparent 13%),
    var(--paper);
}

.hero::after {
  content: "y = x?  prove it.  ∴";
  position: absolute;
  right: -28px;
  bottom: 24px;
  max-width: 420px;
  color: rgba(21, 16, 24, .10);
  font-size: clamp(3rem, 9vw, 8.5rem);
  font-weight: 1000;
  line-height: .78;
  letter-spacing: -.12em;
  transform: rotate(-10deg);
  pointer-events: none;
}

h1, h2, p { margin-top: 0; }

h1 {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-bottom: 22px;
  font-size: clamp(3.4rem, 9vw, 8.2rem);
  line-height: 0.82;
  letter-spacing: -0.095em;
}

.intro {
  position: relative;
  z-index: 1;
  max-width: 790px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.65;
  font-weight: 650;
}

.scribble {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 14px 0 0;
  border: 3px dashed var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  font-weight: 950;
  transform: rotate(-1deg);
}

.door-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.door {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 28px;
  min-height: 540px;
}

.door::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.logic-door {
  background:
    linear-gradient(90deg, rgba(21,16,24,.12) 2px, transparent 2px) 0 0 / 28px 28px,
    linear-gradient(160deg, #fff7ed, #f3e8ff 54%, #c4b5fd);
  transform: rotate(-1.2deg);
}

.door-art {
  position: absolute;
  right: 20px;
  bottom: 22px;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(8px 8px 0 rgba(21,16,24,.20));
}

.door-art::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 5px solid var(--line);
  box-shadow: inset 0 0 0 9px rgba(255,255,255,.15);
}

.door-art::after {
  content: "";
  position: absolute;
  left: 12px;
  right: -14px;
  bottom: -14px;
  height: 16px;
  border-radius: 999px;
  background: rgba(21,16,24,.25);
}

.door-knob {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  right: 27px;
  top: 52%;
  border: 5px solid var(--line);
  border-radius: 50%;
  background: #facc15;
  transform: translateY(-50%);
}

.logic-art {
  width: 170px;
  height: 285px;
  right: 22px;
  bottom: 22px;
  transform: rotate(4deg);
}

.logic-art::before {
  border-radius: 78px 78px 10px 10px;
  background:
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(21,16,24,.18) 36px 39px),
    linear-gradient(#5b21b6, #2e1065);
}

.vector-art {
  width: 190px;
  height: 295px;
  right: 18px;
  bottom: 18px;
  transform: rotate(-3deg);
}

.vector-art::before {
  /* Upright storm door: rounded top, flatter floor. */
  border-radius: 86px 86px 14px 14px;
  background:
    repeating-linear-gradient(-16deg, rgba(255,255,255,.25) 0 7px, transparent 8px 19px),
    linear-gradient(#0891b2, #064e3b);
}

.vector-art .door-knob {
  right: 30px;
  top: 52%;
  background: #fde047;
}

.logic-door::after {
  content: "¬P ∨ Q";
  right: 16px;
  top: 82px;
  color: rgba(76, 29, 149, .22);
  font-size: 5rem;
  font-weight: 1000;
  transform: rotate(13deg);
}

.vector-door {
  background:
    radial-gradient(circle at 76% 28%, rgba(255,255,255,.75) 0 2px, transparent 3px) 0 0 / 20px 20px,
    conic-gradient(from 220deg at 80% 35%, rgba(37,194,255,.55), rgba(20,241,149,.35), transparent 45%, rgba(255,255,255,.75)),
    linear-gradient(160deg, #ecfeff, #dcfce7 58%, #a7f3d0);
  transform: rotate(.9deg);
}

.vector-door::after {
  content: "∇ × F";
  right: 26px;
  top: 78px;
  color: rgba(8, 145, 178, .22);
  font-size: 5.4rem;
  font-weight: 1000;
  transform: rotate(-14deg);
}

.warning {
  margin-bottom: 24px;
  background: #fff;
  position: relative;
  z-index: 1;
}

.door h2, .path-board h2 {
  position: relative;
  z-index: 1;
  max-width: 78%;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 0.86;
  letter-spacing: -0.075em;
}

.door p, .subject-card p {
  position: relative;
  z-index: 1;
  max-width: 84%;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.62;
  font-weight: 650;
}

.door ul {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
  max-width: 82%;
}

.door li {
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: #fff;
  font-weight: 950;
  box-shadow: 3px 3px 0 rgba(21,16,24,.20);
}

.actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 12px 17px;
  color: var(--ink);
  font-weight: 1000;
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.button:hover {
  transform: translate(4px, 4px) rotate(-1deg);
  box-shadow: 2px 2px 0 var(--ink);
  filter: saturate(1.2);
}

.button.primary { background: var(--acid); }
.button.secondary { background: #ffffff; }

.brain {
  padding: 28px;
  margin-top: 34px;
  background:
    linear-gradient(90deg, rgba(21,16,24,.07) 2px, transparent 2px) 0 0 / 32px 32px,
    #fffef7;
}

.brain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.brain-grid a {
  display: grid;
  gap: 8px;
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  background: #fff;
  box-shadow: 5px 5px 0 rgba(21,16,24,.16);
}

.brain-grid a:nth-child(1) { background: #cffafe; }
.brain-grid a:nth-child(2) { background: #ede9fe; }
.brain-grid a:nth-child(3) { background: #fef3c7; }
.brain-grid a:hover { background: var(--acid); transform: rotate(-1deg); }
.brain-grid strong { font-size: 1.05rem; }
.brain-grid span { color: var(--muted); line-height: 1.45; font-weight: 650; }

.closing {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 22px;
  border: 4px solid var(--line);
  border-radius: 24px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.18;
  text-align: center;
  font-weight: 1000;
}

.subject-lab { max-width: 1040px; }
.subject-card { padding: clamp(24px, 6vw, 56px); }
.subject-card h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
.status { margin-top: 8px; background: var(--green); }
.path-board { margin-top: 26px; padding: 24px; }
.sticky-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sticky-list a { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; border: 3px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; text-decoration: none; }
.sticky-list a:nth-child(3n + 1) { background: #fef3c7; }
.sticky-list a:nth-child(3n + 2) { background: #dbeafe; }
.sticky-list a:nth-child(3n) { background: #fce7f3; }
.sticky-list a:hover { background: var(--acid); }
.sticky-list span { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--line); border-radius: 50%; background: var(--ink); color: #fff; font-weight: 950; }
.sticky-list em { grid-column: 2; color: var(--muted); font-style: normal; font-weight: 800; }

@media (max-width: 900px) {
  .door h2, .door p, .door ul { max-width: none; }
  .door-art { opacity: .22; }
}

@media (max-width: 780px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .door-board, .brain-grid, .sticky-list { grid-template-columns: 1fr; }
  .logic-door, .vector-door { transform: none; }
  .door { min-height: auto; }
}
