:root {
  --bg: #fafafa;
  --ink: #111;
  --muted: #5a5a5a;
  --faint: #6b6b6b;
  --line: #e2e2e2;
  --gap: 22px;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--muted); }

.wrap { max-width: 1360px; margin: 0 auto; padding: 72px 32px 48px; }

/* Header */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.who { display: flex; flex-direction: column; gap: 14px; }
.name { margin: 0; font-size: 72px; line-height: .95; font-weight: 500; letter-spacing: -.04em; }
.intro { margin: 0; font-size: 18px; color: var(--muted); font-weight: 300; }

.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--faint); background: #fff; }
.search:focus-within { border-color: var(--ink); color: var(--ink); }
.search input { all: unset; width: 140px; font-family: var(--sans); font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.more-row { display: flex; justify-content: center; padding-top: 32px; }
.pill.more { border: 1px solid var(--line); background: #fff; padding: 0 28px; }
.pill.more:hover { border-color: var(--ink); background: #fff; }
.pill.more[hidden] { display: none; }
.empty { margin: 24px 0 0; font-size: 16px; color: var(--muted); }
.empty[hidden] { display: none; }
.pill { all: unset; cursor: pointer; flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; border-radius: 999px; font-family: var(--sans); font-size: 14px; color: var(--ink); transition: background .2s, color .2s; }
.pill .n { font-family: var(--mono); font-size: 12px; opacity: .6; }
.pill:hover { background: #ececec; }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Section titles: Now, On my mind lately, And the rest */
.section-title { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; color: var(--ink); }
.section-title[hidden] { display: none; }
main .section-title { margin-bottom: 20px; }

/* Now */
.now { padding-top: 48px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.now .section-title { flex: 0 0 100%; }
.now[hidden] { display: none; }
.now-media { flex: 0 1 540px; min-width: 0; }
.now-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 14px; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.now-more { margin: 14px 0 0; font-size: 17px; line-height: 1.5; color: var(--ink); white-space: pre-line; }
.note { white-space: pre-line; }
.now-title { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; }

/* Pinned row */
.pinned { padding-top: 56px; display: flex; flex-direction: column; gap: 20px; }
.pinned[hidden] { display: none; }
.pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }

/* Grid: a masonry built on CSS grid. Each card's row span is measured in site.js. */
main { padding-top: 56px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(326px, 1fr)); grid-auto-rows: 4px; column-gap: var(--gap); grid-auto-flow: dense; align-items: start; }
.card { min-width: 0; animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.card[hidden] { display: none; }
.card.big { grid-column: span 2; }
.card.full { grid-column: 1 / -1; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.meta { display: flex; flex-direction: column; gap: 6px; padding: 10px 2px 0; }
.meta .note { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Instagram embeds: let them fill their column and drop Instagram's own outer margin */
.card .instagram-media, .now .instagram-media { margin: 0 !important; min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
.card iframe.instagram-media, .now iframe.instagram-media { border-radius: 6px !important; }
.card.big .instagram-media { max-width: 100% !important; }

/* Trimmed embed: shows only the photo or video frame from an Instagram embed.
   Instagram's header (54px) sits above the frame and its footer below; both are clipped. */
.mask { position: relative; overflow: hidden; border-radius: 6px; background: #e9e9e9; aspect-ratio: var(--r, 1); }
.mask blockquote.instagram-media { visibility: hidden; }
.mask iframe.instagram-media { position: absolute !important; top: -55px !important; left: -1px !important; width: calc(100% + 2px) !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; pointer-events: none; }
.mask.reel { aspect-ratio: var(--ra, 0.5625); background: #111; }
.mask.reel iframe.instagram-media { width: var(--iw, calc(100% + 2px)) !important; left: var(--il, -1px) !important; top: var(--it, -55px) !important; }
.mask .hit { all: unset; cursor: pointer; position: absolute; inset: 0; z-index: 2; transition: background .25s; }
.mask .hit:hover { background: rgba(0,0,0,.12); }
.mask .hit:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.credit { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 0; }
.credit .orig { font-size: 13px; line-height: 1.45; color: var(--faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Source box: who posted it, when, and the original caption */
.source a.label { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--muted); text-decoration: underline; text-decoration-color: #bdbdbd; text-underline-offset: 3px; }
.source a.label:hover { color: var(--ink); text-decoration-color: var(--ink); }
.source a.label .out { display: inline-flex; }
.source { display: flex; flex-direction: column; gap: 4px; background: #efefef; border-radius: 6px; padding: 10px 12px; }
/* Trimmed Threads embed: a white card with the post's words and pictures */
.tmask { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; height: var(--h, 360px); }
.tmask blockquote.text-post-media { visibility: hidden; margin: 0; }
.tmask iframe { position: absolute !important; top: -62px !important; left: -12px !important; width: calc(100% + 24px) !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; border: 0 !important; pointer-events: none; }
.tmask .hit { position: absolute; inset: 0; z-index: 2; transition: background .25s; }
.tmask .hit:hover { background: rgba(0,0,0,.04); }
.tmask .hit:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* Tiles for YouTube, Spotify, links and text posts */
.tile { position: relative; display: block; overflow: hidden; border-radius: 6px; background: #e9e9e9; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.03); }
.tile.wide { aspect-ratio: 16 / 9; }
.tile.square { aspect-ratio: 1; }
.tile.link { aspect-ratio: 1.91 / 1; }
.tile iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tile.player { aspect-ratio: auto; height: 352px; background: transparent; }
.tile.player.apple { height: 450px; border-radius: 10px; }
.tile.player.apple.song { height: 175px; }
.tile .hit { all: unset; cursor: pointer; position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 14px; box-sizing: border-box; }
.tile .hit:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.playbtn, .tile .go { width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; }
.tile .go { position: absolute; right: 14px; bottom: 14px; }
/* Word tiles: your own text posts (white) and quotes from others (black) share one layout */
.tile.text, .tile.quote { padding: 26px 24px 72px; text-decoration: none; transition: background .2s; }
.tile.text .words, .tile.quote .words { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 300; letter-spacing: -.015em; }
.card.big .tile.text .words, .card.big .tile.quote .words, .card.full .tile.text .words, .card.full .tile.quote .words { font-size: 32px; }
.tile.text { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.tile.text:hover { background: #f4f4f4; }
.tile.text .go { background: #efefef; }

.tile.quote { background: var(--ink); color: #fff; }
.tile.quote:hover { background: #262626; }
.tile.quote .mark { display: block; font-size: 64px; line-height: .6; height: 28px; font-weight: 300; color: #8a8a8a; }

/* Tags: click to see related pieces */
.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 2px; }
.tag { all: unset; cursor: pointer; font-size: 13px; font-style: italic; color: var(--faint); min-height: 24px; display: inline-flex; align-items: center; }
.tag:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tag:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
/* Your own site caption, outside the box */
.credit .note { font-size: 16px; line-height: 1.45; color: var(--ink); padding: 4px 2px 0; }
.now-media .mask { border-radius: 6px; }

/* Footer */
.foot { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.links { display: flex; gap: 24px; }
.links a { text-decoration: none; }

@media (max-width: 1040px) and (min-width: 721px) {
  .pins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone */
@media (max-width: 720px) {
  .wrap { padding: 36px 16px 32px; }
  .name { font-size: 52px; }
  .intro { font-size: 16px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; width: calc(100% + 32px); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .tools { width: 100%; justify-content: flex-start; }
  .search { width: 100%; }
  .search input { width: 100%; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .pins { grid-template-columns: minmax(0, 1fr); }
  .pinned { padding-top: 36px; }
  .card.big, .card.full { grid-column: auto; }
  .now-title { font-size: 23px; }
  .section-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
