/* ==========================================================
   Daniele Rogantini — personal website
   Style: deep indigo, flat geometric shapes, "accretion" palette.
   Change the colours / fonts here and every page follows.
   ========================================================== */

:root {
  --bg: #1a1a1a;          /* dark charcoal / ebony */
  --bg-2: #202020;
  --card: #232323;
  --card-2: #2b2b2b;
  --line: rgba(244, 239, 230, 0.12);
  --line-strong: rgba(244, 239, 230, 0.24);
  --text: #f4efe6;        /* warm cream */
  --muted: #c6c2ba;
  --dim: #8f8b84;

  /* accretion palette */
  --coral: #ff7a5c;
  --saffron: #ffc24b;
  --teal: #45c4b0;
  --lilac: #a897ff;
  --accent: var(--coral);

  --font-head: "Outfit", "Avenir Next", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "Outfit", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --maxw: 1180px;
  --radius: 22px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(244, 239, 230, 0.06) 1.2px, transparent 1.6px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

a { color: var(--saffron); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }
b, strong { font-weight: 600; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(3rem, 7vw, 5.6rem); font-weight: 600; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* italic serif accent words: <em class="art">gravity</em> */
.art { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--saffron); letter-spacing: 0; }

.label {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--coral);
}
.mono { font-family: var(--font-head); }

.container { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--saffron); color: #111; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- placeholders (remove class="ph" when you add real text) ---------- */
.ph { color: var(--dim); font-style: italic; }
.ph::before { content: "[ "; font-style: normal; color: var(--coral); }
.ph::after  { content: " ]"; font-style: normal; color: var(--coral); }

.ph-figure {
  position: relative;
  aspect-ratio: var(--ratio, 16 / 10);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 38%, var(--bg) 0 13%, transparent 13.4%),
    radial-gradient(circle at 72% 38%, var(--saffron) 0 16%, transparent 16.4%),
    radial-gradient(circle at 72% 38%, transparent 0 24%, var(--coral) 24.4% 27%, transparent 27.4%),
    radial-gradient(circle at 72% 38%, transparent 0 33%, rgba(168, 151, 255, .55) 33.4% 35%, transparent 35.4%),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(244, 239, 230, .035) 14px 28px),
    var(--card-2);
  display: grid;
  place-items: end start;
  padding: 18px;
}
.ph-figure span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(26, 26, 26, 0.8);
  padding: 6px 14px;
  border-radius: 999px;
}
.ph-figure.round { border-radius: 50%; aspect-ratio: 1; place-items: center; }

figure { margin: 0; }
figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }
figcaption b { color: var(--coral); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(26, 26, 26, 0.82);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-head); font-size: 1rem; font-weight: 400; color: var(--muted);
  transition: background .2s, color .2s;
}
.site-nav a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.site-nav a[aria-current="page"] { color: #191b2e; background: var(--saffron); font-weight: 500; }

.nav-toggle {
  display: none; background: var(--card); border: 0; color: var(--text);
  font-family: var(--font-head); font-size: 1rem; padding: 10px 18px; border-radius: 999px; cursor: pointer;
}
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 14px 24px 22px; gap: 6px; }
  .site-nav a { padding: 12px 18px; font-size: 1.1rem; }
}

/* ---------- hero (home) ---------- */
.hero { position: relative; min-height: calc(94vh - var(--header-h)); display: flex; align-items: center; overflow: hidden; }
.hero canvas, .page-hero canvas, .lost canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .container { position: relative; z-index: 1; padding: 80px 0; pointer-events: none; }
.hero .container a { pointer-events: auto; }
.hero-text { max-width: 600px; }
.hero h1 { margin-bottom: 0.25em; }
.hero .role { font-size: 1.25rem; color: var(--muted); margin-bottom: 1.4em; font-weight: 400; }
.hero .lead { font-size: 1.3rem; line-height: 1.6; margin-bottom: 2em; color: var(--text); }
@media (max-width: 900px) {
  .hero { align-items: flex-end; min-height: 92vh; }
  .hero .container { padding: 50vh 0 56px; }
  .hero-text { text-shadow: 0 2px 18px var(--bg), 0 0 4px var(--bg); }
}

/* ---------- inner-page hero ---------- */
.page-hero { position: relative; height: 340px; overflow: hidden; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.page-hero .container { position: relative; z-index: 1; padding-bottom: 44px; pointer-events: none; }
.page-hero h1 { margin: 6px 0 0; font-size: clamp(2.8rem, 6vw, 4.4rem); }
@media (max-width: 900px) { .page-hero { height: 280px; } }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  border: 2px solid var(--line-strong); color: var(--text);
  font-family: var(--font-head); font-size: 1.02rem; font-weight: 500;
  background: rgba(26, 26, 26, 0.6);
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.btn:hover { text-decoration: none; border-color: var(--saffron); color: var(--saffron); transform: translateY(-2px); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #1b1526; }
.btn.primary:hover { background: var(--saffron); border-color: var(--saffron); color: #1b1526; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 52px; flex-wrap: wrap; }
.section-head .num {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  background: var(--saffron); color: #1b1526;
}
.section-head h2 { margin: 0; }
.section-head .rule { flex: 1; height: 2px; background: var(--line); border-radius: 2px; min-width: 40px; }
.section-head a { font-family: var(--font-head); font-weight: 500; white-space: nowrap; }

.prose { max-width: 66ch; }
.prose p { color: var(--text); }

/* ---------- cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
@media (max-width: 960px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  overflow: hidden;
  transition: transform .25s, background .25s;
}
.card:hover { transform: translateY(-4px); background: var(--card-2); }
/* small geometric badge on each card, colour cycles */
.card::after {
  content: ""; position: absolute; top: 22px; right: 22px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--coral);
}
.card:nth-child(4n+2)::after { background: var(--teal); border-radius: 4px; transform: rotate(45deg); }
.card:nth-child(4n+3)::after { background: var(--lilac); border-radius: 18px 18px 0 0; height: 9px; top: 30px; }
.card:nth-child(4n+4)::after { background: var(--saffron); }
.card .ph-figure { margin: -30px -30px 26px; border-radius: 0; }
.card .ph-figure + h3 { margin-top: 0; }
.card:has(.ph-figure)::after { display: none; }
.card h3 { margin-bottom: 0.45em; padding-right: 30px; }
.card p { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.1em; }
.card .more { font-family: var(--font-head); font-weight: 500; }
.card .idx { display: none; }

/* ---------- news ---------- */
.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.news li { display: grid; grid-template-columns: 110px 1fr; gap: 24px; align-items: baseline; padding: 20px 26px; background: var(--card); border-radius: 16px; }
.news time { font-family: var(--font-head); font-weight: 600; color: var(--saffron); }
@media (max-width: 600px) { .news li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- research topics ---------- */
.topic { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 84px 0; }
.topic + .topic { border-top: 1px solid var(--line); }
.topic:nth-child(even) .topic-text { order: 2; }
.topic .label { display: inline-block; margin-bottom: 14px; }
.topic ul:not(.tags) { padding-left: 1.2em; }
.topic li { margin-bottom: 8px; }
.topic li::marker { content: "●  "; color: var(--coral); font-size: 0.7em; }
.topic:nth-child(4n+2) li::marker { color: var(--teal); }
.topic:nth-child(4n+3) li::marker { color: var(--lilac); }
.topic:nth-child(4n+4) li::marker { color: var(--saffron); }
@media (max-width: 960px) {
  .topic { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .topic:nth-child(even) .topic-text { order: 0; }
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { font-size: 0.9rem; padding: 5px 14px; border-radius: 999px; background: var(--card-2); color: var(--muted); margin: 0; }
.tags li::marker { content: none; }

/* ---------- publications ---------- */
.pub-tools, .filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 40px; }
.filter {
  background: var(--card); border: 0; color: var(--muted);
  font-family: var(--font-head); font-size: 1rem; font-weight: 500;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
}
.filter:hover { color: var(--text); background: var(--card-2); }
.filter[aria-pressed="true"] { background: var(--teal); color: #12201e; }
.pub-tools .search {
  margin-left: auto; min-width: 280px;
  background: var(--card); border: 2px solid transparent; color: var(--text);
  font: inherit; font-size: 1rem; padding: 9px 18px; border-radius: 999px;
}
.pub-tools .search:focus { border-color: var(--teal); outline: none; }
.pub-tools .search::placeholder { color: var(--dim); }
@media (max-width: 700px) { .pub-tools .search { margin-left: 0; width: 100%; } }

.pub-year { margin: 56px 0 12px; font-size: 1.8rem; color: var(--saffron); }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pub { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 26px; background: var(--card); border-radius: 16px; }
.pub .n { font-family: var(--font-head); font-weight: 600; color: var(--dim); padding-top: 2px; }
.pub .title { color: var(--text); font-size: 1.12rem; font-weight: 500; margin-bottom: 6px; display: block; line-height: 1.4; }
.pub .authors { color: var(--muted); font-size: 1rem; }
.pub .authors .me { color: var(--text); font-weight: 500; box-shadow: inset 0 -0.35em 0 rgba(255, 122, 92, 0.35); }
.pub .venue { color: var(--dim); font-size: 1rem; font-style: italic; }
.pub .links { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.pub .links a { font-family: var(--font-head); font-size: 0.9rem; font-weight: 500; padding: 3px 12px; border-radius: 999px; background: var(--card-2); color: var(--saffron); }
.pub .links a:hover { background: var(--saffron); color: #1b1526; text-decoration: none; }
.pub .badge { font-size: 0.78rem; font-weight: 600; color: #1b1526; background: var(--coral); padding: 2px 10px; border-radius: 999px; margin-left: 10px; vertical-align: 2px; white-space: nowrap; }
.pub[hidden], .pub-year[hidden], .g-item[hidden] { display: none; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- CV ---------- */
.cv-block { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 60px 0; }
.cv-block + .cv-block { border-top: 1px solid var(--line); }
.cv-block > h2 { font-size: 1.8rem; margin: 0; }
@media (max-width: 860px) { .cv-block { grid-template-columns: 1fr; gap: 22px; padding: 44px 0; } }

.timeline { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line-strong); border-radius: 2px; }
.timeline li { position: relative; padding-bottom: 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--coral); }
.timeline li:nth-child(3n+2)::before { border-color: var(--teal); }
.timeline li:nth-child(3n+3)::before { border-color: var(--lilac); }
.timeline li:first-child::before { background: var(--saffron); border-color: var(--saffron); }
.timeline .when { font-family: var(--font-head); font-weight: 600; color: var(--saffron); font-size: 0.98rem; }
.timeline .what { color: var(--text); display: block; font-weight: 500; font-size: 1.08rem; }
.timeline .where { color: var(--muted); font-size: 1rem; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 72px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 44px; } }
.portrait { position: relative; max-width: 340px; margin: 20px; }
.portrait .orbit { position: absolute; inset: -22px; border: 2px solid var(--line-strong); border-radius: 50%; animation: spin 60s linear infinite; }
.portrait .orbit::after { content: ""; position: absolute; top: 50%; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--coral); }
.portrait .orbit::before { content: ""; position: absolute; top: 12%; right: 6%; width: 10px; height: 10px; border-radius: 2px; background: var(--teal); transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .portrait .orbit { animation: none; } }

.facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 14px 22px; background: var(--card); border-radius: 14px; font-size: 1.02rem; }
.facts .k { font-family: var(--font-head); font-weight: 600; color: var(--coral); }
@media (max-width: 600px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- material / sketches ---------- */
.gallery { columns: 3 300px; column-gap: 24px; }
.g-item {
  break-inside: avoid; display: block; margin: 0 0 24px;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  color: var(--text); transition: transform .25s, background .25s;
}
a.g-item:hover { transform: translateY(-4px); background: var(--card-2); text-decoration: none; }
.g-item img, .g-item .ph-figure { width: 100%; border-radius: 0; }
.g-cap { display: block; padding: 18px 22px 22px; }
.g-cap strong { display: block; font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; }
.g-cap small { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.g-cap .tagdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); margin-right: 8px; }
.g-item[data-tags~="notes"] .tagdot { background: var(--teal); }
.g-item[data-tags~="slides"] .tagdot { background: var(--lilac); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(14, 14, 14, 0.95); display: none; place-items: center; padding: 32px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox figure { max-width: min(1200px, 100%); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 14px; }
.lightbox figcaption { text-align: center; font-size: 1.05rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-email { font-family: var(--font-head); font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 500; color: var(--text); word-break: break-all; }
.contact-email:hover { color: var(--saffron); }
.links-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links-list a { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: var(--card); border-radius: 16px; color: var(--text); font-weight: 500; }
.links-list a:hover { background: var(--card-2); color: var(--saffron); text-decoration: none; }
.links-list .mono { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
address { font-style: normal; line-height: 1.8; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; font-size: 0.95rem; color: var(--dim); }

/* ---------- 404 ---------- */
.lost { position: relative; min-height: calc(100vh - var(--header-h) - 90px); display: grid; place-items: center; text-align: center; overflow: hidden; }
.lost .container { position: relative; z-index: 1; padding-top: 36vh; pointer-events: none; }
.lost .container a { pointer-events: auto; }
.lost p { color: var(--muted); font-size: 1.2rem; }

/* ---------- Chicago skyline (bottom of homepage) ---------- */
.skyline { position: relative; padding-top: 72px; overflow: hidden; border-top: 1px solid var(--line); }
.skyline-art { position: relative; width: min(1600px, 100%); margin: 0 auto; }
.skyline-art img { width: 100%; height: auto; position: relative; z-index: 1; }
/* a small geometric black hole rising over the lake, like a moon */
.sky-hole {
  position: absolute; z-index: 0; right: 9%; top: -8%;
  width: clamp(56px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: #0a0a0a;
  box-shadow: 0 0 0 clamp(4px, .5vw, 7px) var(--saffron), 0 0 0 clamp(10px, 1.3vw, 18px) rgba(255, 122, 92, .55), 0 0 0 clamp(16px, 2.1vw, 30px) rgba(168, 151, 255, .25);
}
/* water: thin geometric lines that fade out */
.lake {
  height: 90px;
  background: repeating-linear-gradient(to bottom, rgba(168, 151, 255, .28) 0 2px, transparent 2px 12px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
          mask-image: linear-gradient(to bottom, #000, transparent);
}
.sky-note { text-align: center; color: var(--dim); font-size: 0.9rem; margin: 0 0 18px; }

/* ==========================================================
   THIN-LINE VERSION — lighter colours, 1px lines, outline buttons.
   (These rules override the ones above. Delete this block to go back.)
   ========================================================== */
:root {
  --coral: #ee8d76;
  --saffron: #eec472;
  --teal: #76c3b7;
  --lilac: #b3a8f0;
  --card: rgba(255, 255, 255, 0.03);
  --card-2: rgba(255, 255, 255, 0.06);
  --line: rgba(244, 239, 230, 0.10);
  --line-strong: rgba(244, 239, 230, 0.22);
}
a:hover { text-decoration-thickness: 1px; }
h1, h2 { font-weight: 500; }
h3 { font-weight: 500; }
.art { color: var(--saffron); }

/* nav: no filled pill, just a thin underline */
.site-nav a[aria-current="page"] { background: none; color: var(--text); box-shadow: inset 0 -1px 0 var(--saffron); border-radius: 0; font-weight: 400; }
.site-nav a:hover { background: none; }
.nav-toggle { background: none; border: 1px solid var(--line-strong); }

/* buttons: 1px outline */
.btn { border-width: 1px; padding: 11px 22px; font-weight: 400; background: transparent; }
.btn.primary { background: transparent; border-color: var(--coral); color: var(--coral); }
.btn.primary:hover { background: rgba(238, 141, 118, 0.12); border-color: var(--coral); color: var(--coral); }
.btn:hover { transform: none; }

/* section numbers: thin circle */
.section-head .num { width: 40px; height: 40px; background: none; border: 1px solid var(--saffron); color: var(--saffron); font-weight: 400; font-size: 0.95rem; }
.section-head .rule { height: 1px; }

/* cards: thin border, outlined shape */
.card { border: 1px solid var(--line); }
.card:hover { transform: none; border-color: var(--line-strong); }
.card::after { background: none !important; border: 1.5px solid var(--coral); width: 14px; height: 14px; }
.card:nth-child(4n+2)::after { border-color: var(--teal); }
.card:nth-child(4n+3)::after { border-color: var(--lilac); border-bottom: 0; height: 7px; }
.card:nth-child(4n+4)::after { border-color: var(--saffron); }

/* lists */
.news li, .pub, .facts li, .links-list a { background: none; border: 1px solid var(--line); }
.pub .badge { background: none; color: var(--coral); border: 1px solid var(--coral); font-weight: 500; }
.pub .links a { background: none; padding: 0; border-radius: 0; }
.pub .links a:hover { background: none; color: var(--saffron); text-decoration: underline; }
.pub .authors .me { box-shadow: inset 0 -1px 0 var(--coral); }
.tags li { background: none; border: 1px solid var(--line-strong); }

/* filters */
.filter { background: none; border: 1px solid var(--line-strong); font-weight: 400; }
.filter[aria-pressed="true"] { background: none; border-color: var(--teal); color: var(--teal); }
.pub-tools .search { background: none; border: 1px solid var(--line-strong); }

/* timeline: hairline + small rings */
.timeline::before { width: 1px; }
.timeline li::before { width: 11px; height: 11px; left: -32px; top: 9px; border-width: 1.5px; }
.timeline li:first-child::before { background: var(--bg); border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(238, 196, 114, 0.15); }

/* portrait orbit */
.portrait .orbit { border-width: 1px; }
.portrait .orbit::after { width: 10px; height: 10px; left: -5px; }

/* figure placeholders: thin rings instead of thick bands */
.ph-figure {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 72% 40%, #0a0a0a 0 12%, transparent 12.3%),
    radial-gradient(circle at 72% 40%, transparent 0 14.5%, var(--saffron) 14.8% 15.3%, transparent 15.6%),
    radial-gradient(circle at 72% 40%, transparent 0 22%, rgba(238, 141, 118, .7) 22.3% 22.7%, transparent 23%),
    radial-gradient(circle at 72% 40%, transparent 0 30%, rgba(179, 168, 240, .45) 30.3% 30.6%, transparent 30.9%),
    rgba(255, 255, 255, 0.025);
}
.ph-figure span { background: none; border: 1px solid var(--line-strong); font-weight: 400; }

/* skyline: thinner rings on the moon-hole, finer lake */
.sky-hole { box-shadow: 0 0 0 2px var(--saffron), 0 0 0 9px rgba(238, 141, 118, .35), 0 0 0 10px rgba(238, 141, 118, .6); }
.lake { background: repeating-linear-gradient(to bottom, rgba(179, 168, 240, .25) 0 1px, transparent 1px 12px); }

/* ==========================================================
   MINIMAL MONOCHROME — charcoal, cream, grey + one soft gold accent.
   (Overrides everything above. Delete this block to go back.)
   ========================================================== */
:root {
  --gold: #e3c58f;
  --saffron: var(--gold);
  --coral: var(--gold);
  --teal: #d8d3c9;
  --lilac: #9a968f;
}
body { background-image: none; }
a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(244, 239, 230, .3); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--gold); text-decoration-color: var(--gold); }
.site-nav a, .brand, .btn, .card .more, .section-head a, .links-list a, .pub .links a, .g-item { text-decoration: none; }
.art { color: var(--text); }
.label { color: var(--muted); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.brand { font-weight: 400; letter-spacing: .02em; }
.brand svg { color: var(--text); width: 30px; height: 30px; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--text); }

.btn, .btn.primary { border-color: var(--line-strong); color: var(--text); }
.btn.primary { border-color: var(--text); }
.btn:hover, .btn.primary:hover { background: rgba(244, 239, 230, .06); color: var(--text); border-color: var(--text); }

.section-head .num { border: 0; width: auto; height: auto; color: var(--dim); font-size: .85rem; letter-spacing: .1em; }
.section-head h2 { font-weight: 400; }
h1, h2, h3 { font-weight: 400; }

.card::after { display: none; }
.topic li::marker, .topic:nth-child(n) li::marker { color: var(--dim); }
.pub .badge { color: var(--muted); border-color: var(--line-strong); }
.pub .authors .me { box-shadow: inset 0 -1px 0 var(--muted); }
.pub-year { color: var(--text); font-weight: 400; }
.news time, .timeline .when { color: var(--gold); font-weight: 400; }
.facts .k { color: var(--muted); font-weight: 400; }
.filter[aria-pressed="true"] { border-color: var(--text); color: var(--text); }
.pub-tools .search:focus { border-color: var(--text); }

.timeline li::before, .timeline li:nth-child(n)::before { border-color: var(--dim); }
.timeline li:first-child::before { border-color: var(--text); box-shadow: none; background: var(--text); width: 9px; height: 9px; left: -31px; top: 10px; }
.portrait .orbit::after { background: var(--text); }
.portrait .orbit::before { display: none; }
.g-cap .tagdot, .g-item[data-tags] .tagdot { background: var(--dim); width: 7px; height: 7px; }

.ph { color: var(--dim); }
.ph::before, .ph::after { color: var(--gold); }
.ph-figure {
  background:
    radial-gradient(circle at 70% 42%, #0a0a0a 0 11%, transparent 11.3%),
    radial-gradient(circle at 70% 42%, transparent 0 12.6%, rgba(244, 239, 230, .7) 12.9% 13.3%, transparent 13.6%),
    radial-gradient(circle at 70% 42%, transparent 0 21%, rgba(244, 239, 230, .14) 21.3% 21.6%, transparent 21.9%),
    rgba(255, 255, 255, .02);
}

/* skyline: logo instead of the coloured moon, grey lake */
.sky-logo { position: absolute; z-index: 0; right: 10%; top: -12%; width: clamp(60px, 8vw, 120px); height: auto; color: var(--text); opacity: .9; }
.lake { background: repeating-linear-gradient(to bottom, rgba(244, 239, 230, .14) 0 1px, transparent 1px 12px); }
.sky-logo { width: clamp(110px, 13vw, 190px); top: -48%; right: 8%; opacity: 1; }

/* signature under the Chicago skyline */
.signature { text-align: center; padding: 8px 0 56px; }
.sig-name { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; letter-spacing: .02em; margin: 0; color: var(--text); }
.sig-role { margin: 6px 0 0; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.sky-logo { width: clamp(150px, 17vw, 260px); top: -72%; right: 7%; opacity: 1; filter: drop-shadow(0 0 14px rgba(227, 197, 143, .22)); }
.skyline-art .sky-logo { position: absolute; z-index: 0; width: clamp(130px, 15vw, 230px); height: auto; top: -80%; right: 8%; }
.skyline { padding-top: clamp(170px, 19vw, 300px); }
.skyline-art .sky-logo { filter: none; }

/* ---------- font: the one you liked (Avenir Next on Apple devices, Figtree elsewhere) ---------- */
:root {
  --font-head: "Avenir Next", "Avenir", "Figtree", system-ui, sans-serif;
  --font-body: "Avenir Next", "Avenir", "Figtree", system-ui, sans-serif;
}

/* ---------- smaller logo over the skyline ---------- */
.skyline { padding-top: clamp(90px, 9vw, 140px); }
.skyline-art .sky-logo { width: clamp(54px, 6vw, 92px); top: -42%; right: 9%; }

/* ---------- footer = signature at the bottom of every page ---------- */
.site-footer { padding: 56px 0 40px; }
.site-footer .container { flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center; }
.site-footer .sig-name { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 300; letter-spacing: .02em; color: var(--text); margin: 0; text-transform: none; }
.site-footer .sig-role { margin: 6px 0 0; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.site-footer .copy { margin-top: 22px; font-size: .78rem; letter-spacing: .1em; color: var(--dim); }

/* black hole rising behind the tall tower on the right (tower top is at 79% / 24.6% of the drawing) */
.skyline-art .sky-logo {
  --lw: clamp(100px, 12vw, 180px);
  width: var(--lw); right: auto;
  left: calc(79% - var(--lw) / 2);
  top: calc(24.6% - var(--lw) * 0.62);
  z-index: 0;
}
.btn-row { align-items: center; }

/* ---------- black hole image (replaces the drawn animation) ---------- */
.bh-img {
  position: absolute; z-index: 0; max-width: none; width: auto; pointer-events: none; user-select: none;
  mix-blend-mode: screen;                     /* the image's black melts into the charcoal page */
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
.hero-bh { height: 108%; right: 4%; top: 50%; transform: translateY(-50%); }
.page-bh { height: 190%; right: 6%; top: 50%; transform: translateY(-50%); opacity: .85; }
.lost-bh { height: 70%; left: 50%; top: 4%; transform: translateX(-50%); }
@media (max-width: 900px) {
  .hero-bh { height: 58%; right: auto; left: 50%; top: 0; transform: translateX(-50%); }
  .page-bh { height: 170%; right: -8%; }
}

/* research icons on the homepage cards */
.card-icon { width: 72px; height: 72px; color: var(--text); margin: 4px 0 24px -6px; }
.card-icon svg { width: 100%; height: 100%; display: block; }

/* ---------- bigger black hole on the homepage (overlaps the name softly) ---------- */
.hero-bh { height: 150%; right: -2%; top: 50%; transform: translateY(-50%); }
.hero h1, .hero .role, .hero .lead { text-shadow: 0 1px 18px rgba(10, 10, 10, .85); }
@media (max-width: 900px) {
  .hero-bh { height: 82%; top: -4%; left: 50%; right: auto; transform: translateX(-50%); }
  .hero .container { padding-top: 44vh; }
}

/* ---------- your photo on the About page ---------- */
.portrait { margin: 0; }
.portrait-img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------- even bigger black hole, with soft top/bottom fades (no hard crop line) ---------- */
@media (min-width: 901px) {
  .hero-bh { height: 175%; right: -4%; top: 50%; transform: translateY(-50%); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 14%, transparent 78%, var(--bg) 100%);
}

/* ---------- material: drawings on white paper ---------- */
.g-item.paper { background: #fff; color: #1a1a1a; }
.g-item.paper .g-cap { background: var(--bg-2); color: var(--text); }
.g-item.paper img { padding: 18px; background: #fff; }
.g-miss { display: none; padding: 40px 20px; text-align: center; font-size: .9rem; color: #6b675f; }
.g-item.missing img { display: none; }
.g-item.missing .g-miss { display: block; }
.lightbox img { background: #fff; }

/* ---------- news / blog ---------- */
.container.narrow { width: min(820px, 100% - 48px); }
.posts { display: grid; gap: 18px; }
.post { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; }
.post[hidden] { display: none; }
.post-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.post-meta time { color: var(--gold); font-size: .9rem; }
.post .mission { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; }
.post h2 { font-size: 1.5rem; margin: 0 0 .5em; }
.post p { color: var(--muted); margin-bottom: 1em; }
.post .links { display: flex; gap: 18px; }
.post .links a { font-size: .95rem; }
.site-nav a { padding: 8px 10px; }

/* ---------- news as "bites": image + short summary ---------- */
.bite-intro { margin-bottom: 32px; }
.bite-intro p { color: var(--muted); }
.bite-intro p:first-child { color: var(--text); }
.post.bite { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 24px; align-items: start; }
.bite-img { margin: 0; background: #fff; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.bite-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.bite-ref { font-size: .9rem; color: var(--dim) !important; border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 700px) { .post.bite { grid-template-columns: 1fr; } }

/* ---------- material page: grouped gallery ---------- */
.g-index { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 24px; font-size: .95rem; }
.g-index a { color: var(--muted); text-decoration: none; }
.g-index a:hover { color: var(--gold); }
.g-group { padding-top: 56px; scroll-margin-top: calc(var(--header-h) + 16px); }
.g-group + .g-group { border-top: 1px solid var(--line); margin-top: 32px; }
.g-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.g-head h2 { font-size: 1.7rem; margin: 0; }
.g-head p { margin: 0; color: var(--muted); font-size: .98rem; }
figure.g-item { margin: 0 0 24px; }
.g-zoom { display: block; }
.g-item.paper .g-zoom { background: #fff; }
.g-item.dark { background: #121212; border: 1px solid var(--line); }
.g-item.dark img { padding: 18px; }
.g-item.dark .g-miss { color: var(--dim); }
.g-item.missing .g-zoom { display: none; }
.g-item.missing .g-miss { display: block; }
.g-miss code { font-size: .8rem; word-break: break-all; }
.g-cap .g-paper { display: inline-block; margin-top: 6px; font-size: .9rem; }
figure.g-item:hover { transform: translateY(-3px); }
.gallery { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; align-items: start; } .gallery .g-item, figure.g-item { margin: 0; }

/* ---------- material: every preview the same size ---------- */
.gallery { align-items: stretch; }
figure.g-item { display: flex; flex-direction: column; }
.g-zoom { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.g-zoom img, .g-item.paper img, .g-item.dark img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.g-item .g-cap { flex: 1; }
.g-item.missing .g-miss { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 20px; }

/* missing drawings: hidden on the live site, visible only when you open the page from your computer */
.g-item.missing { display: none; }
html.local .g-item.missing { display: flex; }
.g-zoom img, .g-item.paper img, .g-item.dark img { padding: 8px; }

/* ---------- skyline: full width, lake right under the buildings ---------- */
.skyline-art { width: 100%; }
.lake { margin-top: -2px; }
.skyline-art .sky-logo { left: calc(79.3% - var(--lw) / 2); top: calc(27% - var(--lw) * 0.62); }
.lake { margin-top: -0.9vw; position: relative; z-index: 0; }
.brand-logo { width: 38px; height: 38px; flex: none; display: block; }

/* hero text glow: same colour as the page background, narrower */
.hero h1, .hero .role, .hero .lead, .hero-text { text-shadow: 0 0 8px rgba(26, 26, 26, .9); }

/* ---------- "Accretion in progress" notice for unfinished pages ---------- */
.wip { border-bottom: 1px solid var(--line); }
.wip .container { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 16px 0; text-align: center; }
.wip-title { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text); }
.wip-text { font-size: .9rem; color: var(--muted); }
.wip-dot { position: relative; width: 14px; height: 14px; flex: none; }
.wip-dot::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0a0a0a; box-shadow: 0 0 0 1px var(--text); }
.wip-dot::after { content: ""; position: absolute; top: -1px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--gold); transform-origin: 1.5px 8px; animation: wip-orbit 2.4s linear infinite; }
@keyframes wip-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wip-dot::after { animation: none; } }

/* ---------- smaller skyline, extended with a horizontal ground line to both edges ---------- */
.skyline-art { width: min(1100px, 74%); }
@media (max-width: 700px) { .skyline-art { width: 88%; } }
.skyline-art::before, .skyline-art::after {
  content: ""; position: absolute; z-index: 1; top: 96.9%; height: 2px; width: 100vw;
  background: #f4efe6; transform: translateY(-50%);
}
.skyline-art::before { right: calc(100% - 1px); }
.skyline-art::after { left: calc(100% - 1px); }

/* research-theme icons (homepage cards and research page) */
.card-icon { width: auto; height: 84px; margin: 4px 0 26px; }
.card-icon img { height: 100%; width: auto; display: block; }
.topic-icon { aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.015); }
.topic-icon img { width: 58%; height: auto; }
