/* The Work index (/).
   A sticky column of soft cards on the left, an endless two-column wall of
   clips on the right. Wide screens (1200px+) lock the page and loop the wall
   (work/js/loop.js); narrower screens scroll normally. */

:root {
  --page: #ffffff;
  --card: #f5f4f0;
  --ink: #0d0c0a;
  --muted: #6f6c66;
  --line: #e4e1da;
  --lilac: #cdbaff;        /* the site's one accent (work.css --lavender) */
  --lilac-2: #b8a0ff;
  --ease: cubic-bezier(.44, 0, .56, 1);
  --gap: 10px;
  --r: 10px;
  --sans: 'Figtree', ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip {
  position: absolute; left: var(--gap); top: -60px; z-index: 10;
  padding: 8px 14px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500;
}
.skip:focus { top: var(--gap); }

.muted { color: var(--muted); }
.link { color: var(--muted); transition: color .2s var(--ease); }
.link:hover { color: var(--ink); }

/* ---------- layout ---------- */

.layout { display: flex; align-items: flex-start; gap: var(--gap); padding: 0 var(--gap); }
.sidebar {
  display: flex; flex-direction: column; gap: var(--gap);
  flex: none; width: 384px;
  padding: var(--gap) 0;
}
.gallery { display: flex; gap: var(--gap); flex: 1; min-width: 0; }
.loop-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.loop-track, .loop-set { display: flex; flex-direction: column; gap: var(--gap); }
.loop-track { padding: var(--gap) 0; will-change: transform; }
.loop-set--copy { display: none; }

@media (min-width: 1200px) {
  /* on short windows the sidebar scrolls on its own; the wall keeps the
     wheel everywhere else */
  .sidebar {
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .layout[data-loop] { height: 100vh; min-height: 700px; overflow: hidden; }
  .gallery { height: 100%; }
  .loop-col { height: 100%; overflow: hidden; }
  .loop-set--copy { display: flex; }
  .footer { display: none; }
  /* the lists card runs to the bottom of the window, with Pause motion and the credit at its foot */
  .sidebar > .card--lists { flex: 1 0 auto; }
  /* Both columns loop at exactly the same height, so the three phone tiles keep their
     zigzag however far the wall scrolls (Laura, 2026-11-18: no phones side by side). Every
     tile scales with the column except the tear-off calendar (a fixed 623px), so the
     fortune teller's height takes up the difference: 623px less 17.72% of the column (the
     column split of 2026-11-19, with the four strongest tiles on the first screen, and the
     tall Magical Ferry playthrough in the first column). */
  .loop-col { container-type: inline-size; }
  .tile[data-project="fortune-teller"] { height: calc(623px - 17.72cqw); }
  /* the Play arrangement (layouts.js) has its own column split: 623px less 11.26% there */
  .tile[data-in="play"][data-project="fortune-teller"] { height: calc(623px - 11.26cqw); }
  /* The book shelf (a 4:3 tile) sits in the other column from Doodle Playground in both the
     All and Play arrangements, so Doodle Playground, a live app that fits any box, grows by
     the shelf's height and one gap to keep the columns level (2026-11-19; the fortune
     teller's height stays as it was) */
  .tile[data-project="doodle-playground"]:is([data-in="all"], [data-in="play"]) { height: calc(150cqw + var(--gap)); }
  /* Magical Ferry framed (the game at 70% of the tile with 40px above and below) is
     36.51% of the column less 80px shorter than its full 1520:1850 playthrough, so a
     flexible tile in its column grows by that much: Pixel Friend Forest in All, Doodle
     Playground in Play (2026-11-19) */
  .tile[data-in="all"][data-project="friend-forest"] { height: calc(75cqw + 36.51cqw - 80px); }
  .tile[data-in="play"][data-project="doodle-playground"] { height: calc(150cqw + 36.51cqw - 80px + var(--gap)); }
}

/* tablet: cards in two columns above a two-column wall */
@media (max-width: 1199.98px) {
  .layout { flex-direction: column; align-items: stretch; }
  .sidebar { width: auto; display: grid; grid-template-columns: 1fr 1fr; padding-bottom: 0; }
  .card--name { grid-column: 1; grid-row: 1; }
  .card--bio { grid-column: 2; grid-row: 1; }
  .card--tod { grid-column: 1; grid-row: 2; }
  .card--lists { grid-column: 2; grid-row: 2; }
  .loop-track { padding-top: 0; }
}

/* phones: one column; tiles interleave from both columns by --o */
@media (max-width: 809.98px) {
  .sidebar { display: flex; }
  .gallery, .loop-col, .loop-track, .loop-set { display: contents; }
  .loop-set--copy { display: none; }
  .tile { order: var(--o, 0); }
  .card--name { height: 132px; }
}

/* ---------- cards ---------- */

.card { background: var(--card); border-radius: var(--r); }

.card--name {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 178px; flex: none;
}
.card--name h1 { display: inline-flex; align-items: center; gap: 10px; font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.name-peace { width: 40px; height: 40px; } /* the yellow peace sign from lauragao.com */

/* the shared toggle from /js/media.js, a small pill at the foot of the lists card */
.w-motion {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px 0 10px; border: 0; border-radius: 999px;
  background: #fff; color: var(--ink);
  font: 500 13px/1 var(--sans); letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.w-motion::before { content: ''; position: absolute; inset: -7px -2px; } /* 44px target */
.w-motion[data-paused="true"] { background: var(--lilac); color: var(--ink); }
.w-motion__icon { width: 14px; height: 14px; flex: none; }
.w-motion__play { display: none; fill: currentColor; }
.w-motion[data-paused="true"] .w-motion__pause { display: none; }
.w-motion[data-paused="true"] .w-motion__play { display: inline; }

.card--bio {
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  padding: 20px 20px 24px; flex: none;
}
.card--bio p { font-size: 14px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.card--bio p + p { margin-top: -10px; }
/* links in the bio, as on lorenzocabra.xyz (Laura, 2026-11-19): grey against the black text,
   no underline until hover or keyboard focus. #6f6c66 is 4.8:1 on the card and 3.7:1 against
   the text, so colour alone tells them apart (WCAG asks 3:1), with the underline on hover */
.card--bio p a {
  color: var(--muted); text-decoration: none;
  text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  transition: color .2s var(--ease);
}
.card--bio p a:hover, .card--bio p a:focus-visible { color: var(--ink); text-decoration: underline; }
.bio-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--gap); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: #fff;
  font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.pill:hover { transform: translateY(-1px); }
.pill svg { width: 12px; height: 12px; }
.pill--accent { background: var(--lilac); }

/* Let's chat (chat-fan.js): three round buttons fan out above the pill, dealt one after
   another (Bencho's Radial). chat-fan.js sets each one's --x and --y so all three sit the
   same 10px from the pill's edge. */
.chat { position: relative; }
.chat__core { border: 0; cursor: pointer; font-family: inherit; color: var(--ink); }
.chat__fan { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; }
.chat__opt {
  position: absolute; left: -18px; top: -18px;
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 8px 20px -8px rgb(0 0 0 / .3);
  opacity: 0; pointer-events: none; visibility: hidden;
  transform: translate(0, 0) scale(.4);
  transition:
    transform 420ms cubic-bezier(0.24, 1.34, 0.38, 1),
    opacity 220ms ease, visibility 0s linear 420ms;
}
.chat__opt svg { width: 17px; height: 17px; }
.chat[data-open] .chat__opt {
  opacity: 1; pointer-events: auto; visibility: visible;
  transform: translate(var(--x), var(--y));
  transition-delay: calc(var(--i) * 28ms), calc(var(--i) * 28ms), 0s;
}
.chat__opt:hover { transform: translate(var(--x), var(--y)) scale(1.08); }
.chat__opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* the button's name, under it on hover, as on the fan it comes from */
.chat__label {
  position: absolute; bottom: calc(100% + 5px);
  padding: 4px 7px; border-radius: 999px; background: var(--ink); color: #fff;
  font: 600 11px/1 var(--sans); font-style: normal; letter-spacing: 0;
  white-space: nowrap; opacity: 0; transition: opacity .16s ease; pointer-events: none;
}
.chat__opt:hover .chat__label, .chat__opt:focus-visible .chat__label { opacity: 1; }
/* the outer buttons sit near the card's edges, so their names grow inward, not past the card */
.chat__opt:first-child .chat__label { left: 0; }
.chat__opt:last-child .chat__label { right: 0; }
/* while open, the space over the arc still counts as the pill, so crossing to a button keeps it open */
.chat[data-open]::before { content: ''; position: absolute; left: -48px; right: -48px; bottom: 50%; height: 96px; }
@media (prefers-reduced-motion: reduce) {
  .chat__opt { transition-duration: 0s; }
  .chat[data-open] .chat__opt { transition-delay: 0s; }
}

/* All / Work / Play (work/js/filter.js): three words on a white pill; a dark
   thumb slides under the one that is on */
.seg {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center;
  height: 30px; padding: 2px; border-radius: 999px;
  background: #fff;
}
.seg__thumb {
  position: absolute; z-index: -1; top: 2px; left: 0; bottom: 2px;
  border-radius: 999px; background: var(--lilac); /* the site's lavender (2026-11-19) */
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), width .42s cubic-bezier(.22, 1, .36, 1);
}
.seg button {
  position: relative;
  height: 26px; padding: 0 11px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font: 500 13px/1 var(--sans); letter-spacing: -0.01em;
  cursor: pointer;
  transition: color .3s var(--ease);
}
.seg button::before { content: ''; position: absolute; inset: -9px -1px; } /* 44px target */
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.card--lists {
  display: flex; flex-direction: column; gap: 28px;
  padding: 20px 20px 16px;
  flex: none;
}
.lists { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) minmax(0, .85fr); align-items: start; gap: 18px; }
.side-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
/* the same as the bio's links (2026-11-19): dark text, the link grey, underlined on hover */
.credit { font-size: 12px; font-weight: 500; letter-spacing: -0.005em; color: var(--ink); }
.credit a { color: var(--muted); text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .2s var(--ease); }
.credit a:hover, .credit a:focus-visible { color: var(--ink); text-decoration: underline; }

/* Laura's day in pictures (time-of-day.js): one illustration, arrows either side */
.card--tod { position: relative; overflow: hidden; aspect-ratio: 2 / 1; flex: none; }
.tod__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s var(--ease); }
.tod__img.is-entering { opacity: 0; }

/* the time in San Francisco, small in the top left corner */
.tod__clock {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  height: 22px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center;
  background: rgb(255 255 255 / .82); color: var(--ink);
  font-size: 11px; font-weight: 600; letter-spacing: -0.005em; font-variant-numeric: tabular-nums;
}
/* what she's up to: a white pill, like the name pills on the tiles, on hover or focus, at the
   spot each picture sets (time-of-day.js): centred there, or (the bike) sitting up and to
   the left of it, so it rests above the bridge's right end */
.tod__pill {
  --tx: -50%; --ty: -50%;
  position: absolute; left: var(--px, 50%); top: var(--py, 50%); z-index: 2;
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 6px 16px -6px rgb(0 0 0 / .18);
  opacity: 0; transform: translate(var(--tx), calc(var(--ty) + 6px));
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none;
}
.tod__pill[data-corner] { --tx: -100%; --ty: -100%; }
.tod__icon { display: inline-flex; margin-right: 8px; line-height: 1; }
.tod__icon svg { width: 20px; height: 20px; display: block; }
.card--tod:hover .tod__pill { opacity: 1; transform: translate(var(--tx), var(--ty)); }
@media (hover: none) { .tod__pill { opacity: 1; transform: translate(var(--tx), var(--ty)); } }
.list { display: flex; flex-direction: column; gap: 8px; }
.list li { font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.list .list-title { color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.list li:not(.list-title) { color: var(--muted); }
.list a { transition: color .2s var(--ease); }
.list a:hover { color: var(--ink); }

/* ---------- tiles ---------- */

/* the filter hides the other kind, in the copies too */
/* each filter has its own arrangement (layouts.js); only the current one shows */
[data-filter="all"] .tile[data-in]:not([data-in="all"]),
[data-filter="work"] .tile[data-in]:not([data-in="work"]),
[data-filter="play"] .tile[data-in]:not([data-in="play"]) { display: none; }
/* a column that already fits on the screen stays put: no loop, so nothing repeats (loop.js) */
.loop-col.is-still .loop-set--copy { display: none; }

.tile {
  position: relative; display: block; flex: none;
  border-radius: var(--r); overflow: hidden;
  background: var(--card);
  isolation: isolate;
}
/* a faint edge, so white app screens do not melt into the white page */
.tile::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .07);
  pointer-events: none;
}
.w-media { position: relative; width: 100%; overflow: hidden; background: var(--card); }
.w-media video, .w-media img { width: 100%; height: 100%; object-fit: cover; }
.w-media[data-state="placeholder"]::after {
  content: attr(data-label);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px;
  color: var(--muted); font-size: 12px; text-align: center;
}

/* phone clips sit on the project's colour, cropped by the tile's bottom edge */
/* the phone tiles stand on the site's lavender accent (Laura, 2026-11-19), except the two
   language apps, which take a colour from their own screens that sits well beside it:
   30 Day Chinese the apricot of its Shanghai print, Yaoguai High the vermilion of its seals */
[data-project="koddi-mobile"], [data-project="sales-pipeline"] { --a: var(--lilac); --b: var(--lilac-2); }
[data-project="30-day-chinese"] { --a: #f4d7b0; --b: #e9b08a; }
[data-project="yaoguai-high"] { --a: #b8432f; --b: #e08a62; }
.tile--phone {
  aspect-ratio: 508 / 560;
  background: linear-gradient(130deg, var(--a) 0%, var(--a) 35%, var(--b) 100%);
  display: flex; justify-content: center; padding-top: 44px;
}
.phone {
  width: 46%; height: max-content;
  padding: 7px; border-radius: 34px;
  background: #15131c;
  box-shadow: 0 24px 60px -24px rgb(10 8 30 / .28); /* softer (2026-11-19) */
  transition: transform .5s var(--ease);
}
.phone .w-media { border-radius: 27px; background: #fff; }
.tile--phone:hover .phone { transform: translateY(-6px); }

/* Magical Ferry, framed like the phone mocks (Laura, 2026-11-19): the game smaller, in its
   own rounded frame, on the game's dark green, with the same space below it as above */
.tile--framed {
  background: radial-gradient(120% 90% at 50% 0%, #3f6a38 0%, #2c4a27 100%);
  display: flex; justify-content: center; padding: 40px 0;
}
.tile--framed .w-media {
  width: 70%; height: max-content; flex: none;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -22px rgb(8 20 6 / .45);
  transition: transform .5s var(--ease);
}
.tile--framed:hover .w-media { transform: translateY(-6px); }

.tile--sealed {
  aspect-ratio: 508 / 400;
  background: linear-gradient(130deg, var(--a), var(--b));
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center;
}
.tile--sealed svg { width: 44px; height: 44px; opacity: .9; }
.tile--sealed strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.tile--sealed span { font-size: 14px; font-weight: 500; opacity: .7; }

/* side projects without a clip yet: a block of the project's colour with its
   name; the bracketed line says which clip goes here */
[data-project="mapful"], [data-project="magical-ferry"], [data-project="pipfest"], [data-project="friend-forest"] { --bg: var(--lilac); --fg: var(--ink); }
[data-project="bakery-map"] { --bg: #dfe4ff; --fg: #1f2a6b; }
[data-project="doodle-playground"] { --bg: var(--lilac); --fg: var(--ink); }
[data-project="fortune-teller"] { --bg: #fbfcfc; --fg: #2b2552; } /* the card page's own paper white, so nothing shows before the fold */
.tile--soon {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  padding: 24px;
  background: var(--bg); color: var(--fg);
}
.soon__kicker { position: absolute; top: 20px; left: 24px; font-size: 13px; font-weight: 500; opacity: .7; }
.soon__name { font-size: clamp(32px, 3.4vw, 48px); font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.soon__line { max-width: 30ch; font-size: 15px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; opacity: .85; }
.soon__todo {
  align-self: flex-start; margin-top: 4px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px dashed currentColor; opacity: .7;
  font-size: 12px; font-weight: 500;
}
.tile--soon .soon__name { transition: transform .4s var(--ease); }
.tile--soon:hover .soon__name { transform: translateY(-4px); }

/* the label that names the project; shows on hover and focus */
.tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 6px 16px -6px rgb(0 0 0 / .18);
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.tag span { color: var(--muted); font-weight: 500; }
.tag svg { width: 11px; height: 11px; }
.tile:hover .tag, .tile:focus-visible .tag { opacity: 1; transform: none; }
/* the smallest phones: the longer names fit on one line, with the arrow alone saying it opens */
@media (max-width: 359.98px) {
  .tag { font-size: 12px; padding: 0 10px; gap: 6px; }
  .tag > span { display: none; }
}
.tile:focus-visible { outline-offset: -3px; outline-color: #fff; box-shadow: 0 0 0 3px var(--ink); }
@media (hover: none) { .tag { opacity: 1; transform: none; } }

/* ---------- footer (below the wall; hidden on wide screens) ---------- */

.footer { padding: var(--gap); }
.footer-card { background: var(--card); border-radius: var(--r); display: flex; flex-direction: column; }
.footer-top, .footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 15px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
}
.footer-top { color: var(--muted); }
.footer-middle { display: flex; align-items: center; justify-content: center; min-height: 240px; padding: 20px 15px; }
.footer-name { font-size: clamp(64px, 14vw, 120px); font-weight: 600; line-height: .9; letter-spacing: -0.045em; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-by { color: var(--muted); }
@media (max-width: 559.98px) {
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* a clip the phone would not start by itself (iPhone Low Power Mode; media.js): a tap plays it */
.w-tap-play {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%);
  width: 56px; height: 56px; padding: 0 0 0 3px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgb(255 255 255 / .92); color: #16140f;
  box-shadow: 0 2px 6px rgb(0 0 0 / .12), 0 12px 28px -10px rgb(0 0 0 / .35);
}
.w-tap-play:focus-visible { outline: 2px solid #16140f; outline-offset: 3px; }
