/* ConcreteMGM: concrete poetry + microgravity. Light concrete grey, strict geometric type, one cobalt accent.
   The page is mostly one canvas (field.js): the poem is the arrangement of the letters. */
:root {
  --bg: #ecece7;
  --ink: #111111;
  --muted: #6b6b66;
  --line: #cfcfc8;
  --accent: #1f4bff;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --ink: #eeeeea; --muted: #9a9a94; --line: #2d2d2a; --accent: #6d8bff; }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; }

.top { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 48px); pointer-events: none; }
.top a { pointer-events: auto; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.mark span { color: var(--accent); }
.back { font-family: var(--mono); font-size: .8rem; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--accent); }

.stage { position: relative; height: 100svh; min-height: 520px; overflow: hidden; border-bottom: 1px solid var(--line); }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.title { position: absolute; left: clamp(16px, 4vw, 48px); bottom: clamp(28px, 6vh, 64px); z-index: 2; pointer-events: none; }
.title h1 { font-weight: 300; font-size: clamp(3rem, 11vw, 8.5rem); line-height: .9; letter-spacing: -.02em; }
.title h1 span { font-weight: 700; color: var(--accent); font-size: .4em; letter-spacing: .08em; vertical-align: top; margin-left: .2em; }
.title p { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin-top: 12px; }

.gswitch { position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(28px, 6vh, 64px); z-index: 2;
  display: flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--ink); color: var(--ink);
  font: 500 .85rem var(--mono); padding: 8px 12px; cursor: pointer; }
.gswitch i { width: 34px; height: 16px; border: 1px solid var(--ink); position: relative; }
.gswitch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--accent); transition: left .3s; }
.gswitch[aria-pressed="true"] i::after { left: 20px; }
.gswitch b { font-weight: 500; opacity: .45; }
.gswitch[aria-pressed="false"] b:first-child, .gswitch[aria-pressed="true"] b:last-child { opacity: 1; }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); border-bottom: 1px solid var(--line); }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 28px clamp(16px, 3vw, 32px) 32px; text-decoration: none;
  border-right: 1px solid var(--line); transition: background .2s; }
.tile:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.tile svg { width: 72px; height: 72px; margin-bottom: 14px; transition: transform .6s; }
.tile:hover svg { transform: rotate(-12deg) translateY(-4px); }
.tile .ac { fill: var(--accent); }
.tile.early svg { opacity: .75; }
.k { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.t { font-size: 1.25rem; font-weight: 500; }

.foot { padding: 24px clamp(16px, 4vw, 48px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.sibs { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* three states for the poem: drift, fall, orbit */
.modes { position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(28px, 6vh, 64px); z-index: 2; display: flex; border: 1px solid var(--ink); background: var(--bg); }
.modes button { background: none; border: none; color: var(--muted); font: 500 .85rem var(--mono); padding: 8px 14px; cursor: pointer; }
.modes button + button { border-left: 1px solid var(--ink); }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.modes button:hover:not([aria-pressed="true"]) { color: var(--accent); }

/* characterization: one project in two techniques, and the study that joins them */
.tile.wide { grid-column: span 2; }
@media (max-width: 720px) { .tile.wide { grid-column: 1 / -1; } }
.sub { list-style: none; margin-top: 14px; display: grid; gap: 12px; }
.sub li { display: grid; grid-template-columns: 3.6rem 40px 1fr; gap: 12px; align-items: start; font-size: .92rem; line-height: 1.45; color: var(--muted); }
.sub li svg { width: 40px; height: 24px; margin: 0; }
.tile:hover .sub svg { transform: none; }
.sk { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .06em; padding-top: 2px; }
.sub li.joint { color: var(--ink); border-top: 1px dashed var(--line); padding-top: 12px; }
/* open layout: no panels, just a rule above each entry */
.strip { border-bottom: none; column-gap: 40px; padding: 0 clamp(16px, 4vw, 48px); }
.tile { border-right: none; border-top: 1px solid var(--line); padding: 26px 0 32px; }
.tile:hover { background: none; }
.tile:hover .t { color: var(--accent); }
.sub .acs { stroke: var(--accent); }
/* paper, then the two projects side by side, each two columns wide */
@media (min-width: 1100px) { .strip { grid-template-columns: 1fr 2fr 2fr; } .tile.wide { grid-column: auto; } }
