/* ─── v2 ABOUT PAGE ──────────────────────────────────────────────
   Builds on v2.css tokens and components (polaroid, footer, dock).
   Only page-specific layout lives here.
   ─────────────────────────────────────────────────────────────── */

/* ─── HERO ───────────────────────────────────────────────────── */

.ab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding-top: clamp(56px, 8vw, 112px);
}
.ab-hero__title { margin-top: 8px; font-size: clamp(30px, 8vw, 68px); }
.ab-hero__photo { justify-self: center; width: min(100%, 340px); padding: 16px; }
.ab-hero__photo .polaroid { width: 100%; }

/* ─── STORY ──────────────────────────────────────────────────── */

.ab-story {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.ab-story__head { position: sticky; top: 96px; }
.ab-story__body { display: flex; flex-direction: column; gap: 18px; max-width: 680px; }
.ab-story__body p { color: var(--ink-2); font-size: 17px; line-height: 1.7; }
.ab-story__body .ab-story__lead {
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.ab-story__body .serif { color: var(--accent-ink); font-size: 1.1em; }
.ab-link {
  color: var(--ink);
  text-decoration: underline dotted 1.5px;
  text-underline-offset: 4px;
}
.ab-link:hover { color: var(--accent-ink); }

/* Paragraphs write themselves in as you scroll (word spans added by about.js).
   The next paragraph waits as a soft blur, hinting there's more to read;
   the ones after it stay hidden until you get closer. */
.js-write [data-write] .wd {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 320ms var(--ease), filter 320ms var(--ease);
  transition-delay: calc(var(--i, 0) * 12ms);
}
.js-write [data-write].is-next .wd { opacity: 0.35; filter: blur(5px); transition-delay: 0ms; }
.js-write [data-write].is-written .wd { opacity: 1; filter: none; }

/* Klerk: logo pops up on hover / focus */
.ab-peek { position: relative; display: inline-block; }
.ab-peek__img {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: 64px;
  height: 64px;
  border-radius: 8px;
  max-width: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--shadow-lift);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px) rotate(-8deg) scale(0.8);
  transition: opacity 200ms var(--ease), transform 400ms var(--spring);
}
.ab-peek__img--face { border-radius: 50%; }
.ab-peek:hover .ab-peek__img,
.ab-peek:focus-within .ab-peek__img { opacity: 1; transform: translate(-50%, 0) rotate(-4deg) scale(1); }

/* ─── HOW I WORK: the step on the left, what happens on the right ── */

.ab-steps { border-top: 1px solid var(--line); }
.ab-step {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px clamp(32px, 6vw, 96px);
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.ab-step dt {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
}
.ab-step__num { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--accent-ink); }
.ab-step dd { max-width: 620px; font-size: 16px; line-height: 1.65; color: var(--ink-2); }

/* ─── GITHUB ─────────────────────────────────────────────────── */

.gh {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.gh__scroll { overflow-x: auto; scrollbar-width: thin; }
.gh__chart { width: 100%; min-width: 640px; height: auto; }
/* The chart is a light-mode image; flip lightness but keep the green in dark mode */
[data-theme="dark"] .gh__chart { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
.gh__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-3);
}
.gh__user { display: inline-flex; align-items: center; gap: 8px; }
.gh__user svg { width: 18px; height: 18px; fill: var(--ink); }
.gh .job__link { margin-top: 0; }

/* ─── BEYOND THE WORK: bento grid (layout carried over from v1) ── */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(190px, 30vh, 270px);
  gap: 14px;
}
.bento__card:nth-child(1) { grid-column: span 5; }
.bento__card:nth-child(2) { grid-column: span 4; }
.bento__card:nth-child(3) { grid-column: span 3; }
.bento__card:nth-child(4) { grid-column: span 7; }
.bento__card:nth-child(5) { grid-column: span 5; }

.bento__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 400ms var(--spring), box-shadow 300ms var(--ease);
}
.bento__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.bento__media { flex: 1; min-height: 0; overflow: hidden; background: var(--surface-2); }
.bento__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease);
}
.bento__card:hover .bento__media img { transform: scale(1.04); }
.bento__media--logo {
  display: grid;
  place-items: center;
  padding: 32px;
  background: radial-gradient(120% 100% at 30% 0%, #2A2A2A 0%, #0B0B0B 70%);
}
.bento__media--logo img { width: 80%; height: auto; object-fit: contain; }
.bento__card:hover .bento__media--logo img { transform: scale(1.06); }
.bento__body { flex-shrink: 0; padding: 12px 14px 14px; }

.fun__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.bento__body h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.fun__note { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; margin-top: 4px; }
.fun__credit { font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }
.fun__credit a { text-decoration: underline; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: clamp(180px, 24vh, 240px); }
  .bento__card:nth-child(1),
  .bento__card:nth-child(2),
  .bento__card:nth-child(3),
  .bento__card:nth-child(4) { grid-column: span 4; }
  .bento__card:nth-child(5) { grid-column: span 8; }
}

@media (max-width: 860px) {
  .ab-hero { grid-template-columns: 1fr; }
  .ab-hero__photo { width: min(78%, 300px); }
  .ab-story { grid-template-columns: 1fr; }
  .ab-story__head { position: static; }
}

@media (max-width: 640px) {
  .ab-story__body p { font-size: 15.5px; }

  .ab-step { grid-template-columns: minmax(0, 1fr); padding: 16px 0; }
  .ab-step dd { font-size: 15px; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 10px; }
  .bento__card:nth-child(1),
  .bento__card:nth-child(2),
  .bento__card:nth-child(4),
  .bento__card:nth-child(5) { grid-column: span 1; }
  .bento__card:nth-child(3) { grid-column: span 2; }
  .bento__body { padding: 10px 12px 12px; }
  .bento__body h3 { font-size: 15px; }
  .fun__note { font-size: 12.5px; }
  .bento__media--logo { padding: 18px; }
}

@media (max-width: 360px) {
  /* Still two across, so the whole set fits on one screen */
  .bento { grid-auto-rows: 160px; gap: 8px; }
  .bento__body { padding: 8px 10px 10px; }
  .bento__body h3 { font-size: 14px; }
  .fun__note { display: none; }
}


/* ─── WRITING ────────────────────────────────────────────────── */

.ab-write {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 6vw, 96px);
  align-items: end;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line);
}
.ab-write__body p { max-width: 560px; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.ab-write__body .btn { margin-top: 22px; }
@media (max-width: 860px) {
  .ab-write { grid-template-columns: minmax(0, 1fr); }
}
