/* ───────────────────────── Random Tuesday ───────────────────────── */

:root {
  --bg: #e9e8dc;
  --panel: #fbfaf5;
  --cream: #f4f2e6;
  --ink: #121212;
  --ink-soft: #3b3b3b;
  --muted: #7a7a72;
  --purple: #7b2ff7;
  --purple-deep: #5a17c9;
  --lime: #d4f53c;
  --radius-panel: 28px;
  --radius-tile: 36px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --px: "Silkscreen", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  padding: 20px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
mark { background: none; color: var(--purple); }
h1, h2, h3, p { margin: 0; }
.px-font { font-family: var(--px); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

/* ───────── Shell ───────── */
.shell {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 12px;
  max-width: 1480px;
  margin: 0 auto;
}

/* ───────── Sidebar ───────── */
.side {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  min-height: 520px;
  background: var(--panel);
  border-radius: var(--radius-panel);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.side-top { display: flex; align-items: center; gap: 14px; }
.burger {
  width: 26px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.wordmark { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.side-menu { display: flex; flex-direction: column; gap: 6px; margin-top: 22px; }
.side-menu[hidden] { display: none; }
.side-menu a { font-size: 22px; font-weight: 500; }
.side-menu a:hover { color: var(--purple); }
.intro { margin: auto 0; font-size: 17px; line-height: 1.4; max-width: 24ch; }
.side-bottom { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.side-bottom a:hover, .topnav a:hover { color: var(--purple); }


/* ───────── A random Tuesday (card under the apps) ───────── */
.tuesday {
  margin: clamp(24px, 3vw, 36px) 0 0; padding: clamp(18px, 2.4vw, 28px);
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: 26px;
  box-shadow: 5px 5px 0 var(--ink);
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px 24px;
  perspective: 800px;
}
.tuesday[hidden] { display: none; }
.tuesday-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tuesday-label { font-family: var(--px); font-size: 10px; text-transform: uppercase; letter-spacing: .02em; }
.tuesday-t {
  width: 24px; height: 24px; border-radius: 7px; background: var(--purple); color: var(--lime);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; line-height: 1;
}
.tuesday-body { transform-origin: 50% 0; }
.tuesday-date { font-family: var(--px); font-size: 12px; text-transform: uppercase; color: var(--purple); margin: 0 0 6px; }
.tuesday-date span { color: #6f6e66; white-space: nowrap; }
.tuesday-fact { margin: 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.35; max-width: 52ch; min-height: 2.7em; }
.tuesday-next {
  cursor: pointer; white-space: nowrap;
  border: 2px solid var(--ink); background: var(--panel); border-radius: 999px;
  padding: 8px 14px; font: 600 13px/1 inherit; font-family: inherit; color: var(--ink);
}
.tuesday-next:hover { background: var(--lime); }
.tuesday-next:active { transform: translateY(1px); }

/* ───────── Main panel ───────── */
.main {
  background: var(--panel);
  border-radius: var(--radius-panel);
  padding: 26px clamp(20px, 3.4vw, 48px) 40px;
  min-width: 0;
}
.topnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.topnav-links { display: flex; gap: clamp(32px, 6vw, 90px); }
.topnav-contact { justify-self: end; display: inline-flex; gap: 10px; align-items: center; }
.topnav-contact .arrow { color: var(--purple); font-size: 18px; transition: transform .2s; }
.topnav-contact:hover .arrow { transform: translate(2px, -2px); }

/* ───────── Hero ───────── */
.hero { padding-top: clamp(28px, 4vw, 52px); }
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero h1 {
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 500;
}
.date { display: flex; flex-direction: column; align-items: flex-end; text-transform: uppercase; line-height: 1; padding-top: 6px; }
.date-label { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.date-day { font-size: 13px; font-weight: 500; }
.date-month { font-size: 13px; font-weight: 500; margin-top: 2px; }

.stage {
  position: relative;
  width: 100%;
  height: clamp(380px, 44vw, 600px);
  margin-top: 8px;
  perspective: 1600px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='36' viewBox='0 0 8 12' shape-rendering='crispEdges'%3E%3Cpath fill='%23121212' d='M0 0h1v11H0zM1 1h1v1H1zM2 2h1v1H2zM3 3h1v1H3zM4 4h1v1H4zM5 5h1v1H5zM6 6h1v1H6zM7 7h1v1H7zM4 8h4v1H4zM1 10h1v1H1zM2 9h1v1H2zM3 9h1v2H3zM4 10h1v2H4zM5 9h1v2H5z'/%3E%3Cpath fill='%23d4f53c' d='M1 2h1v8H1zM2 3h1v6H2zM3 4h1v5H3zM4 5h1v3H4zM5 6h1v2H5zM6 7h1v1H6zM4 9h1v1H4z'/%3E%3C/svg%3E") 2 2, pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.stage:focus-visible { outline: 3px dashed var(--purple); outline-offset: 6px; border-radius: 24px; }

/* deck boxes under the piles */
.deck-base {
  position: absolute;
  width: var(--cw, 140px);
  height: calc(var(--ch, 196px) + 34px);
  border: 3px solid var(--ink);
  border-radius: 14px;
  background:
    repeating-linear-gradient(to bottom, var(--purple) 0 5px, var(--ink) 5px 7px);
  transform: translate(-50%, -50%);
  transition: opacity .5s;
  pointer-events: none;
}
.deck-base--right { opacity: 0; }
.stage.has-right .deck-base--right { opacity: 1; }

/* ───────── Cards ───────── */
.card {
  position: absolute;
  left: 0; top: 0;
  width: var(--cw, 140px);
  height: var(--ch, 196px);
  transform-style: preserve-3d;
  will-change: transform;
}
.card .face {
  position: absolute; inset: 0;
  border: 3px solid var(--ink);
  border-radius: calc(var(--cw, 140px) * .09);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  transition: opacity .45s ease;
}
.card .back {
  background: var(--cream);
  padding: calc(var(--cw, 140px) * .06);
}
.card .back-art {
  width: 100%; height: 100%;
  border: 2.5px solid var(--ink);
  border-radius: calc(var(--cw, 140px) * .05);
  background-color: var(--ink);
  background-size: 100% 100%;
  image-rendering: pixelated;
}
.card .front {
  background: var(--cream);
  transform: rotateY(180deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.card .corner {
  position: absolute;
  width: calc(var(--cw, 140px) * .15);
  height: calc(var(--cw, 140px) * .15);
}
.card .corner.tl { top: 7%; left: 8%; }
.card .corner.br { bottom: 7%; right: 8%; transform: rotate(180deg); }
.card .corner svg, .card .art svg { display: block; width: 100%; height: 100%; }
.card .corner .t-mini { font-weight: 700; font-size: calc(var(--cw, 140px) * .14); line-height: 1; }
.card .art { width: 52%; aspect-ratio: 1; margin-bottom: 12%; }
.card .art.glyph { width: auto; aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; }
.card .glyph-t { font-weight: 700; font-size: calc(var(--cw, 140px) * .52); line-height: .9; letter-spacing: -.04em; }
.card .glyph-sub { font-weight: 700; font-size: calc(var(--cw, 140px) * .1); letter-spacing: .04em; margin-top: 4%; }
.card .label {
  position: absolute; bottom: 21%; left: 0; right: 0; text-align: center;
  font-family: var(--px); text-transform: uppercase;
  font-size: max(7px, calc(var(--cw, 140px) * .065));
  letter-spacing: .03em;
}
.card.featured .front {
  box-shadow: 0 0 0 4px var(--lime), 0 0 0 7px var(--ink);
}
/* dim the faces, not the card: opacity on a 3D element would flatten it and show the wrong side */
.stage.revealed .card:not(.featured) .face { opacity: .3; }
.card.featured { cursor: pointer; }

/* light sheen on the drawn card while you hover it */
.card.featured .front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.75), transparent 42%),
    linear-gradient(115deg, transparent 30%, rgba(212,245,60,.35) 48%, rgba(123,47,247,.18) 56%, transparent 70%);
  background-size: 100% 100%, 220% 220%;
  background-position: 0 0, calc(var(--mx, 50%) * -1) 0;
  mix-blend-mode: soft-light;
  opacity: 0; transition: opacity .3s;
}
.card.featured.lit .front::after { opacity: 1; }

/* prompt inside the stage */
.stage-hud {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; white-space: nowrap;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 999px;
  padding: 6px 12px; z-index: 0; pointer-events: none;
  transition: background .2s, color .2s;
}
.stage[data-state="shuffling"] .stage-hud { background: var(--ink); color: var(--lime); }
.stage[data-state="catching"] .stage-hud { background: var(--lime); }
.hud-bars { display: flex; gap: 3px; }
.hud-bars:empty { display: none; }
.hud-bars i { width: 6px; height: 10px; background: #444; }
.hud-bars i.on { background: var(--lime); }
.stage[data-state="idle"] .stage-hud { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(-50%); } 50% { transform: translate(-50%, -4px); } }

/* burst particles */
.burst {
  position: absolute; width: 8px; height: 8px; left: 0; top: 0;
  pointer-events: none; z-index: 999;
}

/* ───────── Decorations ───────── */
.spark, .dot, .dashes { position: absolute; pointer-events: none; z-index: 0; }
.spark {
  width: 34px; height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' shape-rendering='crispEdges'%3E%3Cpath fill='%23121212' d='M7 0h1v2H7zM6 1h1v2H6zM8 1h1v2H8zM5 3h1v1H5zM9 3h1v1H9zM4 4h1v1H4zM10 4h1v1H10zM2 5h2v1H2zM11 5h2v1h-2zM0 6h2v1H0zM13 6h2v1h-2zM0 7h1v1H0zM14 7h1v1h-1zM0 8h2v1H0zM13 8h2v1h-2zM2 9h2v1H2zM11 9h2v1h-2zM4 10h1v1H4zM10 10h1v1h-1zM5 11h1v1H5zM9 11h1v1H9zM6 12h1v2H6zM8 12h1v2H8zM7 13h1v2H7z'/%3E%3Cpath fill='%23d4f53c' d='M7 2h1v11H7zM6 3h3v9H6zM5 4h5v7H5zM4 5h7v5H4zM2 6h11v3H2zM1 7h13v1H1z'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: twinkle 3.2s ease-in-out infinite;
}
.spark.small { width: 20px; height: 20px; }
.s1 { left: 54%; top: 4%; }
.s2 { left: 61%; top: 74%; animation-delay: -1.2s; }
.s3 { left: 8%;  top: 22%; width: 22px; height: 22px; animation-delay: -2s; }
.s4 { left: 90%; top: 12%; animation-delay: -.6s; }
.dot { width: 7px; height: 7px; background: var(--ink); }
.dot.lime { width: 10px; height: 10px; background: var(--lime); }
.d1 { left: 34%; top: 14%; }
.d2 { left: 72%; top: 86%; }
.d3 { left: 26%; top: 8%; }
.d4 { left: 85%; top: 62%; }
.dashes {
  width: 46px; height: 30px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 14px 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 20px 12px / 22px 3px no-repeat,
    linear-gradient(var(--lime), var(--lime)) 6px 24px / 18px 3px no-repeat;
}
.ds1 { left: 3%; top: 48%; transform: rotate(-30deg); }
.ds2 { left: 92%; top: 40%; transform: rotate(30deg) scaleX(-1); }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50% { transform: scale(.6) rotate(20deg); opacity: .55; }
}

/* ───────── Controls / result ───────── */
.controls { min-height: 120px; margin-top: 4px; }
.controls-idle { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.controls-idle[hidden], .result[hidden] { display: none; }
.btn-start, .btn-again, .btn-view {
  display: inline-flex; align-items: center; gap: 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 15px 26px;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn-start {
  background: var(--ink); color: var(--lime);
  box-shadow: 5px 5px 0 var(--purple);
}
.btn-start:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--purple); }
.btn-start:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--purple); }
.btn-start .btn-icon { display: inline-block; transition: transform .5s; }
.btn-start:hover .btn-icon { transform: rotate(180deg); }
.hint { font-size: 14px; color: var(--muted); max-width: 30ch; }

.result {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.3fr) auto;
  gap: 18px 36px;
  align-items: center;
  animation: rise .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
.result-label { font-size: 11px; color: var(--purple); }
.result-name { font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.03em; line-height: 1; margin: 6px 0 6px; }
.result-meta { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.result-blurb { font-size: 16px; line-height: 1.45; color: var(--ink-soft); }
.result-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.btn-view { background: var(--lime); justify-content: space-between; box-shadow: 4px 4px 0 var(--ink); }
.btn-view:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-again { background: transparent; justify-content: space-between; }
.btn-again:hover { background: var(--ink); color: var(--panel); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ───────── Work grid ───────── */
.work { margin-top: clamp(48px, 6vw, 90px); }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 22px;
}
.section-head h2 { font-size: 14px; }
.count { font-size: 14px; color: var(--muted); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(96px, 9vw, 130px);
  gap: 14px;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-tile);
  padding: 26px 30px;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.3);
  isolation: isolate;
}
.tile:hover { transform: translateY(-5px) rotate(-.6deg); }
.tile-bg { position: absolute; inset: 0; z-index: -1; }
.tile-bg svg { width: 100%; height: 100%; display: block; }
.tile-tag { font-size: 11px; opacity: .7; }
.tile-text { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; max-width: 34ch; margin-top: auto; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; }
.tile-foot h3 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 700; letter-spacing: -.02em; }
.tile-arrow {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  border: 2px solid currentColor;
  transition: transform .25s, background .25s;
}
.tile:hover .tile-arrow { transform: rotate(45deg); }
.tile.flash { animation: flash 1.4s ease; }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  15%, 60% { box-shadow: 0 0 0 5px var(--lime), 0 0 0 8px var(--ink); }
  25% { transform: rotate(-1.5deg) scale(1.02); }
  40% { transform: rotate(1deg) scale(1.02); }
}

.tile-arrow::after { content: ""; position: absolute; inset: 0; } /* a tile's ↗ link covers the whole tile */
a.tile-arrow:focus-visible { outline: none; }
.tile:has(a.tile-arrow:focus-visible) { outline: 3px solid var(--purple); outline-offset: 3px; }

.tile--dark { background: #151515; color: #f2f1ea; }
.tile--dark mark { color: #b48bff; }
.tile--dark .tile-text { margin-top: 18px; }
.tile--a { grid-column: 1 / 7; grid-row: span 3; }

/* Unplanned bits: logo as the title, periwinkle highlight as a background */
.tile--unplanned mark { background: #a7a5fa; color: #171717; padding: 0 .25em; border-radius: 6px; }
.tile--unplanned .tile-tag { font-family: "Space Mono", ui-monospace, monospace; }
.unp-logo { height: clamp(30px, 2.6vw, 40px); width: auto; display: block; }

/* UsualCrew bits: charcoal and the script wordmark */
.tile--crew { background: #33373b; color: #fff; }
.tile--crew mark { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tile--crew .tile-text { color: #e4e6e8; }
.crew-wordmark { font-family: "Lobster", cursive; font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: 0; }

.tile--lime { background: var(--lime); color: var(--ink); border-radius: 200px 200px var(--radius-tile) var(--radius-tile); }
.tile--b { grid-column: 7 / 10; grid-row: span 3; }
.tile-art { width: 58%; aspect-ratio: 1; margin: auto auto 0; transition: transform .4s cubic-bezier(.2, .9, .3, 1.4); }
.tile--lime:hover .tile-art { transform: rotate(-10deg) scale(1.08); }
.tile--lime .tile-foot { flex-direction: column-reverse; align-items: flex-start; gap: 8px; }
.soon { font-size: 10px; background: var(--ink); color: var(--lime); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }

/* Tuesday Club (concept) */
.tile--purple { background: var(--purple); color: var(--cream); border-radius: var(--radius-tile) 160px var(--radius-tile) var(--radius-tile); }
.tile--purple .tile-foot { width: 100%; gap: 10px; }
.tile--c { grid-column: 10 / 13; grid-row: span 3; }
.big-t { font-weight: 700; font-size: clamp(110px, 12vw, 190px); line-height: .82; letter-spacing: -.05em; margin-top: 4px; }
.big-t-sub { font-size: clamp(14px, 1.4vw, 20px); margin-top: 8px; }

.tile--pixel { background: var(--ink); color: var(--cream); }
.tile--d { grid-column: 1 / 6; grid-row: span 2; }
.pixel-bg { background-size: cover; image-rendering: pixelated; opacity: .95; transition: transform 1.2s ease; }
.tile--pixel:hover .pixel-bg { transform: scale(1.08); }
.badge {
  width: 84px; height: 84px; border-radius: 22px;
  background: var(--cream); border: 3px solid var(--ink);
  display: grid; place-items: center;
}
.badge .px { width: 58%; height: 58%; }
.tile-foot.on-dark h3 {
  background: var(--cream); color: var(--ink);
  padding: 6px 14px; border-radius: 999px; border: 3px solid var(--ink);
  font-size: clamp(16px, 1.4vw, 20px);
}
.tile--pixel .tile-arrow { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); }

.tile--e { grid-column: 6 / 13; grid-row: span 2; border-radius: var(--radius-tile) 200px 200px var(--radius-tile); padding-right: 90px; }
.tile--e .tile-text { max-width: 44ch; }

.tile--black { background: var(--ink); color: var(--lime); }
.tile--f { grid-column: 1 / 6; grid-row: span 2; }
.squiggle-arrow { width: 62%; margin: auto 0; color: var(--lime); transition: transform .4s; }
.tile--black:hover .squiggle-arrow { transform: translateX(14px); }
.tile-spark { position: absolute; top: 22px; right: 26px; width: 40px; height: 40px; animation: twinkle 3s ease-in-out infinite; }
.tile--black .tile-foot.on-dark h3 { background: var(--lime); }
.tile--black .tile-arrow { color: var(--lime); }

.tile--halftone {
  background-color: #e4e2d6;
  background-image: radial-gradient(rgba(0,0,0,.28) 1px, transparent 1.6px);
  background-size: 5px 5px;
  color: var(--ink);
  border: 3px solid var(--ink);
  justify-content: center;
}
.tile--g { grid-column: 6 / 13; grid-row: span 2; transform: rotate(-2.2deg) translate(-6px, 6px); box-shadow: 0 18px 30px -18px rgba(0,0,0,.35); }
.tile--g:hover { transform: rotate(-.8deg) translate(-6px, 0); }
.cta-text { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -.03em; max-width: 18ch; font-weight: 500; }
.cta-link { margin-top: 14px; font-size: 13px; color: var(--purple); }

/* ───────── Card faces for the two real apps: just the logo ───────── */
.card .card-logo { width: 74%; height: auto; display: block; }
.card .card-wordmark { font-family: "Lobster", cursive; font-size: calc(var(--cw, 140px) * .18); line-height: 1; color: #33373b; }

/* ───────── Language switch ───────── */
.lang-switch { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; padding: 2px; gap: 2px; }
.lang-switch button {
  border: 0; background: transparent; border-radius: 999px; padding: 4px 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
.lang-switch button:not([aria-pressed="true"]):hover { background: var(--lime); }
.side-bottom { align-items: center; }

.px { display: block; }
.px svg { width: 100%; height: 100%; display: block; }

/* ───────── About ───────── */
.about {
  margin-top: clamp(60px, 7vw, 110px);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  border-top: 2px solid var(--ink); padding-top: 28px;
}
.about-statement { font-size: clamp(30px, 3.6vw, 54px); line-height: 1; letter-spacing: -.035em; font-weight: 500; }
.about-col p { font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
.services { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.services li { border: 2px solid var(--ink); border-radius: 999px; padding: 7px 14px; }
.services li:nth-child(odd) { background: var(--lime); }

/* ───────── Contact ───────── */
.contact {
  margin-top: clamp(60px, 7vw, 110px);
  background: var(--ink); color: var(--cream);
  border-radius: var(--radius-tile);
  padding: clamp(28px, 4vw, 56px);
  position: relative; overflow: hidden;
}
.contact::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 260px; height: 260px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' shape-rendering='crispEdges'%3E%3Cpath fill='%237b2ff7' d='M7 0h1v15H7zM6 2h3v11H6zM5 4h5v7H5zM4 5h7v5H4zM2 6h11v3H2zM0 7h15v1H0z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .9; animation: twinkle 5s ease-in-out infinite;
}
.contact-label { font-size: 12px; color: var(--lime); }
.contact h2 { font-size: clamp(34px, 5vw, 76px); line-height: .98; letter-spacing: -.04em; font-weight: 500; margin: 14px 0 30px; position: relative; z-index: 1; }
/* contact form — not connected yet */
.contact-form { position: relative; z-index: 1; display: grid; gap: 18px; max-width: 760px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 500; color: #cfcec4; }
.cf-field input, .cf-field textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--cream); border: 3px solid var(--cream); border-radius: 18px;
  padding: 14px 18px; transition: border-color .15s;
}
.cf-field textarea { resize: vertical; min-height: 130px; border-radius: 22px; }
.cf-field input:focus, .cf-field textarea:focus { outline: none; border-color: var(--lime); }
.cf-field input[aria-invalid="true"], .cf-field textarea[aria-invalid="true"] { border-color: #ff7a6b; }
.cf-topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-topics legend { font-size: 13px; font-weight: 500; color: #cfcec4; margin-bottom: 10px; padding: 0; }
.cf-topics label { cursor: pointer; }
.cf-topics input { position: absolute; opacity: 0; pointer-events: none; }
.cf-topics span {
  display: inline-block; font-family: var(--px); text-transform: uppercase; font-size: 12px;
  border: 2px solid #5a5a54; color: var(--cream); border-radius: 999px; padding: 8px 14px; transition: background .15s, color .15s, border-color .15s;
}
.cf-topics label:hover span { border-color: var(--cream); }
.cf-topics input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.cf-topics input:focus-visible + span { outline: 3px solid var(--purple); outline-offset: 2px; }
.cf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cf-send {
  display: inline-flex; gap: 12px; align-items: center; cursor: pointer;
  font-size: clamp(18px, 2vw, 22px); font-weight: 700;
  background: var(--lime); color: var(--ink); border: 0;
  border-radius: 999px; padding: 14px 28px;
  transition: transform .2s;
}
.cf-send:hover { transform: translate(-2px, -2px) rotate(-1deg); }
.cf-send:disabled { cursor: progress; transform: none; }
.cf-send.sending { opacity: .7; }
.cf-error { margin: 0; font-size: 14px; color: #ff9c90; }
.contact-thanks { position: relative; z-index: 1; max-width: 640px; border: 3px solid var(--lime); border-radius: 24px; padding: 24px 28px; animation: rise .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.contact-thanks .px-font { color: var(--lime); font-size: 12px; margin-bottom: 8px; }
.contact-thanks-text { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -.02em; }
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(40px, 6vw, 80px); font-size: 12px; color: #a9a89f;
}

/* ───────── Blog (home section + blog.html) ───────── */
.blog-latest { margin-top: clamp(60px, 7vw, 110px); }
.blog-all { font-size: 12px; }
.blog-all:hover { color: var(--purple); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card {
  display: flex; flex-direction: column; background: var(--cream); border: 2px solid var(--ink);
  border-radius: 28px; overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.post-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.post-card-img { display: block; aspect-ratio: 16 / 10; background: var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-img--none { display: grid; place-items: center; background: var(--purple); }
.post-card-img--none span { font-weight: 700; font-size: 72px; line-height: 1; color: var(--lime); letter-spacing: -.04em; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.post-card-date { font-family: var(--px); font-size: 11px; text-transform: uppercase; color: var(--purple); }
.post-card-title { font-size: 21px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.post-card-excerpt { font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.post-card-more { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 700; }
.post-card:hover .post-card-more { color: var(--purple); }

.topnav-links a[aria-current="page"] { color: var(--purple); }
.blog-index { margin-top: clamp(36px, 5vw, 70px); }
.blog-h1 { font-size: clamp(56px, 8vw, 120px); line-height: .9; letter-spacing: -.05em; font-weight: 500; margin: 0; }
.blog-lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.35; max-width: 34ch; margin: 18px 0 clamp(30px, 4vw, 54px); }
.post-grid--all { border-top: 2px solid var(--ink); padding-top: 22px; }
.blog-status { color: var(--muted); font-size: 15px; margin: 20px 0 0; }
.blog-status[hidden] { display: none; }

.post { max-width: 760px; margin: clamp(30px, 4vw, 60px) auto 0; }
.post-back { display: inline-flex; gap: 8px; font-size: 12px; }
.post-back:hover { color: var(--purple); }
.post-head { margin: 26px 0 26px; }
.post-meta { font-size: 11px; color: var(--purple); margin: 0 0 12px; }
.post-meta span { color: var(--muted); }
.post-title { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; font-weight: 500; margin: 0; }
.post-note { margin: 16px 0 0; display: inline-block; background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.post-note[hidden] { display: none; }
.post-cover { margin: 0 0 30px; border: 2px solid var(--ink); border-radius: 28px; overflow: hidden; }
.post-cover[hidden] { display: none; }
.post-cover img { width: 100%; height: auto; display: block; }

/* Rendered Markdown: HQ's preview uses the same rules (hq/app.css .prose). */
.prose { font-size: 18px; line-height: 1.65; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: .9em; }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.03em; line-height: 1.1; font-weight: 500; margin-top: 1.4em; }
.prose h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; font-weight: 700; margin-top: 1.3em; }
.prose h4 { font-size: 18px; font-weight: 700; }
.prose a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; display: block; border-radius: 20px; border: 2px solid var(--ink); }
.prose blockquote { padding: 4px 0 4px 20px; border-left: 4px solid var(--purple); font-size: 1.15em; letter-spacing: -.01em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .3em; }
.prose code { font-family: "Space Mono", ui-monospace, monospace; font-size: .85em; background: var(--cream); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--ink); color: var(--cream); padding: 16px 18px; border-radius: 18px; overflow-x: auto; font-size: 15px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 2px solid var(--ink); margin: 2em 0; }
.prose mark { background: var(--lime); }

.blog-foot { color: var(--muted); border-top: 2px solid var(--ink); padding-top: 14px; }

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid { grid-template-columns: repeat(6, 1fr); }
  .tile--a { grid-column: 1 / 7; grid-row: span 3; }
  .tile--b { grid-column: 1 / 4; grid-row: span 3; }
  .tile--c { grid-column: 4 / 7; grid-row: span 3; }
  .tile--d { grid-column: 1 / 4; }
  .tile--e { grid-column: 4 / 7; padding-right: 30px; }
  .tile--f { grid-column: 1 / 4; }
  .tile--g { grid-column: 4 / 7; }
  .result { grid-template-columns: 1fr 1fr; }
  .result-actions { grid-column: 1 / -1; flex-direction: row; }
}

@media (max-width: 860px) {
  body { padding: 12px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: relative; top: 0; height: auto; min-height: 0; gap: 20px; padding: 22px; }
  .intro { margin: 8px 0 0; max-width: none; }
  .side-bottom { justify-content: flex-start; gap: 24px; }
  .topnav { grid-template-columns: auto 1fr; }
  .topnav > span:first-child { display: none; }
  .topnav-links { gap: 24px; }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .tuesday { grid-template-columns: 1fr; align-items: start; }
  .tuesday-next { justify-self: start; }
  .post-grid { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }
  .cf-row { grid-template-columns: 1fr; }
  .stage { height: 400px; }
  .hero-head { flex-direction: column-reverse; gap: 10px; }
  .date { flex-direction: row; gap: 6px; align-items: baseline; }
  .date-label { margin: 0 4px 0 0; }
  .work-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .work-grid .tile { grid-column: auto; grid-row: auto; min-height: 240px; }
  .tile--a, .tile--e { min-height: 300px; }
  .tile--b, .tile--c { border-radius: var(--radius-tile); min-height: 280px; }
  .tile--g { transform: rotate(-1.5deg); margin: 8px 4px; }
  .result { grid-template-columns: 1fr; gap: 14px; }
  .result-actions { flex-direction: column; }
  .controls-idle { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
