/* thedatalife theme — the single source of truth for all generated pages.
   Edit here, run `node scripts/build.js`, and every project page updates. */

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #1a1f23;
  --muted: #5c6670;
  --border: #e4e2dd;
  --accent: #0d7f78;
  --accent-strong: #0a635e;
  --accent-soft: #e3f2f0;
  --green: #1a7f37;
  --green-soft: #e6f4ea;
  --amber: #9a6700;
  --amber-soft: #fff3d6;
  --gray: #57606a;
  --gray-soft: #eceff1;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1214;
    --surface: #171b1e;
    --text: #e8eaec;
    --muted: #9aa4ad;
    --border: #262c30;
    --accent: #3fd0c5;
    --accent-strong: #63dcd3;
    --accent-soft: #12302e;
    --green: #4ac26b;
    --green-soft: #11291a;
    --amber: #e3b341;
    --amber-soft: #2e2410;
    --gray: #9aa4ad;
    --gray-soft: #22272b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* ---------- base ---------- */

*,
*::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-sans);
  font-size: 16px;
  line-height: 1.6;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

.container {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- header / footer ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}

.site-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 18px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- home ---------- */

.home-hero {
  padding: 64px 0 20px;
}

.home-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.home-hero .headline {
  margin: 0 0 20px;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--accent-strong);
  font-weight: 600;
}

.bio p {
  margin: 0 0 14px;
  max-width: 46em;
  font-size: 16.5px;
}

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

.section-label {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- museum teaser ---------- */

.museum-teaser-wrap {
  padding: 36px 0 44px;
}

.museum-teaser {
  position: relative;
  display: block;
  min-height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: #0b0d10;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.museum-teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(5, 7, 10, 0.85) 0%, rgba(5, 7, 10, 0.45) 55%, rgba(5, 7, 10, 0.1) 100%);
}

.mt-content {
  position: relative;
  max-width: 34em;
  padding: 36px 40px;
}

.mt-content h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.01em;
}

.mt-content p {
  margin: 0 0 16px;
  color: #c7ccd2;
  font-size: 15.5px;
  line-height: 1.55;
}

.mt-cta {
  font-weight: 700;
  font-size: 14.5px;
  color: #7fe7dd;
}

a.museum-teaser:hover .mt-cta {
  text-decoration: underline;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 72px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 16 / 9;
  background: var(--accent-soft);
  overflow: hidden;
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
}

.card-body {
  padding: 16px 18px 18px;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card-dates {
  color: var(--muted);
  font-size: 12.5px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.card-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- pills & chips ---------- */

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-shipped {
  color: var(--green);
  background: var(--green-soft);
}

.pill-in-progress {
  color: var(--amber);
  background: var(--amber-soft);
}

.pill-archived {
  color: var(--gray);
  background: var(--gray-soft);
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chip-sm {
  font-size: 11.5px;
  padding: 2px 8px;
}

/* ---------- project hero ---------- */

.project-hero {
  padding: 56px 0 8px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.project-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.one-liner {
  margin: 0;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 44em;
}

.hero-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.btn:hover {
  background: var(--accent-strong);
}

.hero-stack {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-image {
  margin: 36px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image img {
  display: block;
  width: 100%;
}

/* ---------- project body ---------- */

.project-body {
  padding: 24px 0 72px;
}

.block {
  margin-top: 48px;
}

.block > h2 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.prose p {
  margin: 0 0 14px;
  max-width: 46em;
  font-size: 16.5px;
}

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

/* ---------- media gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 24px;
}

.shot {
  margin: 0;
}

.shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: none;
  cursor: zoom-in;
}

.shot img,
.shot video {
  display: block;
  width: 100%;
}

.shot.video video {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shot figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- before/after compare ---------- */

.compare {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  --pos: 50%;
}

.compare img {
  display: block;
  width: 100%;
}

.compare .after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 0 var(--pos));
}

.compare .handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  transform: translateX(-1px);
  pointer-events: none;
}

.compare .handle::after {
  content: "\2194";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 16px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

/* ---------- features & highlights ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.feature img {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- social post previews ---------- */

.post-group {
  margin-top: 28px;
}

.post-group:first-of-type {
  margin-top: 0;
}

.post-group-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.post-group-head h3 {
  margin: 0;
  font-size: 16px;
  text-transform: capitalize;
}

.post-group-note {
  color: var(--muted);
  font-size: 13px;
}

.post-card {
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  margin-bottom: 12px;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 16px;
}

.post-author {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
}

.post-sub {
  color: var(--muted);
  font-size: 12.5px;
}

.post-body p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

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

.post-media {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.post-media.multi {
  grid-template-columns: 1fr 1fr;
}

.post-media img,
.post-media video {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.post-media video {
  max-height: 520px;
  background: #000;
  object-fit: contain;
}

.post-attach {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-count {
  margin-top: 8px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.post-count.over {
  color: #d1242f;
  font-weight: 700;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(12, 14, 16, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 82vh;
  border-radius: 8px;
}

.lb-caption {
  margin-top: 14px;
  max-width: 60em;
  color: #cfd6dc;
  font-size: 14px;
  text-align: center;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}
