/* Simple, clean styling that mirrors the PDF: black headings, plain sans-serif text. */

:root {
  --text: #1a1a1a;
  --muted: #555;
  --line: #ddd;
  --bg: #fff;
  --accent: #1f4fd1;   /* button + link color: change this one value to re-theme */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
}
.topbar-name { font-weight: 700; color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.topbar .btn { margin-left: auto; white-space: nowrap; }

/* Project tabs: scroll sideways if they don't fit */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); background: #f2f2f2; }
.tabs a.active { color: var(--accent); background: #eef2fd; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}
.btn:hover { filter: brightness(1.1); }

/* ---------- Layout ---------- */
.intro, main, footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.intro { padding-top: 40px; }

h1 { font-size: 3rem; line-height: 1.1; margin: 0; text-transform: uppercase; }
h2 { font-size: 2.2rem; line-height: 1.2; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.3rem; margin: 28px 0 6px; }
h4 { font-size: 1rem; margin: 18px 0 2px; }
p  { margin: 0 0 12px; }

.subtitle { color: var(--muted); margin: 4px 0 12px; }
.lead { font-size: 1.1rem; }
.contact { margin-bottom: 24px; }
.hero { margin-bottom: 24px; }

/* Small all-caps section labels, like "CONTACT" on the PDF cover */
h2.label { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 32px 0 6px; }

/* Home page project cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 12px 0 40px; }
.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.card h3 { margin: 12px 14px 4px; }
.card p { margin: 0 14px 14px; font-size: 0.92rem; color: var(--muted); line-height: 1.5; }

.project { padding: 40px 0 16px; }

/* Previous / next links at the bottom of each project page */
.pager { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 40px; font-weight: 600; }
.pager a { text-decoration: none; }

/* Text on the left, picture on the right (stacks on phones) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.split > img { margin-top: 28px; }
.split.narrow-img { grid-template-columns: 1fr 140px; }

.grid { display: grid; gap: 16px; margin: 16px 0; }
.grid.two  { grid-template-columns: 1fr 1fr; }
.grid.five { grid-template-columns: repeat(5, 1fr); }

figure { margin: 16px 0; }
figure .grid { margin: 0; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 6px; text-align: center; }

footer { padding: 40px 16px 60px; text-align: center; border-top: 1px solid var(--line); }

/* ---------- Narrower windows: name + button on top, tabs on their own row ---------- */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; padding-bottom: 6px; }
  .tabs { order: 3; width: 100%; }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  .split, .split.narrow-img, .grid.two { grid-template-columns: 1fr; }
  .split.narrow-img > img { max-width: 160px; margin: 0 auto; }
  .grid.five { grid-template-columns: repeat(3, 1fr); }
}

/* Side-by-side photos cropped to the same shape so rows line up */
.grid.even img { aspect-ratio: 4 / 3; object-fit: cover; }
