/* TypeScript Berlin meetup deck — Prisma-styled.
   Barlow (display) · Inter (body) · Roboto Mono (code).
   Midnight background, teal primary + indigo secondary, soft gradients,
   rounded boxes with connecting lines. Projector-legible. */

:root {
  --bg:        #0b0d14;
  --bg-2:      #11151f;
  --surface:   #161b29;
  --surface-2: #1c2234;
  --line:      #2a3145;
  --line-soft: #20273a;

  --ink:       #f3f6fc;
  --ink-soft:  #cdd5e4;
  --muted:     #8a93a8;

  --teal:      #5be3cc;
  --teal-deep: #25b9a1;
  --indigo:    #8b95ff;
  --indigo-deep:#6b76f0;
  --rose:      #ff7d92;
  --amber:     #ffd08a;

  --grad: linear-gradient(100deg, var(--teal) 0%, var(--indigo) 100%);

  --font-display: "Barlow", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(2rem, 6vw, 7rem);
  --maxw: 66rem;
  --radius: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  background:
    radial-gradient(80% 60% at 12% -8%, rgba(91, 227, 204, 0.12), transparent 60%),
    radial-gradient(70% 60% at 100% 0%, rgba(139, 149, 255, 0.14), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.deck { position: relative; height: 100svh; width: 100vw; }

/* ---- Slides ---- */
.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 1.35rem;
  padding: clamp(3.5rem, 8vh, 6rem) var(--pad) clamp(4.5rem, 9vh, 6rem);
}
.slide.active { display: flex; }

@media (prefers-reduced-motion: no-preference) {
  .slide.active > * { animation: rise 0.5s var(--ease) both; }
  .slide.active > *:nth-child(2) { animation-delay: 0.05s; }
  .slide.active > *:nth-child(3) { animation-delay: 0.1s; }
  .slide.active > *:nth-child(4) { animation-delay: 0.15s; }
  .slide.active > *:nth-child(5) { animation-delay: 0.2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

.slide > * { max-width: var(--maxw); width: 100%; }

/* hide the persistent talk label on the title slide (it repeats the title) */
.on-title .chrome .talk { display: none; }

/* ---- Typography ---- */
.kicker {
  font-family: var(--font-sans);
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.6vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  line-height: 1.42;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.statement {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.note { font-size: clamp(1rem, 1.6vw, 1.35rem); color: var(--muted); }

.accent { color: var(--teal); }
.indigo { color: var(--indigo); }
.amber  { color: var(--amber); }
.dim    { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
strong, b { color: var(--ink); font-weight: 700; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
em { color: var(--teal); font-style: normal; font-weight: 600; }

/* ---- Lists ---- */
ul.points { list-style: none; display: grid; gap: 1rem; }
ul.points li {
  position: relative;
  padding-left: 1.9rem;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  line-height: 1.34;
  color: var(--ink-soft);
}
ul.points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.6rem; height: 0.6rem;
  border-radius: 3px;
  background: var(--grad);
}
ul.points li.dash::before { background: var(--muted); }
ul.points li strong { color: var(--ink); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 60rem) { .two-col { grid-template-columns: 1fr; } }
.col-label { font-family: var(--font-display); font-weight: 700; color: var(--teal); font-size: clamp(1.05rem,1.8vw,1.5rem); margin-bottom: 0.7rem; }
.col-label.bad { color: var(--rose); }
.col-label.indigo { color: var(--indigo); }

/* ---- Cards / panels ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.2vw, 1.8rem) clamp(1.3rem, 2.6vw, 2rem);
}

/* ---- Code ---- */
pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.7rem) clamp(1.2rem, 2.4vw, 2rem);
  overflow: auto;
  box-shadow: 0 30px 70px -40px rgba(0,0,0,0.8);
}
code, pre { font-family: var(--font-mono); }
pre code {
  font-size: clamp(0.9rem, 1.55vw, 1.3rem);
  line-height: 1.55;
  display: block;
  white-space: pre;
  color: var(--ink-soft);
}
.slide.dense { gap: 0.9rem; }
.slide.dense pre { padding: clamp(0.8rem, 1.6vw, 1.2rem) clamp(1rem, 2vw, 1.5rem); }
.slide.dense pre code { font-size: clamp(0.74rem, 1.18vw, 1.02rem); line-height: 1.5; }

:not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.06em 0.4em;
  border-radius: 6px;
  color: var(--ink);
}

/* token colors */
.c  { color: var(--muted); font-style: italic; }
.k  { color: var(--indigo); }
.t  { color: var(--teal); }
.s  { color: var(--amber); }
.f  { color: #d7b3ff; }
.an { color: var(--amber); font-style: italic; }
.bad-tok  { color: var(--rose); }
.good-tok { color: var(--teal); }

/* ---- Terminal block (CLI output) ---- */
.term {
  background: #090b11;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(0,0,0,0.85);
}
.term .bar {
  display: flex; gap: 0.5rem; align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.term .bar i { width: 0.7rem; height: 0.7rem; border-radius: 999px; display: inline-block; }
.term .bar .r { background: #ff5f57; } .term .bar .y { background: #febc2e; } .term .bar .g { background: #28c840; }
.term .bar span { margin-left: 0.6rem; color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; }
.term pre { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: clamp(1rem,2vw,1.6rem) clamp(1.2rem,2.4vw,2rem); }
.term .prompt { color: var(--teal); }
.term .tree { color: var(--muted); }
.term .tname { color: var(--ink); }
.term .ttype { color: var(--indigo); }
.term .tnull { color: var(--muted); }

/* ---- Diagram ---- */
.diagram { display: flex; justify-content: center; }
.diagram svg { width: 100%; max-width: 54rem; height: auto; }
.diagram.lg svg { max-width: 100%; }
.dg-box       { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dg-box-teal  { fill: var(--surface); stroke: var(--teal); stroke-width: 2; }
.dg-box-indigo{ fill: var(--surface); stroke: var(--indigo); stroke-width: 2; }
.dg-label { fill: var(--ink); font-family: var(--font-display); font-weight: 700; }
.dg-sub   { fill: var(--muted); font-family: var(--font-mono); }
.dg-arrow      { stroke: var(--muted); stroke-width: 2.5; fill: none; }
.dg-arrow-bad  { stroke: var(--rose); stroke-width: 2.5; fill: none; }
.dg-arrow-good { stroke: var(--teal); stroke-width: 2.5; fill: none; }
.dg-cap   { fill: var(--muted); font-family: var(--font-sans); font-size: 15px; }
.dg-faded { opacity: 0.32; }

/* ---- Chrome ---- */
.chrome { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-size: 0.9rem; color: var(--muted); }
.chrome .talk { position: absolute; top: clamp(1.1rem, 2.5vh, 1.7rem); left: var(--pad); font-family: var(--font-sans); }
.chrome .talk b { color: var(--teal); font-weight: 700; }
.chrome .counter { position: absolute; bottom: clamp(1rem, 2.4vh, 1.5rem); right: var(--pad); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.chrome .hint { position: absolute; bottom: clamp(1rem, 2.4vh, 1.5rem); left: var(--pad); font-size: 0.8rem; opacity: 0.55; }
.progress { position: fixed; left: 0; bottom: 0; height: 3px; z-index: 11; background: var(--grad); width: 0; transition: width 0.45s var(--ease); }
@media (prefers-reduced-motion: reduce) { .progress { transition: none; } .slide.active > * { animation: none; } }

/* ---- Title slide ---- */
.title-slide { gap: 1.6rem; }
.title-slide .meta { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: clamp(0.95rem, 1.6vw, 1.2rem); color: var(--muted); }
.rule { height: 1px; background: var(--line); width: min(100%, var(--maxw)); }
.brandbar { width: 4.5rem; height: 0.42rem; background: var(--grad); border-radius: 999px; }

/* badge */
.badge { display: inline-block; font-family: var(--font-mono); font-size: 0.95rem; padding: 0.2em 0.7em; border-radius: 999px; }
.badge.good { color: #07120f; background: var(--teal); font-weight: 600; }
.badge.bad  { color: #fff; background: var(--rose); }
