/* About page — a plain white sheet next to the landing scene. Same hand as the
   landing page: thin wobbly pen line, flat black, scribbled hatching, and red
   or the cat's-eye cream wherever something is filled in. Tokens and the
   typeface come from base.css. */

html {
  font-synthesis: none; /* only real weights exist: no smeared faux-bold */
  scroll-behavior: smooth;
}

body {
  font-size: 17px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-weight: 400; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

.ink-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.page {
  max-width: 616px; /* 576 column + gutters */
  margin: 0 auto;
  padding: 44px 20px 56px;
}

/* small print: roles, dates, links, labels */
.links,
.back,
.copy,
.role,
.when,
.note,
h2,
.foot p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ---------- the drawings ---------- */

svg { overflow: visible; }

.ink path,
.ink use {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ink .thin { stroke-width: 1.2; }
.ink .f-ink { fill: var(--ink); }
.ink .s-paper { stroke: var(--paper); stroke-width: 2.2; }

.tile {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The layer under the pen line (still called "wax" in the markup). Its zigzag
   strokes are hatching, in the same pen; its solid shapes are flat fills. */
.wax path,
.wax use {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wax .narrow { stroke-width: 0.9; }
.wax .blob { fill: currentColor; stroke: none; }

/* every fill is one of four things */
.c-red,
.c-orange { color: var(--red); }
.c-yellow { color: var(--cream); }
.c-pink,
.c-blue   { color: var(--grey); }
.c-green,
.c-purple { color: var(--ink); }

/* ---------- links ---------- */

/* a line drawn under the words by hand (one long irregular stroke, so short links never show a repeat) */
.squig,
.links a span,
.back span,
.copy {
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 168px 9px;
  padding-bottom: 7px;
}
.squig {
  text-decoration: none;
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='9' viewBox='0 0 168 9'%3E%3Cpath d='M1.5 4.2 C8 7 14 2.4 23 5 C31 7.2 38 2.6 47 4.6 C56 6.6 63 7 73 4 C81 1.8 89 6.2 99 5.6 C108 5 115 2.4 125 4.6 C134 6.6 142 6.2 151 4 C157 2.6 162 3.4 166.5 4.6' fill='none' stroke='%23d23b52' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.links a,
.back,
.copy {
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.links a:hover,
.back:hover,
.copy:hover { color: var(--ink); }
.links a:hover span,
.back:hover span,
.copy:hover,
.squig:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='9' viewBox='0 0 168 9'%3E%3Cpath d='M1.5 4.2 C8 7 14 2.4 23 5 C31 7.2 38 2.6 47 4.6 C56 6.6 63 7 73 4 C81 1.8 89 6.2 99 5.6 C108 5 115 2.4 125 4.6 C134 6.6 142 6.2 151 4 C157 2.6 162 3.4 166.5 4.6' fill='none' stroke='%230c0c0c' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

/* ---------- header ---------- */

.top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "me    back"
    "links back";
  align-items: center;
  row-gap: 10px;
}

.me {
  grid-area: me;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 13px;
}
.who a { text-decoration: none; }
.avatar {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  transform: rotate(-3deg);
}
.avatar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar .tile { fill: none; stroke-width: 2; }
.avatar .wax { color: var(--red); } /* the black cat sits on the one red square */
.cat-avatar { position: relative; width: 44px; height: 44px; }
.who {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding-top: 0.14em; /* the capitals ride high in their line box */
}

.links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.links a,
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.glyph { flex: none; width: 22px; height: 18px; }
.back .glyph { height: 14px; }
.glyph .ink path { stroke: currentColor; stroke-width: 1.5; }
.back { grid-area: back; }

/* ---------- bio ---------- */

.bio { margin-top: 32px; font-size: 18px; }
.bio p + p { margin-top: 14px; }
.acts {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 24px;
  font-size: 18px;
}
.copy {
  border: 0;
  margin: 0;
  padding: 0 0 7px;
  background-color: transparent;
  cursor: pointer;
}

/* ---------- sections ---------- */

section { margin-top: 62px; }

h2 {
  position: relative;
  width: -moz-fit-content;
  width: fit-content;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 30px;
}
.rule {
  position: absolute;
  left: -3px;
  bottom: -9px;
  width: calc(100% + 2px);
  height: 8px;
}
.rule path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ---------- rows ---------- */

.rows { display: grid; row-gap: 30px; }

.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "tile head"
    "tile desc";
  column-gap: 18px;
}

.doodle {
  grid-area: tile;
  display: block;
  width: 64px;
  height: 64px;
  margin-top: 2px;
}
/* nobody sticks eight squares down perfectly straight */
.row:nth-child(3n + 1) .doodle { transform: rotate(-2.2deg); }
.row:nth-child(3n + 2) .doodle { transform: rotate(1.6deg); }
.row:nth-child(3n) .doodle { transform: rotate(-0.8deg); }

.head {
  grid-area: head;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
}
.name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0.005em;
}
.role { color: var(--ink-dim); }
.when {
  margin-left: auto;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
/* a project that can be visited: its name is the link */
.name a {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.name a:hover { text-decoration-color: var(--ink); }
/* long names: the date keeps its corner, the role drops to its own line */
.row--long .name { flex: 1 1 0; min-width: 0; }
.row--long .role { order: 3; flex-basis: 100%; }

.desc {
  grid-area: desc;
  margin-top: 4px;
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--ink-dim);
}

/* ---------- honors + education ---------- */

.honors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 26px;
}
.honors li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  line-height: 1.35;
}
.what { font-weight: 500; }
.star { width: 24px; height: 24px; margin-top: -2px; }
.star .ink use { stroke-width: 1.4; }
.honors li:nth-child(2n) .star { transform: rotate(14deg); }
.honors li:nth-child(3n) .star { transform: rotate(-11deg) scale(0.92); }
.honors li:nth-child(5) .star { transform: rotate(24deg); }
.note { color: var(--ink-dim); }
.note--line { display: block; }

.edu { display: grid; row-gap: 8px; }
.edu .note { margin-left: 8px; }

/* ---------- footer ---------- */

.foot { margin-top: 70px; }
.cat-typing {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 640 / 560;
  /* the drawing sits inside an empty margin on its canvas; pull it back to the column edge */
  margin-left: -14px;
}
.foot p {
  margin-top: 14px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- motion: a two-or-three frame wiggle, like a flipbook ---------- */

@keyframes wiggle {
  0%   { rotate: 0deg; translate: 0 0; }
  34%  { rotate: 2.4deg; translate: 0.6px -0.6px; }
  67%  { rotate: -1.8deg; translate: -0.5px 0.4px; }
  100% { rotate: 0deg; translate: 0 0; }
}
@keyframes smudge {
  0%   { translate: 0 0; }
  34%  { translate: 0.9px 0.5px; }
  67%  { translate: -0.6px 0.8px; }
  100% { translate: 0 0; }
}
@keyframes nudge {
  0%, 100% { translate: 0 0; }
  50% { translate: -3px 0; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .row:hover .doodle,
  .honors li:hover .star,
  .me:hover .avatar { animation: wiggle 0.45s step-end infinite; }
  .row:hover .wax,
  .honors li:hover .wax { animation: smudge 0.45s step-end infinite; }
  .back:hover .glyph { animation: nudge 0.5s step-end infinite; }
}

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

/* ---------- narrow screens ---------- */

@media (max-width: 600px) {
  .page { padding: 28px 18px 44px; }
  .who { font-size: 22px; }
  section { margin-top: 52px; }

  .row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "tile head"
      "desc desc";
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
  }
  .doodle { width: 56px; height: 56px; margin-top: 0; }
  .head { display: block; }
  .name, .role, .when { display: block; }
  .name { line-height: 1.2; }
  .role { line-height: 1.4; margin-top: 3px; }
  .when { margin-left: 0; line-height: 1.4; }
  .desc { margin-top: 10px; }

  .honors { grid-template-columns: 1fr; row-gap: 10px; }
}
