/* bethkoenig.com — shared styles */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/inter-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/caveat-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #141414;
  --ink-2: #3A3A3A;
  --muted: #5C5C5C;
  --line: #D9D6D0;
  --paper: #FFFFFF;
  --warm: #F4F1EA;
  --red: #E4002B;
  --pink: #FBDDE2;
  --blue: #41B6E6;
  --hover: #1C78A8;
  --tint: #E8F6FC;
  --tint-2: #E2F3FB;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --blob-a: 58% 42% 55% 45% / 45% 58% 42% 55%;
  --blob-b: 42% 58% 38% 62% / 55% 40% 60% 45%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--ink); transition: color .15s, background-color .15s, border-color .15s; }
a:hover { color: var(--hover); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 16px; color: #fff; }

/* Layout */
.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 20px; }
.wrap { max-width: 1120px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; padding: 28px 0 32px; flex-grow: 1; }
.wrap--loose { gap: 72px; }
main { display: flex; flex-direction: column; gap: inherit; flex-grow: 1; }

/* Header + nav */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; }
.wordmark { font-weight: 900; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; padding: 12px 0; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { text-decoration: none; padding: 12px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav a[aria-current="page"] { font-weight: 700; }
.menu-btn { display: none; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 14px var(--sans); cursor: pointer; }
@media (max-width: 760px) {
  .js .menu-btn { display: inline-flex; }
  .js .nav { display: none; }
  .nav { width: 100%; flex-direction: column; align-items: flex-start; gap: 0; border-top: 1.5px solid var(--ink); padding-top: 8px; }
  .js .nav.is-open { display: flex; }
  .nav .btn { margin: 6px 0; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; background: var(--ink); color: #fff; font: 700 15px var(--sans); text-decoration: none; border: 0; border-radius: 999px; cursor: pointer; }
.btn:hover { background: var(--hover); color: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--outline:hover { background: transparent; color: var(--hover); border-color: var(--hover); }
.link-strong { font-size: 15px; font-weight: 700; padding: 10px 0; align-self: flex-start; }

/* Type */
.hand { font-family: var(--hand); font-weight: 700; color: var(--red); line-height: 1.1; margin: 0; }
.aside { font-size: 32px; transform: rotate(-2deg); transform-origin: left center; }
.title { margin: 0; font-weight: 900; font-size: clamp(48px, 7.5vw, 96px); line-height: 0.9; letter-spacing: -0.05em; }
.lede { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 620px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.intro { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; border-top: 1.5px solid var(--ink); padding-top: 12px; font-size: 13px; color: var(--muted); margin-top: auto; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--ink-2); padding: 12px 0; }

/* Blobs */
.blob-photo { position: relative; width: 100%; max-width: 380px; aspect-ratio: 380 / 420; }
.blob-photo__back { position: absolute; inset: 6% -4% -4% 8%; border-radius: var(--blob-a); background: var(--blue); }
.blob-photo__img { position: absolute; inset: 0 4% 4% 0; border-radius: var(--blob-b); overflow: hidden; background: #ECEAE6; }
.blob-photo__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.blob-badge { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.blob-badge::before { content: ""; position: absolute; inset: 0; border-radius: var(--blob-a); background: var(--blue); }
.blob-badge > * { position: relative; margin: 0; }

/* Split hero (home, making, 404) */
.split { flex-grow: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.split__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split__art { flex: 0 1 360px; min-width: 240px; display: flex; justify-content: center; }

/* Home */
.home .split__text { gap: 20px; }
.home .split__art { flex-basis: 400px; }
.hello { transform: rotate(-3deg); transform-origin: left center; }
.hello .hand { font-size: 34px; line-height: 1.15; }
.hello .welcome { font-family: var(--hand); font-weight: 700; font-size: 26px; line-height: 1.15; color: var(--ink-2); margin: 0; }
.name { margin: 0; font-weight: 900; font-size: clamp(60px, 11vw, 148px); line-height: 0.84; letter-spacing: -0.05em; }
.tagline { margin: 4px 0 0; font-weight: 900; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -0.03em; }
.tagline .hand { display: inline-block; font-size: 1.3em; letter-spacing: 0; transform: rotate(-4deg); margin-left: 4px; line-height: 1; }
.bio { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Making / 404 */
.coming { font-family: var(--hand); font-weight: 700; font-size: 64px; line-height: 0.95; text-align: center; transform: rotate(-6deg); }
.big404 { font-weight: 900; font-size: 104px; line-height: 1; letter-spacing: -0.05em; transform: rotate(-6deg); }

/* Working */
.working-intro { display: flex; flex-direction: column; gap: 24px; max-width: 880px; }
.working-intro .title { font-size: clamp(40px, 6.4vw, 80px); line-height: 0.95; letter-spacing: -0.045em; }
.working-intro .lede { font-size: 19px; line-height: 1.65; max-width: 720px; }
.skills { display: flex; flex-direction: column; gap: 28px; }
.skills__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.skill { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--ink); padding-top: 16px; }
.skill .num { font-family: var(--hand); font-weight: 700; font-size: 28px; line-height: 1; color: var(--red); }
.skill h3 { margin: 0; font-weight: 900; font-size: 22px; letter-spacing: -0.02em; }
.skill p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.timeline__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.role { display: flex; flex-wrap: wrap; gap: 6px 32px; border-top: 1px solid var(--line); padding: 22px 0; margin: 0; }
.role:first-of-type { border-top: 1.5px solid var(--ink); }
.role:last-of-type { border-bottom: 1px solid var(--line); }
.role__when { margin: 0; flex: 0 0 140px; font-weight: 900; font-size: 15px; }
.role--now .role__when { color: var(--red); }
.role__body { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.role__body h3 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.role__body h3 span { font-weight: 500; color: var(--muted); }
.role__body p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.backstage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; background: var(--tint-2); padding: 32px; border-radius: 20px; }
.backstage div { display: flex; flex-direction: column; gap: 6px; max-width: 620px; }
.backstage .hand { font-size: 28px; }
.backstage p:not(.hand) { margin: 0; font-size: 17px; line-height: 1.55; color: #2A2A2A; }

/* Writing */
.subscribe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; background: var(--tint); border-radius: 24px; padding: 36px; }
.subscribe__copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.subscribe__copy .hand { font-size: 28px; line-height: 1; }
.subscribe__copy h2 { margin: 0; font-weight: 900; font-size: 32px; line-height: 1.05; letter-spacing: -0.03em; }
.subscribe__copy p:last-child { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.subscribe form { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.subscribe label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.subscribe .row { display: flex; flex-wrap: wrap; gap: 10px; }
.subscribe input { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 400 16px var(--sans); color: var(--ink); }
.posts { display: flex; flex-direction: column; gap: 24px; }
.posts[hidden] { display: none; }
.posts__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; border-top: 2px solid var(--ink); padding-top: 14px; }
.posts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.post { display: flex; flex-direction: column; gap: 12px; text-decoration: none; border: 2px solid var(--ink); border-radius: 16px; padding: 14px; }
.post:hover { border-color: var(--hover); }
.post__img { aspect-ratio: 16 / 9; border-radius: 10px; background: var(--blue); overflow: hidden; }
.post__img img { width: 100%; height: 100%; object-fit: cover; }
.post__date { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post__title { font-weight: 900; font-size: 20px; line-height: 1.15; letter-spacing: -0.02em; }
.post__sub { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* Reading */
.now { display: flex; flex-direction: column; gap: 24px; background: var(--tint); border-radius: 24px; padding: 32px; }
.now__label { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px 6px 12px; }
.now__label h2 { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.glow-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); color: var(--blue); animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 2px 1px currentColor; opacity: 1; } 50% { box-shadow: 0 0 10px 4px currentColor; opacity: .7; } }
.now__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.book { display: flex; flex-direction: column; gap: 10px; text-align: left; background: transparent; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.book:focus-visible { outline-offset: 4px; border-radius: 6px; }
.book--row { flex-direction: row; gap: 20px; align-items: center; }
.book--row .cover { flex: 0 0 120px; width: 120px; padding: 14px 12px; }
.book--row .cover__t { font-size: 14px; }
.book--row .cover__a { font-size: 10px; }
.book__t { font-weight: 700; font-size: 14px; line-height: 1.25; }
.book__a { font-size: 13px; color: var(--muted); margin-top: -6px; }
.book--row .book__t { font-weight: 900; font-size: 22px; line-height: 1.1; letter-spacing: -0.02em; }
.book--row .book__a { font-size: 15px; color: var(--ink-2); margin-top: 0; }
.book__more { font-size: 14px; font-weight: 700; color: var(--hover); margin-top: 6px; }
.book__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cover { width: 100%; aspect-ratio: 2 / 3; border-radius: 3px 8px 8px 3px; box-shadow: inset 6px 0 0 rgba(0,0,0,.12), 0 6px 14px rgba(20,20,20,.16); padding: 16px 14px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .2s ease; overflow: hidden; }
.book:hover .cover { transform: translateY(-4px) rotate(-1.5deg); }
.cover { position: relative; }
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; border-radius: inherit; animation: coverIn .3s ease both; }
.cover.has-img .cover__t, .cover.has-img .cover__a { visibility: hidden; }
/* Square or wide books: show the whole cover, sitting on the shelf, instead of cropping it */
.cover.cover--whole, .book-dialog .cover.cover--whole { background: transparent !important; box-shadow: none; }
.cover.cover--whole .cover__img { object-fit: contain; object-position: center center; background: transparent; filter: drop-shadow(0 6px 10px rgba(20,20,20,.18)); }
.cover.cover--whole::after { display: none; }
.cover.has-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 4px 0 0 rgba(0,0,0,.12); pointer-events: none; }
@keyframes coverIn { from { opacity: 0; } to { opacity: 1; } }
.cover__t { font-weight: 900; font-size: 17px; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: break-word; }
.cover__a { font-size: 11px; font-weight: 600; line-height: 1.25; }
.shelf { display: flex; flex-direction: column; gap: 40px; }
.filters { display: flex; flex-direction: column; gap: 16px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-row > span { font-size: 13px; font-weight: 700; color: var(--muted); width: 80px; }
.filter-row > .filter-row { flex: 1 1 0; min-width: 0; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 700 14px var(--sans); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.chip:hover { border-color: var(--hover); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.clear { min-height: 40px; padding: 0 4px; border: 0; background: transparent; color: var(--hover); font: 700 14px var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; align-self: flex-start; }
.year-group { display: flex; flex-direction: column; gap: 24px; }
.year-group h3 { margin: 0; font-weight: 900; font-size: 40px; letter-spacing: -0.04em; line-height: 1; border-top: 2px solid var(--ink); padding-top: 14px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 32px 24px; }
.empty { font-family: var(--hand); font-weight: 700; font-size: 30px; color: var(--red); margin: 0; }

/* Book dialog */
.book-dialog { width: min(720px, calc(100% - 32px)); max-height: 90vh; padding: 0; border: 2px solid var(--ink); border-radius: 20px; color: var(--ink); }
.book-dialog::backdrop { background: rgba(20,20,20,.55); }
.book-dialog__inner { position: relative; padding: 32px; display: flex; flex-wrap: wrap; gap: 28px; }
.book-dialog .close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.book-dialog__side { flex: 0 0 220px; display: flex; flex-direction: column; gap: 18px; }
.book-dialog__side .buy { flex-direction: column; align-items: stretch; gap: 8px; margin: 0; }
.nudge { display: inline-block; color: #FF5A6E; font-size: 17px; line-height: 1; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.book-dialog__side .btn { justify-content: center; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.book-dialog__side .buy small { max-width: none; text-align: center; }
.book-dialog .cover { flex: none; width: 100%; height: auto; aspect-ratio: 2 / 3; padding: 20px 18px; border-radius: 4px 10px 10px 4px; box-shadow: inset 8px 0 0 rgba(0,0,0,.12), 0 10px 24px rgba(20,20,20,.22); }
.book-dialog .cover__t { font-size: 24px; }
.book-dialog .cover__a { font-size: 13px; }
.book-dialog__body { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.book-dialog__when { font-size: 26px; }
.book-dialog h2 { margin: 0; font-weight: 900; font-size: 30px; line-height: 1.05; letter-spacing: -0.03em; padding-right: 40px; }
.book-dialog__author { margin: 0; font-size: 16px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--tint); border-radius: 999px; padding: 6px 12px; }
.tag--pink { background: var(--pink); }
.take { display: flex; flex-direction: column; gap: 6px; background: var(--tint); border-radius: 14px; padding: 14px 18px 16px; }
.take .hand { font-size: 26px; line-height: 1; }
.take p:last-child { margin: 0; font-size: 17px; line-height: 1.55; }
.about { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.about__text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }
.about__text.is-clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.about__credit { margin: 0; font-size: 12px; color: var(--muted); }
.about__credit a { color: var(--hover); font-weight: 700; font-size: 13px; text-underline-offset: 3px; }
.more { align-self: flex-start; border: 0; background: none; padding: 4px 0; font: 700 14px var(--sans); color: var(--hover); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px; }
.buy small { font-size: 12px; line-height: 1.4; color: var(--muted); max-width: 220px; }

@media (max-width: 560px) {
  .now, .subscribe, .backstage { padding: 24px 20px; border-radius: 18px; }
  .book--row .cover { flex-basis: 96px; width: 96px; }
  .book-dialog__inner { padding: 24px 20px; }
  .book-dialog__side { flex-basis: 100%; flex-direction: row; align-items: flex-end; gap: 16px; }
  .book-dialog__side .buy { flex: 1 1 0; min-width: 0; }
  .book-dialog .cover { width: 120px; }
  .book-dialog .cover { padding: 12px 10px; }
  .book-dialog .cover__t { font-size: 15px; }
  .book-dialog .cover__a { font-size: 11px; }
  .book-dialog__side .btn { white-space: normal; text-align: center; }
  .book-dialog .cover__t { font-size: 18px; }
  .filter-row > span { width: 100%; }
  .filter-row > .filter-row { flex-basis: 100%; }
  .home .blob-photo { max-width: 300px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 24px 14px; }
  .book-grid .cover { padding: 10px 9px; }
  .book-grid .cover__t { font-size: 13px; }
  .book-grid .cover__a { font-size: 9px; }
  .book-grid .book__t { font-size: 13px; }
  .book-grid .book__a { font-size: 12px; }
  .year-group h3 { font-size: 32px; }
  .split__art { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
