/* Loaded after Bootstrap 5.3. Bootstrap handles layout (grid, flex, spacing, display);
   this file holds the design tokens and the type/colour that Bootstrap has no utility for.

   Contents
   1. Tokens          6. Decorations
   2. Base            7. Hero
   3. Helpers         8. Stack, Work, Experience
   4. Buttons         9. Contact / footer
   5. Header & sections   10. Project drawer, toast, reduced motion */


/* ==========================================================================
   1. Tokens (RGB triplets so alpha works: rgb(var(--ink) / .3))
   ========================================================================== */

:root {
  --paper: 250 249 246;
  --surface: 255 255 255;
  --ink: 20 20 19;
  --muted: 102 102 96;
  --subtle: 150 150 142;
  --border: 234 234 230;
  --border-hover: 213 213 206;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  /* accent only: labels, logo, clock. Too hard to read for body text */
  --font-pixel: 'Geist Pixel', var(--bs-font-monospace);

  color-scheme: light;
}

[data-bs-theme="dark"] {
  --paper: 12 12 15; /* #0C0C0F */
  --surface: 29 29 27;
  --ink: 240 239 234;
  --muted: 168 168 160;
  --subtle: 128 128 120;
  --border: 44 44 41;
  --border-hover: 70 70 66;

  color-scheme: dark;
}

/* point Bootstrap's own variables at the tokens so .border, .text-muted, reboot etc. match */
:root,
[data-bs-theme="dark"] {
  --bs-body-bg: rgb(var(--paper));
  --bs-body-color: rgb(var(--ink));
  --bs-secondary-color: rgb(var(--muted));
  --bs-border-color: rgb(var(--border));
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bs-font-monospace: 'JetBrains Mono', monospace;
}


/* ==========================================================================
   2. Base
   ========================================================================== */

/* scale the layout up 1.15x on tablet/desktop (all sizes are rem); phones keep 16px */
@media (min-width: 768px) {
  html {
    font-size: 115%;
  }
}

html {
  scroll-behavior: smooth;
}

/* Bootstrap's !important display utilities would otherwise override the hidden attribute */
[hidden] {
  display: none !important;
}

body {
  position: relative; /* containing block for the scattered .life-deco layer */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgb(var(--ink));
  color: rgb(var(--paper));
}

/* undo reboot's heading/paragraph/link styles: every element is sized by its own class */
h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
}


/* ==========================================================================
   3. Helpers
   ========================================================================== */

.page {
  max-width: 61.25rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 576px) {
  .page {
    padding-inline: 2rem;
  }
}

.font-display {
  font-family: var(--font-display);
}

.text-ink {
  color: rgb(var(--ink));
}

.text-subtle {
  color: rgb(var(--subtle));
}

.bg-surface {
  background: rgb(var(--surface));
}

.bg-paper {
  background: rgb(var(--paper));
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--subtle));
}

.mono-xs {
  font-family: var(--bs-font-monospace);
  font-size: 0.65625rem;
}

.chip {
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: rgb(var(--paper));
  border: 1px solid rgb(var(--border));
  font-size: 0.75rem;
}

.tag {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background: rgb(var(--paper));
  border: 1px solid rgb(var(--border));
  font-family: var(--bs-font-monospace);
  font-size: 0.625rem;
  color: rgb(var(--muted));
}

.panel {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
}

/* SVG files used as masks so icons take the text color (currentColor) and follow the theme */
.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon-md {
  width: 0.875rem;
  height: 0.875rem;
}


/* ==========================================================================
   4. Buttons
   ========================================================================== */

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  font-size: 0.78125rem;
  font-weight: 500;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  color: rgb(var(--ink));
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill:hover {
  border-color: rgb(var(--ink) / 0.3);
}

.btn-pill .icon {
  color: rgb(var(--subtle));
}

.btn-pill-dark {
  gap: 0.625rem;
  background: rgb(var(--ink));
  border-color: rgb(var(--ink));
  color: rgb(var(--paper));
}

.btn-pill-dark:hover {
  background: rgb(var(--ink) / 0.9);
}

.btn-pill:active {
  transform: scale(0.99);
}

.copy-badge {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: rgb(var(--paper) / 0.15);
  font-family: var(--bs-font-monospace);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.icon-btn {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  color: rgb(var(--muted));
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  color: rgb(var(--ink));
  border-color: rgb(var(--ink) / 0.3);
}

.icon-btn-lg {
  width: 2rem;
  height: 2rem;
  color: rgb(var(--ink));
}


/* ==========================================================================
   5. Header & sections
   ========================================================================== */

.site-header {
  background: rgb(var(--paper) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(var(--border) / 0.8);
}

.site-header .page {
  height: 3.5rem;
}

.brand {
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 0.9375rem;
}

.brand-logo {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.3125rem;
}

[data-bs-theme="dark"] .brand-logo {
  box-shadow: 0 0 0 1px rgb(var(--border));
}

.brand-dot {
  color: rgb(var(--subtle));
  transition: color 0.15s;
}

.brand:hover .brand-dot {
  color: rgb(var(--ink));
}

.brand-sub {
  color: rgb(var(--subtle));
  font-family: var(--bs-body-font-family);
  font-weight: 400;
  font-size: 0.75rem;
}

.site-nav {
  gap: 1.5rem;
  font-size: 0.78125rem;
  color: rgb(var(--muted));
}

.site-nav a:hover,
.footer-links a:hover {
  color: rgb(var(--ink));
}

.clock {
  font-family: var(--font-pixel);
  font-size: 0.6875rem;
  color: rgb(var(--subtle));
  font-variant-numeric: tabular-nums;
}

.status-dot {
  position: relative;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #10b981;
}

.status-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  opacity: 0.75;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.theme-sun,
[data-bs-theme="dark"] .theme-moon {
  display: none;
}

[data-bs-theme="dark"] .theme-sun {
  display: inline-block;
}

.section {
  padding-block: 4rem;
  border-bottom: 1px solid rgb(var(--border));
  scroll-margin-top: 3.5rem;
}

@media (min-width: 576px) {
  .section {
    padding-block: 5rem;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (min-width: 576px) {
  .section-title {
    font-size: 1.375rem;
  }
}

.section-note {
  font-size: 0.8125rem;
  color: rgb(var(--muted));
  max-width: 24rem;
  line-height: 1.625;
}


/* ==========================================================================
   6. Decorations
   ========================================================================== */

/* a few looping Game of Life patterns scattered down the page margins; only where the margins have room */
.life-deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.life-deco canvas {
  display: none;
  position: absolute;
}

@media (min-width: 68rem) {
  .life-deco canvas {
    display: block;
  }
}

/* the hollow diamond after the hero name: still for a beat, then flips half a turn around its
   vertical axis (looks the same mirrored, so it stays hollow) */
.flip {
  animation: diamond-flip 2s ease-in-out infinite;
}

@keyframes diamond-flip {
  0%,
  55% {
    transform: perspective(120px) rotateY(0);
  }

  100% {
    transform: perspective(120px) rotateY(180deg);
  }
}


/* ==========================================================================
   7. Hero
   ========================================================================== */

.hero {
  padding-block: 2rem;
  border-bottom: 1px solid rgb(var(--border));
}

@media (min-width: 576px) {
  .hero {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/* --- AI badge --- */

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(var(--muted));
}

.ai-tile {
  width: 1.375rem;
  height: 1.375rem;
  margin-left: -0.1875rem;
  border-radius: 0.375rem;
  background: rgb(var(--ink));
  color: rgb(var(--paper));
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(var(--r));
}

.ai-tile:first-child {
  margin-left: 0;
}

.ai-tile .icon {
  width: 0.8125rem;
  height: 0.8125rem;
}

.ai-badge .ai-tile {
  transition: transform 0.3s var(--ease);
}

.ai-badge:hover .ai-tile {
  transform: rotate(0deg) translateY(-2px);
}

.ai-badge .ai-tile:hover {
  transform: rotate(calc(var(--r) * -2)) scale(1.3);
}

/* --- Text --- */

.hero-title {
  font-family: var(--font-pixel);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.22;
  text-wrap: balance;
}

@media (min-width: 576px) {
  .hero-title {
    font-size: 2.25rem;
  }
}

.hero-sub {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: rgb(var(--muted));
  text-wrap: balance;
}

@media (min-width: 576px) {
  .hero-sub {
    font-size: 1.125rem;
  }
}

@media (min-width: 992px) {
  .hero-sub {
    white-space: nowrap;
  }
}

.hero-desc {
  position: relative;
  font-size: 1.03125rem;
  line-height: 1.7;
  color: rgb(var(--muted));
  max-width: 60ch;
}

@media (min-width: 576px) {
  .hero-desc {
    font-size: 1.0625rem;
  }
}

.type-caret {
  display: inline-block;
  margin-left: 2px;
  font-weight: 300;
  animation: caret-blink 1s step-end infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.hero-loc {
  font-size: 0.78125rem;
  color: rgb(var(--muted));
  line-height: 1.625;
}

.hero-meta {
  font-size: 0.75rem;
  color: rgb(var(--muted));
}

.coords {
  font-family: var(--bs-font-monospace);
  font-size: 0.71875rem;
  color: rgb(var(--subtle));
}

.hero-meta .coords {
  font-size: 0.6875rem;
}

/* --- Retro PC (opens the terminal) --- */

.pc-wrap {
  position: relative;
  max-width: 100%;
  container-type: inline-size; /* lets the screen text scale with the image (cqw) */
}

@media (min-width: 576px) {
  .pc-wrap {
    max-width: 20rem;
  }
}

@media (max-width: 575.98px) {
  .pc-wrap {
    margin: 0 20px;
  }
}

.retro-pc {
  width: 100%;
  max-width: 20rem;
  height: auto;
  user-select: none;
  transition: transform 0.35s var(--ease);
}

@media (max-width: 575.98px) {
  .retro-pc {
    max-width: 100%;
  }
}

/* scale the button so the screen overlay stays aligned */
.retro-pc-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease);
}

.retro-pc-btn:hover {
  transform: scale(1.03);
}

.retro-pc-btn:active {
  transform: scale(0.98);
}

/* hide the PC under the open terminal so a scaled (hover/tap) image can't peek out around it */
.retro-pc-btn[aria-expanded="true"] {
  visibility: hidden;
}

.pc-screen {
  position: absolute;
  left: 30%;
  top: 25%;
  width: 28%;
  height: 28%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12%;
  font: 400 3.1cqw/1 var(--font-pixel);
  white-space: nowrap;
  color: #d9fff0;
  text-shadow: 0 0 6px #aaffdd;
  animation: pc-blink 1.1s steps(2) infinite;
  transition: background 0.3s, box-shadow 0.3s;
  pointer-events: none;
}

.retro-pc-btn:hover .pc-screen {
  background: rgb(170 255 221 / 0.3);
  box-shadow: 0 0 22px 4px rgb(110 231 183 / 0.55), inset 0 0 14px rgb(255 255 255 / 0.35);
  animation-play-state: paused;
  opacity: 1;
}

@keyframes pc-blink {
  50% {
    opacity: 0.25;
  }
}

/* --- Terminal (overlays the PC, no layout shift) --- */

.term {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: #14211c;
  color: #b6f5d8;
  font: 0.6875rem/1.6 var(--bs-font-monospace);
  box-shadow: 0 0 0 1px rgb(var(--border));
  animation: term-in 0.35s var(--ease);
}

.term[hidden] {
  display: none;
}

/* iOS zooms the page when focusing an input under 16px, so the whole terminal uses 16px on
   phones to keep typed and printed text identical */
@media (max-width: 575.98px) {
  .term {
    font-size: 16px;
  }
}

@keyframes term-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
}

.term-out {
  flex: 1;
  min-height: 0;
  padding-right: 1.5rem;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: rgb(182 245 216 / 0.3) transparent;
}

.term-out::-webkit-scrollbar {
  width: 6px;
}

.term-out::-webkit-scrollbar-thumb {
  background: rgb(182 245 216 / 0.3);
  border-radius: 3px;
}

.term-out::-webkit-scrollbar-track {
  background: transparent;
}

.term-out a,
.term-out button {
  color: #fff;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.term-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  z-index: 1;
  padding: 0.0625rem 0.625rem;
  border: 0;
  border-radius: 999px;
  background: rgb(110 231 183 / 0.22);
  color: #b6f5d8;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.term-close:hover {
  background: rgb(110 231 183 / 0.4);
  color: #fff;
}

.term-row {
  display: flex;
  gap: 0.375rem;
  margin: 0;
}

.term-row input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  caret-color: #aaffdd;
}


/* ==========================================================================
   8. Stack, Work, Experience
   ========================================================================== */

/* --- Stack --- */

.stack-row {
  padding: 1.25rem;
}

@media (min-width: 576px) {
  .stack-row {
    padding-inline: 1.5rem;
  }
}

.stack-row + .stack-row {
  border-top: 1px solid rgb(var(--border));
}

.stack-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}

/* --- Work: filters + cards --- */

.filter-pill {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  color: rgb(var(--muted));
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  color: rgb(var(--ink));
}

.filter-pill[aria-pressed="true"] {
  background: rgb(var(--ink));
  border-color: rgb(var(--ink));
  color: rgb(var(--paper));
}

.filter-count {
  opacity: 0.6;
  font-family: var(--bs-font-monospace);
  font-size: 0.65625rem;
  margin-left: 0.125rem;
}

.project-card {
  height: 100%;
  padding: 0.875rem;
  cursor: pointer;
  transition: transform 0.35s var(--ease), border-color 0.25s ease, box-shadow 0.35s var(--ease);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgb(var(--border-hover));
  box-shadow: 0 18px 40px -16px rgba(20, 20, 19, 0.08);
  outline: none;
}

.shot {
  border-radius: 0.75rem;
  background: rgb(var(--paper));
  border: 1px solid rgb(var(--border) / 0.7);
  overflow: hidden;
}

.shot img {
  object-fit: cover;
  object-position: top;
  transition: transform 0.45s var(--ease);
}

.shot-contain {
  background: #141618;
}

.shot-contain img {
  object-fit: contain;
  object-position: center;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.45rem;
  border-radius: 999px;
  background: rgb(var(--ink));
  color: rgb(var(--surface));
  font-family: var(--bs-font-monospace);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}

.project-card:hover .shot img {
  transform: scale(1.018);
}

.project-title {
  font-family: var(--font-display);
  font-size: 0.90625rem;
  font-weight: 800;
  text-underline-offset: 4px;
}

.project-title-lg {
  font-size: 1.0625rem;
}

.project-card:hover .project-title {
  text-decoration: underline;
}

.project-summary {
  font-size: 0.78125rem;
  color: rgb(var(--muted));
}

.project-summary-lg {
  font-size: 0.8125rem;
  line-height: 1.625;
}

.kind-tag {
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  background: rgb(var(--paper));
  border: 1px solid rgb(var(--border));
  color: rgb(var(--muted));
}

.card-arrow {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgb(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--subtle));
  transition: color 0.15s, border-color 0.15s;
}

.project-card:hover .card-arrow {
  color: rgb(var(--ink));
  border-color: rgb(var(--ink) / 0.3);
}

/* --- Experience --- */

.job {
  padding-left: 1rem;
  border-left: 1px solid rgb(var(--border));
  transition: border-color 0.15s;
}

.job:hover {
  border-color: rgb(var(--ink));
}

.job-title {
  font-size: 0.90625rem;
  font-weight: 600;
}

.job-title-sm {
  font-size: 0.875rem;
}

.job-title span {
  font-weight: 400;
  color: rgb(var(--muted));
}

.job-date {
  font-family: var(--bs-font-monospace);
  font-size: 0.6875rem;
  color: rgb(var(--subtle));
  font-variant-numeric: tabular-nums;
}

.job-place {
  font-size: 0.78125rem;
  font-weight: 500;
  color: rgb(var(--muted));
  margin-top: 0.125rem;
}


/* ==========================================================================
   9. Contact / footer
   ========================================================================== */

.contact {
  padding-top: 4rem;
  scroll-margin-top: 3.5rem;
}

@media (min-width: 576px) {
  .contact {
    padding-top: 5rem;
  }
}

.contact-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (min-width: 576px) {
  .contact-title {
    font-size: 1.5rem;
  }
}

.btn-email-lg {
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
}

.btn-email-lg:hover {
  border-color: rgb(var(--ink) / 0.4);
}

.footer-links {
  font-size: 0.78125rem;
  color: rgb(var(--muted));
}

.footer-links .sep {
  color: rgb(var(--border));
}

@media (max-width: 575.98px) {
  .btn-email-lg {
    width: 100%;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }

  .btn-email-lg .font-monospace {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem !important;
  }
}

.copyright {
  font-size: 0.75rem;
  color: rgb(var(--subtle));
}

/* the interactive Game of Life strip above the footer */
#life {
  display: block;
  width: 100%;
  height: 3.375rem;
  cursor: crosshair;
  touch-action: pan-y;
}

@media (min-width: 576px) {
  #life {
    height: 3.75rem;
  }
}


/* ==========================================================================
   10. Project drawer, toast, reduced motion
   ========================================================================== */

/* --- Project drawer (Bootstrap offcanvas) --- */

.drawer.offcanvas {
  --bs-offcanvas-width: min(42rem, 90vw);
  --bs-offcanvas-bg: rgb(var(--paper));
  --bs-offcanvas-border-color: rgb(var(--border));
  --bs-offcanvas-transition: transform 0.38s var(--ease);
  --dp: 1.5rem; /* drawer padding, reused by .drawer-scroll */

  padding: var(--dp);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.drawer.offcanvas.showing,
.drawer.offcanvas.hiding {
  will-change: transform;
}

@media (min-width: 576px) {
  .drawer.offcanvas {
    --dp: 2rem;
  }
}

@media (max-width: 575.98px) {
  .drawer.offcanvas {
    --bs-offcanvas-width: 100%;
  }
}

.offcanvas-backdrop {
  --bs-backdrop-bg: #000;
  --bs-backdrop-opacity: 0.3;
}

/* only the content scrolls; the Live Preview / Source Code row stays pinned at the bottom,
   and the top row (.drawer-head) stays pinned at the top */
.drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* pull the scroller into the drawer padding so the scrollbar sits at the far right edge */
  margin-right: calc(-1 * var(--dp));
  padding-right: var(--dp);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgb(var(--paper));
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.drawer-label {
  font-family: var(--bs-font-monospace);
  font-size: 0.65625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--subtle));
}

.drawer-text {
  font-size: 0.84375rem;
  color: rgb(var(--muted));
  line-height: 1.625;
}

.drawer-btn {
  flex: 1;
  text-align: center;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  font-size: 0.78125rem;
  font-weight: 500;
}

.drawer-private {
  border: 1px dashed rgb(var(--border));
  color: rgb(var(--subtle));
  font-weight: 400;
}

/* --- Copy toast --- */

.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 1060;
  transform: translate(-50%, 0.5rem);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  background: rgb(var(--ink));
  color: rgb(var(--paper));
  font-family: var(--bs-font-monospace);
  font-size: 0.71875rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Reduced motion (kept last so it overrides the rules above) --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .type-caret,
  .flip,
  .pc-screen,
  .term {
    animation: none;
  }

  .ai-badge .ai-tile,
  .retro-pc {
    transition: none;
  }
}
