/*
  TheGeek.com
  Dark only. Colors live in the custom properties below; change them here.
*/

:root {
  color-scheme: dark;

  --bg: #1c1d20;
  --text: #ece9e3;
  --text-strong: #f4f1eb;
  --text-body: #d9d5cd;
  --muted: #a09d97;
  --rule: #3a3c41;
  --grid: #34363b;
  --grid-axis: #55585f;
  --surface: #26282c;
  --trace: #e9c646;
  --trace-hover: #f6dd82;

  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-drawing: "Overpass", "Arial Narrow", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
}

a {
  color: var(--trace);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--trace-hover);
}

a:focus-visible {
  outline: 2px solid var(--trace);
  outline-offset: 4px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--trace);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* 1308 = 1180 of content plus 64 of padding on each side */
.page {
  max-width: 1308px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 64px) 64px;
}

/* ---------- Header: drawing title block + nav ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.title-block {
  display: block;
  flex: 0 1 380px;
  min-width: 0;
  border: 1.5px solid var(--muted);
  color: var(--text-strong);
  font-family: var(--font-drawing);
  text-decoration: none;
}

.title-block:hover {
  color: var(--text-strong);
}

.title-block__title {
  padding: 6px 12px 8px;
  border-bottom: 1px solid var(--muted);
}

.title-block__name {
  margin: 2px 0 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
}

.title-block__fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.title-block__field {
  padding: 5px 10px 7px;
  border-right: 1px solid var(--muted);
}

.title-block__field:last-child {
  border-right: 0;
}

.drawing-label {
  display: block;
  font-family: var(--font-drawing);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.title-block__value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 17px;
  font-weight: 500;
}

/* ---------- Intro + Lissajous ---------- */

.intro {
  display: grid;
  align-items: center;
  gap: 48px 72px;
  margin-top: 72px;
}

.intro__text {
  max-width: 21em;
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  line-height: 1.35;
  text-wrap: pretty;
}

.scope {
  max-width: 420px;
  margin: 0;
}

.scope svg {
  width: 100%;
  height: auto;
}

.scope__grid {
  fill: none;
  stroke: var(--grid);
  stroke-width: 0.3;
}

.scope__axis {
  fill: none;
  stroke: var(--grid-axis);
  stroke-width: 0.35;
}

/* pathLength="1" on the paths makes a dash of 1 cover the whole curve,
   so animating the offset from 1 to 0 draws it once from start to end. */
.trace {
  fill: none;
  stroke: var(--trace);
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: trace-draw 2.6s cubic-bezier(0.45, 0, 0.2, 1) 0.4s backwards;
}

.trace--glow {
  stroke-opacity: 0.18;
  stroke-width: 2.4;
}

.trace--beam {
  stroke-width: 0.8;
}

@keyframes trace-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trace {
    animation: none;
  }
}

@media (min-width: 860px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  }

  .scope {
    max-width: none;
  }
}

/* ---------- Project rows (apps and the bench) ---------- */

.section-label {
  margin: 0 0 28px;
  font-size: 22px;
  font-stretch: 112.5%;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
}

.apps {
  margin-top: 120px;
}

.row {
  display: grid;
  align-items: start;
  gap: 16px 48px;
}

.app {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}

.app:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.row__title {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  font-stretch: 125%;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  text-wrap: balance;
}

.row__body {
  min-width: 0;
}

.row__body p {
  max-width: 32em;
  margin: 0 0 14px;
  color: var(--text-body);
  text-wrap: pretty;
}

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

.app__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
}

.app__date {
  font-size: 15px;
  color: var(--muted);
}

.row__art {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 10;
}

.app__thumb {
  overflow: hidden;
  background: var(--surface);
}

.app__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bench {
  margin-top: 96px;
}

.bench .row__title {
  color: var(--muted);
}

.bench__grid {
  fill: none;
  stroke: var(--grid);
  stroke-width: 0.5;
}

.bench__trace {
  stroke: var(--trace);
  stroke-width: 1.2;
}

@media (min-width: 640px) {
  .row {
    grid-template-columns: minmax(0, 1fr) 200px;
  }

  .row__title {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 220px;
  }

  .row__title {
    grid-column: auto;
  }
}

/* ---------- Footer: revision block + contact ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px 64px;
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.revisions-wrap {
  flex: 1 1 520px;
  min-width: 0;
  max-width: 640px;
}

.revisions {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid var(--muted);
  font-family: var(--font-drawing);
  color: var(--text-strong);
}

.revisions th,
.revisions td {
  border: 1px solid var(--muted);
  text-align: left;
  vertical-align: top;
}

.revisions th {
  padding: 5px 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.revisions .revisions__heading {
  padding: 6px 10px;
  text-align: center;
}

.revisions td {
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
}

.revisions .revisions__desc {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-body);
}

.revisions__rev {
  width: 56px;
}

.revisions__date {
  width: 112px;
  white-space: nowrap;
}

.contact {
  flex: 0 1 340px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.contact__email {
  color: var(--text);
}

/* ---------- Small phones ---------- */

@media (max-width: 480px) {
  body {
    font-size: 17px;
  }

  .title-block__name {
    font-size: 28px;
  }

  .title-block__field {
    padding: 4px 7px 6px;
  }

  .title-block__value {
    font-size: 13.5px;
  }

  .revisions__rev {
    width: 44px;
  }

  .revisions__date {
    width: 96px;
  }
}
