/* clay-p-mcpherson.com — hand-written, no framework.
   Edit freely; nothing here is generated. */

:root {
  --bg: #101214;
  --bg-raised: #191c20;
  --bg-hover: #21252b;
  --text: #e8eaed;
  --text-dim: #9aa3ad;
  --accent: #5cc8ff;
  --border: #2a2f36;
  --max-width: 1200px;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, 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);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

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

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--bg-raised);
  padding: 10px 16px;
  border-radius: var(--radius);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 18, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.site-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.site-footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- homepage ---------- */

.hero { padding: 56px 0 32px; }

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: #3a424c; }

.card a { color: inherit; display: block; height: 100%; }
.card a:hover { text-decoration: none; }

.card-media { aspect-ratio: 16 / 9; background: #0b0d0f; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

/* Year the project was finished: its own line between title and summary. */
.card-year {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

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

.card-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-summary {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}

.more-soon {
  margin: 56px 0 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- project page ---------- */

.project { padding-top: 40px; }

.breadcrumb {
  margin: 0 0 20px;
  font-size: 0.92rem;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }

.project h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.project-links { margin: 20px 0 0; }

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.94rem;
}
.button:hover { background: var(--bg-hover); text-decoration: none; border-color: #3a424c; }

/* Text is capped at a readable measure and left-aligned with the page title,
   while galleries and video break out to the full content width. */
.prose {
  margin-top: 32px;
  display: grid;
  /* min() keeps the text track from overflowing on narrow screens. */
  grid-template-columns:
    [full-start text-start] min(820px, 100%) [text-end] 1fr [full-end];
}
.prose > * { grid-column: text; }
.prose > .gallery,
.prose > .video-embed,
.prose > figure { grid-column: full; }

.prose h2 {
  margin: 48px 0 12px;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.prose h3 { margin: 36px 0 10px; font-size: 1.18rem; }
.prose h4 { margin: 28px 0 8px; font-size: 1.02rem; color: var(--text-dim); }

.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

.prose blockquote {
  margin: 0 0 20px;
  padding-left: 18px;
  border-left: 3px solid var(--border);
  color: var(--text-dim);
}

.prose code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.88em;
}

.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.prose figure { margin: 28px 0; }
.prose figcaption {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.prose img { border-radius: var(--radius); cursor: zoom-in; }

.video-embed,
.gallery {
  margin: 32px 0;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-1 { grid-template-columns: 1fr; }
.gallery-1 img { aspect-ratio: auto; }

/* ---------- prev / next ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.pager a {
  flex: 1 1 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}
.pager a:hover { color: var(--accent); text-decoration: none; }
.pager a span {
  display: block;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.pager-next { text-align: right; }

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 10, 0.94);
  padding: 24px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  border-radius: var(--radius);
}
.lightbox[hidden] { display: none; }

/* ---------- small screens ---------- */

@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 36px 0 24px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .gallery { grid-template-columns: 1fr; }
  .pager { flex-direction: column; gap: 24px; }
  .pager-next { text-align: left; }
}
