/* Cooper Hewitt — open source typeface via jsDelivr */
@font-face {
  font-family: 'Cooper Hewitt';
  src: url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Book.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Book.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cooper Hewitt';
  src: url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Medium.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cooper Hewitt';
  src: url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cooper Hewitt';
  src: url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Heavy.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/cooperhewitt/cooperhewitt-typeface@master/fonts/web/CooperHewitt-Heavy.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400&family=Coustard:wght@400;900&display=swap');

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

:root {
  --bg:           #f5f4f0;
  --fg:           #1a1a18;
  --fg-muted:     #6b6b65;
  --fg-faint:     #a8a89f;
  --border:       rgba(26,26,24,0.12);
  --border-hover: rgba(26,26,24,0.28);
  --accent:       #1a1a18;
  --ch: 'Cooper Hewitt', sans-serif;
  --mono: 'DM Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #141412;
    --fg:           #eeecea;
    --fg-muted:     #9a9a92;
    --fg-faint:     #5a5a54;
    --border:       rgba(238,236,234,0.1);
    --border-hover: rgba(238,236,234,0.28);
    --accent:       #eeecea;
  }
}

/* ─── Base ──────────────────────────────────────────────── */

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── Nav ───────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-home {
  font-family: var(--ch);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--fg);
  text-decoration: none;
}
.nav-home:hover { opacity: 0.6; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }

/* ─── Page shell ────────────────────────────────────────── */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 32px 100px;
}

/* ─── Hero / name ───────────────────────────────────────── */

.hero-name {
  font-family: var(--ch);
  font-weight: 800;
  font-size: clamp(44px, 10vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--fg);
}

.hero-title {
  font-family: var(--ch);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.bio {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 440px;
  line-height: 1.9;
  margin-bottom: 64px;
}

/* ─── Section ───────────────────────────────────────────── */

.section { margin-bottom: 56px; }

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 16px;
}

/* ─── Link rows ─────────────────────────────────────────── */

.links { display: flex; flex-direction: column; }

.link-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s;
}
.link-row:first-child { border-top: 0.5px solid var(--border); }
.link-row:hover { border-bottom-color: var(--border-hover); }
.link-row:hover .link-arrow { transform: translate(3px, -3px); }

.link-name {
  font-family: var(--ch);
  font-weight: 500;
  font-size: 16px;
  min-width: 100px;
}
.link-desc  { font-size: 12px; color: var(--fg-muted); flex: 1; }
.link-arrow { font-size: 12px; color: var(--fg-faint); transition: transform 0.15s; display: inline-block; }

/* ─── Project cards ─────────────────────────────────────── */

.projects { display: flex; flex-direction: column; }

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px 24px;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s;
}
.project-row:first-child { border-top: 0.5px solid var(--border); }
.project-row:hover { border-bottom-color: var(--border-hover); }
.project-row:hover .link-arrow { transform: translate(3px, -3px); }

.project-name {
  font-family: var(--ch);
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 4px;
}
.project-desc { font-size: 12px; color: var(--fg-muted); line-height: 1.7; }
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  border: 0.5px solid var(--border);
  padding: 2px 7px;
  border-radius: 2px;
}
.project-meta {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-top: 3px;
}

/* ─── Human voice ───────────────────────────────────────── */

.human {
  font-family: 'Coustard', serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.75;
  color: var(--fg-muted);
  max-width: 520px;
  margin-top: 20px;
}
.human + .human {
  margin-top: 16px;
}
.human em, .human i {
  font-style: italic;
}

.ai-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  text-decoration: none;
  vertical-align: super;
  margin-left: 2px;
  transition: color 0.15s;
}
.ai-note:hover { color: var(--fg-muted); }

.mono {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--fg);
  background: var(--border);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ─── Work page ─────────────────────────────────────────── */

.prose {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}
.prose p {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.9;
}
.prose em { color: var(--fg); font-style: italic; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--border);
}
@media (max-width: 480px) {
  .stack-grid { grid-template-columns: 1fr; }
}
.stack-group {
  padding: 18px 0;
  border-bottom: 0.5px solid var(--border);
  padding-right: 24px;
}
.stack-group-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 10px;
}
.stack-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack-list li {
  font-family: var(--ch);
  font-weight: 400;
  font-size: 14px;
  color: var(--fg);
}

.beliefs {
  display: flex;
  flex-direction: column;
  border-top: 0.5px solid var(--border);
}
.belief-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--border);
  align-items: baseline;
}
.belief-row .human {
  flex-basis: 100%;
  margin-top: 4px;
}
.belief-glyph {
  font-family: var(--ch);
  font-size: 14px;
  color: var(--fg-faint);
  flex-shrink: 0;
  width: 16px;
}
.belief-row p {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.85;
}
.belief-row em { color: var(--fg); font-style: italic; }

/* ─── Photography grid ──────────────────────────────────── */

.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (min-width: 480px) {
  .photos-grid { grid-template-columns: repeat(4, 1fr); }
}

.photo-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--border);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s, transform 0.3s;
}
.photo-item:hover img { opacity: 0.85; transform: scale(1.03); }
.view-hint { margin-top: 10px; font-size: 11px; color: var(--fg-faint); text-align: right; }

/* ─── Lightbox ──────────────────────────────────────────── */

.lb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14,14,12,0.96);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lb.open { display: flex; }
.lb-img { max-width: 100%; max-height: 88vh; object-fit: contain; display: block; }
.lb-close {
  position: fixed; top: 20px; right: 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: rgba(238,236,234,0.45); background: none; border: none; cursor: pointer;
  transition: color 0.15s;
}
.lb-close:hover { color: #eeecea; }
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: rgba(238,236,234,0.35);
  background: none; border: none; cursor: pointer; padding: 20px 16px;
  font-family: var(--mono); transition: color 0.15s;
}
.lb-nav:hover { color: #eeecea; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-count {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px;
  color: rgba(238,236,234,0.3); letter-spacing: 0.08em;
}

/* ─── Page heading (non-home) ───────────────────────────── */

.page-heading {
  font-family: var(--ch);
  font-weight: 800;
  font-size: clamp(32px, 7vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 12px;
  color: var(--fg);
}
.page-subheading {
  font-size: 17px;
  color: var(--fg-muted);
  margin-bottom: 52px;
  max-width: 400px;
  line-height: 1.8;
}

/* ─── Footer ────────────────────────────────────────────── */

.footer {
  margin-top: 72px;
  font-size: 11px;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--fg-faint);
  position: relative; top: -1px;
}

/* ─── Animations ─────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-1 { animation: fadeUp 0.4s ease both 0.05s; }
.anim-2 { animation: fadeUp 0.4s ease both 0.12s; }
.anim-3 { animation: fadeUp 0.4s ease both 0.19s; }
.anim-4 { animation: fadeUp 0.4s ease both 0.26s; }
.anim-5 { animation: fadeUp 0.4s ease both 0.33s; }

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 480px) {
  .page { padding: 48px 20px 80px; }
  .site-nav { padding: 0 20px; }
  .link-desc { display: none; }
  .project-desc { font-size: 12px; }
}
