/* ==========================================================
   Suvankar Sen: shared styles for every page
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #f5f2ea;
  --card: #fbf9f4;
  --ink: #26221f;
  --ink-2: #4a433d;
  --grey: #857c72;
  --hair: #dcd4c6;
  --rule: #26221f;
  --plum: #5f4b63;
  --rub: #a3321b;
  --dot: rgba(60, 50, 70, .10);
  --zone: rgba(95, 75, 99, .16);
  --glow-op: .42;
  --t-rose: #eedbd5; --t-sage: #dce5d7; --t-plum: #e7dfe8; --t-sand: #eee5ca;
  --b-plum: #cbbcc8;
  --shadow: rgba(196, 160, 205, .30);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16141a; --card: #1e1b22; --ink: #ece6dc; --ink-2: #c6bdb2; --grey: #8d8479;
    --hair: #37313b; --rule: #ece6dc; --plum: #cdb2d2; --rub: #ef8a6a;
    --dot: rgba(220, 210, 235, .07); --zone: rgba(205, 178, 210, .16); --glow-op: .22;
    --t-rose: #33261f; --t-sage: #232b21; --t-plum: #2b2330; --t-sand: #2e291b; --b-plum: #4c3d50;
    --shadow: rgba(140, 100, 150, .25);
  }
}
:root[data-theme="dark"] {
  --paper: #16141a; --card: #1e1b22; --ink: #ece6dc; --ink-2: #c6bdb2; --grey: #8d8479;
  --hair: #37313b; --rule: #ece6dc; --plum: #cdb2d2; --rub: #ef8a6a;
  --dot: rgba(220, 210, 235, .07); --zone: rgba(205, 178, 210, .16); --glow-op: .22;
  --t-rose: #33261f; --t-sage: #232b21; --t-plum: #2b2330; --t-sand: #2e291b; --b-plum: #4c3d50;
  --shadow: rgba(140, 100, 150, .25);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.5;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; font-feature-settings: "kern", "liga", "onum";
  counter-reset: sidenote; overflow-x: hidden;
  transition: background-color .25s, color .25s;
}
::selection { background: var(--rub); color: var(--paper); }
a { color: inherit; text-decoration: none; }
p a, li a, dd a, .sidenote a, .pub .t a, .card-note a {
  border-bottom: 1px solid var(--hair); transition: color .2s, border-color .2s;
}
p a:hover, li a:hover, dd a:hover, .sidenote a:hover, .pub .t a:hover, .card-note a:hover { color: var(--rub); border-bottom-color: var(--rub); }
.page { position: relative; overflow-x: clip; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4.5vw, 56px) 3rem; }
.page { z-index: 1; }

/* ---------- Background: "structured light" ----------
   A faint metasurface lattice of dots, a Fresnel zone plate
   behind the portrait, and a slowly shifting thin-film glow. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 70% 20%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 60% at 70% 20%, #000 0%, transparent 75%);
}
.bgwrap { position: absolute; top: 0; left: 0; right: 0; height: 1200px; overflow: hidden; pointer-events: none; z-index: 0; }
.bg { position: absolute; pointer-events: none; }
.bg.glow {
  top: -200px; right: -160px; width: 640px; height: 560px; border-radius: 50%;
  background: conic-gradient(from 200deg, #f2b8c6, #f5d6a0, #bfe0c4, #a9d6e5, #c9b8ec, #f2b8c6);
  filter: blur(70px); opacity: var(--glow-op);
  animation: film 40s linear infinite;
}
@keyframes film { to { filter: blur(70px) hue-rotate(360deg); } }
.bg.zone { width: 760px; height: 760px; left: calc(50% - 860px); top: 60px; color: var(--zone); animation: breathe 18s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.04) rotate(3deg); } }

/* ---------- Header (Janu running head) ---------- */
.running {
  display: flex; justify-content: space-between; align-items: baseline; gap: .6rem 2rem; flex-wrap: wrap;
  padding: 1.6rem 0 .6rem; border-bottom: 3px double var(--rule); font-size: 1rem;
}
.brand { font-weight: 600; letter-spacing: -.02em; font-size: 1.3rem; white-space: nowrap; }
.brand span { font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .14em; color: var(--plum); margin-left: .4rem; text-transform: uppercase; vertical-align: .25em; }
.running nav { display: flex; gap: .4rem 1.15rem; flex-wrap: wrap; align-items: baseline; }
.running nav a { color: var(--ink-2); position: relative; }
.running nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform .18s; }
.running nav a:hover, .running nav a[aria-current="page"] { color: var(--rub); }
.running nav a:hover::after, .running nav a[aria-current="page"]::after { transform: scaleX(1); }
.running nav .sep { color: var(--hair); }
#theme { background: none; border: 0; cursor: pointer; color: var(--ink-2); font: inherit; font-family: var(--mono); font-size: .78rem; padding: 0; }
#theme:hover { color: var(--rub); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
  gap: clamp(44px, 7vw, 104px); align-items: center; margin: clamp(48px, 7vw, 84px) 0 clamp(40px, 6vw, 72px);
}
.portrait { width: min(100%, 430px); position: relative; justify-self: center; }
.portrait .backdrop {
  position: absolute; top: -30px; right: -34px; width: 72%; height: 82%;
  border: 1px solid rgba(95,75,99,.38); border-radius: 49% 51% 43% 57% / 44% 45% 55% 56%; transform: rotate(8deg);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: rotate(14deg) translate(-6px, 6px); border-radius: 55% 45% 50% 50% / 48% 40% 60% 52%; } }
.frame {
  position: relative; aspect-ratio: .81 / 1; overflow: hidden; background: var(--t-plum);
  border-radius: 48% 52% 44% 56% / 37% 42% 58% 63%;
  box-shadow: -14px 14px 0 var(--shadow), 0 26px 60px rgba(60,45,70,.16);
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; opacity: 0; transition: opacity 1.1s ease; }
.frame img.on { opacity: 1; }
.portrait figcaption { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 22px 0; }
.count { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--plum); }
.dots { display: flex; gap: 7px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--plum); background: transparent; cursor: pointer; padding: 0; opacity: .6; }
.dots button.on { background: var(--plum); opacity: 1; }

.hello { font-family: var(--mono); font-size: .92rem; color: var(--ink-2); margin-bottom: 1.3rem; min-height: 1.6em; }
.hello .prompt { color: var(--plum); }
.hello #typed { color: var(--ink); font-weight: 500; }
.caret { display: inline-block; width: .55em; height: 1.1em; background: var(--rub); vertical-align: -.2em; margin-left: 2px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-family: "Fraunces", var(--serif); font-weight: 300; font-size: clamp(2.5rem, 5vw, 3.9rem); line-height: 1.02; letter-spacing: -.03em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0; }
.hero h1 em { display: block; font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--plum); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.topic {
  display: inline-flex; align-items: baseline; gap: .6rem; margin-top: 1.4rem;
  font-family: var(--mono); font-size: .74rem; color: var(--ink-2);
  border: 1px solid var(--hair); border-radius: 999px; padding: .35rem .85rem; background: color-mix(in srgb, var(--card) 70%, transparent);
}
.topic b { font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: .64rem; color: var(--plum); }
.lead { font-size: clamp(1.2rem, 1.9vw, 1.42rem); line-height: 1.4; margin-top: 1.1rem; text-wrap: pretty; }
.bio { font-size: 1.02rem; color: var(--ink-2); margin-top: 1rem; line-height: 1.6; max-width: 34em; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 1.7rem; font-family: var(--mono); font-size: .8rem; }
.btn { background: var(--plum); color: var(--paper); border: 1px solid var(--plum); padding: 10px 14px; display: inline-flex; gap: 10px; transition: transform .18s, background-color .18s; }
.btn:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.actions .ul { border-bottom: 1px solid var(--ink-2); padding-bottom: 3px; }
.actions .ul:hover { color: var(--rub); border-color: var(--rub); }

/* ---------- Icon dock (reveals label on hover) ---------- */
.dock { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.9rem; }
.dock a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 11px; gap: 0;
  border: 1px solid var(--hair); border-radius: 999px; color: var(--ink-2);
  background: color-mix(in srgb, var(--card) 75%, transparent);
  transition: background-color .25s, color .25s, border-color .25s, gap .25s, padding .25s;
}
.dock svg { width: 20px; height: 20px; flex: none; }
.dock span { max-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--mono); font-size: .74rem; transition: max-width .3s ease; }
.dock a:hover, .dock a:focus-visible { background: var(--plum); border-color: var(--plum); color: var(--paper); gap: 8px; padding: 0 16px 0 13px; }
.dock a:hover span, .dock a:focus-visible span { max-width: 10em; }
@media (hover: none) {
  .dock a { gap: 7px; padding: 0 14px 0 12px; }
  .dock span { max-width: 10em; }
}

/* ---------- Sections ---------- */
section { padding-top: clamp(2.6rem, 5vw, 3.8rem); }
h2 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-weight: 500; font-size: 1.5rem; letter-spacing: -.01em; line-height: 1.2;
  border-top: 1px solid var(--rule); padding-top: .55rem; margin-bottom: 1.1rem;
}
h2 .more { font-family: var(--mono); font-size: .74rem; font-weight: 400; color: var(--grey); }
h2 .more a:hover, h2 .more button:hover { color: var(--rub); }
.col { width: 62%; container-type: inline-size; }
p { margin-bottom: 1rem; text-wrap: pretty; }
.asof { font-family: var(--mono); font-size: .74rem; color: var(--grey); margin-top: .6rem; }
.muted { color: var(--ink-2); }

/* sidenotes */
.sn-toggle { cursor: pointer; }
.sn-toggle::after { content: attr(data-n); font-family: var(--mono); font-size: .68em; color: var(--rub); vertical-align: super; line-height: 0; margin-left: .1em; }
.sn-check { display: none; }
.sidenote {
  float: right; clear: right; width: 52cqi; margin-right: -61cqi; margin-top: .2rem; margin-bottom: .8rem;
  font-size: .86rem; line-height: 1.45; color: var(--ink-2); position: relative; text-wrap: pretty;
}
.sidenote::before { content: attr(data-n); position: absolute; left: -1.4rem; top: .1rem; font-family: var(--mono); font-size: .7rem; color: var(--rub); }

/* definition lists */
dl.now > div, dl.threads > div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--hair); }
dl.threads > div { grid-template-columns: 11rem 1fr; }
dl.now > div:last-of-type, dl.threads > div:last-of-type { border-bottom: 1px solid var(--hair); }
dl.now dt, dl.threads dt { font-variant: all-small-caps; letter-spacing: .06em; color: var(--ink-2); padding-top: .05rem; }
dl.now dd, dl.threads dd { font-size: 1.04rem; color: var(--ink-2); line-height: 1.5; }
dl.now dd b { color: var(--ink); font-weight: 500; }
dl.now dd { position: relative; }
dl.now dd .sidenote { position: absolute; float: none; top: 0; left: calc(100% + 9cqi); margin: 0; }

/* news */
ul.news { list-style: none; }
ul.news li { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .32rem 0; font-size: 1.04rem; line-height: 1.45; align-items: baseline; }
ul.news .d { font-family: var(--mono); font-size: .74rem; color: var(--grey); }
ul.news li.hidden { display: none; }
.show-more { font-family: var(--mono); font-size: .74rem; color: var(--grey); background: none; border: 0; cursor: pointer; margin-top: .4rem; padding: 0; }
.show-more:hover { color: var(--rub); }

/* research cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; margin: 1.4rem 0 .4rem; }
.thumb { aspect-ratio: 4 / 3; border: 1px solid var(--hair); overflow: hidden; border-radius: 4px; }
.thumb svg, .thumb img { width: 100%; height: 100%; display: block; object-fit: contain; }
.grid .cap { margin-top: .65rem; }
.grid .m { display: block; font-family: var(--mono); font-size: .7rem; color: var(--grey); margin-bottom: .25rem; }
.grid .t { font-size: 1.12rem; font-weight: 500; line-height: 1.3; }
.grid .s { display: block; font-size: .94rem; line-height: 1.45; color: var(--ink-2); margin-top: .2rem; }

/* ---------- Mind map ---------- */
.mm { position: relative; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--card) 60%, transparent); }
.mm canvas { display: block; width: 100%; height: 520px; cursor: grab; touch-action: none; }
.mm canvas.dragging { cursor: grabbing; }
.mm-bar { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; padding: .7rem .9rem; border-top: 1px solid var(--hair); font-family: var(--mono); font-size: .76rem; color: var(--grey); }
.mm-bar form { display: flex; gap: .5rem; flex: 1 1 260px; }
.mm-bar input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--hair); border-radius: 999px; padding: .45rem .8rem; }
.mm-bar input:focus { outline: 2px solid var(--plum); outline-offset: 1px; }
.mm-bar button { font: inherit; color: var(--ink-2); background: none; border: 1px solid var(--hair); border-radius: 999px; padding: .45rem .8rem; cursor: pointer; }
.mm-bar button:hover { color: var(--paper); background: var(--plum); border-color: var(--plum); }
.mm-legend { display: flex; gap: .9rem; flex-wrap: wrap; }
.mm-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; vertical-align: .05em; }
.card-note {
  position: absolute; left: 14px; top: 14px; max-width: min(330px, calc(100% - 28px));
  background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: .75rem .9rem;
  font-size: .95rem; line-height: 1.45; color: var(--ink-2); box-shadow: 0 10px 30px rgba(40,30,50,.10);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.card-note.show { opacity: 1; transform: none; pointer-events: auto; }
.card-note b { display: block; color: var(--ink); font-weight: 500; font-size: 1.05rem; margin-bottom: .15rem; }
.card-note .k { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--plum); }
.mm-hint { position: absolute; right: 14px; top: 12px; font-family: var(--mono); font-size: .68rem; color: var(--grey); pointer-events: none; }
.mm-status { position: absolute; right: 12px; top: 30px; font-family: var(--mono); font-size: .64rem; color: var(--grey); pointer-events: none; text-align: right; max-width: 60%; background: color-mix(in srgb, var(--card) 85%, transparent); padding: 1px 5px; border-radius: 3px; }
.mm-intro { font-size: 1rem; margin-bottom: 1.1rem; }
.card-note .cnt { display: block; font-family: var(--mono); font-size: .7rem; color: var(--grey); margin: .4rem 0 .15rem; }
.mm-legend .ring { width: 9px; height: 9px; border: 1.5px solid var(--rub); background: none; }
@media (max-width: 560px) { .mm-status { display: none; } }

/* ---------- Publications ---------- */
.pubs { list-style: none; border-top: 1px solid var(--hair); }
.pub { display: grid; grid-template-columns: 240px 1fr; gap: 1.6rem; padding: 1.2rem 0; border-bottom: 1px solid var(--hair); align-items: center; }
.pub.hidden { display: none; }
.media { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; border: 1px solid var(--hair); }
.media svg, .media video, .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .tag { position: absolute; left: 8px; bottom: 7px; font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: color-mix(in srgb, var(--paper) 82%, transparent); padding: 2px 6px; border-radius: 3px; }
.pub .t { font-size: 1.12rem; font-weight: 500; line-height: 1.32; }
.pub .au { font-size: .94rem; color: var(--ink-2); margin-top: .25rem; line-height: 1.45; }
.pub .au u { text-decoration-color: var(--plum); text-underline-offset: 3px; color: var(--ink); }
.pub .v { font-size: .94rem; margin-top: .1rem; }
.pub .v em { color: var(--ink); }
.award { display: inline-block; margin-top: .3rem; color: var(--rub); font-size: .92rem; font-weight: 500; }
.status { display: inline-block; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--plum); border: 1px solid var(--b-plum); background: var(--t-plum); padding: 1px 6px; border-radius: 3px; margin-left: .3rem; vertical-align: .15em; }
.pub .lk { font-family: var(--mono); font-size: .74rem; color: var(--grey); margin-top: .4rem; }
.pub .lk a { color: var(--ink-2); border-bottom: 1px solid var(--hair); }
.pub .lk a:hover { color: var(--rub); border-bottom-color: var(--rub); }
.pub .desc { font-size: .98rem; color: var(--ink-2); margin: .45rem 0 0; line-height: 1.5; }
.pub .kw { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 0; padding: 0; }
.pub .kw li { font-family: var(--mono); font-size: .64rem; letter-spacing: .03em; color: var(--plum); background: var(--t-plum); border: 1px solid var(--b-plum); border-radius: 999px; padding: 1px 8px; }
.media:has(img) { background: #fff; }
.media > a { display: block; height: 100%; }
.toggle { display: inline-flex; gap: .3rem; }
.toggle button { background: none; border: 0; font: inherit; color: var(--grey); cursor: pointer; padding: 0; }
.toggle button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* plain lists */
ul.plain { list-style: none; border-top: 1px solid var(--hair); }
ul.plain li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--hair); font-size: 1.04rem; line-height: 1.45; align-items: baseline; }
ul.plain .d { font-family: var(--mono); font-size: .74rem; color: var(--grey); }
ul.plain .w { display: block; color: var(--ink-2); font-size: .95rem; }
ul.plain .n { display: block; color: var(--grey); font-size: .9rem; margin-top: .1rem; }
ul.plain .n.in { display: inline; }

/* ---------- Sub-pages ---------- */
.page-head { margin: clamp(44px, 6vw, 72px) 0 1.5rem; max-width: 40em; }
.page-head .kicker { font-family: var(--mono); font-size: .8rem; color: var(--plum); }
.page-head h1 { font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.4rem); letter-spacing: -.03em; line-height: 1.05; margin: .4rem 0 .9rem; }
.page-head p { color: var(--ink-2); font-size: 1.12rem; }
.note-box { font-family: var(--mono); font-size: .76rem; color: var(--grey); border: 1px dashed var(--hair); border-radius: 8px; padding: .7rem .9rem; margin: 1rem 0 0; }

.drift { display: flex; gap: 1rem; height: 24rem; overflow: hidden; margin-top: 1.4rem; border-radius: 6px;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.drift-col { flex: 1; min-width: 0; }
.drift-track { animation: drift-up 60s linear infinite; will-change: transform; }
.drift-col.down .drift-track { animation-name: drift-down; }
.drift:hover .drift-track { animation-play-state: paused; }
.drift img { display: block; width: 100%; height: auto; margin-bottom: 1rem; border-radius: 4px; cursor: zoom-in; background: var(--card); box-shadow: 0 6px 20px -12px rgba(38,34,31,.4); transition: filter .3s; }
.drift:hover img:not(:hover) { filter: saturate(.6) brightness(.97); }
@keyframes drift-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes drift-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .drift-track { animation: none; } }
.drift-note { font-family: var(--mono); font-size: .68rem; color: var(--grey); margin-top: .6rem; text-align: right; }
@media (max-width: 640px) { .drift { height: 20rem; gap: .8rem; } .drift img { margin-bottom: .8rem; } .drift-note { display: none; } }
.gal-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; margin: 2.6rem 0 1.1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--plum); }
.gal-h:first-child { margin-top: .6rem; }
.gal-h span { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--grey); }
/* Justified rows: JS sets each width; without JS, flex-grow in proportion to shape does nearly the same. */
.gallery { --h: 20rem; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.6rem 1.4rem; }
.gallery.paintings { --h: 16rem; }
.gallery .art { flex: var(--r) 1 calc(var(--r) * var(--h)); min-width: 0; margin: 0; }
.gallery.laid .art { flex: none; }
.art { cursor: zoom-in; }
.art .pic { aspect-ratio: var(--r, 4 / 5); border-radius: 4px; overflow: hidden; background: var(--card); box-shadow: 0 1px 2px rgba(38,34,31,.08), 0 8px 24px -14px rgba(38,34,31,.35); }
.art .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.art:hover .pic img, .art:focus-visible .pic img { transform: scale(1.025); }
.art.missing .pic { background: repeating-linear-gradient(135deg, var(--card) 0 10px, color-mix(in srgb, var(--hair) 45%, var(--card)) 10px 11px); }
.art.missing .pic img { visibility: hidden; }
.art .t { font-size: 1.02rem; font-weight: 500; margin-top: .6rem; line-height: 1.3; }
.art .m { font-family: var(--mono); font-size: .68rem; color: var(--grey); margin-top: .15rem; }
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; grid-template-columns: auto 1fr auto; gap: 1rem; background: rgba(15,12,18,.88); padding: 3vw; cursor: zoom-out; }
.lightbox.show { display: grid; }
.lightbox figure { margin: 0; color: #eee; text-align: center; justify-self: center; }
.lightbox .big img { display: block; max-width: min(1100px, 80vw); max-height: 82vh; width: auto; height: auto; margin: 0 auto; border-radius: 4px; }
.lb-nav { background: none; border: 1px solid rgba(255,255,255,.3); color: #eee; width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; transition: background-color .2s; }
.lb-nav:hover { background: rgba(255,255,255,.12); }
.lightbox figcaption { font-family: var(--mono); font-size: .8rem; margin-top: .8rem; }

.musings { list-style: none; border-top: 1px solid var(--hair); }
.musings li { padding: 1.1rem 0; border-bottom: 1px solid var(--hair); }
.musings .d { font-family: var(--mono); font-size: .74rem; color: var(--grey); }
.musings h3 { font-weight: 500; font-size: 1.3rem; letter-spacing: -.01em; margin: .2rem 0 .3rem; }
.musings p { color: var(--ink-2); margin: 0; }
.musings .tags { font-family: var(--mono); font-size: .7rem; color: var(--plum); margin-top: .4rem; }

.qfeature { margin: 1rem 0 2.4rem; padding: clamp(1.4rem, 4vw, 2.6rem); border: 1px solid var(--hair); border-radius: 14px; background: color-mix(in srgb, var(--card) 70%, transparent); min-height: 13rem; display: flex; flex-direction: column; justify-content: center; }
.qfeature blockquote { font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; letter-spacing: -.01em; transition: opacity .35s; }
.qfeature cite { display: block; font-family: var(--mono); font-style: normal; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--plum); margin-top: 1rem; transition: opacity .35s; }
.qfeature .row { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; gap: 1rem; flex-wrap: wrap; }
.qfeature button { font-family: var(--mono); font-size: .78rem; background: var(--plum); color: var(--paper); border: 0; border-radius: 999px; padding: .5rem 1rem; cursor: pointer; }
.qfeature button:hover { background: var(--ink); }
.quotes { columns: 2 280px; column-gap: 1.6rem; }
.quotes figure { break-inside: avoid; margin: 0 0 1.4rem; padding: 1rem 1.1rem; border-left: 2px solid var(--plum); background: color-mix(in srgb, var(--card) 60%, transparent); }
.quotes blockquote { font-style: italic; font-size: 1.1rem; line-height: 1.4; }
.quotes figcaption { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--plum); margin-top: .5rem; }

/* ---------- Footer ---------- */
footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-top: clamp(3.5rem, 7vw, 5rem); padding-top: 1.6rem; border-top: 3px double var(--rule); }
footer blockquote { font-style: italic; font-size: 1.05rem; color: var(--ink-2); max-width: 30em; line-height: 1.45; }
footer cite { display: block; font-family: var(--mono); font-style: normal; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--plum); margin-top: .5rem; }
.fine { font-family: var(--mono); font-size: .72rem; color: var(--grey); text-align: right; line-height: 1.8; }
.fine a { border-bottom: 1px solid var(--hair); color: var(--ink-2); }
.fine a:hover { color: var(--rub); border-bottom-color: var(--rub); }
.social { display: flex; gap: .4rem 1rem; justify-content: flex-end; flex-wrap: wrap; margin-bottom: .3rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .col { width: 100%; }
  dl.now dd .sidenote { position: static; }
  .sidenote { display: none; float: none; width: 100%; margin: .5rem 0 .8rem; padding: .6rem .8rem; border-left: 2px solid var(--rub); background: var(--card); }
  .sidenote::before { display: none; }
  .sn-check:checked + .sidenote { display: block; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
  .portrait { width: min(80vw, 360px); }
  .grid { grid-template-columns: 1fr 1fr; }
  .pub { grid-template-columns: 1fr; gap: .9rem; }
  .media { max-width: 420px; }
  .bg.zone { left: -260px; top: 40px; width: 640px; height: 640px; }
  .mm canvas { height: 440px; }
}
@media (max-width: 560px) {
  body { font-size: 1.08rem; }
  .running nav { gap: .3rem .9rem; font-size: .95rem; }
  .grid { grid-template-columns: 1fr; }
  .thumb { aspect-ratio: 16 / 9; }
  .media { aspect-ratio: 16 / 8; }
  .gallery { --h: 13rem; gap: 1.2rem .9rem; }
  .gallery.paintings { --h: 14rem; }
  .lightbox { grid-template-columns: 1fr; padding: 4vw; }
  .lb-nav { display: none; }
  .lightbox .big img { max-width: 92vw; }
  dl.now > div, dl.threads > div, ul.plain li, ul.news li { grid-template-columns: 1fr; gap: .15rem; }
  footer { flex-direction: column; align-items: flex-start; }
  .fine { text-align: left; }
  .social { justify-content: flex-start; }
  .mm canvas { height: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
