@font-face { font-family: "Alfa Slab One"; src: url(/fonts/alfa-slab-one.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Reenie Beanie"; src: url(/fonts/reenie-beanie.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Special Elite"; src: url(/fonts/special-elite.woff2) format("woff2"); font-display: swap; }

:root {
  --cream: #fbf3e2;
  --dot: #ecdcbc;
  --ink: #2f3b4c;
  --muted: #7b7f89;
  --coral: #ff6b5b;
  --teal: #38b2a8;
  --mustard: #f6c344;
  --pink: #f59ab5;
  --card: #fffdf8;
  --edge: #e6dcc6;
  --sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  --hand: "Reenie Beanie", "Segoe Print", "Bradley Hand", cursive;
  --type: "Special Elite", "American Typewriter", "Courier New", monospace;
  --slab: "Alfa Slab One", Rockwell, "Rockwell Extra Bold", "Arial Black", Georgia, serif;
  --sky: #9fd4f0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  font: 17px/1.62 var(--sans);
  background-color: var(--cream);
  background-image:
    radial-gradient(var(--dot) 1.6px, transparent 1.7px),
    radial-gradient(var(--dot) 1.6px, transparent 1.7px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mustard); color: #222; }
a { color: var(--coral); text-decoration: none; border-bottom: 1px dashed currentColor; }
a:hover { color: var(--teal); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 18.5rem minmax(0, 40rem); gap: 3rem; justify-content: center; width: 100%; max-width: 70rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.sidebar { position: sticky; top: 2.2rem; align-self: start; text-align: center; }
.site-title { display: block; border: 0; font: 2.7rem/1.05 var(--slab); letter-spacing: .005em; color: var(--sky); text-shadow: 3px 3px 0 var(--ink); }
.site-title:hover { color: var(--mustard); }
.tagline { margin: .7rem 0 0; font: 1.05rem/1.3 var(--type); color: var(--ink); }
.bio { margin: 1rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.sidebar nav { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin: 1.4rem 0 1.2rem; }
.sidebar nav a { border: 2px solid var(--ink); border-radius: 999px; padding: .15rem .75rem; color: var(--ink); font: .9rem var(--type); background: #fff; box-shadow: 2px 2px 0 var(--ink); }
.sidebar nav a:hover { background: var(--mustard); transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--ink); }
.sidebar-foot { font: 1.25rem var(--hand); color: var(--muted); margin: 0; }

/* ---------- cards & paper ---------- */
.card, .paper {
  position: relative; background: var(--card); border: 1px solid var(--edge); border-radius: 4px;
  box-shadow: 0 1px 0 #fff inset, 0 3px 10px rgba(80,60,30,.18); margin: 0 0 3rem;
}
.paper { padding: 2.6rem 2.2rem 2.2rem; }
.card::before, .paper::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 7.5rem; height: 1.7rem; z-index: 2;
  transform: translateX(-50%) rotate(var(--tilt, -2deg)); opacity: .82;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 6px, transparent 6px 12px), var(--tape, var(--teal));
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.tape-0 { --tape: var(--teal); --tilt: -2deg; }
.tape-1 { --tape: var(--pink); --tilt: 2.5deg; }
.tape-2 { --tape: var(--mustard); --tilt: -1deg; }
.tape-3 { --tape: #9fd4f0; --tilt: 3deg; }

.flag { position: absolute; z-index: 3; top: .9rem; right: -.5rem; padding: .1rem .8rem; font: .8rem/1.5 var(--type); color: #fff; letter-spacing: .02em; background: var(--coral); box-shadow: 0 2px 3px rgba(0,0,0,.2); }
.flag::after { content: ""; position: absolute; right: 0; top: 100%; border: .25rem solid transparent; border-top-color: rgba(0,0,0,.3); border-right-color: rgba(0,0,0,.3); }
.flag-photo { background: var(--teal); } .flag-video { background: var(--coral); } .flag-text { background: #8e7cc3; }

.card-photo { display: block; border: 0; padding: 12px 12px 0; }
.card-photo img { display: block; width: 100%; height: auto; max-height: 36rem; object-fit: cover; border: 1px solid var(--edge); background: var(--edge); }
.card-body { padding: 1.3rem 1.8rem 1.6rem; }
.flag + .card-body { padding-top: 2.7rem; }
.card h2 { margin: 0 0 .25rem; font: 700 1.7rem/1.2 var(--sans); letter-spacing: -.01em; }
.card h2 a { color: var(--ink); border: 0; }
.card h2 a:hover { color: var(--coral); }
.meta { margin: 0 0 .9rem; font: .86rem var(--type); color: var(--muted); }
.excerpt { margin: 0 0 1rem; color: #4a5568; }
.more { font: 1.05rem var(--type); }
.end { text-align: center; font: 1.6rem var(--hand); color: var(--ink); margin: 0; }
.end a { border-bottom: 2px solid var(--coral); }

/* ---------- post ---------- */
.post-header h1, .page-title { margin: 0 0 .4rem; font: 700 clamp(1.9rem, 5vw, 2.5rem)/1.12 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.page-title { font-family: var(--slab); font-weight: 400; color: var(--sky); text-shadow: 3px 3px 0 var(--ink); letter-spacing: .005em; }
.post-header { margin-bottom: 1.6rem; padding-right: 3.5rem; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2, .prose h3 { margin: 2em 0 .5em; line-height: 1.25; }
.prose h2 { font-size: 1.5rem; } .prose h3 { font-size: 1.25rem; }
.prose blockquote { margin: 1.5em 0; padding: .2rem 0 .2rem 1.2rem; border-left: 4px solid var(--teal); color: #555; font-style: italic; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.25em; }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::before { content: "✦ ✦ ✦"; color: var(--coral); letter-spacing: .6em; }
.prose a { border-bottom-color: rgba(255,107,91,.5); }

/* polaroids */
.prose figure {
  margin: 2rem auto; padding: 12px 12px 14px; background: #fff; border: 1px solid #ece4d2; width: 100%;
  box-shadow: 0 2px 7px rgba(60,40,10,.28); transform: rotate(var(--r, -.6deg)); transition: transform .2s, box-shadow .2s;
}
.prose > figure:nth-of-type(3n+1) { --r: -.7deg; }
.prose > figure:nth-of-type(3n+2) { --r: .6deg; }
.prose > figure:nth-of-type(3n) { --r: -.15deg; }
.prose figure:hover { transform: rotate(0) scale(1.012); box-shadow: 0 6px 16px rgba(60,40,10,.3); }
.prose figure img { display: block; width: 100%; height: auto; cursor: zoom-in; background: var(--edge); }
.prose figcaption { margin: 0; padding: .7rem .3rem .1rem; font: 1.45rem/1.15 var(--hand); color: #4a4a4a; text-align: center; }
.prose figcaption a { border-bottom: 1px solid var(--coral); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.gallery figure { margin: 0; padding: 6px 6px 8px; transform: rotate(var(--r, 0)); }
.gallery figure:nth-child(4n+1) { --r: -1.4deg; } .gallery figure:nth-child(4n+2) { --r: 1deg; }
.gallery figure:nth-child(4n+3) { --r: -.4deg; } .gallery figure:nth-child(4n) { --r: 1.6deg; }
.gallery figure img { aspect-ratio: 1 / 1; object-fit: cover; }
.gallery figure:hover { z-index: 2; transform: rotate(0) scale(1.07); }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 2rem 0; padding: 0; background: #000; border: 8px solid #fff; box-shadow: 0 2px 7px rgba(60,40,10,.28); transform: rotate(.4deg); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed.ig { aspect-ratio: auto; height: 640px; width: min(100%, 24rem); margin-inline: auto; background: #fff; transform: none; }
.prose video { display: block; width: 100%; margin: 2rem 0; border: 8px solid #fff; box-shadow: 0 2px 7px rgba(60,40,10,.28); background: #000; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: -.5rem 0 0; }
.post-nav a { display: block; padding: .9rem 1.1rem; border: 2px solid var(--ink); border-radius: 6px; background: #fff; box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font: 700 .98rem/1.3 var(--sans); }
.post-nav a:hover { background: var(--mustard); transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.post-nav span { display: block; font: .85rem var(--type); color: var(--coral); margin-bottom: .2rem; }
.post-nav .next { text-align: right; }

/* ---------- archive ---------- */
.month { margin: 2rem 0 .8rem; font: 1.5rem var(--hand); border-bottom: 2px dashed var(--edge); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 0; background: var(--edge) center / cover; box-shadow: 0 1px 4px rgba(60,40,10,.3); }
.tile span { position: absolute; inset: auto 0 0 0; padding: 1.4rem .6rem .5rem; font: .8rem/1.25 var(--sans); font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); opacity: 0; transition: opacity .2s; }
.tile:hover span, .tile:focus span { opacity: 1; }
.tile:hover { transform: scale(1.03); z-index: 2; }
.tile-text { display: grid; place-items: center; padding: .6rem; text-align: center; color: #fff; }
.tile-text span { position: static; opacity: 1; background: none; padding: 0; font-size: .9rem; }
.tile-text.c0 { background: var(--teal); } .tile-text.c1 { background: var(--coral); } .tile-text.c2 { background: #8e7cc3; } .tile-text.c3 { background: #e9a23b; }

.lightbox { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 1.5rem; background: rgba(20,18,15,.88); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border: 10px solid #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* ---------- small screens ---------- */
@media (max-width: 62rem) {
  .layout { grid-template-columns: minmax(0, 40rem); gap: 1.5rem; padding-top: 1.5rem; }
  .sidebar { position: static; text-align: left; padding-bottom: .5rem; }
  .site-title { font-size: 2.1rem; }
  .tagline { margin: .2rem 0 0; font-size: .9rem; }
  .bio, .sidebar-foot { display: none; }
  .sidebar nav { justify-content: flex-start; margin: 1rem 0 0; }
}
@media (max-width: 34rem) {
  body { font-size: 16.5px; }
  .layout { padding-inline: .9rem; }
  .paper { padding: 2.2rem 1.15rem 1.6rem; }
  .card-body { padding: 1.1rem 1.1rem 1.3rem; }
  .card h2 { font-size: 1.45rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .embed.ig { height: 560px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
