/* =========================================================================
   robertoomezzolli.com — editorial research index
   Shared stylesheet for / and /work
   Warm paper · near-black ink · mono metadata · thin hairlines · no images
   ========================================================================= */

:root {
  --paper:     #f7f4ef;   /* warm off-white */
  --ink:       #151515;   /* near-black */
  --muted:     #6b675f;   /* gray */
  --hairline:  rgba(0,0,0,0.12);
  --surface:   rgba(255,255,255,0.55);
  --accent:    #21405f;   /* archival ink blue — the one quiet accent */
  --mark-open: #9a9a92;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono:  "Spline Sans Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --shell: 1140px;   /* outer shell */
  --read:  45rem;    /* reading column ~720px */
  --pad:   clamp(1.25rem, 5vw, 2.75rem);
}

/* Light only — the site is intentionally the warm off-white editorial surface
   in every context. No automatic dark mode (it is not part of the design). */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad); }

/* reading-width helper: keeps prose to ~70–78 chars */
.read { max-width: var(--read); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 120ms ease, color 120ms ease;
}
a:hover { text-decoration-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

/* shared mono / label primitives */
.mono,
.kicker,
.meta,
nav.top a,
.label { font-family: var(--mono); }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* small inline status dots */
.dot { display: inline-block; width: 0.42em; height: 0.42em; border-radius: 50%; vertical-align: 0.12em; margin-right: 0.5em; }
.dot.pub  { background: var(--accent); }
.dot.prep { background: transparent; border: 1px solid var(--mark-open); }

/* =========================================================================
   TOP BAR
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.topbar .shell {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-top: 0.95rem; padding-bottom: 0.95rem;
}
.topbar .wordmark {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
nav.top { display: flex; flex-wrap: wrap; gap: 1.15rem; justify-content: flex-end; }
nav.top a {
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--accent); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding: clamp(4rem, 12vh, 8.5rem) 0 clamp(3rem, 7vh, 5rem); }
.hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 1.1rem;
}
.hero .thesis {
  margin-top: clamp(1.8rem, 4vh, 2.8rem);
  max-width: 48rem;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.hero .thesis .accentline { display: block; margin-top: 1rem; color: var(--muted); }
.hero .evidence {
  margin-top: 2.2rem;
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink);
}
.hero .tff {
  margin-top: 1.2rem; max-width: var(--read);
  color: var(--muted); font-size: 1.02rem;
}
.disclaimer {
  margin-top: 2.4rem; max-width: var(--read);
  border-left: 2px solid var(--hairline);
  padding: 0.4rem 0 0.4rem 1.1rem;
  color: var(--muted); font-size: 0.97rem;
}

/* =========================================================================
   THE THREAD
   ========================================================================= */
.thread {
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 3px;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 760px) {
  .thread { grid-template-columns: 13rem 1fr; gap: 2.5rem; }
}
.thread .t-title {
  font-family: var(--serif); font-style: italic;
  font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.01em;
}
.thread .t-title .k { display: block; font: inherit; font-style: normal;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.thread .lede { font-size: 1.18rem; line-height: 1.45; }
.thread ul.litany { list-style: none; margin: 1.1rem 0; }
.thread ul.litany li { color: var(--muted); line-height: 1.7; }
.thread .close { margin-top: 1.1rem; max-width: 38rem; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
section.block { padding-top: clamp(3.5rem, 9vh, 6rem); }
section.block + section.block { border-top: 1px solid var(--hairline); }
.sec-head { margin-bottom: 2.2rem; }
.sec-head .num {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--muted); display: block; margin-bottom: 0.5rem;
}
.sec-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  line-height: 1.05; letter-spacing: -0.018em;
}
.sec-head .intro { margin-top: 1rem; max-width: var(--read); color: var(--muted);
  font-size: 1.08rem; line-height: 1.5; }

/* =========================================================================
   PROJECT CARDS
   ========================================================================= */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.3rem; }
@media (min-width: 760px) {
  .cards.two { grid-template-columns: 1fr 1fr; }
}
.card {
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 3px;
  padding: 1.5rem 1.6rem 1.4rem;
  transition: border-color 140ms ease;
  display: flex; flex-direction: column;
}
.card:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--hairline)); }
.card.span { grid-column: 1 / -1; }
.card .meta {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); line-height: 1.6;
  margin-bottom: 0.85rem;
}
.card h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.2rem; line-height: 1.22; letter-spacing: -0.005em;
  color: var(--ink);
}
.card h3 a { text-decoration-color: var(--mark-open); }
.card .desc { margin-top: 0.7rem; color: var(--muted);
  font-size: 0.98rem; line-height: 1.55; max-width: 42rem; }
.card .links {
  margin-top: 1.05rem; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.card .links a { color: var(--muted); text-decoration-color: var(--hairline); }
.card .links a:hover { color: var(--accent); }

/* =========================================================================
   LATEST WORK (feed)
   ========================================================================= */
.feed-group + .feed-group { margin-top: 2.8rem; }
.feed-group > h3 {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: 1.25rem; letter-spacing: -0.005em;
}
.feed-group > .sub { color: var(--muted); font-size: 0.97rem; margin-top: 0.3rem;
  max-width: var(--read); }
ul.feed { list-style: none; margin-top: 1.2rem; }
ul.feed li {
  display: grid; grid-template-columns: 1fr; gap: 0.3rem;
  padding: 1.05rem 0; border-top: 1px solid var(--hairline);
}
ul.feed li:first-child { border-top: none; }
.feed .f-meta {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem; align-items: baseline;
}
.feed .f-src { color: var(--ink); }
.feed .f-class { color: var(--accent); }
.feed .f-title { font-weight: 500; font-size: 1.05rem; line-height: 1.3; }
.feed .f-desc { color: var(--muted); font-size: 0.95rem; max-width: 44rem; }
.feed .f-empty { color: var(--muted); font-size: 0.97rem; }

/* filter bar (work page) */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.8rem 0 0.6rem; }
.filters button {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  background: transparent; border: 1px solid var(--hairline);
  border-radius: 2px; padding: 0.4rem 0.75rem; cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* =========================================================================
   LAB (restyled SVG schematics)
   ========================================================================= */
.lab .proj {
  border: 1px solid var(--hairline); background: var(--surface);
  border-radius: 3px; padding: 1.6rem 1.7rem 1.5rem; margin-top: 1rem;
}
.lab .p-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.7rem; }
.lab .p-name { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; }
.lab .p-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); }
.lab .p-desc { color: var(--muted); font-size: 0.98rem; margin-top: 0.6rem; max-width: 44rem; }
.lab figure { margin: 1.4rem 0 0; }
.lab svg { display: block; width: 100%; max-width: 27rem; height: auto; }
.lab figcaption { font-family: var(--mono); font-size: 0.64rem; color: var(--muted);
  margin-top: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
.lab .m { margin-top: 1rem; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lab .m a { color: var(--muted); }

/* =========================================================================
   VENTURES
   ========================================================================= */
.ventures .grp + .grp { margin-top: 2.2rem; }
.ventures .grp > h3 {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}
.v-list { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
@media (min-width: 760px) { .v-list { grid-template-columns: 1fr 1fr; } }
.v-item { border: 1px solid var(--hairline); background: var(--surface);
  border-radius: 3px; padding: 1.1rem 1.25rem; }
.v-item .v-name { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; }
.v-item .v-note { color: var(--muted); font-size: 0.96rem; display: block; margin-top: 0.25rem; }

/* =========================================================================
   CLOSING + FOOTER
   ========================================================================= */
.closing { padding: clamp(3.5rem, 9vh, 6rem) 0 0; }
.closing p {
  max-width: 50rem; font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.4; letter-spacing: -0.01em;
}
footer {
  margin-top: clamp(3.5rem, 9vh, 6rem);
  padding: 2.2rem 0 4.5rem; border-top: 1px solid var(--hairline);
}
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 1.5rem; }
footer .row p, footer .row nav { color: var(--muted); font-size: 0.95rem; }
footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
footer .fine { margin-top: 1.3rem; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* =========================================================================
   MOBILE
   ========================================================================= */
@media (max-width: 620px) {
  body { font-size: 1.0625rem; }
  .topbar .shell { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  nav.top { justify-content: flex-start; gap: 0.9rem 1rem; }
  .hero { padding-top: 3.2rem; }
  .card { padding: 1.3rem 1.25rem; }
  .feed .f-desc, .card .desc, .lab .p-desc { font-size: 0.96rem; }
}

/* =========================================================================
   SECOND PASS — thesis-led hero, metadata chips, CSS pipeline diagrams
   ========================================================================= */

/* Hero: lead with the thesis, then the litany, then the build line. */
.hero .lead {
  margin-top: clamp(1.8rem, 4.5vh, 2.8rem);
  max-width: 50rem;
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero .litany-inline {
  margin-top: 1.15rem;
  max-width: 46rem;
  font-size: clamp(1.1rem, 1.9vw, 1.32rem);
  line-height: 1.5;
  color: var(--muted);
}
.hero .build {
  margin-top: 1.5rem;
  max-width: 47rem;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* Metadata as scannable chips: [TYPE · PAPER] [STATUS · …] [DOMAIN · …] */
/* Card metadata: stacked pills, one per line — unmistakably separated. */
.card .meta {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.4rem; margin-bottom: 1.15rem;
}
/* Lab status tags stay inline. */
.lab .m {
  display: flex; flex-wrap: wrap; gap: 0.55rem;
  margin-top: 1.1rem; line-height: 1;
}
.chip,
.card .meta > span,
.lab .m > span {
  font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  padding: 0.34rem 0.6rem;
}
.chip.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); }
.lab .m a { color: var(--muted); text-decoration: none; }
.lab .m a:hover { color: var(--accent); }

/* CSS-only pipeline diagram: bordered nodes + arrows; vertical on mobile. */
.pipeline {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.7rem; margin: 1.5rem 0 0;
}
.pipeline .node {
  font-family: var(--mono);
  font-size: 0.64rem; letter-spacing: 0.06em;
  color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 0.5rem 0.7rem; background: var(--paper);
}
.pipeline .node.accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--hairline));
}
.pipeline .arrow { color: var(--mark-open); font-family: var(--mono); font-size: 0.8rem; }
.pipe-cap {
  font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin-top: 0.85rem;
}

@media (max-width: 620px) {
  .pipeline { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .pipeline .arrow { transform: rotate(90deg); margin-left: 1.1rem; }
  .pipeline .node { width: auto; }
}

/* Thread lands on the synthesizing question. */
.thread .lede { color: var(--muted); }
.thread .close {
  margin-top: 1.2rem; max-width: 34rem;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.22;
  letter-spacing: -0.01em; color: var(--ink);
}

/* Card title / subtitle split. */
.card h3 .sub {
  display: block; margin-top: 0.3rem;
  font-weight: 400; font-style: italic; font-size: 0.86em;
  line-height: 1.25; color: var(--muted);
}
