/* InkyPing — a hand-inked sketchbook zine. Dotted paper, ink blue, one tangerine accent.
   System fonts only, decorative SVGs inline as data URIs, no JavaScript. */
:root {
  color-scheme: light dark;
  --paper: #faf6ec;
  --sheet: #fffdf7;
  --dots: rgba(27, 42, 107, .13);
  --ink: #1b2a6b;
  --text: #1f2440;
  --muted: #4d5578;
  --line: rgba(27, 42, 107, .28);
  --accent: #e4572e;
  --accent-text: #b23c17;
  --sticky: #ffe58a;
  --sticky-ink: #2a2a1a;
  --mint: #d8f0e3;
  --tape: rgba(228, 87, 46, .28);
  --tape-2: rgba(27, 42, 107, .16);
  --highlight: rgba(255, 213, 79, .65);
  --shadow: 0 2px 0 rgba(27, 42, 107, .08), 0 10px 22px -16px rgba(27, 42, 107, .55);
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M2 7c10-6 18 5 28 0s18-6 28 0 18 5 28 0 18-6 30 0' fill='none' stroke='%23e4572e' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  --hand: "Marker Felt", "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Neue", "Comic Sans MS", cursive;
  --body: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-2: 15px 255px 15px 225px / 225px 15px 255px 15px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1530;
    --sheet: #161e40;
    --dots: rgba(185, 198, 255, .12);
    --ink: #b9c6ff;
    --text: #ece7da;
    --muted: #b6bbd6;
    --line: rgba(185, 198, 255, .3);
    --accent: #ff8a5c;
    --accent-text: #ffa07c;
    --sticky: #e9d27a;
    --sticky-ink: #1b1d2c;
    --mint: #1d3a33;
    --tape: rgba(255, 138, 92, .35);
    --tape-2: rgba(185, 198, 255, .2);
    --highlight: rgba(255, 138, 92, .35);
    --shadow: 0 10px 24px -14px rgba(0, 0, 0, .8);
    --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M2 7c10-6 18 5 28 0s18-6 28 0 18 5 28 0 18-6 30 0' fill='none' stroke='%23ff8a5c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 18px/1.7 var(--body);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
}
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px dashed var(--accent); outline-offset: 4px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--sticky); color: var(--sticky-ink); padding: 8px 14px; font-family: var(--hand); z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.desk-top { max-width: 1120px; margin: 0 auto; padding: 28px 16px 8px; text-align: center; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 52px; height: 52px; flex: none; }
.logo__drop { fill: var(--ink); }
.logo__wave { stroke: var(--accent); }
.logo__word {
  font: 700 clamp(44px, 9vw, 68px)/1 var(--hand); letter-spacing: .01em;
  padding-bottom: 10px; background: var(--squiggle) bottom / 100% 12px no-repeat;
}
.desk-top__note {
  display: table; max-width: 30em; margin: 14px auto 6px; padding: 8px 16px;
  background: var(--sticky); color: var(--sticky-ink); font: 16px/1.4 var(--hand);
  transform: rotate(-1.2deg); box-shadow: var(--shadow);
}
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 18px 0 0; }
.tabs a {
  font: 17px/1.2 var(--hand); color: var(--ink); text-decoration: none;
  padding: 6px 14px; background: var(--tape-2); transform: rotate(-1deg);
}
.tabs a:nth-child(even) { background: var(--tape); transform: rotate(1.2deg); }
.tabs a:hover { background: var(--sticky); color: var(--sticky-ink); }

.desk { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }

/* ---------- Headings / hello ---------- */
.scribble-head {
  display: inline-block; font: 700 clamp(30px, 5vw, 40px)/1.1 var(--hand); color: var(--ink);
  margin: 28px 0 22px; padding-bottom: 10px; background: var(--squiggle) bottom left / 100% 10px no-repeat;
}
.hello {
  position: relative; max-width: 640px; margin: 8px auto 12px; padding: 22px 26px 18px;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--wobble);
  box-shadow: var(--shadow); transform: rotate(-.6deg);
}
.hello::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 26px; margin-left: -55px;
  background: var(--tape); transform: rotate(-3deg);
}
.hello p { margin: 0 0 10px; }
.hello__hand { font: 700 28px/1.1 var(--hand); color: var(--accent-text); }
.hello__small { font-size: 14px; color: var(--muted); margin: 0 !important; }

/* ---------- Board of cards ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px 26px; padding: 6px 4px; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 24px 20px 16px;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--wobble);
  box-shadow: var(--shadow); transform: rotate(-.8deg); transition: transform .15s ease;
}
.card::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 80px; height: 22px; margin-left: -40px;
  background: var(--tape-2); transform: rotate(2deg);
}
.card:nth-child(3n+2) { transform: rotate(.9deg); border-radius: var(--wobble-2); }
.card:nth-child(3n+2)::before { background: var(--tape); transform: rotate(-4deg); }
.card:nth-child(3n) { transform: rotate(-.3deg); }
.card:hover, .card:focus-within { transform: rotate(0) translateY(-3px); }
.card__no { font: 600 13px/1 var(--mono); color: var(--accent-text); margin: 0 0 8px; letter-spacing: .04em; }
.card__img { margin: 4px 0 12px; border: 2px solid var(--ink); border-radius: 4px; }
.card__title { font: 700 21px/1.25 var(--body); margin: 0 0 8px; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.card__desc { font-size: 16px; color: var(--muted); margin: 0 0 12px; }
.card__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin: auto 0 0; font-size: 13px; color: var(--muted); }
.card__drawer { font: 16px/1.2 var(--hand); color: var(--ink); background: var(--highlight); padding: 0 6px; }
.board--first .card:first-child { grid-column: 1 / -1; background: var(--sticky); color: var(--sticky-ink); border-color: var(--sticky-ink); transform: rotate(-.5deg); padding: 30px 28px 20px; }
.board--first .card:first-child .card__title { font: 700 clamp(26px, 4vw, 38px)/1.15 var(--hand); }
.board--first .card:first-child .card__title a,
.board--first .card:first-child .card__desc,
.board--first .card:first-child .card__meta,
.board--first .card:first-child .card__drawer { color: var(--sticky-ink); }
.board--first .card:first-child .card__no { color: #8a2c0f; }
.board--first .card:first-child .card__desc { font-size: 18px; max-width: 46em; }
.board--first .card:first-child .card__drawer { background: rgba(255, 255, 255, .55); }
@media (min-width: 900px) { .board--first .card:first-child { grid-column: span 2; } }
.board--mini { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card--mini { padding: 20px 16px 14px; }
.card--mini .card__title { font-size: 17px; margin: 8px 0 0; }
.card--mini .card__meta { margin: 0; order: -1; }

/* ---------- Empty state ---------- */
.drying {
  max-width: 680px; margin: 20px auto; padding: 30px 28px; text-align: center;
  background: var(--sheet); border: 2px dashed var(--ink); border-radius: var(--wobble-2); box-shadow: var(--shadow);
}
.drying__doodle { width: 200px; height: 110px; color: var(--ink); margin: 0 auto 8px; display: block; }
.drying__dot { fill: var(--accent); }
.drying__title { font: 700 clamp(28px, 5vw, 40px)/1.15 var(--hand); color: var(--ink); margin: 0 0 12px; }
.drying--small { padding: 22px; }
.drying--small .drying__title { font-size: 26px; }

/* ---------- Drawers (category stamps) ---------- */
.drawers__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px; }
.stamp { text-align: center; }
.stamp a {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 150px; height: 150px; margin: 0 auto 10px; border-radius: 50%;
  border: 3px double var(--ink); color: var(--ink); text-decoration: none; background: var(--sheet);
  transform: rotate(-6deg); transition: transform .15s ease;
}
.stamp:nth-child(even) a { transform: rotate(5deg); border-color: var(--accent); }
.stamp a:hover { transform: rotate(0) scale(1.04); }
.stamp__name { font: 700 21px/1.1 var(--hand); padding: 0 12px; }
.stamp__count { font: 12px/1 var(--mono); color: var(--accent-text); margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; }
.stamp__desc { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Drawer (list) page ---------- */
.drawer-head { text-align: center; margin: 4px auto 26px; max-width: 700px; }
.drawer-head__label { font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent-text); margin: 0 0 8px; }
.drawer-head__title { display: inline-block; font: 700 clamp(36px, 7vw, 56px)/1.1 var(--hand); color: var(--ink); margin: 0 0 10px; padding-bottom: 10px; background: var(--squiggle) bottom / 100% 12px no-repeat; }
.drawer-head__desc { color: var(--muted); margin: 0; }
.notes { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
.note {
  position: relative; margin: 0 0 22px; padding: 18px 22px 16px 34px;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: var(--shadow);
}
.note::before { content: ""; position: absolute; left: 14px; top: 16px; bottom: 16px; border-left: 2px solid var(--accent); }
.note:nth-child(even) { border-radius: var(--wobble-2); }
.note .card__meta { justify-content: flex-start; margin: 0 0 4px; }
.note__title { font: 700 22px/1.3 var(--body); margin: 0 0 4px; }
.note__title a { color: var(--text); text-decoration: none; }
.note__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.note__desc { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Sheet (article) ---------- */
.sheet {
  position: relative; max-width: 760px; margin: 0 auto; padding: 34px 34px 30px 56px;
  background-color: var(--sheet);
  background-image: linear-gradient(90deg, transparent 38px, var(--accent) 38px, var(--accent) 40px, transparent 40px);
  border: 2px solid var(--ink); border-radius: 6px 10px 8px 12px; box-shadow: var(--shadow);
}
.sheet::before, .sheet::after {
  content: ""; position: absolute; top: -13px; width: 96px; height: 26px; background: var(--tape);
}
.sheet::before { left: 24px; transform: rotate(-6deg); }
.sheet::after { right: 24px; transform: rotate(5deg); background: var(--tape-2); }
.sheet__kicker { font: 18px/1.3 var(--hand); color: var(--muted); margin: 0 0 10px; }
.sheet__kicker span { font: 600 14px/1 var(--mono); color: var(--accent-text); }
.sheet__kicker a { color: var(--ink); }
.sheet__title { font: 800 clamp(30px, 5vw, 44px)/1.18 var(--body); letter-spacing: -.01em; margin: 0 0 14px; color: var(--text); }
.sheet__title span { background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 4px; }
.sheet__dek { font: 21px/1.45 var(--hand); color: var(--ink); margin: 0 0 12px; }
.sheet__meta { font: 13px/1.4 var(--mono); color: var(--muted); margin: 0 0 18px; }
.polaroid { margin: 26px auto; padding: 12px 12px 6px; background: #fff; max-width: 92%; box-shadow: var(--shadow); transform: rotate(1deg); border: 1px solid var(--line); }
.polaroid figcaption { font: 17px/1.4 var(--hand); color: #1b2a6b; text-align: center; padding: 8px 0 4px; }

.prose { margin-top: 20px; }
.prose p { margin: 0 0 1.05em; }
.prose h2 {
  display: inline-block; font: 700 28px/1.2 var(--hand); color: var(--ink);
  margin: 1.5em 0 .5em; padding-bottom: 8px; background: var(--squiggle) bottom left / 100% 9px no-repeat;
}
.prose h3 { font: 700 20px/1.3 var(--body); color: var(--ink); margin: 1.4em 0 .4em; }
.prose h3::before { content: "\2192\00a0"; color: var(--accent-text); }
.prose ul { list-style: none; padding-left: 4px; }
.prose ul > li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 20px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M1 7c4-2 9-1 14-1M11 2l5 4-5 4' fill='none' stroke='%23e4572e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose ol { padding-left: 1.4em; }
.prose ol li::marker { font-family: var(--hand); color: var(--accent-text); font-weight: 700; }
.prose blockquote {
  margin: 1.6em auto; max-width: 92%; padding: 20px 22px; background: var(--sticky); color: var(--sticky-ink);
  font: 21px/1.45 var(--hand); transform: rotate(-1.2deg); box-shadow: var(--shadow);
}
.prose blockquote p { margin: 0; }
.prose blockquote a { color: var(--sticky-ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; }
.prose th { font: 700 17px var(--hand); color: var(--ink); text-align: left; border-bottom: 2px solid var(--ink); padding: 6px 8px; }
.prose td { border-bottom: 1px dashed var(--line); padding: 8px; }
.prose hr { border: 0; height: 12px; margin: 2em 0; background: var(--squiggle) center / 120px 12px no-repeat; }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--highlight); padding: 1px 4px; }
.prose img { border: 2px solid var(--ink); border-radius: 4px; margin: 1.2em 0; }
.sheet--page .prose h2 { font-size: 25px; }

.takeaway {
  position: relative; margin: 34px auto 26px; max-width: 520px; padding: 24px 26px 20px;
  background: var(--sticky); color: var(--sticky-ink); transform: rotate(1.5deg); box-shadow: var(--shadow);
}
.takeaway::before { content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: var(--tape); transform: rotate(-3deg); }
.takeaway__label { font: 700 16px/1 var(--mono); text-transform: lowercase; letter-spacing: .1em; color: #8a2c0f; margin: 0 0 8px; }
.takeaway__text { font: 700 24px/1.35 var(--hand); margin: 0; }

.arrows { max-width: 760px; margin: 26px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.arrows a { display: block; padding: 12px 16px; text-decoration: none; color: var(--text); border: 2px dashed var(--line); border-radius: var(--wobble-2); font-weight: 600; line-height: 1.35; }
.arrows a:hover { border-color: var(--accent); }
.arrows span { display: block; font: 17px var(--hand); color: var(--accent-text); font-weight: 400; }
.arrows__next { text-align: right; }
.more { max-width: 1000px; margin: 20px auto 0; }

/* ---------- Shared partials ---------- */
.disclosure {
  position: relative; margin: 14px 0; padding: 12px 16px 12px 46px; font-size: 15px; line-height: 1.55;
  background: var(--mint); color: var(--text); border: 2px solid var(--ink); border-radius: var(--wobble-2);
}
.disclosure::before { content: "\270E"; position: absolute; left: 14px; top: 10px; font-size: 20px; color: var(--ink); }
.disclosure strong { font-family: var(--hand); font-size: 17px; color: var(--ink); }
.disclosure--health { background: var(--sheet); border-style: dashed; }
.disclosure--health::before { content: "\2661"; }
.disclosure--vr { background: var(--sheet); border-style: dashed; border-color: var(--accent); }
.disclosure--vr::before { content: "\26A0"; color: var(--accent-text); }

.project-box {
  position: relative; margin: 26px 0 8px; padding: 18px 20px 14px;
  background-color: var(--sheet);
  background-image: repeating-linear-gradient(var(--sheet) 0 29px, var(--line) 29px 30px);
  border: 2px solid var(--ink); border-top: 8px solid var(--accent); border-radius: 4px; box-shadow: var(--shadow);
}
.project-box__name { font: 700 24px/1.2 var(--hand); color: var(--ink); margin: 0 0 4px; }
.project-box__short { margin: 0 0 8px; }
.project-box__platform { font: 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); margin-left: 4px; }
.project-box__link { font: 700 16px var(--body); }
.project-box__note { margin: 6px 0 0; font: 13px/1.4 var(--mono); color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; margin: 36px 0 0; }
.pagination a { font: 20px var(--hand); text-decoration: none; padding: 6px 16px; background: var(--sticky); color: var(--sticky-ink); transform: rotate(-1.5deg); box-shadow: var(--shadow); }
.pagination a:nth-of-type(2) { transform: rotate(1.5deg); }
.pagination__info { font: 13px var(--mono); color: var(--muted); }

/* ---------- Footer ---------- */
.desk-bottom { border-top: 2px dashed var(--line); background: var(--sheet); }
.desk-bottom__inner { max-width: 1120px; margin: 0 auto; padding: 26px 16px 44px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.desk-bottom__word { font: 700 30px/1 var(--hand); color: var(--ink); margin: 0 0 6px; }
.desk-bottom__line { margin: 0 0 16px; }
.site-disclaimer p { margin: 0 0 10px; }
.site-disclaimer strong { color: var(--text); }
.site-disclaimer__links { margin: 12px 0; font: 16px var(--hand); }
.site-disclaimer__links a { white-space: nowrap; }
.site-disclaimer__copy { font: 12px var(--mono); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .desk-top { padding-top: 20px; }
  .logo__mark { width: 40px; height: 40px; }
  .tabs a { font-size: 15px; padding: 5px 10px; }
  .sheet { padding: 28px 18px 22px 34px; background-image: linear-gradient(90deg, transparent 18px, var(--accent) 18px, var(--accent) 20px, transparent 20px); }
  .sheet::before, .sheet::after { width: 64px; }
  .hello { padding: 20px 18px 16px; }
  .board { gap: 26px; }
  .board--first .card:first-child { padding: 26px 20px 18px; }
  .takeaway__text { font-size: 21px; }
  .arrows__next { text-align: left; }
  .note { padding: 16px 16px 14px 30px; }
  .note::before { left: 12px; }
}
@media (prefers-reduced-motion: reduce) { .card, .stamp a { transition: none; } }
