/* jonaengel.ch — v0.1.1
 *
 * A dark editorial surface with one Swiss-red accent. The interface stays
 * restrained so the paintings and the evidence carry the visual weight.
 */

:root {
  color-scheme: dark;

  --paper: #0e100f;
  --paper-2: #161917;
  --paper-3: #1d211e;
  --ink: #e9e6de;
  --ink-soft: #b3b8b0;
  --ink-faint: #858b83;
  --line: #292e2a;
  --line-strong: #414842;

  /* Accent, neutralized (was Swiss red #ff0000/#ff2424 — too brutal everywhere).
     Token names kept so the ~25 call sites don't have to change. Monochrome now:
     -text is a quiet light-gray for labels/eyebrows/emphasis/link-hover;
     -core is a restrained dimmer gray for structural marks (dot, borders, dashes). */
  --swiss-red-core: #6b716a;
  --swiss-red-text: #c1c5bd;
  --swiss-red-soft: #24291f;
  --swiss-red-print: #3a3a3a;

  --max: 780px;
  --wide: 1080px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  min-width: 0;
  background-color: var(--paper);
  background-image: radial-gradient(
    900px 360px at 66% -130px,
    rgb(255 0 0 / 9%),
    transparent 72%
  );
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--swiss-red-soft);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  border-bottom: 1px solid var(--line-strong);
  overflow-wrap: anywhere;
  transition: border-color 140ms ease, color 140ms ease;
}

a:hover {
  color: var(--swiss-red-text);
  border-color: var(--swiss-red-core);
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--swiss-red-text);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.08;
  overflow-wrap: break-word;
}

h1 {
  max-width: 19ch;
  font-size: clamp(2.45rem, 7vw, 4.35rem);
}

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 1.1rem;
}

strong {
  color: var(--ink);
  font-weight: 650;
}

time {
  white-space: nowrap;
}

.muted {
  color: var(--ink-soft);
}

.faint {
  color: var(--ink-faint);
}

.wrap {
  width: min(100%, calc(var(--max) + 3rem));
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.wrap--wide {
  width: min(100%, calc(var(--wide) + 3rem));
}

.skip {
  position: fixed;
  left: 0.75rem;
  top: 0.5rem;
  z-index: 100;
  min-height: 44px;
  padding: 0.58rem 0.9rem;
  border: 1px solid var(--swiss-red-core);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  transform: translateY(-180%);
}

.skip:focus {
  transform: translateY(0);
}

/* Site chrome */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-top: 3px solid var(--swiss-red-core);
  border-bottom: 1px solid var(--line);
  background: rgb(14 16 15 / 94%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.top .wrap,
footer .wrap {
  width: min(100%, calc(var(--wide) + 3rem));
}

.nav {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1.4rem;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.brand b {
  color: var(--swiss-red-text);
}

.navlinks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem 1.15rem;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.navlinks a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 0;
  white-space: nowrap;
}

.navlinks a:hover,
.navlinks a[aria-current="page"],
.navlinks a[aria-current="location"] {
  color: var(--swiss-red-text);
}

.lang {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  white-space: nowrap;
}

.lang button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
}

.lang button:hover,
.lang button.active,
.lang button[aria-pressed="true"] {
  color: var(--swiss-red-text);
}

.langblock[hidden] {
  display: none !important;
}

.anchor-alias {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Editorial layout */

.hero,
.note-hero {
  padding: clamp(3.4rem, 9vw, 5.8rem) 0 1.25rem;
}

.hero h1,
.note-hero h1 {
  margin-bottom: 1.35rem;
}

.lead,
.dek,
.standfirst {
  max-width: 64ch;
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2.2vw, 1.36rem);
  line-height: 1.52;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

.kicker .dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--swiss-red-core);
}

.label,
.eyebrow,
.sec-label,
.cat-group > .n {
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.71rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.45;
  text-transform: uppercase;
}

.sec-label {
  margin-bottom: 1.15rem;
}

.section-link {
  border: 0;
}

section {
  position: relative;
  margin-top: 2.7rem;
  padding: 2.8rem 0 0;
  border-top: 1px solid var(--line);
}

.hero,
.note-hero,
section.hero {
  margin-top: 0;
  border-top: 0;
}

main > .wrap {
  padding-bottom: 1rem;
}

.about {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-top: 1.4rem;
}

.portrait {
  margin: 0;
}

.portrait picture,
.portrait img {
  display: block;
}

.portrait img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  filter: grayscale(1) brightness(0.98) contrast(1.03);
}

.portrait figcaption {
  margin-top: 0.6rem;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
}

.spine,
.pubs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.spine li,
.pubs li {
  position: relative;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
}

.spine li {
  padding-left: 1.55rem;
}

.spine li::before {
  position: absolute;
  left: 0;
  color: var(--swiss-red-text);
  content: "→";
  font-family: var(--mono);
}

.spine li:last-child,
.pubs li:last-child {
  border-bottom: 0;
}

.pubs .venue {
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.4rem;
  margin-top: 0.5rem;
}

.links a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-color: var(--line);
  font-family: var(--mono);
  font-size: 0.88rem;
}

.links .k {
  color: var(--ink-faint);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aside {
  margin-top: 1.7rem;
  padding: 1.25rem 1.35rem;
  border-left: 3px solid var(--swiss-red-core);
  background: var(--paper-2);
}

.aside h3 {
  margin-bottom: 0.65rem;
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.aside p:last-child {
  margin-bottom: 0;
}

/* Art plates */

.plate {
  margin: 2.5rem 0 2.2rem;
}

.plate picture {
  display: block;
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  filter: brightness(0.97) saturate(0.98);
  transition: filter 220ms ease;
}

.plate--portrait img {
  width: auto;
  max-width: 100%;
  max-height: 74vh;
}

.plate:hover img,
.plate img:focus-visible {
  filter: brightness(1) saturate(1);
}

.plate figcaption {
  margin-top: 0.72rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.015em;
  line-height: 1.55;
}

.plate figcaption b,
.plate figcaption i {
  color: var(--ink-soft);
}

.plate--held .held {
  padding: clamp(2.4rem, 8vw, 4.6rem) 1.5rem;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, var(--swiss-red-core) 0 9px, transparent 9px),
    var(--paper-2);
  text-align: center;
}

.plate--held .work {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-style: italic;
  line-height: 1.25;
}

.plate--held .who {
  margin: 0 0 1rem;
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plate--held .why {
  max-width: 51ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

/* Notes index */

.cat-group {
  margin-top: 2.8rem;
}

.notes-list {
  margin: 1.2rem 0 2rem;
  padding: 0;
  list-style: none;
}

.notes-list > li {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.notes-list > li:last-child {
  border-bottom: 1px solid var(--line);
}

.note-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.45rem;
  align-items: start;
}

.note-row .image-link {
  display: block;
  border: 0;
}

.note-row picture,
.note-row img {
  display: block;
}

.note-row img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  filter: brightness(0.94) saturate(0.96);
}

.note-row:hover img {
  filter: brightness(1) saturate(1);
}

.note-row .meta,
.note-row .art {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.69rem;
  line-height: 1.5;
}

.note-row .meta {
  color: var(--swiss-red-text);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.note-row h2,
.note-row h3 {
  margin: 0.5rem 0 0.55rem;
  font-size: 1.42rem;
}

.note-row h2 a,
.note-row h3 a {
  border: 0;
}

.note-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.note-row .art {
  margin-top: 0.75rem;
}

.noart {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, var(--swiss-red-core) 0 7px, transparent 7px),
    var(--paper-2);
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  text-align: center;
}

/* Individual notes */

.note-hero {
  padding-bottom: 0;
}

.note-hero h1 {
  max-width: 23ch;
  margin-top: 0.95rem;
  font-size: clamp(2.35rem, 6vw, 3.55rem);
}

.note-body {
  max-width: 68ch;
  padding-top: 0.4rem;
}

.note-body > h2 {
  margin-top: 2.5rem;
}

.note-body > p,
.note-body > ul,
.note-body > ol,
.note-body > dl {
  margin-bottom: 1.3rem;
}

.note-body ul,
.note-body ol {
  padding-left: 1.35rem;
  color: var(--ink-soft);
}

.note-body li {
  margin: 0.55rem 0;
  padding-left: 0.25rem;
}

.note-body li::marker {
  color: var(--swiss-red-text);
}

.decision-map {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.42fr) minmax(0, 1fr);
  gap: 0;
  margin: 1.5rem 0;
  border-top: 1px solid var(--line-strong);
}

.decision-map dt,
.decision-map dd {
  margin: 0;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.decision-map dt {
  padding-right: 1rem;
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.decision-map dd {
  color: var(--ink-soft);
}

.evidence-table {
  width: 100%;
  margin: 1.7rem 0 2rem;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.evidence-table caption {
  padding-bottom: 0.7rem;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.evidence-table th,
.evidence-table td {
  padding: 0.8rem 0.9rem 0.8rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
}

.evidence-table th {
  border-top: 1px solid var(--line-strong);
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evidence-table th + th,
.evidence-table td + td {
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
}

.note-sources {
  margin-top: 2.8rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.note-sources h2 {
  margin-bottom: 0.85rem;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.note-sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-sources li {
  margin: 0.6rem 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.77rem;
}

.pager a {
  max-width: 46%;
  border: 0;
}

.pager .dir {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink-faint);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.pager .none {
  color: var(--line-strong);
}

/* Supporting pages */

.credits-list {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.credits-list > li {
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}

.credits-list h2,
.credits-list h3 {
  margin-bottom: 0.55rem;
}

.credits-list p:last-child {
  margin-bottom: 0;
}

.source-note {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.73rem;
  line-height: 1.55;
}

dl.details {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.45rem 1rem;
}

dl.details dt {
  color: var(--swiss-red-text);
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

dl.details dd {
  margin: 0;
  color: var(--ink-soft);
}

/* Footer */

footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.025em;
}

.foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.foot .disc {
  max-width: 64ch;
  line-height: 1.6;
}

.foot nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem 1rem;
  flex-wrap: wrap;
}

.foot a {
  min-height: 24px;
  border: 0;
}

/* Responsive */

@media (max-width: 760px) {
  html {
    scroll-padding-top: 9.5rem;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr auto;
    padding-block: 0.55rem;
  }

  .navlinks {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: -0.15rem 0 0;
    justify-content: flex-start;
    gap: 0 1rem;
    overflow-x: auto;
  }

  .nav > .lang {
    grid-column: 2;
    grid-row: 1;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .portrait {
    max-width: 280px;
  }

  .foot {
    flex-direction: column;
  }

  .foot nav {
    justify-content: flex-start;
  }
}

@media (max-width: 580px) {
  .wrap {
    width: 100%;
    padding-inline: 1rem;
  }

  .top .wrap,
  footer .wrap {
    width: 100%;
  }

  body {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3rem);
  }

  .navlinks {
    font-size: 0.7rem;
  }

  .hero,
  .note-hero {
    padding-top: 3.15rem;
  }

  .links {
    grid-template-columns: 1fr;
  }

  .note-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .note-row .image-link {
    max-width: 330px;
  }

  .decision-map {
    grid-template-columns: 1fr;
  }

  .decision-map dt {
    padding-bottom: 0.2rem;
    border-bottom: 0;
  }

  .decision-map dd {
    padding-top: 0;
  }

  .pager {
    flex-direction: column;
  }

  .pager a {
    max-width: 100%;
  }

  dl.details {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    color-scheme: light;
    --paper: #ffffff;
    --paper-2: #ffffff;
    --paper-3: #ffffff;
    --ink: #111111;
    --ink-soft: #333333;
    --ink-faint: #555555;
    --line: #cccccc;
    --line-strong: #999999;
    --swiss-red-core: var(--swiss-red-print);
    --swiss-red-text: var(--swiss-red-print);
    --swiss-red-soft: #e8e8e6;
  }

  body {
    background: #ffffff;
    color: #111111;
    font-size: 11pt;
  }

  .top,
  .pager,
  .lang,
  .navlinks {
    display: none;
  }

  .plate img {
    filter: none;
  }

  a {
    border: 0;
  }

  .note-body {
    max-width: none;
  }
}

/* ---------- datacenters-ai.html: market-note grids (scoped, collision-free) ---------- */

.dc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 1.4rem 0 0;
}
.dc-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.dc-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.dc-cell {
  background: var(--paper-2);
  padding: 1.05rem 1.15rem;
}
.dc-cell .k {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--swiss-red-text);
  margin-bottom: 0.5rem;
}
.dc-cell h3 {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
}
.dc-cell p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}
.dc-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--ink-faint);
  margin-top: 1.1rem;
  max-width: 90ch;
}
.dc-contact {
  display: flex;
  gap: 1.4rem 2rem;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
}
@media (max-width: 820px) {
  .dc-grid,
  .dc-grid.cols-4,
  .dc-grid.cols-2 { grid-template-columns: 1fr; }
}
