/* Nikoloz Tchumburidze — the plain pages (Design, each project, Paintings, AI, About).
   Same palette and type as the spiral, but these pages simply scroll.
   They are written by tools/build_pages.py from js/data.js. */

:root {
  --ink: #0a0a0a;
  --paper: #faf7f0;
  --red: #fc3030;
  --mute: rgba(250, 247, 240, 0.62);
  --line: rgba(250, 247, 240, 0.16);
  --display: "Bodoni Moda", "Bodoni 72", Didot, serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --pad: clamp(18px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; }

html { background: #070606; color-scheme: dark; }
body {
  min-height: 100vh;
  background: linear-gradient(#1a1511 0, #100d0b 380px, #070606 900px) no-repeat #070606;
  color: var(--paper);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* ---------- top bar ---------- */

.top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px;
  padding: 16px var(--pad);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin-right: auto;
  font-weight: 600; text-decoration: none;
}
.top nav { display: flex; gap: 2px; }
.top nav a {
  padding: 9px 13px; border-radius: 999px;
  color: var(--mute); font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none;
  transition: color 0.2s;
}
.top nav a:hover { color: var(--paper); }
.top nav a[aria-current] { color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: transform 0.12s var(--ease), background-color 0.2s;
}
.pill:hover { background: #fff; }
.pill:active { transform: scale(0.955); }
.pill-ghost { background: rgba(10, 10, 10, 0.55); color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.pill-ghost:hover { background: rgba(250, 247, 240, 0.1); }

/* ---------- shared type ---------- */

h1 {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(44px, 6vw, 84px); line-height: 0.98; letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 28px; line-height: 1.05; }
.tag { font-size: 14px; font-weight: 600; color: var(--mute); }
.sub { color: var(--mute); }
.lead { max-width: 52ch; font-size: 18px; }

.page { padding: clamp(28px, 5vw, 64px) var(--pad) 80px; }
.page-head { display: grid; justify-items: start; gap: 14px; margin-bottom: clamp(30px, 5vw, 60px); }

/* ---------- one project: the words stay put, the pictures scroll ---------- */

.project {
  display: grid; grid-template-columns: minmax(260px, 0.42fr) 1fr; align-items: start;
  gap: clamp(24px, 4.5vw, 64px);
  padding: clamp(28px, 5vw, 64px) var(--pad) 80px;
}
.p-text { position: sticky; top: 28px; display: grid; justify-items: start; gap: 12px; }
.p-text .body { max-width: 42ch; margin: 6px 0 12px; }
.p-media { display: grid; gap: 14px; min-width: 0; }
.p-media img { width: 100%; background: #15110e; }
.next { display: grid; justify-items: start; gap: 6px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.next a { font-family: var(--display); font-style: italic; font-size: clamp(30px, 4vw, 48px); line-height: 1; text-decoration: none; }
.next a:hover { color: var(--red); }

/* ---------- the list of design projects ---------- */

.works { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 40px 26px; }
.work { display: grid; gap: 6px; text-decoration: none; }
.work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 8px; background: #15110e; transition: opacity 0.2s; }
.work:hover img { opacity: 0.86; }
.work p { color: var(--mute); }

/* ---------- paintings: hung in columns ---------- */

.wall { columns: 3 280px; column-gap: 26px; }
.wall figure { break-inside: avoid; margin: 0 0 30px; }
.wall img { width: 100%; background: #15110e; }
figcaption { margin-top: 8px; font-size: 14px; color: var(--mute); }

/* ---------- AI clips ---------- */

.reels { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; gap: 34px 22px; }
.reel video { width: 100%; border-radius: 10px; background: #15110e; margin-bottom: 10px; }
.reel h2 { font-size: 24px; }
.reel p { font-size: 14px; color: var(--mute); margin-top: 4px; }

/* ---------- about ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); align-items: start; gap: clamp(28px, 6vw, 90px); }
.about-text { display: grid; gap: 16px; max-width: 54ch; font-size: 18px; }
.facts div { padding: 13px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--mute); }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.facts a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.facts a:hover { text-decoration-color: var(--red); }

/* ---------- foot ---------- */

.foot {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between;
  padding: 26px var(--pad) 34px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--mute);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.foot a:hover { color: var(--paper); }

@media (min-width: 700px) {
  .reel.wide { grid-column: span 2; }
}
@media (max-width: 820px) {
  .project, .about { grid-template-columns: 1fr; }
  .p-text { position: static; }
}
@media (max-width: 640px) {
  .top { gap: 10px 8px; }
  .top nav { order: 3; width: 100%; margin-left: -13px; }
  .brand { gap: 8px; }
  .brand span { font-size: 15px; }
  .pill { padding: 11px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01s !important; }
}
