/* ============================================================
   Aazim Haque — personal site
   "The Index" system · classic, print-inspired
   Spectral (serif) · Archivo (labels) · IBM Plex Mono (meta)
   Neutral warm paper + a single quiet dark-red accent
   ============================================================ */

:root {
  --paper:      oklch(0.986 0.004 85);
  --paper-2:    oklch(0.964 0.007 80);
  --paper-3:    oklch(0.945 0.008 78);
  --ink:        oklch(0.245 0.012 50);
  --ink-soft:   oklch(0.405 0.012 50);
  --muted:      oklch(0.560 0.010 50);
  --line:       oklch(0.850 0.008 70);
  --line-soft:  oklch(0.912 0.006 75);
  --accent:     oklch(0.455 0.140 27);   /* dark red / oxblood */
  --accent-ink: oklch(0.380 0.130 27);   /* darker, for text on paper */
  --accent-tint: color-mix(in oklch, var(--accent) 9%, var(--paper));
  --accent-glow: color-mix(in oklch, var(--accent) 18%, transparent);

  --serif: "Spectral", Georgia, serif;
  --sans:  "Archivo", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1, "onum" 1;
}

/* gentle page-load fade */
@media (prefers-reduced-motion: no-preference) {
  body { animation: pageIn 0.5s ease both; }
}
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-glow); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 44px; }
.measure { max-width: 660px; }

/* ---------- shared type helpers ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.label {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }

h1, h2, h3 { font-weight: 500; color: var(--ink); letter-spacing: -0.014em; line-height: 1.08; }

/* ---------- site header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklch, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink);
}
.site-head .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 18px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.wordmark .dot { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 30px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--muted);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0; height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.site-nav a:hover { color: var(--accent-ink); }
.site-nav a:hover::after { right: 0; }
.site-nav a.active { color: var(--accent-ink); }
.site-nav a.active::after { right: 0; }

/* ---------- site footer ---------- */
.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
}
.site-foot .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 48px;
  align-items: start;
}
.foot-mark { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); }
.foot-tag { margin-top: 6px; font-size: 15px; color: var(--muted); font-style: italic; }
.foot-links { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.foot-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.foot-links a:hover { color: var(--accent-ink); }
.foot-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- inline link style for prose ---------- */
.tlink {
  color: var(--accent-ink);
  border-bottom: 1px solid var(--accent-glow);
  transition: border-color 0.2s;
}
.tlink:hover { border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper);
  background: var(--accent-ink);
  padding: 13px 20px;
  border: 1px solid var(--accent-ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: transparent; color: var(--accent-ink); }
.btn-ghost {
  color: var(--accent-ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--accent-ink); color: var(--paper); }

/* ---------- placeholder (for content to be filled later) ---------- */
.ph {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 7px,
    color-mix(in oklch, var(--accent) 5%, transparent) 7px,
    color-mix(in oklch, var(--accent) 5%, transparent) 8px
  );
  border: 1px dashed var(--line);
  padding: 3px 9px;
  border-radius: 1px;
}

/* =====================================================================
   HOME / INDEX
   ===================================================================== */
.home-main { padding-top: 76px; }
.home-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 84px;
  align-items: start;
}
.rail-name {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.rail-name .dot { color: var(--accent); }
.rail-tag {
  margin: 18px 0 0;
  font-size: 19px;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 320px;
}
.rail-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.dot-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
@media (prefers-reduced-motion: no-preference) {
  .dot-pulse { animation: pulse 2.6s ease-out infinite; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.rail-bio { margin: 26px 0 0; font-size: 16px; line-height: 1.68; }
.rail-bio + .rail-bio { color: var(--ink-soft); }
.rail-facts { margin: 30px 0 0; padding-top: 4px; }
.fact { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.fact dt {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  width: 70px;
  flex-shrink: 0;
  padding-top: 4px;
}
.fact dd { margin: 0; font-size: 15px; color: var(--ink); }
.fact dd a { border-bottom: 1px solid var(--line); }
.fact dd a:hover { color: var(--accent-ink); border-color: var(--accent); }

/* the index list */
.index-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.index-head .t { font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.index-list { display: flex; flex-direction: column; }
.irow {
  display: grid;
  grid-template-columns: 38px 32px 1fr auto 30px;
  align-items: center;
  gap: 24px;
  padding: 22px 14px 22px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.18s, padding-left 0.18s;
}
.irow:hover { background: var(--paper-2); padding-left: 16px; }
.irow .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  align-self: start;
  padding-top: 6px;
}
.irow .iro-ico { width: 28px; height: 28px; color: var(--accent); align-self: start; margin-top: 3px; opacity: 0.92; transition: transform 0.2s; }
.irow .iro-ico svg { width: 100%; height: 100%; display: block; }
.irow:hover .iro-ico { transform: scale(1.08); }
.irow .main { display: flex; flex-direction: column; gap: 5px; }
.irow .ttl { font-family: var(--serif); font-size: 29px; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); transition: color 0.18s; }
.irow .desc { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.irow .meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.irow .arrow { color: var(--accent); justify-self: end; transition: transform 0.2s; font-size: 18px; }
.irow:hover .arrow { transform: translateX(6px); }
.irow:hover .ttl { color: var(--accent-ink); }

/* =====================================================================
   INTERIOR PAGES (Work / Personal)
   ===================================================================== */
.page-hero { padding-top: 80px; padding-bottom: 8px; }
.page-hero .eyebrow { display: block; margin-bottom: 18px; }
.page-title {
  font-size: 76px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.95;
  margin: 0;
}
.page-lead {
  margin: 26px 0 0;
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 640px;
}
.page-lead .dot { color: var(--accent); }

/* section scaffold */
.section { padding-top: 72px; }
.section-head {
  display: grid;
  grid-template-columns: 28px 30px 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 34px;
}
.section-head .sn { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.section-head h2 { font-size: 30px; margin: 0; }
.section-head .sx { grid-column: 3; font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 4px; letter-spacing: 0.02em; align-self: start; }
.section-head .sec-ico { width: 28px; height: 28px; color: var(--accent); }
.section-head .sec-ico svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ===== section-icon draw-in animation (section headers only) ===== */
@media (prefers-reduced-motion: no-preference) {
  .sec-ico svg [stroke] {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
  }
  .sec-ico.in svg [stroke] {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.9s ease 0.04s;
  }
  .sec-ico svg [fill]:not([fill="none"]) {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0.4);
  }
  .sec-ico.in svg [fill]:not([fill="none"]) {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.5s ease 0.34s, transform 0.55s cubic-bezier(0.2, 0.85, 0.25, 1) 0.34s;
  }
  .sec-ico.in .pulse-ring {
    animation: ringPulse 3s ease-in-out 1s infinite;
  }
}
@keyframes ringPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ===== hero icon (large, signature animation per subpage) ===== */
.hero-ico { width: 62px; height: 62px; margin-bottom: 26px; }
.hero-ico svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Work clock — sweeps the 9→6 workday (270°) */
.hero-clock .ring { transform-origin: 32px 32px; }
.work-clock .ring { transform: rotate(180deg); stroke-dasharray: 125.66; stroke-dashoffset: 31.42; }
.work-clock .hand { transform-origin: 32px 32px; transform: rotate(270deg); }
/* Personal clock — sweeps 6→12 (180°) */
.personal-clock .ring { transform: rotate(90deg); stroke-dasharray: 125.66; stroke-dashoffset: 62.83; }
.personal-clock .hand { transform-origin: 32px 32px; transform: rotate(180deg); }
/* Writing pen — drawn-in nib + a written underline */
.hero-pen .pen-body { stroke-dasharray: 150; stroke-dashoffset: 0; }
.hero-pen .pen-nib  { stroke-dasharray: 22; stroke-dashoffset: 0; }
.hero-pen .pen-line { stroke-dasharray: 42; stroke-dashoffset: 0; }

@media (prefers-reduced-motion: no-preference) {
  .work-clock.play .ring { animation: ringWork 1.7s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; }
  .work-clock.play .hand { animation: handWork 1.7s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; }
  .personal-clock.play .ring { animation: ringPersonal 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; }
  .personal-clock.play .hand { animation: handPersonal 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; }
  .hero-pen.play .pen-body { animation: heroDraw 1s ease 0.3s both; }
  .hero-pen.play .pen-nib  { animation: heroDrawNib 0.45s ease 1.15s both; }
  .hero-pen.play .pen-line { animation: heroDrawLine 0.8s ease 1.25s both; }
}
@keyframes ringWork { from { stroke-dashoffset: 125.66; } to { stroke-dashoffset: 31.42; } }
@keyframes handWork { from { transform: rotate(0deg); } to { transform: rotate(270deg); } }
@keyframes ringPersonal { from { stroke-dashoffset: 125.66; } to { stroke-dashoffset: 62.83; } }
@keyframes handPersonal { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }
@keyframes heroDraw { from { stroke-dashoffset: 150; } to { stroke-dashoffset: 0; } }
@keyframes heroDrawNib { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
@keyframes heroDrawLine { from { stroke-dashoffset: 42; } to { stroke-dashoffset: 0; } }

/* Reading section — the book opens as it scrolls into view */
.reading-book svg [stroke] { stroke-dasharray: none; stroke-dashoffset: 0; }
.reading-book .pg-l, .reading-book .pg-r { transform-box: fill-box; transform: scaleX(1); }
.reading-book .pg-l { transform-origin: right center; }
.reading-book .pg-r { transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  .reading-book.in .pg-l { animation: bookOpen 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) 0.1s both; }
  .reading-book.in .pg-r { animation: bookOpen 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) 0.24s both; }
}
@keyframes bookOpen { from { transform: scaleX(0.06); } to { transform: scaleX(1); } }

/* experience timeline */
.xp { display: flex; flex-direction: column; }
.xp-item {
  display: grid;
  grid-template-columns: 46px 200px 1fr;
  gap: 24px;
  padding: 26px 6px 30px;
  border-bottom: 1px solid var(--line-soft);
}
.xp-item .when { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 5px; }
.xp-item .where { }
.xp-role { font-family: var(--serif); font-size: 23px; font-weight: 500; color: var(--ink); line-height: 1.12; }
.xp-org { margin-top: 4px; font-size: 15px; color: var(--accent-ink); }
.xp-place { margin-top: 2px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.xp-body { }
.xp-body p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; }
.xp-metrics { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 16px; }
.metric .v { font-family: var(--serif); font-size: 34px; font-weight: 500; color: var(--accent-ink); line-height: 1; }
.metric .k { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* timeline bullets */
.xp-list { list-style: none; margin: 6px 0 0; padding: 0; }
.xp-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: 15.5px;
  line-height: 1.56;
  color: var(--ink-soft);
}
.xp-list li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--accent); }

/* toolkit / skills */
.toolkit { display: flex; flex-direction: column; }
.tk-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  padding: 22px 6px;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.tk-row:first-child { border-top: none; }
.tk-k {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
}
.tk-v { display: flex; flex-wrap: wrap; gap: 9px; }
.tk-note { margin-left: 8px; align-self: center; font-style: italic; font-size: 13px; color: var(--muted); }

/* capability grid */
.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 64px; }
.cap { padding: 20px 0; border-top: 1px solid var(--line-soft); }
.cap:nth-child(1), .cap:nth-child(2) { border-top: none; }
.cap .cn { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.cap h3 { font-size: 20px; margin: 8px 0 8px; }
.cap p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }

/* simple listing rows (talks / writing) */
.list { display: flex; flex-direction: column; }
.lrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.18s, background 0.18s;
}
.lrow:hover { background: var(--paper-2); padding-left: 14px; }
.lrow .lt { font-family: var(--serif); font-size: 20px; color: var(--ink); display: block; transition: color 0.18s; }
.lrow:hover .lt { color: var(--accent-ink); }
.lrow .lx { font-size: 14px; color: var(--muted); font-style: italic; display: block; margin-top: 4px; }
.lrow .lm { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 4px; }

/* a talk row that carries event photos */
.lrow-photos { padding: 22px 6px 28px; border-bottom: 1px solid var(--line-soft); transition: padding-left 0.18s, background 0.18s; }
.lrow-photos:hover { background: var(--paper-2); padding-left: 14px; }
.lrow-photos .lrow { padding: 0; border-bottom: none; }
.lrow-photos .lrow:hover { background: none; padding-left: 0; }
.talk-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; max-width: 620px; }
.talk-gallery a { display: block; overflow: hidden; border: 1px solid var(--line); background: var(--paper-3); }
.talk-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s ease; }
.talk-gallery a:hover img { transform: scale(1.04); }
.talk-gallery.single { grid-template-columns: 1fr; max-width: 560px; }
.talk-gallery.single img { aspect-ratio: 16 / 10; }
.talk-gallery.portrait { grid-template-columns: 1fr; max-width: 300px; }
.talk-gallery.portrait img { aspect-ratio: 3 / 4; }

/* contact block */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-grid p { margin: 0 0 18px; font-size: 18px; line-height: 1.6; }
.contact-list { display: flex; flex-direction: column; gap: 2px; }
.contact-list a {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 14px; color: var(--ink);
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--accent-ink); }
.contact-list a .k { color: var(--muted); }

/* =====================================================================
   PERSONAL — podcasts, sports, music
   ===================================================================== */
/* podcasts — link rows */
.pods { display: flex; flex-direction: column; }
.pod {
  display: grid;
  grid-template-columns: 36px 1fr auto 26px;
  gap: 20px;
  align-items: baseline;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.18s, background 0.18s;
}
.pod:hover { background: var(--paper-2); padding-left: 14px; }
.pod .pi { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.pod .pn { font-family: var(--serif); font-size: 20px; color: var(--ink); transition: color 0.18s; }
.pod .pd { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.pod .px { color: var(--accent); justify-self: end; font-size: 15px; transition: transform 0.2s; }
.pod:hover .pn { color: var(--accent-ink); }
.pod:hover .px { transform: translate(3px, -3px); }
.pods-note { margin-top: 16px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* sports — supporter cards */
.sport-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sport-card {
  --tc: var(--accent);
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 26px 24px 24px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.sport-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--tc);
}
.sport-card:hover { transform: translateY(-3px); border-color: var(--tc); }
.sport-crest {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--tc);
  background: color-mix(in oklch, var(--tc) 12%, var(--paper));
  color: var(--tc);
  font-family: var(--serif); font-weight: 600; font-size: 25px;
  margin-bottom: 20px;
  overflow: hidden;
}
.sport-crest-logo { background: var(--paper); }
.sport-crest-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.sport-league { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sport-name { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); margin: 5px 0 10px; line-height: 1.1; }
.sport-note { font-size: 15px; line-height: 1.5; color: var(--ink-soft); font-style: italic; margin: 0; }

/* music — cover-forward carousel */
.music-wrap { position: relative; }
.music-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.music-rail::-webkit-scrollbar { height: 6px; }
.music-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.song { flex: 0 0 184px; scroll-snap-align: start; }
.song .art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--paper-3);
  box-shadow: 0 1px 2px rgba(40,20,12,0.14), 0 14px 26px -14px rgba(60,30,20,0.40);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.song:hover .art { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(40,20,12,0.18), 0 20px 34px -14px rgba(60,30,20,0.48); }
.song .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.song .art-fb {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--accent-ink), oklch(0.30 0.10 27));
  color: color-mix(in oklch, var(--paper) 70%, transparent);
  font-size: 34px;
}
.song .play {
  position: absolute; z-index: 3; right: 11px; bottom: 11px;
  width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; padding-left: 2px;
  opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.4);
}
.song:hover .play { opacity: 1; transform: none; }
.song .st { font-family: var(--serif); font-size: 16.5px; font-weight: 500; color: var(--ink); margin-top: 14px; line-height: 1.25; }
.song .sa { font-size: 13.5px; font-style: italic; color: var(--muted); margin-top: 2px; }
.music-nav { display: flex; gap: 8px; }
.music-nav button {
  width: 34px; height: 34px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink-soft); cursor: pointer; font-size: 15px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.music-nav button:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--paper-2); }

/* =====================================================================
   PERSONAL page specifics
   ===================================================================== */
.now-card {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 26px;
}
.now-card .stamp { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 12px; }
.now-card p { margin: 0 0 14px; font-size: 18px; line-height: 1.65; color: var(--ink); }
.now-card p:last-child { margin-bottom: 0; }

/* shelf / reading */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.book {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.book:hover { border-color: var(--accent); transform: translateY(-3px); }
.book .spine {
  height: 5px; width: 44px; background: var(--accent);
  margin-bottom: 18px; opacity: 0.8;
}
.book .bt { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.book .ba { margin-top: 6px; font-size: 14px; font-style: italic; color: var(--muted); }
.book .bn { margin-top: 14px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }

/* =====================================================================
   WRITING — index + posts
   ===================================================================== */
.writing-list { display: flex; flex-direction: column; }
.wrow {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  gap: 28px;
  align-items: baseline;
  padding: 26px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.18s, background 0.18s;
}
.wrow:hover { background: var(--paper-2); padding-left: 14px; }
.wrow .wdate { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.wrow .wmain h3 { font-size: 25px; margin: 0 0 7px; }
.wrow .wmain p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 620px; }
.wrow .warrow { color: var(--accent); justify-self: end; font-size: 18px; transition: transform 0.2s; }
.wrow:hover .warrow { transform: translateX(6px); }
.wrow:hover .wmain h3 { color: var(--accent-ink); }

.empty-state {
  border: 1px dashed var(--line);
  background: var(--accent-tint);
  padding: 44px 40px;
  text-align: center;
}
.empty-state .es-mark { font-family: var(--serif); font-size: 40px; color: var(--accent); line-height: 1; }
.empty-state h3 { font-size: 23px; margin: 18px 0 10px; }
.empty-state p { margin: 0 auto; max-width: 440px; font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); }

/* post reading view */
.post { max-width: 680px; margin: 0 auto; }
.post-head { padding-top: 76px; padding-bottom: 8px; }
.post-meta { display: flex; gap: 16px; align-items: center; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.post-meta .pt { font-family: var(--sans); letter-spacing: 0.12em; text-transform: uppercase; font-size: 10.5px; color: var(--accent-ink); }
.post h1 { font-size: 50px; letter-spacing: -0.02em; line-height: 1.04; margin: 0; }
.post-lead { margin: 22px 0 0; font-size: 21px; line-height: 1.5; color: var(--ink-soft); font-style: italic; }
.post-body { margin-top: 40px; font-size: 18.5px; line-height: 1.74; }
.post-body h2 { font-size: 27px; margin: 44px 0 14px; }
.post-body h3 { font-size: 21px; margin: 34px 0 10px; }
.post-body p { margin: 0 0 22px; }
.post-body a { color: var(--accent-ink); border-bottom: 1px solid var(--accent-glow); }
.post-body a:hover { border-color: var(--accent); }
.post-body blockquote {
  margin: 28px 0; padding: 4px 0 4px 26px;
  border-left: 2px solid var(--accent);
  font-style: italic; color: var(--ink);
}
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 24px; }
.post-body li { margin-bottom: 9px; }
.post-body code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--paper-3); padding: 2px 6px; border-radius: 2px;
}
.post-body img { width: 100%; height: auto; margin: 30px 0; border: 1px solid var(--line); }
.post-body hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.post-foot { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.back-link { font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.back-link:hover { color: var(--accent); }

/* =====================================================================
   PORTRAIT (home rail)
   ===================================================================== */
.rail-portrait { width: 116px; margin-bottom: 26px; }
.rail-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(40,20,12,0.10), 0 14px 26px -16px rgba(60,30,20,0.40);
  filter: grayscale(0.12) contrast(1.02);
}

/* currently-reading — cover-forward shelf (data-driven from Goodreads) */
.read-now { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.bookc { display: flex; flex-direction: column; }
.cover-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--paper-3);
  box-shadow: 0 1px 2px rgba(40,20,12,0.16), 0 16px 30px -14px rgba(60,30,20,0.40);
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
}
.bookc:hover .cover-wrap { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(40,20,12,0.18), 0 22px 38px -14px rgba(60,30,20,0.48); }
.cover-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 11px;
  background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(0,0,0,0.04) 60%, transparent);
  z-index: 3; pointer-events: none;
}
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; display: block; }
.cover-fb {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px 15px;
  background: linear-gradient(158deg, var(--accent-ink), oklch(0.29 0.095 27));
  color: var(--paper);
}
.cover-fb .fb-t { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.16; }
.cover-fb .fb-a { font-family: var(--sans); font-size: 11px; letter-spacing: 0.04em; margin-top: 7px; opacity: 0.82; }
.bookc .bt2 { font-family: var(--serif); font-size: 16.5px; font-weight: 500; color: var(--ink); line-height: 1.2; margin-top: 16px; }
.bookc .ba2 { font-size: 14px; font-style: italic; color: var(--muted); margin-top: 3px; }
.bookc .br2 { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 9px; }
.bookc .br2 .star { color: var(--accent); }

/* projects */
.proj { display: flex; flex-direction: column; }
.prow {
  display: grid; grid-template-columns: 1fr auto 28px; gap: 30px; align-items: start;
  padding: 26px 6px; border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.18s, background 0.18s;
}
.prow:hover { background: var(--paper-2); padding-left: 14px; }
.prow h3 { font-size: 23px; margin: 0 0 8px; transition: color 0.18s; }
.prow:hover h3 { color: var(--accent-ink); }
.prow h3 .yr { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-left: 12px; font-weight: 400; letter-spacing: 0; }
.prow p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); max-width: 620px; }
.prow .tag { font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; padding-top: 6px; }
.prow .parrow { color: var(--accent); justify-self: end; font-size: 18px; padding-top: 4px; transition: transform 0.2s; }
.prow:hover .parrow { transform: translateX(6px); }

/* ===== project detail page ===== */
.project { max-width: 920px; margin: 0 auto; }
.project-hero { padding-top: 60px; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 26px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.crumbs a { color: var(--ink-soft); transition: color 0.2s; white-space: nowrap; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs .sep { color: var(--line); }
.crumbs > span:last-child { white-space: nowrap; }
.project-eyebrow { display: flex; gap: 12px; align-items: center; font-family: var(--sans); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 16px; }
.project-eyebrow span { white-space: nowrap; }
.project-eyebrow .yr { color: var(--muted); }
.project-title { font-size: 56px; letter-spacing: -0.022em; line-height: 1.02; margin: 0; }
.project-lead { margin: 22px 0 0; font-size: 21px; line-height: 1.5; color: var(--ink-soft); max-width: 640px; }
.project-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.demo-window { margin: 52px 0 8px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; box-shadow: 0 1px 2px rgba(40,20,12,0.10), 0 26px 50px -28px rgba(60,30,20,0.45); background: var(--paper); }
.demo-bar { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 15px; background: var(--paper-2); border-bottom: 1px solid var(--line-soft); }
.demo-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.demo-url { margin-left: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-body { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px; background:
  repeating-linear-gradient(-45deg, transparent, transparent 9px, color-mix(in oklch, var(--accent) 4%, transparent) 9px, color-mix(in oklch, var(--accent) 4%, transparent) 10px); }
.demo-body img { width: 100%; height: 100%; object-fit: cover; }
.demo-glyph { font-size: 34px; color: var(--accent); }
.demo-note { font-family: var(--mono); font-size: 12.5px; color: var(--muted); max-width: 360px; line-height: 1.5; }
.demo-cap { margin: 12px 2px 0; font-family: var(--sans); font-size: 12px; color: var(--muted); font-style: italic; }

/* multi-screen composite demo — a row of phone frames */
.demo-screens {
  margin: 52px 0 8px;
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 40px 30px;
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 9px, color-mix(in oklch, var(--accent) 4%, transparent) 9px, color-mix(in oklch, var(--accent) 4%, transparent) 10px);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.phone {
  flex: 0 0 196px;
  aspect-ratio: 196 / 412;
  background: var(--ink);
  border-radius: 26px;
  padding: 8px;
  box-shadow: 0 2px 4px rgba(40,20,12,0.18), 0 26px 46px -22px rgba(60,30,20,0.55);
  transition: transform 0.25s;
}
.phone:nth-child(odd) { transform: translateY(-12px); }
.phone:hover { transform: translateY(-20px); }
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--paper);
  border-radius: 19px;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 11px; text-align: center; padding: 22px;
}
.phone-screen::before {
  content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 5px; border-radius: 3px; background: color-mix(in oklch, var(--ink) 22%, transparent); z-index: 4;
}
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.phone-glyph { font-size: 26px; color: var(--accent); }
.phone-label { font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.project-body { display: grid; grid-template-columns: 1fr 250px; gap: 64px; margin-top: 56px; align-items: start; }
.project-main h2 { font-size: 25px; margin: 0 0 14px; }
.project-main h2:not(:first-child) { margin-top: 40px; }
.project-main p { margin: 0 0 18px; font-size: 17.5px; line-height: 1.7; }
.project-main ul { margin: 0 0 18px; padding-left: 22px; }
.project-main li { margin-bottom: 9px; font-size: 17px; line-height: 1.6; }
.project-main a { color: var(--accent-ink); border-bottom: 1px solid var(--accent-glow); }
.project-main a:hover { border-color: var(--accent); }
.project-meta { position: sticky; top: 96px; }
.meta-block { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.meta-block:first-child { border-top: none; padding-top: 0; }
.meta-block .mk { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.meta-block .mv { font-size: 15.5px; color: var(--ink); }
.meta-block .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }
.meta-status .d { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.meta-link { display: block; font-family: var(--mono); font-size: 13.5px; color: var(--accent-ink); padding: 4px 0; }
.meta-link:hover { color: var(--accent); }
.project-foot { margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.project-foot .nextp { text-align: right; }
.project-foot .nextp .lbl { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.project-foot .nextp a { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.project-foot .nextp a:hover { color: var(--accent-ink); }

/* interests / media tag rows */
.taglist { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-chip {
  font-family: var(--sans); font-size: 13px;
  color: var(--ink); border: 1px solid var(--line);
  padding: 7px 15px; border-radius: 100px;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent-ink); }

.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.media-col .label { display: block; margin-bottom: 16px; }
.media-line { display: flex; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.media-line .mi { font-family: var(--mono); font-size: 12px; color: var(--accent); width: 26px; flex-shrink: 0; }
.media-line .mt { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.media-line .mtx { font-size: 14px; color: var(--muted); font-style: italic; }

/* =====================================================================
   responsive
   ===================================================================== */
@media (max-width: 920px) {
  .home-grid { grid-template-columns: 1fr; gap: 56px; }
  .caps, .contact-grid, .media-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-grid, .media-grid { gap: 40px; }
  .sport-cards { grid-template-columns: 1fr; gap: 18px; }
  .project-body { grid-template-columns: 1fr; gap: 36px; }
  .project-meta { position: static; }
  .phone { flex-basis: 150px; }
  .shelf { grid-template-columns: 1fr 1fr; }
  .read-now { grid-template-columns: repeat(3, 1fr); }
  .xp-item { grid-template-columns: 1fr; gap: 10px; }
  .xp-item .when { padding-top: 0; }
  .page-title { font-size: 56px; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 24px; }
  .site-nav { gap: 18px; }
  .shelf { grid-template-columns: 1fr; }
  .read-now { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .song { flex-basis: 150px; }
  .irow { grid-template-columns: 28px 26px 1fr 26px; }
  .irow .meta { display: none; }
  .page-title { font-size: 44px; }
  .index-head { flex-wrap: wrap; gap: 6px; }
}

/* =====================================================================
   print (Work page → clean CV via the Download button)
   ===================================================================== */
@media print {
  .site-head, .site-foot, .no-print { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; animation: none; }
  .wrap { max-width: none; padding: 0; }
  .section { padding-top: 22px; page-break-inside: avoid; }
  .page-hero { padding-top: 0; }
  .page-title { font-size: 32pt; }
  a { color: #000; }
}
