/* Fonts and colors from the drupal.org "bluecheese" theme (new.drupal.org/ai) */
@font-face { font-family: ZTGatha; font-weight: 700; font-display: block; src: url(fonts/ZTGatha-Bold.woff2) format('woff2'); }
@font-face { font-family: ZTGatha; font-weight: 600; font-display: block; src: url(fonts/ZTGatha-SemiBold.woff2) format('woff2'); }
@font-face { font-family: NotoSans; font-weight: 300; font-display: block; src: url(fonts/NotoSans-Light.woff2) format('woff2'); }
@font-face { font-family: NotoSans; font-weight: 400; font-display: block; src: url(fonts/NotoSans-Regular.woff2) format('woff2'); }
@font-face { font-family: NotoSans; font-weight: 400; font-style: italic; font-display: block; src: url(fonts/NotoSans-Italic.woff2) format('woff2'); }
@font-face { font-family: NotoSans; font-weight: 500; font-display: block; src: url(fonts/NotoSans-Medium.woff2) format('woff2'); }
@font-face { font-family: NotoSans; font-weight: 600 800; font-display: block; src: url(fonts/NotoSans-Bold.woff2) format('woff2'); }
@font-face { font-family: SourceCodePro; font-weight: 400 700; font-display: block; src: url(fonts/source-code-pro-v30-latin-regular.woff2) format('woff2'); }

:root {
  /* drupal.org brand tokens */
  --drupal-blue: #009cde;
  --drupal-dark-blue: #006aa9;
  --drupal-navy: #12285f;
  --drupal-dark-navy: #091942;
  --drupal-light-blue: #ccedf9;
  --drupal-purple: #ccbaf4;
  --drupal-yellow: #ffc423;
  --drupal-red: #f46351;
  --drupal-green: #7cbc48;

  --bg: #060f2b;
  --panel: rgba(18, 40, 95, 0.62);
  --panel-solid: var(--drupal-navy);
  --line: rgba(204, 237, 249, 0.16);
  --text: #ffffff;
  --muted: #a2acbe;
  --dim: #6d7583;
  --blue: var(--drupal-blue);
  --blue-2: var(--drupal-dark-blue);
  --cyan: var(--drupal-light-blue);
  --red: var(--drupal-red);
  --amber: var(--drupal-yellow);
  --green: var(--drupal-green);
  --violet: var(--drupal-purple);
  --mono: SourceCodePro, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: NotoSans, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --head: ZTGatha, NotoSans, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

#bg { position: fixed; inset: 0; z-index: 0; display: block; }
#vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(6,15,43,0) 35%, rgba(6,15,43,0.8) 100%);
}

/* ---------- stage: fixed 1600x900 canvas, scaled to the viewport ---------- */
#stage {
  position: fixed; left: 50%; top: 50%;
  width: 1600px; height: 900px;
  transform-origin: 0 0;
  z-index: 2;
}

.slide {
  position: absolute; inset: 0;
  padding: 80px 110px 70px;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(24px) scale(0.985);
  transition: opacity .55s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.slide.active { opacity: 1; pointer-events: auto; transform: none; }
.slide.past { transform: translateY(-24px) scale(0.985); }

.slide.center { justify-content: center; align-items: center; text-align: center; }

/* ---------- typography ---------- */
.kicker {
  font-family: var(--mono); font-size: 20px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.kicker.red { color: var(--red); }
.kicker.green { color: var(--green); }
.kicker.amber { color: var(--amber); }
.kicker.violet { color: var(--violet); }

h1 { font-family: var(--head); font-size: 92px; line-height: 1.04; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-family: var(--head); font-size: 60px; line-height: 1.08; margin: 0 0 26px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-family: var(--head); font-size: 30px; margin: 0 0 14px; font-weight: 600; }
p, li { font-size: 27px; line-height: 1.45; color: #dfe6f3; }
p { margin: 0 0 16px; }
.lead { font-size: 32px; color: var(--muted); max-width: 1200px; }
.small { font-size: 20px; color: var(--muted); }
.tiny { font-size: 16px; color: var(--dim); }
.mono { font-family: var(--mono); }
.hl { color: var(--cyan); }
.red-t { color: var(--red); }
.green-t { color: var(--green); }
.amber-t { color: var(--amber); }
.blue-t { color: var(--blue); }
.violet-t { color: var(--violet); }
.strike { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
code { font-family: var(--mono); font-size: .85em; background: rgba(0,156,222,.12); color: var(--cyan); padding: 2px 8px; border-radius: 6px; }

.grad {
  background: linear-gradient(90deg, var(--drupal-blue), #22a5e5 40%, var(--drupal-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-red {
  background: linear-gradient(270deg, var(--drupal-red) -0.5%, var(--drupal-yellow) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { position: relative; padding-left: 38px; margin-bottom: 14px; }
ul.clean li::before { content: '›'; position: absolute; left: 6px; top: -2px; color: var(--blue); font-weight: 800; font-size: 1.15em; }
ul.clean.x li::before { content: '✕'; color: var(--red); font-size: .85em; top: 4px; }
ul.clean.ok li::before { content: '✓'; color: var(--green); font-size: .9em; top: 2px; }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: 48px; align-items: stretch; }
.row.top { align-items: flex-start; }
.row.mid { align-items: center; }
.col { flex: 1; min-width: 0; }
.col-2 { flex: 2; min-width: 0; }
.grow { flex: 1; min-height: 0; }
.spacer { flex: 1; }
.mt { margin-top: 28px; }
.mt-s { margin-top: 14px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 30px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.panel.red { border-color: rgba(244,99,81,.45); }
.panel.green { border-color: rgba(124,188,72,.45); }
.panel.blue { border-color: rgba(0,156,222,.5); }
.panel.amber { border-color: rgba(255,196,35,.45); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted);
  white-space: nowrap;
}
.pill.green { color: var(--green); border-color: rgba(124,188,72,.4); background: rgba(124,188,72,.08); }
.pill.amber { color: var(--amber); border-color: rgba(255,196,35,.4); background: rgba(255,196,35,.08); }
.pill.red { color: var(--red); border-color: rgba(244,99,81,.4); background: rgba(244,99,81,.08); }
.pill.blue { color: var(--blue); border-color: rgba(0,156,222,.4); background: rgba(0,156,222,.08); }

/* ---------- fragments ---------- */
.f { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1); }
.f.on { opacity: 1; transform: none; }
.f.fade-out.on { opacity: .25; }

/* ---------- terminal ---------- */
.term {
  background: rgba(6, 13, 36, 0.94);
  border: 1px solid rgba(204,237,249,.22);
  border-radius: 14px;
  font-family: var(--mono); font-size: 19px; line-height: 1.55;
  color: #cfd8ee;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.term .bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: rgba(255,255,255,.03); border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 15px; color: var(--dim);
}
.term .bar i { width: 12px; height: 12px; border-radius: 50%; background: #3a4560; display: inline-block; }
.term .bar i:nth-child(1) { background: #ff5f57; } .term .bar i:nth-child(2) { background: #febc2e; } .term .bar i:nth-child(3) { background: #28c840; }
.term .bar span { margin-left: 10px; }
.term .body { padding: 18px 22px; flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.term .ln { white-space: pre-wrap; word-break: break-word; animation: lnIn .25s ease; }
@keyframes lnIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.term .user { color: #fff; }
.term .user::before { content: '> '; color: var(--blue); font-weight: 700; }
.term .claude { color: #f3ecd9; }
.term .claude::before { content: '● '; color: var(--drupal-yellow); }
.term .tool { color: var(--cyan); }
.term .tool::before { content: '● '; color: var(--green); }
.term .out { color: var(--dim); padding-left: 28px; }
.term .out::before { content: '└ '; }
.term .err { color: var(--red); padding-left: 28px; }
.term .err::before { content: '└ '; }
.term .ok { color: var(--green); padding-left: 28px; }
.term .code { color: #b8c4e0; padding-left: 28px; font-size: .92em; }
.term .warn { color: var(--red); padding-left: 28px; font-weight: 600; }
.term .cmd { color: #fff; }
.term .cmd::before { content: '$ '; color: var(--green); }
.term .caret { display: inline-block; width: 10px; height: 1.1em; background: var(--blue); vertical-align: -3px; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.meter {
  display: flex; gap: 28px; font-family: var(--mono);
  padding: 12px 22px; border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(244,99,81,.05); font-size: 18px; color: var(--muted);
}
.meter b { color: var(--red); font-weight: 600; min-width: 90px; display: inline-block; }

/* ---------- code / file panes ---------- */
pre.code {
  margin: 0; font-family: var(--mono); font-size: 17px; line-height: 1.55;
  background: rgba(6,13,36,.94); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px; color: #c7d2ec; white-space: pre-wrap; overflow: hidden;
}
pre.code .k { color: var(--violet); }
pre.code .s { color: #9be29b; }
pre.code .c { color: var(--dim); }
pre.code .n { color: var(--amber); }
pre.code .key { color: #3fb8f0; }
pre.code .mark { background: rgba(0,156,222,.18); border-radius: 4px; box-shadow: 0 0 0 2px rgba(0,156,222,.18); }

/* ---------- module cards (problem 3) ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative;
}
.card h4 { margin: 0; font-size: 25px; font-family: var(--head); font-weight: 600; }
.card .mn { font-family: var(--mono); font-size: 16px; color: var(--dim); }
.card .desc { font-size: 18px; color: var(--muted); line-height: 1.4; flex: 1; }
.card .badges { display: flex; flex-wrap: wrap; gap: 8px; }
.card .q {
  position: absolute; top: -18px; right: -12px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber); color: #1a1200; font-weight: 800; font-size: 26px;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(255,196,35,.4);
}
.card.trap { border-color: rgba(244,99,81,.55); }
.card.trap .q { background: var(--red); color: #fff; }

/* ---------- stat counters ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.stat .num { font-family: var(--head); font-size: 64px; font-weight: 700; line-height: 1; }
.stat .lbl { font-size: 19px; color: var(--muted); margin-top: 10px; line-height: 1.35; }

/* ---------- bar charts ---------- */
.chart { display: flex; flex-direction: column; gap: 14px; }
.chart h4 { margin: 0 0 4px; font-size: 22px; color: #fff; font-weight: 700; }
.chart .sub { font-size: 16px; color: var(--dim); margin: -4px 0 6px; }
.bar-row { display: grid; grid-template-columns: 116px 1fr 100px; align-items: center; gap: 14px; font-size: 18px; }
.bar-row .name { color: var(--muted); font-family: var(--mono); font-size: 16px; }
.bar-row .track { height: 30px; background: rgba(255,255,255,.04); border-radius: 8px; overflow: hidden; }
.bar-row .fill {
  height: 100%; width: 0; border-radius: 8px;
  transition: width 1.3s cubic-bezier(.2,.8,.2,1);
}
.bar-row .val { font-family: var(--mono); font-size: 18px; text-align: right; color: #fff; }
.fill.vanilla { background: linear-gradient(90deg, #4f5661, #a2acbe); }
.fill.skill { background: linear-gradient(90deg, #006aa9, #009cde); }
.fill.memory { background: linear-gradient(90deg, #397618, #7cbc48); }
.legend { display: flex; gap: 24px; font-size: 18px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; vertical-align: -1px; }
.legend .lv::before { background: #a2acbe; } .legend .ls::before { background: #009cde; } .legend .lm::before { background: #7cbc48; }

/* ---------- comparison (npm vs drupal) ---------- */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.vs .term { height: 420px; }

/* ---------- browser mock ---------- */
.browser { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0b1a45; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.browser .chrome { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #12285f; }
.browser .chrome i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: #3a4560; }
.browser .url { flex: 1; margin-left: 10px; background: #091942; border-radius: 8px; padding: 7px 14px; font-family: var(--mono); font-size: 16px; color: var(--muted); }
.browser .page { padding: 34px 40px; }
.searchbox {
  display: flex; align-items: center; gap: 14px;
  background: #091942; border: 2px solid rgba(0,156,222,.55); border-radius: 12px; padding: 16px 20px;
  font-size: 24px; color: #fff; font-family: var(--mono);
}
.searchbox .ic { color: var(--blue); }
.results { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.result {
  display: flex; align-items: center; gap: 14px; font-size: 20px; padding: 10px 16px; border-radius: 10px;
  background: rgba(255,255,255,.03); opacity: 0; transform: translateX(-10px); transition: all .35s ease;
}
.result.show { opacity: 1; transform: none; }
.result .rk { font-family: var(--mono); color: var(--dim); width: 34px; }
.result .mname { font-family: var(--mono); color: #cfd8ee; }
.result.hit { background: rgba(124,188,72,.12); border: 1px solid rgba(124,188,72,.45); }
.result.hit .mname { color: var(--green); font-weight: 600; }

/* ---------- architecture diagram ---------- */
.arch { display: flex; align-items: center; gap: 0; justify-content: space-between; }
.node {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  width: 250px; text-align: center; position: relative;
}
.node .ico { font-size: 40px; margin-bottom: 6px; }
.node h5 { margin: 0 0 6px; font-size: 22px; font-family: var(--head); font-weight: 600; }
.node p { font-size: 16px; color: var(--muted); margin: 0; line-height: 1.35; }
.node.glow { border-color: rgba(0,156,222,.7); box-shadow: 0 0 40px rgba(0,156,222,.25); }
.node.off { border-color: rgba(124,188,72,.5); }
.link { flex: 1; height: 3px; margin: 0 8px; position: relative; background: rgba(0,156,222,.2); border-radius: 3px; overflow: hidden; }
.link::after {
  content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { left: 100%; } }

/* ---------- title + intro ---------- */
.title-wrap { max-width: 1250px; }
.title-wrap h1 { font-size: 104px; }
.byline { display: flex; align-items: center; gap: 18px; margin-top: 44px; font-size: 24px; color: var(--muted); }
.byline .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

.me { display: grid; grid-template-columns: 430px 1fr; gap: 70px; align-items: center; }
.portrait {
  width: 430px; height: 430px; border-radius: 28px; overflow: hidden; position: relative;
  border: 1px solid rgba(0,156,222,.5); box-shadow: 0 30px 90px rgba(0,156,222,.18);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.05); }
.portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(7,11,22,.55)); }

.big-quote { font-family: var(--head); font-size: 54px; font-weight: 700; line-height: 1.15; max-width: 1300px; }

/* ---------- overlays: progress, number, notes, help ---------- */
#progress { position: fixed; left: 0; bottom: 0; height: 4px; z-index: 5; background: linear-gradient(90deg, var(--blue-2), var(--cyan)); transition: width .5s ease; }
#num { position: fixed; right: 22px; bottom: 14px; z-index: 5; font-family: var(--mono); font-size: 14px; color: var(--dim); }
#notes {
  position: fixed; left: 20px; bottom: 20px; z-index: 6; max-width: 560px; max-height: 50vh; overflow: auto;
  background: rgba(10,14,28,.96); border: 1px solid var(--amber); border-radius: 12px; padding: 16px 18px;
  font-size: 15px; line-height: 1.5; color: #e9e2cf; display: none;
}
#notes.show { display: block; }
#notes h6 { margin: 0 0 6px; color: var(--amber); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
aside.notes { display: none; }
#hint { position: fixed; left: 22px; bottom: 14px; z-index: 5; font-family: var(--mono); font-size: 13px; color: var(--dim); transition: opacity 1s; }

/* demo slide */
.demo-big { font-family: var(--head); font-size: 150px; font-weight: 700; line-height: 1; }
.cmd-list { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.cmd-list .term .body { justify-content: flex-start; }

@media (prefers-reduced-motion: reduce) {
  .slide, .f, .fill, .result { transition: none !important; }
  .link::after { animation: none; }
}

/* ---------- derived-formats section ---------- */
.derive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dtile { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.dtile .ico { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.dtile h4 { font-family: var(--head); font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.dtile p { font-size: 18px; color: var(--muted); margin: 0; }

.video-slot { position: relative; flex: 1; min-height: 0; aspect-ratio: 16 / 9; align-self: center; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #040a1f; display: flex; align-items: center; justify-content: center; }
.video-slot video { width: 100%; height: 100%; object-fit: contain; display: none; background: #000; }
.video-slot.has-video video { display: block; }
.video-slot.has-video .video-ph { display: none; }
.video-ph { text-align: center; }
.video-ph .ico { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; font-size: 46px; color: #fff; background: linear-gradient(135deg, var(--drupal-blue), var(--drupal-purple)); box-shadow: 0 0 60px rgba(0,156,222,.45); }

.pdf-pages { display: flex; gap: 22px; justify-content: center; align-items: flex-start; margin-top: 10px; }
.pdf-pages img { width: 300px; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.5); background: #fff; transition: transform .3s; }
.pdf-pages img:nth-child(odd) { transform: rotate(-1.2deg); }
.pdf-pages img:nth-child(even) { transform: rotate(1.2deg) translateY(10px); }

.deck-next { font-family: var(--head); font-weight: 600; font-size: 24px; color: #fff; background: var(--drupal-blue); border: 0; border-radius: 12px; padding: 14px 26px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,156,222,.35); }
.deck-next:hover { background: var(--drupal-dark-blue); }
.game-frame { flex: 1; min-height: 0; aspect-ratio: 16 / 9; align-self: center; border-radius: 16px; overflow: hidden; border: 1px solid rgba(0,156,222,.5); background: #040a1f; }
.game-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.hosts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.host { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.host b { font-family: var(--head); font-size: 22px; display: block; }
.host span { font-size: 16px; color: var(--muted); }
.podcast-script { overflow: hidden; }
.podcast-script .sp { color: var(--drupal-yellow); }

/* closing-slide link grid */
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 1400px; text-align: left; }
.link-grid .panel { padding: 18px 24px; }
.link-grid .small { margin: 0 0 4px; }
.link-grid .mono { font-size: 17px; margin: 0; white-space: nowrap; color: #fff; }

/* contact links (intro + closing slides) */
.contact { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 26px; font-size: 22px; }
.contact.center { justify-content: center; margin-top: 18px; }
.contact a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.contact a:hover { color: var(--drupal-light-blue); }
.contact .ci { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--drupal-blue); color: #fff; font-weight: 700; font-size: 16px; font-family: var(--sans); }
