/* markbreitenbach.dev
   Direction D: graphite notebook on a dark stone bench, amber accent.
   One sheet, edge tabs as the index, mono for furniture, serif for titles, sans for prose. */

:root {
  --ground: #1b1d20;
  --sheet: #202327;
  --sheet-edge: #2c2f34;
  --well: #15171a;
  --tab-face: #262a2f;
  --tab-muted: #5c6066;
  --binding: #3d4147;

  --ink: #d9dadc;
  --ink-strong: #f0f0f1;
  --ink-soft: #9b9ea3;
  --ink-faint: #85888d;
  --ink-footer: #6b6f75;

  --accent: #d4a24c;
  --accent-hover: #e8bd6a;
  --ok: #8fbf9f;

  --tab-ice: #8fc3d9;
  --tab-sage: #8fbf9f;
  --tab-clay: #c98f7a;
  --tab-amber: var(--accent);

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --sheet-w: 840px;
  --tab-w: 132px;
}

* { box-sizing: border-box; }

html { background: var(--ground); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.75;
  background-color: var(--ground);
  background-image: url('/assets/img/ground.webp');
  background-size: 1024px 1024px;
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 56px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* Masthead ------------------------------------------------------------ */

.masthead {
  width: 100%;
  max-width: 1152px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  font-family: var(--mono);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-strong);
}
.brand:hover { color: var(--ink-strong); text-decoration: none; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 17px;
  background: var(--accent);
  opacity: 0.9;
  animation: cursorpulse 2.6s ease-in-out infinite;
}
@keyframes cursorpulse { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.12; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.sections { display: flex; gap: 28px; font-size: 14px; }
.sections a { color: var(--ink-faint); }
.sections a[aria-current="page"] { color: var(--ink); }
.sections a:hover { color: var(--ink-strong); }

/* Sheet ---------------------------------------------------------------- */

.sheet {
  position: relative;
  width: 100%;
  max-width: var(--sheet-w);
  margin-top: 40px;
  padding: 72px 60px 64px 72px;
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
}

.binding {
  position: absolute;
  left: 18px;
  top: 36px;
  bottom: 36px;
  width: 0;
  border-left: 1px dashed var(--binding);
}

/* Edge tabs ------------------------------------------------------------ */

.tabs {
  position: absolute;
  right: calc(-1 * var(--tab-w));
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
}
.tab {
  display: block;
  padding: 8px 14px 8px 12px;
  background: var(--tab-face);
  border: 1px solid var(--sheet-edge);
  border-left: 3px solid var(--tab, var(--tab-muted));
  border-radius: 0 4px 4px 0;
  color: #c5c8cc;
  white-space: nowrap;
}
.tab:hover { color: var(--ink-strong); text-decoration: none; background: #2b3036; }
.tab.section { color: var(--ink-soft); }
.tab.section:first-of-type { margin-top: 14px; }

/* Type ----------------------------------------------------------------- */

.lede {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink-strong);
}
.intro { margin: 22px 0 0; font-size: 18px; line-height: 1.65; color: var(--ink-soft); }

.label {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.rule { height: 1px; width: 100%; background: var(--sheet-edge); margin: 48px 0 40px; border: 0; }

.now {
  margin-top: 40px;
  padding: 18px 22px;
  border: 1px solid var(--sheet-edge);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 20px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #b4b7bb;
}
.now .label { padding-top: 2px; }
.now p { margin: 0; }

.well {
  margin-top: 14px;
  padding: 16px 20px;
  border-radius: 4px;
  background: var(--well);
  border: 1px solid var(--sheet-edge);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  color: #b4b7bb;
  white-space: pre;
  overflow-x: auto;
}
.well .ok { color: var(--ok); }
.well .warn { color: var(--accent); }

/* Footer --------------------------------------------------------------- */

.colophon {
  width: 100%;
  max-width: var(--sheet-w);
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-footer);
}
.colophon .links { display: flex; gap: 18px; }
.colophon a { color: var(--ink-faint); }

/* Narrow screens: tabs fold into a row above the content ---------------- */

@media (max-width: 1120px) {
  .tabs {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: -24px 0 40px;
  }
  .tab.section:first-of-type { margin-top: 0; }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .masthead { padding: 20px 0; }
  .sections { gap: 20px; }
  .sheet { margin-top: 24px; padding: 48px 24px 40px 36px; }
  .binding { left: 12px; }
  .lede { font-size: 32px; }
  .now { grid-template-columns: 1fr; gap: 8px; }
}

/* Colophon page --------------------------------------------------------- */

.colophon-list { margin: 0; }
.colophon-list dt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-top: 28px;
}
.colophon-list dt:first-child { margin-top: 0; }
.colophon-list dd { margin: 8px 0 0; font-size: 17px; line-height: 1.7; color: var(--ink); }
