/* Archivo (OFL) and Gronka Mono, a renamed IBM Plex Mono subset (OFL): /fonts/OFL-*.txt */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/Archivo-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/Archivo-SemiBold.woff2') format('woff2');
  font-weight: 600 700;
  font-display: block;
}
@font-face {
  font-family: 'Archivo Expanded';
  src: url('/fonts/Archivo-ExpandedExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: block;
}
@font-face {
  font-family: 'Gronka Mono';
  src: url('/fonts/GronkaMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: block;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #000;
  --pencil: #5f5c56;
  --soft: #f1f0ec;
  --gf: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #000;
    --ink: #fff;
    --pencil: #a9a59d;
    --soft: #151515;
    --gf: invert(1);
  }
}

* {
  box-sizing: border-box;
}
html {
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar {
  display: none;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font:
    17px/1.5 'Archivo',
    system-ui,
    sans-serif;
  padding: 0 16px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.mono {
  font-family: 'Gronka Mono', ui-monospace, monospace;
}
[hidden] {
  display: none !important;
}

.top {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font:
    800 18px 'Archivo Expanded',
    sans-serif;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.top img {
  width: 28px;
  height: 28px;
  filter: var(--gf);
}
.top span {
  flex: 1;
}
.top .home {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.top .tag {
  font:
    400 13px 'Gronka Mono',
    monospace;
  letter-spacing: 0;
  color: var(--pencil);
  flex: none;
}

main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  flex: 1;
  padding: 8px 0 40px;
}
h1 {
  font:
    800 clamp(2.3rem, 9.5vw, 5.4rem)/0.96 'Archivo Expanded',
    sans-serif;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
h2 {
  font:
    800 clamp(1.3rem, 4vw, 1.7rem)/1.1 'Archivo Expanded',
    sans-serif;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
}
h3 {
  font-size: 17px;
  margin: 24px 0 6px;
}
p {
  margin: 0 0 14px;
}

/* everything drawn goes through the same displacement as the penguin */
.ink {
  position: relative;
  isolation: isolate;
}
.ink::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3.5px solid var(--ink);
  border-radius: 8px;
  filter: url(#wobble);
  pointer-events: none;
}
.i {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.22em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: none;
  color: var(--paper);
  font:
    800 18px 'Archivo Expanded',
    sans-serif;
  letter-spacing: -0.02em;
  padding: 16px 22px;
  position: relative;
  cursor: pointer;
  isolation: isolate;
  text-decoration: none;
  min-height: 48px;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: 12px;
  filter: url(#wobble);
  z-index: -1;
}
.btn.line {
  color: var(--ink);
}
.btn.line::before {
  background: none;
  border: 3.5px solid var(--ink);
}
.btn.small {
  font:
    600 15px 'Archivo',
    sans-serif;
  letter-spacing: 0;
  padding: 10px 16px;
  min-height: 44px;
}
.btn:active {
  transform: translateY(2px);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.btn:disabled:active {
  transform: none;
}
.linkish {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 10px 4px;
  min-height: 44px;
}

input[type='text'],
input[type='password'],
input:not([type]) {
  font:
    17px 'Gronka Mono',
    monospace;
}
.field {
  display: block;
}
.field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 14px 16px;
  outline: none;
  font:
    17px 'Gronka Mono',
    monospace;
}
.field input::placeholder {
  color: var(--pencil);
  opacity: 1;
}
.field:focus-within::before {
  border-width: 6px;
}
.label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.foot {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  padding: 18px 0 26px;
  font-size: 15px;
}
.foot a {
  text-decoration: none;
  padding: 6px 0;
}
.foot a:hover,
.foot a[aria-current] {
  text-decoration: underline;
}
.foot .me {
  margin-left: auto;
  color: var(--pencil);
}
.foot .me svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.foot .tm {
  flex-basis: 100%;
  color: var(--pencil);
  font-size: 0.85em;
}

.lede {
  color: var(--pencil);
  max-width: 36ch;
}
.meta {
  font:
    15px/1.5 'Gronka Mono',
    monospace;
  color: var(--pencil);
  margin: 0 0 12px;
  word-break: break-word;
}
h1:focus,
h2:focus {
  outline: none;
}
.prose {
  max-width: 640px;
}
.prose li {
  margin-bottom: 8px;
}
.note {
  color: var(--pencil);
  font-size: 15px;
}

@media (min-width: 900px) {
  body {
    font-size: 18px;
  }
  .top,
  main,
  .foot {
    max-width: 920px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    transition: none !important;
    animation: none !important;
  }
  .btn:active {
    transform: none;
  }
}
