@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/patrick-hand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/patrick-hand-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #333;
  --ink-soft: #666;
  --ink-faint: #999;
  --paper: #fff;

  --blue: #3576c9;
  --red: #d23c3c;
  --green: #2e8a57;
  --orange: #c9690f;
  --purple: #7a4fc4;
  --navy: #52537f;

  /* a slightly lopsided, hand-drawn looking outline */
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Patrick Hand", "Comic Neue", "Segoe Print", system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* translucent so a highlighted line never covers the one above it */
::selection { background: rgba(110, 110, 110, 0.22); color: inherit; }

/* ---------- background network ---------- */
#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- slides ---------- */
#slides { position: relative; z-index: 1; }

.slide {
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

.content {
  max-width: 640px;
  text-align: center;
  /* soft paper halo so text never sits on top of a line */
  background: radial-gradient(closest-side, rgba(255,255,255,0.96) 70%, rgba(255,255,255,0));
  padding: 24px 40px;
}
.wide-content { max-width: 860px; }
/* the slot-machine scroll (main.js) tilts and scales each slide's content */
@media (prefers-reduced-motion: no-preference) {
  .content { will-change: transform, opacity; transform-origin: 50% 50%; backface-visibility: hidden; }
}

p { margin: 0 0 1em; }
.lead { font-size: 1.15em; }
.aside { color: var(--ink-soft); }
.small { font-size: 0.85em; color: var(--ink-soft); }

/* the font has a single weight: fake bold by doubling the stroke */
b, strong {
  font-weight: normal;
  text-shadow: 0.7px 0 0 currentColor, -0.2px 0 0 currentColor;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #bbb;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { color: var(--red); text-decoration-color: currentColor; }
a:focus-visible, .btn:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 4px;
}

/* per-letter spans used by the hover wiggle; words never break mid-way */
.w { white-space: nowrap; }
.ch { display: inline-block; transform-origin: 50% 70%; }

/* ---------- title ---------- */
.title {
  margin: 0 0 40px;
  font-weight: normal;
  line-height: 0.92;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.title > span { display: block; letter-spacing: 0.06em; }
.t-small { font-size: 34px; letter-spacing: 0.02em !important; color: var(--ink-soft); margin-bottom: 10px; }
.t-big   { font-size: clamp(64px, 15vw, 150px); }
.t-mid   { font-size: clamp(44px, 10vw, 96px); }

h2 {
  font-weight: normal;
  font-size: clamp(36px, 7vw, 54px);
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0 0 28px;
}

/* ---------- hand-drawn button ---------- */
.btn {
  position: relative;
  display: inline-block;
  font: inherit;
  font-size: 24px;
  color: #111;
  text-decoration: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
  padding: 6px 28px 8px;
  margin-top: 10px;
  cursor: pointer;
  transition: transform 0.15s ease-out, background 0.15s, box-shadow 0.15s;
  box-shadow: 2px 3px 0 0 rgba(0,0,0,0.12);
}
.btn:hover {
  color: #111;
  background: #f3f3f3;
  transform: rotate(-1deg) scale(1.03);
}
.btn:active { transform: scale(0.97); box-shadow: none; }

/* once JS has drawn a sketchy outline, it replaces the CSS border */
.btn:has(> .sk) { border-color: transparent; }
.btn .sk {
  position: absolute;
  left: -3px; top: -3px;          /* cover the (now invisible) border */
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke-linecap: round;
}
.sk-main { stroke: var(--ink); stroke-width: 2.6; }
.sk-thin {
  stroke: var(--ink); stroke-width: 1.3; opacity: 0.5;
  stroke-dasharray: 1; stroke-dashoffset: 1;       /* hidden until hover */
  transition: stroke-dashoffset 0.25s ease-in;
}
.btn:hover .sk-thin, .btn:focus-visible .sk-thin { stroke-dashoffset: 0; }

/* on hover each side is re-drawn in turn, like a pen going round */
.btn.sk-draw .sk-main {
  stroke-dasharray: 1;
  animation: sk-draw 0.16s ease-out both;
  animation-delay: calc(var(--i) * 0.07s);
}
.btn.sk-draw .sk-thin { transition-delay: calc(0.3s + var(--i) * 0.06s); }
@keyframes sk-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .btn.sk-draw .sk-main { animation: none; }
  .sk-thin { transition: none; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; margin-bottom: 26px; }
.back a { text-decoration-color: transparent; }

/* ---------- projects ---------- */
.projects {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 40px;
  text-align: center;
}
.projects a {
  display: block;
  text-decoration: none;
  padding: 10px 12px 12px;
  border: 2px solid transparent;
  border-radius: var(--wobble);
  transition: border-color 0.15s, transform 0.15s;
}
.projects a:hover { color: inherit; border-color: #ddd; transform: rotate(-0.6deg); }
.projects li:nth-child(even) a:hover { transform: rotate(0.6deg); }
.name {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 4px;
  text-shadow: 0.7px 0 0 currentColor;
}
.desc { display: block; font-size: 19px; line-height: 1.35; color: var(--ink-soft); }

.c-blue   { color: var(--blue); }
.c-red    { color: var(--red); }
.c-green  { color: var(--green); }
.c-orange { color: var(--orange); }
.c-purple { color: var(--purple); }
.c-navy   { color: var(--navy); }

/* ---------- project windows ---------- */
.win {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: 5px 7px 0 0 rgba(0,0,0,0.13);
  transform-origin: 0 0;
  transition: rotate 0.15s ease-out, box-shadow 0.15s;
}
.win:focus { outline: none; }
.win.dragging { rotate: -0.7deg; box-shadow: 10px 14px 0 0 rgba(0,0,0,0.1); }
.win.closing { pointer-events: none; }
.win.max {
  left: 10px !important; top: 10px !important;
  right: 10px; bottom: 10px;
  width: auto !important; height: auto !important;
}

.win-sk {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  z-index: 2;
}
.win-sk .m { stroke-width: 2.8; }
.win-sk .d { stroke-width: 2.2; }
.win-sk .t { stroke-width: 1.3; opacity: 0.5; }
/* on open the outline is drawn side by side, then the looser pass */
.win.sk-draw .win-sk path {
  stroke-dasharray: 1;
  animation: sk-draw 0.2s ease-out both;
  animation-delay: calc(0.06s + var(--i) * 0.08s);
}
.win.sk-draw .win-sk .t { animation-delay: calc(0.42s + var(--i) * 0.07s); }

.win-bar {
  flex: none;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 20px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.win.dragging .win-bar { cursor: grabbing; }
.win.max .win-bar { cursor: default; }
.win-title {
  flex: 1;
  min-width: 0;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0.7px 0 0 currentColor;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-btn {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease-out, color 0.15s;
}
.win-btn svg {
  width: 20px; height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.win-btn:hover { color: var(--ink); transform: rotate(-8deg) scale(1.15); }
.win-btn[data-act="close"]:hover { color: var(--red); }
.win-btn:focus-visible { outline: 2px dashed var(--ink); outline-offset: -2px; }

.win-body {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 5px 5px;
  overflow: hidden;
}
.win-body iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 0.25s;
}
.win-body.ready iframe { opacity: 1; }
.win-body.ready .win-loading { display: none; }
.win-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ink-faint);
}
.win.dragging iframe, .win.resizing iframe { pointer-events: none; }

.win-grip {
  position: absolute;
  right: 2px; bottom: 2px;
  width: 24px; height: 24px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 3;
}
.win-grip svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 2;
  stroke-linecap: round;
}
.win.max .win-grip { display: none; }

@media (prefers-reduced-motion: reduce) {
  .win { transition: none; }
  .win.dragging { rotate: none; }
}

/* ---------- toys (the shiny doodles) ---------- */
html.over-toy, html.over-toy * { cursor: pointer !important; }

/* thought bubbles */
.bubble {
  position: fixed;
  z-index: 60;
  filter: drop-shadow(4px 6px 0 rgba(0,0,0,0.12));
  pointer-events: none;            /* only the cloud and its parts catch the pointer */
  transition: rotate 0.15s ease-out;
}
.bubble > * { pointer-events: auto; }
.bubble > .bubble-sk { pointer-events: none; }
.bubble.dragging { rotate: -1deg; }
.bubble.dragging iframe { pointer-events: none; }
/* drag handle: a wide invisible stroke along the cloud's edge */
.bubble-grab {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none !important;
  fill: none;
  stroke: transparent;
  stroke-width: 24;
}
.bubble-grab path { pointer-events: stroke; cursor: grab; }
.bubble.dragging .bubble-grab path, .bubble.dragging .gh { cursor: grabbing; }
.gh { cursor: grab; }
.gh a { cursor: pointer; }
.bubble-clip {
  position: absolute; inset: 0;
  background: var(--paper);
  overflow: hidden;
}
.bubble-clip iframe {
  position: absolute; left: 0; top: 0;
  border: 0;
  transform-origin: 0 0;
  background: var(--paper);
}
.bubble-sk {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bubble-sk .m { stroke-width: 3; }
.bubble-sk .t { stroke-width: 1.3; opacity: 0.5; }
.bubble.sk-draw .bubble-sk path {
  stroke-dasharray: 1;
  animation: sk-draw 0.5s ease-out both;
  animation-delay: calc(0.3s + var(--i) * 0.25s);
}
.bubble-dot {
  position: fixed;
  z-index: 60;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 58% 42% 55% 45% / 47% 56% 44% 53%;
  box-shadow: 2px 3px 0 0 rgba(0,0,0,0.12);
  pointer-events: none;
}
.bubble-x {
  position: absolute;
  right: 13%; top: 11%;
  background: var(--paper) !important;
  border-radius: 50%;
  box-shadow: 0 0 0 2.5px var(--ink), 2px 3px 0 2px rgba(0,0,0,0.12);
  width: 34px; height: 34px;
}
.bubble-x svg { width: 16px; height: 16px; }
.bubble-link {
  position: absolute;
  left: 50%; bottom: -6px;
  transform: translate(-50%, 50%);
  white-space: nowrap;
  font-size: 18px;
  background: var(--paper);
  padding: 1px 14px 3px;
  border: 2px solid var(--ink);
  border-radius: var(--wobble);
  text-decoration: none;
  box-shadow: 2px 3px 0 0 rgba(0,0,0,0.12);
}

/* the podcast inside its bubble */
.pod {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: grab;
}
.bubble.dragging .pod { cursor: grabbing; }
.pod p { margin: 0; text-align: center; line-height: 1.15; }
.pod-show { font-size: 15px; letter-spacing: 0.06em; color: var(--ink-soft); }
.pod-show span { letter-spacing: 0; }
.pod-title { font-size: 22px; margin-bottom: 8px !important; }
/* the podcast player: YouTube underneath, drawn controls on top */
.pod-player { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pod-stage {
  position: relative;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: 6px 9px 7px 10px / 9px 6px 10px 7px;
  background: #111;
  box-shadow: 3px 4px 0 0 rgba(0,0,0,0.12);
}
.pod-stage > div, .bubble-clip .pod-stage iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  transform: none;
}
.pod-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; }
.pod-catch { position: absolute; inset: 0; cursor: pointer; }
.pod-big {
  position: absolute;
  left: 50%; top: 50%;
  width: 72px; height: 66px;
  translate: -50% -50%;
  display: grid; place-items: center;
  padding: 0 0 0 5px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 58% 42% 55% 45% / 47% 56% 44% 53%;
  box-shadow: 3px 4px 0 0 rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.15s ease-out, opacity 0.2s;
}
.pod-big svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.pod-big:hover { transform: rotate(-5deg) scale(1.08); }
.pod-player.started .pod-poster, .pod-player.native .pod-poster { opacity: 0; pointer-events: none; }
.pod-player.playing .pod-big, .pod-player.native .pod-big { opacity: 0; pointer-events: none; }
.pod-player.native .pod-catch { display: none; }
.pod-player.failed .pod-controls { display: none; }
.pod-player.loading .pod-big { animation: pod-wait 0.9s ease-in-out infinite alternate; }
@keyframes pod-wait { to { transform: rotate(-8deg) scale(0.92); } }
.pod-player:fullscreen { justify-content: center; background: var(--paper); padding: 16px; }
.pod-player:fullscreen .pod-stage { width: min(100%, calc((100vh - 90px) * 16 / 9)) !important; height: auto !important; aspect-ratio: 16 / 9; }
.pod-player:fullscreen .pod-controls { width: min(100%, calc((100vh - 90px) * 16 / 9)); }

.pod-controls { display: flex; align-items: center; gap: 2px; width: 100%; }
.pod-ctl {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease-out;
}
.pod-ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pod-ctl:hover { transform: rotate(-8deg) scale(1.15); }
.pod-time { flex: none; font-size: 14px; color: var(--ink-soft); min-width: 74px; text-align: center; white-space: nowrap; }
/* seek bar: a pen line that fills in, with a scribbled knob */
.pod-seek {
  --p: 0%;
  flex: 1;
  min-width: 40px;
  height: 24px;
  margin: 0 4px;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.pod-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 3px; background: linear-gradient(to right, var(--ink) var(--p), #d6d6d6 var(--p)); }
.pod-seek::-moz-range-track { height: 4px; border-radius: 3px; background: #d6d6d6; }
.pod-seek::-moz-range-progress { height: 4px; border-radius: 3px; background: var(--ink); }
.pod-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px; height: 16px;
  margin-top: -6px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 58% 42% 55% 45% / 47% 56% 44% 53%;
}
.pod-seek::-moz-range-thumb { width: 12px; height: 11px; background: #fff; border: 3px solid var(--ink); border-radius: 58% 42% 55% 45% / 47% 56% 44% 53%; }
.pod-seek:focus { outline: none; }
.pod-seek:focus-visible::-webkit-slider-thumb { outline: 2px dashed var(--ink); outline-offset: 3px; }

/* the GitHub card inside its bubble */
.gh {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 13% 19%;
  text-align: left;
  font-size: 17px;
  line-height: 1.25;
}
.gh-wait { color: var(--ink-faint); text-align: center; margin: 0; }
.gh-head {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 10px;
}
.gh-head img {
  width: 48px; height: 48px;
  border-radius: 58% 42% 55% 45% / 47% 56% 44% 53%;
  border: 2.5px solid var(--ink);
}
.gh-head span { display: flex; flex-direction: column; }
.gh-head b { font-weight: normal; font-size: 22px; text-shadow: 0.6px 0 0 currentColor; }
.gh-head small { color: var(--ink-soft); font-size: 15px; }
.gh ul { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 300px; }
.gh li { margin: 0; border-top: 1.5px dashed #ddd; }
.gh li a { display: flex; justify-content: space-between; gap: 10px; padding: 3px 2px; text-decoration: none; }
.gh-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-lang { flex: none; font-size: 14px; color: var(--ink-soft); }
.gh-lang::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--lc);
}

/* terminal: a small see-through window with mono text and syntax colours */
.win.term-win {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.win.term-win .win-bar { height: 42px; }
.win-title.term-title {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  text-shadow: none;
  color: var(--ink-soft);
}
.term {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 6px 14px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
}
.t-prompt { color: var(--green); }
.t-path   { color: var(--blue); }
.t-cmd    { color: var(--ink); font-weight: 600; }
.t-flag   { color: var(--orange); }
.t-str    { color: var(--purple); }
.t-num    { color: var(--red); }
.t-kw     { color: var(--navy); font-weight: 600; }
.t-ok     { color: var(--green); }
.t-dim    { color: var(--ink-faint); }
.t-cursor {
  display: inline-block;
  width: 0.6em; height: 1.1em;
  vertical-align: -0.2em;
  background: var(--ink);
  animation: t-blink 1s steps(1) infinite;
}
@keyframes t-blink { 50% { opacity: 0; } }

/* the "AI assistant" */
.chat {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 70;
  width: 350px;
  height: min(470px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: 5px 7px 0 0 rgba(0,0,0,0.13);
}
.chat-sk {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
}
.chat-sk .m { stroke-width: 2.8; }
.chat-sk .d { stroke-width: 2.2; }
.chat-sk .t { stroke-width: 1.3; opacity: 0.5; }
.chat.sk-draw .chat-sk path {
  stroke-dasharray: 1;
  animation: sk-draw 0.2s ease-out both;
  animation-delay: calc(0.05s + var(--i) * 0.07s);
}
.chat-head {
  flex: none;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 14px;
}
.chat-bot {
  width: 34px; height: 34px;
  fill: none;
  stroke: #c8302c;
  stroke-width: 2.2;
  stroke-linecap: round;
  overflow: visible;
}
.chat-title { flex: 1; display: flex; flex-direction: column; line-height: 1.1; }
.chat-title b { font-weight: normal; font-size: 21px; text-shadow: 0.6px 0 0 currentColor; }
.chat-title small { font-size: 14px; color: var(--ink-soft); }
.chat-title i {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
}
.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 18px;
  line-height: 1.3;
}
.msg {
  max-width: 84%;
  padding: 6px 13px 8px;
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  overflow-wrap: anywhere;
}
.msg.bot { align-self: flex-start; background: #fff; }
.msg.me { align-self: flex-end; background: #f1f1f1; border-color: var(--ink-faint); }
.msg p { margin: 0; }
.msg p + p { margin-top: 6px; }
.msg a { color: var(--red); }
.msg.thinking { width: 72%; }
.think { color: var(--ink-soft); }
.think-bar {
  display: block;
  height: 9px;
  margin: 7px 0 2px;
  border: 2px solid var(--ink);
  border-radius: 255px 8px 225px 8px / 8px 225px 8px 255px;
  overflow: hidden;
}
.think-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(-45deg, #c8302c 0 5px, #e3625b 5px 10px);
  transition: width 0.15s linear;
}
.chat-form {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 8px 10px 12px 14px;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 18px;
  padding: 4px 12px 5px;
  border: 2px solid var(--ink);
  border-radius: var(--wobble);
  background: var(--paper);
  color: var(--ink);
  outline: none;
}
.chat-form input:focus-visible { box-shadow: 0 0 0 2px rgba(0,0,0,0.12); }

@media (max-width: 719px) {
  .chat { left: 8px; right: 8px; bottom: 8px; width: auto; height: min(70vh, 480px); }
  .bubble-link { font-size: 16px; }
  .pod-show { font-size: 13px; }
  .pod-title { font-size: 18px; margin-bottom: 5px !important; }
  .pod-mute { display: none; }        /* phones have volume buttons */
  .pod-time { min-width: 62px; font-size: 12px; }
  .pod-big { width: 58px; height: 54px; }
  .pod-big svg { width: 26px; height: 26px; }
}

/* ---------- small screens ---------- */
br.wide { display: none; }
@media (min-width: 720px) {
  br.wide { display: inline; }
}

@media (max-width: 719px) {
  body { font-size: 20px; }
  .content { padding: 16px 8px; }
  .projects { grid-template-columns: 1fr; gap: 10px; }
  .name { font-size: 27px; }
  .t-small { font-size: 26px; }
  .btn { font-size: 21px; padding: 6px 22px 8px; }
  /* phones: windows always fill the screen */
  .win.max { left: 6px !important; top: 6px !important; right: 6px; bottom: 6px; }
  .win-btn[data-act="max"] { display: none; }
  .win-title { font-size: 24px; }
}
