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

:root {
  --bg: #faf8f4;
  --card-bg: #e8c99a;
  --accent: #d4722a;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #d4b896;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── BANNER ── */
.banner {
  width: 100%;
  height: 200px;
  background-image: url('assets/project-images/met_william_morris_1877_willow.jpg');
  background-size: cover;
  background-position: center top;
  position: relative;
}

.avatar-wrap {
  position: absolute;
  bottom: -36px;
  left: 48px;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 2px 14px rgba(0,0,0,0.14);
  z-index: 10;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── NAME STRIP ── */
.name-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 48px 12px;
}

.name-strip h1 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

/* ── PAGE LAYOUT ── */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 48px 80px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
}

/* ── SIDEBAR ── */
.role {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.bio {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.85;
}

.buttons {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  padding: 9px 20px;
  border-radius: 7px;
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.8; }

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid #aaa;
}

.btn.secondary:hover { border-color: var(--text); }

/* ── PROJECT GALLERY ── */
.gallery-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}

.gallery-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0ebe3;
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

/* ── PROJECT CARD ── */
.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(212,114,42,0.16);
}

.card-thumb {
  background: var(--card-bg);
  height: 155px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  padding: 12px 14px 14px;
}

.card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 5px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: rgba(0,0,0,0.45);
  padding: 40px 16px;
}

.modal-content {
  background: white;
  max-width: 800px;
  margin: auto;
  padding: 40px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.close-btn:hover { color: var(--text); }

.modal-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.modal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 30px;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

.modal-content h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 20px;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 14px;
  margin-bottom: 10px;
}

.modal-content li {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 14px;
  margin-bottom: 4px;
}

.modal-content ul,
.modal-content ol {
  padding-left: 22px;
  margin-bottom: 12px;
}

.modal-content ul li { list-style-type: disc; }
.modal-content ol li { list-style-type: decimal; }

.modal-content ul ul,
.modal-content ol ul {
  margin-top: 4px;
  margin-bottom: 4px;
}

.modal-content strong {
  color: var(--text);
  font-weight: 600;
}

.modal-content em {
  font-style: italic;
  color: var(--text-muted);
}

.modal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.modal-content code {
  background: #f0ebe3;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
  color: var(--accent);
}

.modal-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.modal-loading {
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 28px 24px 60px;
  }

  .name-strip {
    padding: 60px 24px 12px;
  }

  .avatar-wrap {
    left: 24px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .name-strip h1 { font-size: 28px; }
  .banner { height: 150px; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}
