/* project detail pages: text scrolls on the left, the drawing stays on the right and changes with it */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 4.5vh var(--gut) 0;
  font-size: 0.85rem; font-style: italic; font-weight: 300;
  pointer-events: none;
}
.bar a { pointer-events: auto; text-decoration: none; color: var(--soft); }
.bar a:hover { color: var(--fg); }
.bar .r { display: flex; gap: 2.4rem; }
.bar .r a { border-bottom: 1px solid var(--faint); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.bar .r a:hover { border-color: var(--fg); }
.bar > a:first-child { font-size: 1.15rem; }
/* gone while the footer is under it */
.bar { transition: opacity .5s; }
.bar.off { opacity: 0; }
.bar.off a { pointer-events: none; }

.page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.text { grid-column: 1; grid-row: 1; padding: 0 0 0 var(--gut); }
.stage { grid-column: 2; grid-row: 1; position: sticky; top: 0; height: 100vh; height: 100svh; }
.stage canvas, .stage img { position: absolute; inset: 0; width: 100%; height: 100%; }

.top {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 12vh;
}
.top h1 {
  font-weight: 200; font-style: italic;
  font-size: clamp(3.6rem, 8.6vw, 9.4rem);
  line-height: 1; letter-spacing: -0.04em; white-space: nowrap;
}

.sec { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 10vh 4vw 10vh 0; max-width: 46rem; }
.sec .label { margin-bottom: 4vh; }
.sec .say { font-weight: 200; font-style: italic; font-size: clamp(1.6rem, 2.7vw, 2.6rem); line-height: 1.35; letter-spacing: -0.02em; margin-bottom: 4vh; }
.sec p { font-weight: 300; font-size: clamp(0.92rem, 1.1vw, 1.02rem); line-height: 1.8; color: var(--soft); max-width: 52ch; margin-bottom: 1.4rem; }

/* tables of numbers, mono and bare */
.tab { width: 100%; max-width: 40rem; border-collapse: collapse; font-size: 0.85rem; font-weight: 300; font-variant-numeric: tabular-nums; margin-top: 1rem; }
.tab th { text-align: left; font-weight: 300; font-style: italic; color: var(--dim); padding: 0 1.6rem 0.8rem 0; }
.tab td { padding: 0.75rem 1.6rem 0.75rem 0; border-top: 1px solid var(--line); color: var(--soft); white-space: nowrap; }
.tab td:first-child { color: var(--fg); }
.tab tr.on td { color: var(--fg); }
.tab.dimmed tr:not(.on) td { color: var(--dim); }
.tab .r { text-align: right; }

/* one big number with its unit */
.big { display: grid; grid-template-columns: repeat(2, max-content); gap: 3vh 4vw; margin-top: 1rem; }
.big b { display: block; font-weight: 200; font-style: italic; font-size: clamp(2.4rem, 4.6vw, 4.4rem); letter-spacing: -0.03em; line-height: 1; }
.big span { display: block; margin-top: 0.7rem; font-size: 0.8rem; font-weight: 300; color: var(--dim); font-style: italic; }

.cmd {
  all: unset; cursor: pointer; display: inline-flex; gap: 1.2rem; align-items: baseline;
  border: 1px solid var(--faint); padding: 1rem 1.3rem; font-size: 1rem; font-weight: 300;
}
.cmd:hover { border-color: var(--fg); }
.cmd i { color: var(--dim); font-size: 0.8rem; }

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; }
  .stage { grid-column: 1; grid-row: 1; height: 26svh; z-index: 2; background: var(--bg); }
  /* no rule under the drawing: the text just goes dark as it slides up behind it */
  .stage::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 4.5rem; background: linear-gradient(var(--bg), rgba(0, 0, 0, 0)); pointer-events: none; }
  .text { grid-row: 2; padding: 0 var(--gut); }
  /* the stage sits 3.4rem down under the bar, so the title starts below it */
  .top { min-height: 0; padding: calc(6vh + 3.4rem) 0 8vh; }
  .sec { min-height: 0; padding: 9vh 0; }
  .bar { background: var(--bg); padding-bottom: 0.9rem; padding-top: 1.1rem; white-space: nowrap; }
  .bar .r { gap: 1.2rem; }
  .bar .r a[href^="mailto"] { display: none; }
  .stage { top: 3.4rem; }
  .big { grid-template-columns: 1fr 1fr; }
  .tab { font-size: 0.75rem; }
  .tab td, .tab th { padding-right: 0.9rem; }
}

/* the mark in front of the name in the corner; it turns while the pointer is on it */
.bar .axm { display: inline-block; width: 1.45em; height: 1.45em; vertical-align: -0.42em; margin-right: 0.55rem; color: var(--fg); }
