/* aaqqibb.com: one stylesheet for every page.
   A softened take on The Game's palette: near-black ground, warm off-white ink, colour only in small dots. */

:root {
  --ground: #0a0a0a;
  --strong: #efede9;
  --text: #cfcdc9;
  --muted: #8f8d89;
  --faint: #3b3a38;
  --hair: #1d1c1b;
  --serif: Piazzolla, Georgia, 'Times New Roman', serif;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(18px, 4vw, 48px);
  --px: 220px; /* width of one year on the line */
  color-scheme: dark;
}
@media (max-width: 640px) {
  :root { --px: 150px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 300 17px/1.65 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--faint);
  transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--strong); text-decoration-color: currentColor; }
:focus-visible { outline: 1px solid var(--strong); outline-offset: 4px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 50; padding: 6px 10px; background: var(--strong); color: var(--ground); }
.skip:focus { left: var(--gutter); }
.dot { display: inline-block; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--c, var(--muted)); }

/* ── Header ── */
.top { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; padding: 0 var(--gutter); }
.top .name { font-size: 16px; font-weight: 400; color: var(--strong); text-decoration: none; white-space: nowrap; }
.top .full { display: flex; gap: 28px; font-size: 15px; }
.top .full a { color: var(--muted); text-decoration: none; }
.top .full a:hover, .top .full a[aria-current="page"] { color: var(--strong); }
.top .full a.cta { color: var(--strong); font-style: italic; }

.menu { display: none; }
.menu summary { padding: 10px 0; font-size: 15px; color: var(--muted); list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu .when-open, .menu[open] .when-closed { display: none; }
.menu[open] .when-open { display: inline; color: var(--strong); }
.menu-panel { position: fixed; inset: 64px 0 0; z-index: 30; display: flex; flex-direction: column; padding: 24px var(--gutter) 32px; background: var(--ground); }
.menu-panel nav { display: flex; flex-direction: column; align-items: flex-start; }
.menu-panel nav a { font-size: 34px; line-height: 1.5; color: var(--text); text-decoration: none; }
.menu-panel nav a[aria-current="page"], .menu-panel nav a.cta { color: var(--strong); }
.menu-panel nav a.cta { font-style: italic; }
.menu-foot { margin: auto 0 0; font-size: 14px; line-height: 2; color: var(--muted); }
@media (max-width: 640px) {
  .top .full { display: none; }
  .menu { display: block; }
}

/* ── Footer ── */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 40px var(--gutter) 48px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; }
.foot .peace { font-style: italic; }

/* ── Home: one still screen; only the line moves ── */
body.home { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.home main { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.intro { padding: 28px var(--gutter) 0; }
.intro h1 { margin: 0; max-width: 28ch; font-size: clamp(20px, 2.3vw, 28px); line-height: 1.35; font-weight: 300; color: var(--strong); }
.intro p { margin: 6px 0 0; font-size: 14px; font-style: italic; color: var(--muted); }

.linearea { flex: 1; min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.stage { position: relative; height: 184px; }
.scroller { position: absolute; inset: 0; display: flex; flex-direction: row-reverse; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; outline: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller.dragging { cursor: grabbing; }
/* Half a screen of space on the left lets the first year reach the playhead; the right side stops at now. */
.pad { flex: none; padding: 0 calc(50% - var(--ahead) * var(--px)) 0 50%; }
.track { position: relative; width: calc(var(--span) * var(--px)); height: 184px; user-select: none; -webkit-user-select: none; }

.past { position: absolute; left: 0; top: 132px; width: calc(var(--now) * var(--px)); height: 1px; background: linear-gradient(to right, transparent, #5f5d5a 180px); }
.ahead { position: absolute; left: calc(var(--now) * var(--px)); top: 132px; width: calc(var(--ahead) * var(--px)); border-top: 1px dashed var(--faint); }
.unplayed { position: absolute; left: calc(var(--now) * var(--px) + 18px); top: 108px; font-size: 13px; font-style: italic; color: var(--muted); white-space: nowrap; }
.nowdot { position: absolute; left: calc(var(--now) * var(--px)); top: 132px; width: 7px; height: 7px; margin: -3px 0 0 -3.5px; border-radius: 50%; background: #4c97ff; }

.yr { position: absolute; left: calc((var(--x) + .5) * var(--px)); top: 150px; transform: translateX(-50%); font: 400 11px var(--mono); color: var(--muted); transition: color .4s; }
.yr.on { color: var(--strong); }

.span { position: absolute; left: calc(var(--x) * var(--px)); width: calc(var(--w) * var(--px)); top: calc(136px + var(--lane) * 4px); height: 1.5px; background: var(--c); opacity: 0; transition: opacity .4s; }
.span.fadein { background: linear-gradient(to right, transparent, var(--c) 60%); }
.span.on { opacity: .8; }

.ev { position: absolute; left: calc(var(--x) * var(--px)); top: 0; height: 100%; }
.ev.t2 { --top: 40px; }
.ev.t1 { --top: 80px; }
.ev .stem { position: absolute; left: 0; top: var(--top); width: 1px; height: calc(132px - var(--top)); background: var(--hair); transition: background .4s; }
.ev .dot { position: absolute; left: 0; top: 132px; margin: -2px 0 0 -2.5px; opacity: .35; transition: opacity .4s; }
.ev a { position: absolute; left: 9px; top: calc(var(--top) - 5px); font-size: 15px; line-height: 1.2; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .4s; }
.ev a:hover { color: var(--strong); }
.ev.on .stem { background: var(--faint); }
.ev.on .dot { opacity: 1; }
.ev.on a { color: var(--strong); }

.fade-l, .fade-r { position: absolute; top: 0; bottom: 0; width: 10%; pointer-events: none; }
.fade-l { left: 0; background: linear-gradient(to right, var(--ground), transparent); }
.fade-r { right: 0; background: linear-gradient(to left, var(--ground), transparent); }
.playhead { position: absolute; left: 50%; top: 26px; width: 1px; height: 140px; background: rgba(239, 237, 233, .16); pointer-events: none; transition: background .2s; }
.scroller:focus-visible ~ .playhead { background: var(--muted); }
.month { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); font: 400 11px var(--mono); color: var(--muted); white-space: nowrap; pointer-events: none; }
.hint { margin: 10px 0 0; text-align: center; font-size: 13px; font-style: italic; color: var(--muted); transition: opacity .6s; }
.moved .hint { opacity: 0; }

.panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 12px 40px; padding: 0 var(--gutter) 28px; }
.when { display: flex; flex-direction: column; }
.when .year { font-size: clamp(36px, 4vw, 52px); line-height: 1; font-weight: 300; color: var(--strong); }
.when .age { margin-top: 8px; font: 400 12px var(--mono); color: var(--muted); }
.caption { margin: 0; max-width: 42ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; }
.links { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 4px; font-size: 15px; }
.links a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.links a:hover { color: var(--strong); }
.links .arr { color: var(--faint); }
.steps { display: flex; }
.steps button { width: 44px; height: 44px; padding: 0; background: none; border: 0; color: var(--muted); font: 300 20px var(--serif); cursor: pointer; }
.steps button:hover { color: var(--strong); }

@media (max-width: 640px) {
  .intro { padding-top: 16px; }
  .panel { grid-template-columns: 1fr auto; gap: 6px 16px; padding-bottom: 20px; }
  .panel .text { grid-column: 1 / -1; grid-row: 2; }
  .steps { grid-column: 2; grid-row: 1; }
  .links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .links::-webkit-scrollbar { display: none; }
}
/* On very short screens, let the page scroll rather than cut anything off. */
@media (max-height: 540px) {
  body.home { height: auto; overflow: visible; }
  .linearea { min-height: 260px; }
}

/* ── Reading pages ── */
.page { max-width: calc(680px + 2 * var(--gutter)); padding: 48px var(--gutter) 80px; }
.page p { max-width: 62ch; }
.title { margin: 0; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.15; font-weight: 300; color: var(--strong); }
.lede { margin: 20px 0 0; font-size: clamp(18px, 1.9vw, 21px); line-height: 1.55; }
.para { margin: 16px 0 0; }
.h2 { margin: 72px 0 8px; font-size: 15px; font-weight: 400; font-style: italic; color: var(--muted); }
.contact { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

.back { margin: 0 0 40px; font-size: 14px; }
.back a { color: var(--muted); text-decoration: none; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 400 13px var(--mono); color: var(--muted); }
.role { margin: 8px 0 0; font-style: italic; color: var(--muted); }
.story { margin-top: 28px; }
.story p { margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 40px 0 0; font-size: 15px; }
.facts dt { font-style: italic; color: var(--muted); }
.facts dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 40px 0 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 80px; font-size: 15px; }
.pager a { color: var(--muted); text-decoration: none; }
.pager a:hover { color: var(--strong); }

.plist, .alist { list-style: none; padding: 0; }
.plist { margin: 48px 0 0; }
.plist li { padding: 18px 0; border-top: 1px solid var(--hair); }
.plist a { display: flex; align-items: baseline; gap: 12px; color: var(--strong); text-decoration: none; }
.plist .dot { align-self: center; }
.plist .pname { font-size: 21px; }
.plist .pyears { margin-left: auto; font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.plist p { margin: 4px 0 0 17px; font-size: 15px; color: var(--muted); }
.alist { margin: 0; }
.alist li { padding: 14px 0; border-top: 1px solid var(--hair); }
.alist .aname { color: var(--strong); }
.alist .arole { font-style: italic; color: var(--muted); }
.alist p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.rentry { padding: 22px 0; border-top: 1px solid var(--hair); }
.rentry .rdates { margin: 0; font: 400 12px var(--mono); color: var(--muted); }
.rentry h3 { margin: 6px 0 0; font-size: 19px; font-weight: 400; color: var(--strong); }
.rentry .rorg { margin: 2px 0 0; font-style: italic; color: var(--muted); }
.rentry ul { margin: 10px 0 0; padding-left: 18px; font-size: 16px; }
.rentry li { margin: 4px 0; }

.life { position: relative; max-width: 560px; height: 48px; margin: 56px 0 0; }
.life > span { position: absolute; }
.l-past { left: 0; top: 12px; height: 1px; background: #5f5d5a; }
.l-ahead { right: 0; top: 12px; border-top: 1px dashed var(--faint); }
.l-birth, .l-now { top: 12px; width: 7px; height: 7px; margin: -3px 0 0 -3.5px; border-radius: 50%; }
.l-birth { left: 0; background: var(--strong); }
.l-now { background: #4c97ff; }
.l-end { right: 0; top: 12px; width: 9px; height: 9px; margin: -4px -4.5px 0 0; border: 1px solid var(--strong); border-radius: 50%; background: var(--ground); }
.l-lab { top: 24px; font: 400 11px var(--mono); color: var(--muted); white-space: nowrap; }
.l-lab.a { left: 0; }
.l-lab.n { transform: translateX(-50%); color: var(--strong); }
.l-lab.z { right: 0; }

.ways { list-style: none; margin: 48px 0 0; padding: 0; }
.ways a { display: block; padding: 22px 0; border-top: 1px solid var(--hair); text-decoration: none; }
.ways .wt { display: block; font-size: 22px; color: var(--strong); }
.ways .wx { display: block; margin-top: 4px; font-size: 16px; color: var(--muted); }
.bigmail { margin: 56px 0 0; font-size: clamp(22px, 3vw, 32px); overflow-wrap: anywhere; }

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