/* josephxanderkirby.com — plain, paulgraham.com-style layout.
   Narrow left column, small text, minimal decoration. */

:root {
  /* the site palette — refer back here */
  --red: #d0342c;
  --blue: #2151a3;
  --white: #ffffff;
  --yellow: #f4c20d;
}

/* Fira Sans (OFL, self-hosted) is the everyone-sees-it font: same
   designer family as FF Unit. FF Unit stays first in the stacks and
   wins wherever it is installed or licensed. */
@font-face {
  font-family: 'Fira Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/fira-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Fira Sans';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/fira-sans-700.woff2') format('woff2');
}
/* Archivo Narrow (OFL, self-hosted): free stand-in for Helvetica
   Narrow Bold. Arial Narrow covers Windows before it kicks in. */
@font-face {
  font-family: 'Archivo Narrow';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/archivo-narrow-700.woff2') format('woff2');
}

body {
  background-color: var(--white);
  /* argyle tile, repeated over the palette white */
  background-image: url('argyle.png');
  color: #000;
  font: 13px/1.6 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif;
  margin: 34px 20px 60px 36px;
  text-transform: lowercase;
}

.page { max-width: 465px; }

a { color: var(--blue); }
a:visited { color: var(--blue); }
::selection { background: var(--yellow); }

.titlebar {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font: bold 17px 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif;
  padding: 2px 12px 3px;
}

/* the home-page column of link buttons */
.btncol { margin: 18px 0 0; }
.btn {
  display: block;
  width: 120px;
  margin: 0 0 7px;
  padding: 2px 8px 3px;
  background: var(--blue);
  border: 2px solid #000;
  color: var(--white);
  font: bold 13px 'Helvetica Narrow', 'Arial Narrow', 'Archivo Narrow', 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif;
  text-decoration: none;
}
.btn:visited { color: var(--white); }
.btn:hover { filter: brightness(1.15); }
/* wider variant for repo names, sized to their text */
.btn.wide { width: fit-content; max-width: 100%; word-break: break-word; }

.backlink { font-size: 11px; margin: 6px 0 0; }

ul.plain, ol.plain { list-style: none; padding: 0; margin: 24px 0 0; }
ul.plain li, ol.plain li { margin: 0 0 10px; }

/* the about page: the text sits in the same blue box as the buttons */
.about-text {
  margin: 24px 0 0;
  background: var(--blue);
  border: 2px solid #000;
  color: var(--white);
  padding: 10px 12px;
}

/* the guestbook */
.gb-form { margin: 0 0 20px; }
.gb-form input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 6px;
  padding: 5px 8px;
  background: var(--white);
  border: 2px solid #000;
  font: 13px 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif;
}
.gb-form button { cursor: pointer; }
.gb-entry { margin: 0 0 12px; }
.gb-entry b { color: var(--blue); }
.gb-entry time { font-size: 11px; color: #666; margin-left: 6px; }
.gb-note { font-size: 11px; color: #666; }

/* the photos page: three strict columns, masonry-style — each column
   stacks its photos independently with the same 10px gap vertically
   as horizontally. The album cover has the third column. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
  width: min(1380px, calc(100vw - 56px));
}
.photo-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.photo-img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 2px solid #000;
  margin: 0;
}

/* the name: huge, vertically stretched, standing in the bottom-right
   just before the cat. Helvetica Narrow renders wherever it is
   installed; Arial Narrow / Archivo Narrow fill in elsewhere. */
.corner-name {
  position: fixed;
  right: 96px;
  bottom: 10px;
  margin: 0;
  color: var(--blue);
  /* the min() term keeps the whole name on-screen: it caps the size
     at (viewport - cat corner - margin) / name width ratio */
  font: bold clamp(24px, min(21vw, calc((100vw - 108px) / 7.2)), 138px)/1 'Helvetica Narrow', 'Arial Narrow', 'Archivo Narrow', 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif;
  transform: scaleY(2.16);
  transform-origin: bottom;
  white-space: nowrap;
  pointer-events: none;
}

/* the cat splat: bottom-right on every page, and it's the jukebox —
   click it to play a random song preview. Spins while playing. */
.cat {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: none;
  background: url('cat.png') no-repeat center / contain;
  cursor: pointer;
}
.cat.playing { animation: cat-spin 4s linear infinite; }
@keyframes cat-spin { to { transform: rotate(360deg); } }

/* the jukebox's hidden YouTube player: audio only, parked off-screen */
#ytHost {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -10px;
  bottom: -10px;
  opacity: 0.01;
  pointer-events: none;
}

@media (max-width: 500px) {
  body { margin: 20px 14px 40px; }
}

/* the essays page and each essay. The essay text keeps its own
   capitals (the site-wide lowercase would hurt a long read). */
.essay-list-date { font-size: 11px; color: #666; margin-left: 6px; }
.essay { text-transform: none; }
.essay-title { font: bold 17px/1.3 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif; margin: 24px 0 0; }
.essay-date { font-size: 11px; color: #666; margin: 2px 0 16px; }
.essay p { margin: 0 0 12px; }
.essay h2 { font-size: 14px; margin: 18px 0 6px; }
.essay ul { margin: 0 0 12px; padding-left: 20px; }
.essay blockquote { margin: 0 0 12px 16px; color: #333; }

/* the plan page: a dated list per month */
.plan-intro { margin: 24px 0 0; }
.plan-year { font: bold 17px 'FF Unit', 'Fira Sans', 'Segoe UI', Verdana, sans-serif; color: var(--blue); margin: 28px 0 2px; }
.plan-terms { font-size: 11px; color: #666; margin: 0 0 6px; }
.plan-month { font-size: 13px; margin: 16px 0 4px; }
.plan-list { display: grid; grid-template-columns: 82px 1fr; gap: 3px 6px; margin: 0; }
.plan-list dt { color: var(--blue); font-weight: bold; }
.plan-list dd { margin: 0; }
.plan-lock { margin-top: 24px; }
