/* =============================================
   DAVID RICH PORTFOLIO — Modern Minimal Design
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --bg: #F8F7F4;
  --surface: #FFFFFF;
  --ink: #111111;
  --ink-muted: #666666;
  --ink-faint: #AAAAAA;
  --accent: #C8A96E;
  --accent-dark: #A07840;
  --border: #E5E3DF;
  --nav-h: 68px;

  --sans: 'Inter', system-ui, sans-serif;
  --serif: 'DM Serif Display', Georgia, serif;

  --max: 1200px;
  --gutter: 48px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.active { color: var(--accent-dark); }

/* ─── HERO (index only) ─── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 24px;
}

.hero-text h1 em {
  font-style: italic;
  color: var(--accent-dark);
}

.hero-text p {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 16px;
}

.hero-bullets {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-bullets li {
  font-size: 13px;
  color: var(--ink-muted);
  padding-left: 16px;
  position: relative;
}

.hero-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 1px;
  background: var(--accent);
}

.hero-photo {
  display: flex;
  justify-content: flex-end;
}

.hero-photo img {
  width: 320px;
  height: 380px;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(20%);
}

/* ─── SECTION LABEL ─── */
.section-label {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  border-top: 1px solid var(--border);
  padding-top: 64px;
  margin-top: 0;
  margin-bottom: 48px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.section-label span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.section-label h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
}

/* ─── GRID ─── */
.work-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* ─── CARD ─── */
.card {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.card:hover { transform: translateY(-4px); }

.card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #E8E6E1;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.card:hover .card-thumb img {
  transform: scale(1.04);
}

.card-body {
  padding: 24px 28px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.card-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
}

.card-summary {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.65;
  flex: 1;
  margin-top: 4px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 16px;
  transition: color 0.2s;
}

.card-link:after {
  content: '→';
  transition: transform 0.2s;
}

.card:hover .card-link {
  color: var(--ink);
}

.card:hover .card-link:after {
  transform: translateX(3px);
}

/* ─── FOOTER ─── */
footer {
  background: var(--ink);
  color: #fff;
  padding: 80px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

footer h3 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

footer p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  max-width: 400px;
}

.footer-contact {
  display: flex;
  gap: 40px;
  margin-top: 8px;
}

.footer-contact a {
  font-size: 14px;
  color: var(--accent);
  transition: color 0.2s;
}

.footer-contact a:hover { color: #fff; }

.copyright {
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── PROJECT PAGE ─── */
.project-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}

.project-meta {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}

.project-meta .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 40px;
  transition: color 0.2s;
}

.project-meta .back-link:before { content: '←'; }
.project-meta .back-link:hover { color: var(--ink); }

.project-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

.project-meta h1 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
}

.project-meta p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.project-content {
  min-width: 0;
}

.project-section {
  margin-bottom: 64px;
}

.project-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.project-section-desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 640px;
}

.project-img {
  width: 100%;
  display: block;
  margin-bottom: 2px;
}

.project-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 2px;
}

.project-img-pair img {
  width: 100%;
  display: block;
}

.img-caption {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 10px;
  margin-bottom: 20px;
}

.project-video {
  width: 100%;
  display: block;
  margin-bottom: 2px;
}

.project-iframe-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 16px;
}

.project-iframe-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ─── BANNER GRID ─── */
.banner-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-grid img {
  width: 100%;
  display: block;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 56px;
    gap: 40px;
  }
  .hero-photo { justify-content: flex-start; }
  .hero-photo img { width: 240px; height: 280px; }

  .work-grid { grid-template-columns: repeat(2, 1fr); }

  .project-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .project-meta { position: static; }
  .project-img-pair { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-contact { flex-direction: column; gap: 16px; align-items: center; }
  .section-label { flex-direction: column; gap: 6px; }
}
