/* ============================================
   Team 16 — Shared Styles
   Cream background, serif display type, black
   outlined cards — matches the team mockups.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap');

:root {
  --cream: #f6f2ea;
  --ink: #1c1a17;
  --ink-soft: #4a453e;
  --border: #1c1a17;
  --card-bg: #ffffff;
  --avatar-bg: #d8d2c4;
  --avatar-fig: #a49a86;
  --accent: #8a6f4e;
  --radius: 18px;
  --max-width: 1040px;
  --shadow-sm: 0 6px 14px rgba(28, 26, 23, 0.12), 0 1px 3px rgba(28, 26, 23, 0.06);
  --shadow-md: 0 10px 22px rgba(28, 26, 23, 0.16), 0 2px 6px rgba(28, 26, 23, 0.08);
  --shadow-lg: 0 16px 32px rgba(28, 26, 23, 0.18), 0 4px 10px rgba(28, 26, 23, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f9f5ed 0%, #f1ebdd 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ---------- Headings ---------- */

h1.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  text-align: center;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.page-subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.title-rule {
  width: 100%;
  height: 2px;
  background: var(--border);
  margin: 0 auto 48px;
  max-width: var(--max-width);
}

.edit-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: -28px 0 40px;
}

/* ---------- Avatar ---------- */
/* When you add a real photo, just fill in the <img src="..."> —
   the placeholder icon hides itself automatically once src is set. */

.avatar {
  position: relative;
  display: block;
  border: 2px solid var(--accent);
  border-radius: 16px;
  background: var(--avatar-bg);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar.avatar-link {
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.avatar.avatar-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.avatar:has(img[src]:not([src=""])) img {
  display: block;
}

.avatar:has(img[src]:not([src=""])) .avatar-placeholder {
  display: none;
}

.avatar-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.avatar-placeholder svg {
  width: 72%;
  height: 72%;
  color: var(--avatar-fig);
}

/* ============================================
   about.html — 3 leads + 4 members
   ============================================ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px 24px;
  align-items: start;
  justify-items: center;
}

/* First row — 3 leads */
.team-grid .card:nth-child(1) {
  grid-column: 1 / span 4;
}

.team-grid .card:nth-child(2) {
  grid-column: 5 / span 4;
}

.team-grid .card:nth-child(3) {
  grid-column: 9 / span 4;
}

/* Second row — 4 team members */
.team-grid .card:nth-child(4) {
  grid-column: 1 / span 3;
}

.team-grid .card:nth-child(5) {
  grid-column: 4 / span 3;
}

.team-grid .card:nth-child(6) {
  grid-column: 7 / span 3;
}

.team-grid .card:nth-child(7) {
  grid-column: 10 / span 3;
}

.member-card {
  width: 220px;
  height: 275px;
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px 22px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.member-card .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  box-shadow: none;
}

.member-card .name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0 0 5px;
  letter-spacing: -0.005em;

  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-card .role {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0;

  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tablet */
@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid .card:nth-child(n) {
    grid-column: auto;
  }

  .team-grid .card:last-child {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* Mobile */
@media (max-width: 460px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-grid .card:nth-child(n) {
    grid-column: auto;
  }
}

/* ============================================
   member-template.html — profile page
   ============================================ */

.profile-header {
  text-align: center;
  margin-bottom: 8px;
}

.profile-header .role {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 4px 0 28px;
}

.profile-avatar {
  width: 180px;
  height: 180px;
  margin: 0 auto 20px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0 0 44px;
}

.profile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  cursor: pointer;
}

.profile-link .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-link .icon-circle svg {
  width: 22px;
  height: 22px;
  fill: var(--cream);
}

.profile-link:hover .icon-circle {
  background: var(--accent);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-card {
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  border-left: 3px solid var(--accent);
}

.info-card.full {
  grid-column: 1 / -1;
}

.info-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.info-card h2 .badge {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card h2 .badge svg {
  width: 16px;
  height: 16px;
  color: var(--ink);
}

.info-card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.fun-facts ul {
  margin: 0;
  padding-left: 20px;
}

.fun-facts li {
  margin-bottom: 6px;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.fun-facts li:last-child {
  margin-bottom: 0;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 48px;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}