@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500&family=Schibsted+Grotesk:wght@400;500;700&family=IBM+Plex+Sans:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --text-primary: #1a1a18;
  --text-secondary: #1a1a18;
  --text-tertiary: #4a4a46;
  --border: #ccc8be;
  --bg: #ffffff;
  --bg-surface: #e5e0d5;
  --accent: #156a37;
  --accent-light: #e8f0eb;
  --serif: 'Schibsted Grotesk', sans-serif;
  --sans: 'IBM Plex Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--sans);
  background: #fff;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('bamboogrove_retro.png');
  background-repeat: repeat;
  background-size: 450px auto;
  filter: saturate(38%);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.page { max-width: 60rem; margin: 0 auto; padding: 0 5rem; background: var(--bg); }

/* ── Nav ── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
nav .name { font-family: 'Caveat', cursive; font-weight: 500; font-size: 34px; text-decoration: none; color: var(--text-primary); }
nav a.name:hover { text-decoration: none; }
nav .nav-links { display: flex; gap: 1.5rem; font-size: 14px; color: var(--text-secondary); }
nav .nav-links a:hover { color: var(--text-primary); text-decoration: none; }

/* ── Project header ── */
.project-header { margin-bottom: 2.5rem; }
.project-meta {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.project-title {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.4rem;
}
.project-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 9px;
  background: #e8f0eb;
  border: 1px solid #c2d9c9;
  border-radius: 4px;
  color: #156a37;
}

/* ── Hero placeholder ── */
.hero-placeholder {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 3.5rem;
  color: var(--text-tertiary);
  font-size: 13px;
  font-family: var(--mono);
}
.hero-placeholder .ph-icon { font-size: 28px; margin-bottom: 4px; }

/* ── Sections ── */
section { margin-bottom: 3.5rem; }
.section-label {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.section-heading {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.body-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Image placeholders ── */
.img-placeholder {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-family: var(--mono);
  text-align: center;
  padding: 1.5rem;
}
.img-placeholder.h200 { height: 200px; }
.img-placeholder.h220 { height: 220px; }
.img-placeholder.h260 { height: 260px; }
.img-placeholder.h320 { height: 320px; }
.img-placeholder.h380 { height: 380px; }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Insight callout ── */
.insight {
  font-size: 13px;
  color: var(--text-secondary);
  background: #eef4f0;
  border-left: 2px solid #a8c8b2;
  border-radius: 0 5px 5px 0;
  padding: 10px 14px;
  margin-top: 1rem;
  line-height: 1.65;
}

/* ── Cards (shared by index + related-work) ── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}
.card-grid.two-col { grid-template-columns: 1fr 1fr; }
.card {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 1.25rem 1.125rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 130px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
}
.card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.12); transform: translateY(-2px); }
.card-type {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a7a72;
}
.card-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
}
.card-subtitle { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.card-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: #156a37;
  background: #e8f0eb;
  border: 1px solid #c2d9c9;
  border-radius: 4px;
  padding: 3px 9px;
}
.card-dates { font-family: var(--mono); font-size: 11px; color: #6a6a62; margin-top: auto; padding-top: 8px; }
.card:hover { text-decoration: none; }

/* ── Related work ── */
.related-work { border-top: 1px solid var(--border); padding-top: 2rem; margin-bottom: 0; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 1rem; }
.related-grid .card { min-height: 110px; cursor: pointer; }
.related-work + footer { margin-top: 2.5rem; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-left { display: flex; flex-direction: column; gap: 5px; }
.footer-name {
  font-family: 'Caveat', cursive;
  font-size: 23px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.footer-name:hover { text-decoration: none; }
.footer-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}
footer .footer-links { display: flex; gap: 1.75rem; font-size: 14px; }
footer .footer-links a { color: var(--text-secondary); }
footer .footer-links a:hover { color: var(--text-primary); text-decoration: none; }
