/* Geoffrey Moffett: one small stylesheet. Modern and a bit cheeky: sticker cards on hard shadows, a highlighter
   swipe, a speech bubble on his photo, his photo faintly behind, and a full-screen phone menu of big tilted links. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); }

:root {
  --paper: #faf7f0;
  --card: #fffdfb;
  --ink: #14110f;
  --muted: #625f5b;
  --line: #dad7d0;
  --brand: #5b3df5;
  --link: #5b3df5;
  --brand-soft: #eae4f1;
  --hi: #ffe45c;
  --r: 18px;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --col: 820px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.65 var(--body); overflow-wrap: break-word; }
/* A faint dotted grid, like a notebook */
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(color-mix(in srgb, var(--ink) 13%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(#000, transparent 70%); mask-image: linear-gradient(#000, transparent 70%); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 7.4vw, 68px); font-weight: 700; }
p { margin: 0; }
::selection { background: var(--hi); color: var(--ink); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }

/* His photo, very faint, behind everything */
.watermark { position: fixed; right: 0; bottom: 0; width: min(46vw, 580px); z-index: 0; pointer-events: none; opacity: .15; -webkit-mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, #000 30%, transparent 70%); mask-image: radial-gradient(ellipse 100% 100% at 100% 100%, #000 30%, transparent 70%); }
.watermark img { width: 100%; }

.site-header, main, .site-footer { position: relative; z-index: 1; width: min(var(--col), 100% - 40px); margin-inline: auto; }

/* Top: photo with a speech bubble, name, links as pills */
.site-header { display: flex; align-items: center; gap: 20px; padding: 46px 0 0; }
.avatar { position: relative; flex: none; display: block; rotate: -5deg; transition: rotate .25s cubic-bezier(.3, 1.6, .5, 1); }
.avatar:hover { rotate: 4deg; }
.avatar img { width: 76px; height: 76px; border-radius: 26px; object-fit: cover; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.hello { position: absolute; left: 50px; top: -26px; padding: 2px 10px; background: var(--hi); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px 14px 14px 3px; font: 700 13px/1.5 var(--display); white-space: nowrap; rotate: 9deg; }
.site-title { font: 700 26px/1.1 var(--display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 5px 13px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--card); transition: translate .15s, box-shadow .15s, border-color .15s; }
.site-nav a:hover { border-color: var(--ink); translate: -2px -2px; box-shadow: 3px 3px 0 var(--ink); }
.site-nav a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

main { padding: 56px 0 20px; min-height: 50vh; }
.intro { margin-bottom: 44px; }
.intro p { margin-top: 20px; font-size: 21px; line-height: 1.5; color: var(--muted); max-width: 56ch; }
/* The highlighter swipe under the homepage headline */
.swipe { background: linear-gradient(transparent 62%, var(--hi) 62%, var(--hi) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .08em; margin: 0 -.08em; }

.label { display: flex; align-items: center; gap: 12px; font: 700 13px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 40px 0 18px; }
.label::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); opacity: .35; }
.latest > .label:first-child, .archive > .label:first-child { margin-top: 0; }

/* Posts as sticker cards: outlined, on a hard shadow, with a nudge when pointed at */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 5px 5px 0 var(--ink); color: var(--ink); text-decoration: none; transition: translate .18s cubic-bezier(.3, 1.5, .5, 1), rotate .18s, box-shadow .18s; }
.card:hover, .card:focus-visible { translate: -4px -4px; box-shadow: 9px 9px 0 var(--brand); rotate: -.6deg; }
.card:nth-child(even):hover, .card:nth-child(even):focus-visible { rotate: .6deg; }
.card time { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: var(--brand-soft); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.card h3, .card h2 { font-size: 22px; font-weight: 650; line-height: 1.18; letter-spacing: -0.02em; padding-right: 8px; }
.card p { font-size: 15.5px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.go { margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; font-size: 17px; line-height: 1; transition: background .18s, rotate .18s, color .18s; }
.card:hover .go { background: var(--ink); color: var(--paper); rotate: -45deg; }
/* The newest post is the big one, with a sticker */
.card-first { grid-column: 1 / -1; padding: 30px 30px 28px; background: var(--hi); }
.card-first time { background: var(--card); }
.card-first h3 { font-size: clamp(27px, 4.6vw, 40px); font-weight: 700; line-height: 1.05; max-width: 20ch; }
.card-first p { font-size: 17px; color: var(--ink); max-width: 56ch; }
.sticker { position: absolute; top: -16px; right: 22px; padding: 6px 14px; background: var(--brand); color: #fff; border: 2px solid var(--ink); border-radius: 99px; font: 700 14px/1.2 var(--display); rotate: 6deg; }
.more { margin-top: 34px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 99px; background: var(--brand); color: #fff; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font: 650 16px/1.2 var(--body); text-decoration: none; cursor: pointer; transition: translate .15s, box-shadow .15s; }
.btn:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--ink); }
.btn:active { translate: 3px 3px; box-shadow: 1px 1px 0 var(--ink); }
.btn-line { background: var(--card); color: var(--ink); }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 44px; }
.pager > :last-child { justify-self: end; }
.pager > :first-child { justify-self: start; }
.pager-at { font-size: 14px; font-weight: 600; color: var(--muted); }
.empty { color: var(--muted); }

/* A post, and the About and Contact pages */
.post header { margin-bottom: 34px; }
.post header h1 { font-size: clamp(34px, 6.2vw, 56px); }
.post header time { display: inline-block; margin-top: 18px; padding: 4px 12px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--hi); font-size: 14px; font-weight: 600; rotate: -1.5deg; }
.draft { display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 6px; background: var(--brand-soft); font-size: 14px; }
.cover { margin: 0 0 30px; }
.cover img, .figure img, .prose img { border-radius: var(--r); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.prose { font-size: 19px; max-width: 68ch; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 30px; font-weight: 700; margin-top: 1.9em; line-height: 1.12; }
.prose h3 { font-size: 23px; font-weight: 650; margin-top: 1.6em; }
.prose a:hover { background: var(--hi); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul li::marker { color: var(--brand); }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin-inline: 0; padding: 14px 20px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); box-shadow: 4px 4px 0 var(--hi); }
.prose hr { border: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); opacity: .35; margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose pre { overflow-x: auto; padding: 14px; background: var(--ink); color: var(--paper); border-radius: 12px; font-size: 15px; }
.figure { margin: 32px 0; }
.figure figcaption { margin-top: 14px; font-size: 14.5px; color: var(--muted); text-align: center; }
.blk { margin-top: 30px; }
.blk h2 { font-size: 30px; font-weight: 700; margin-bottom: .6em; }

.quick { margin: 0 0 30px; padding: 22px 24px; background: var(--brand-soft); border: 2px solid var(--ink); border-radius: var(--r); }
.quick .label { margin: 0 0 10px; }
.quick h2 { font-size: 22px; font-weight: 650; margin-bottom: 8px; }
.faqs { margin-top: 44px; }
.faqs h2 { font-size: 28px; font-weight: 700; margin-bottom: 14px; }
.faqs details { border-top: 2px solid var(--ink); padding: 14px 0; }
.faqs summary { cursor: pointer; font-weight: 600; }
.faqs details p { margin-top: 10px; color: var(--muted); }

.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 46px; font-size: 15px; font-weight: 500; }
.meta a { padding: 7px 15px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--card); color: var(--ink); text-decoration: none; transition: translate .15s, box-shadow .15s; }
.meta a:hover { translate: -2px -2px; box-shadow: 3px 3px 0 var(--brand); }
p.meta { margin-top: 34px; }
p.meta.foot-links { margin-top: 18px; }
.post + .latest { margin-top: 60px; }

.form-card { margin-top: 40px; padding: 26px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 var(--hi); }
.form-card h2 { font-size: 26px; font-weight: 700; }

.site-footer { margin-top: 70px; padding: 28px 0 44px; border-top: 2px solid var(--ink); color: var(--muted); }
.foot-blurb { font-size: 16px; }
.legal { margin-top: 16px; font-size: 14px; }

/* The phone menu: a floating pill with his face on it, then the whole screen in ink with big tilted links */
.mnav { display: none; }
.mnav summary { list-style: none; }
.mnav summary::-webkit-details-marker { display: none; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header { padding-top: 40px; gap: 16px; z-index: 20; }
  .site-nav { display: none; }
  .avatar img { width: 64px; height: 64px; border-radius: 22px; }
  .hello { left: 42px; top: -24px; }
  .site-title { font-size: 22px; }
  main { padding-top: 42px; }
  .watermark { width: 80vw; opacity: .11; }
  .card-first { padding: 26px 22px 22px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-at { grid-column: 1 / -1; grid-row: 2; text-align: center; }

  .mnav { display: block; margin-left: auto; align-self: flex-start; }
  .mnav summary { position: relative; z-index: 22; display: flex; align-items: center; gap: 9px; padding: 9px 15px 9px 13px; background: var(--hi); color: var(--ink); border: 2px solid var(--ink); border-radius: 99px; box-shadow: 4px 4px 0 var(--ink); font: 700 16px/1 var(--display); cursor: pointer; rotate: 5deg; transition: rotate .25s cubic-bezier(.3, 1.6, .5, 1), translate .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
  .mnav summary:active { translate: 3px 3px; box-shadow: 1px 1px 0 var(--ink); }
  /* Two dots and a smile: a little face that turns into a cross */
  .mnav-dots { position: relative; width: 18px; height: 18px; }
  .mnav-dots::before { content: ''; position: absolute; left: 2px; top: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); box-shadow: 9px 0 0 var(--ink); }
  .mnav-dots::after { content: ''; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 8px; border: 2.5px solid var(--ink); border-top: 0; border-radius: 0 0 12px 12px; }
  .mnav-close { display: none; }
  .mnav[open] summary { position: fixed; top: 22px; right: 20px; rotate: -4deg; background: var(--paper); box-shadow: 4px 4px 0 var(--brand); }
  .mnav[open] .mnav-dots::before { left: 0; top: 8px; width: 18px; height: 2.5px; border-radius: 2px; box-shadow: none; rotate: -45deg; }
  .mnav[open] .mnav-dots::after { left: 0; right: 0; bottom: 7.5px; height: 0; border: 0; border-top: 2.5px solid var(--ink); border-radius: 2px; rotate: 45deg; }
  .mnav[open] .mnav-open { display: none; }
  .mnav[open] .mnav-close { display: inline; }
  .mnav-panel { position: fixed; inset: 0; z-index: 21; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 90px 26px 60px; background: var(--ink); counter-reset: n; overflow-y: auto; animation: mnav-in .35s cubic-bezier(.2, .9, .3, 1); }
  .mnav-panel::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(color-mix(in srgb, var(--paper) 22%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; }
  .mnav-panel a { position: relative; align-self: flex-start; counter-increment: n; display: flex; align-items: baseline; gap: 14px; padding: 8px 0; color: var(--paper); text-decoration: none; font: 700 clamp(34px, 11vw, 52px)/1.02 var(--display); letter-spacing: -0.035em; rotate: -2deg; transform-origin: left center; animation: mnav-link .45s cubic-bezier(.3, 1.4, .5, 1) backwards; }
  .mnav-panel a::before { content: '0' counter(n); font: 600 13px/1 var(--body); letter-spacing: .08em; color: var(--hi); }
  .mnav-panel a:nth-of-type(even) { rotate: 1.5deg; margin-left: 18px; }
  .mnav-panel a:nth-of-type(2) { animation-delay: .06s; }
  .mnav-panel a:nth-of-type(3) { animation-delay: .12s; }
  .mnav-panel a:nth-of-type(4) { animation-delay: .18s; }
  .mnav-panel a:nth-of-type(n+5) { animation-delay: .24s; }
  .mnav-panel a[aria-current] { color: var(--ink); }
  .mnav-panel a[aria-current] > span, .mnav-panel a[aria-current] { text-decoration: none; }
  .mnav-panel a[aria-current]::after { content: ''; position: absolute; z-index: -1; left: 22px; right: -14px; top: 6px; bottom: 4px; background: var(--hi); border-radius: 10px; }
  .mnav-face { position: absolute; right: 22px; bottom: 34px; width: 96px; height: 96px; border-radius: 30px; border: 2px solid var(--paper); box-shadow: 5px 5px 0 var(--hi); object-fit: cover; rotate: 8deg; animation: mnav-link .5s .2s cubic-bezier(.3, 1.4, .5, 1) backwards; }
  .mnav-note { position: relative; max-width: 60%; margin-top: 30px; color: color-mix(in srgb, var(--paper) 62%, transparent); font-size: 15px; rotate: -2deg; }
  body:has(.mnav[open]) { overflow: hidden; }
}
/* Moving parts: the highlighter draws itself, the bubble pops, the sticker wiggles, cards rise as you scroll */
.swipe { background-size: 0% 100%; background-repeat: no-repeat; animation: swipe .7s .25s cubic-bezier(.3, .8, .3, 1) forwards; }
@keyframes swipe { to { background-size: 100% 100%; } }
.hello { animation: pop .5s .5s cubic-bezier(.3, 1.8, .5, 1) backwards; transform-origin: 0 100%; }
.avatar:hover .hello { animation: wave .6s ease-in-out; }
@keyframes pop { from { scale: 0; } }
@keyframes wave { 30% { rotate: -6deg; } 60% { rotate: 16deg; } }
.sticker { animation: wiggle 5s 2s ease-in-out infinite; }
@keyframes wiggle { 0%, 88%, 100% { rotate: 6deg; } 91% { rotate: -5deg; } 94% { rotate: 10deg; } 97% { rotate: 2deg; } }
.more { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.count { color: var(--muted); font-size: 15px; }
.count b { color: var(--ink); font: 700 20px/1 var(--display); background: linear-gradient(transparent 60%, var(--hi) 60%); padding: 0 3px; }
/* The dice on "Surprise me": four pips that tumble when pressed */
.dice { width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 5px; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 0 / 50% 50%; transition: rotate .4s cubic-bezier(.3, 1.6, .5, 1); }
.surprise:hover .dice { rotate: 90deg; }
.surprise.spin .dice { rotate: 720deg; transition-duration: .45s; }
@supports (animation-timeline: view()) {
  .cards .card { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  @keyframes rise { from { opacity: 0; translate: 0 28px; rotate: 1.5deg; } }
}
@keyframes mnav-in { from { clip-path: circle(0 at calc(100% - 60px) 44px); } to { clip-path: circle(150% at calc(100% - 60px) 44px); } }
@keyframes mnav-link { from { opacity: 0; translate: -24px 14px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .swipe { background-size: 100% 100%; }
  .card:hover, .card:focus-visible { translate: none; rotate: none; }
}
@media print { .watermark, .site-nav, .mnav, .meta, .latest, body::before { display: none; } }
