:root {
  --bg: #FDF6F1;
  --text: #1f1f1f;
  --muted: #6b6b6b;

  /* Base spacing */
  --gap-xl: 80px;
  --gap-lg: 48px;
  --gap-md: 32px;
  --gap-sm: 20px;

  --padding-xl: 80px;
  --padding-lg: 60px;
  --padding-md: 40px;
  --padding-sm: 20px;

  --card-gap: var(--gap-xl);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

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

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--padding-xl) 24px 120px;
}

.page-header {
  text-align: center;
  margin-bottom: var(--gap-xl);
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 18px;
  width: 100%;
}

.hero-title {
  width: 100%;
  font-size: clamp(2.2rem, 6vw, 6.2rem);
  line-height: 1.05;
  font-weight: 700;
  margin: 0;
}

.page-header p {
  font-size: 15px;
  color: var(--muted);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 90px;
  row-gap: var(--card-gap);
}

.team-card {
  max-width: 420px;
}

.img-wrapper { 
  height: 350px;
  overflow: hidden;
}

.img-wrapper:hover .img-placeholder {
  transform: scale(1.1);
}

.img-placeholder {
  width: 100%;
  background-color: #f7eee7;
  margin-bottom: 22px;
  filter: grayscale(100%);
  transition: all 0.5s ease;
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-top: 20px;
}

.linkedin-icon {
  font-size: 28px;
  color: #0077b7;
  margin-right: 10px;
}

.team-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.team-card .role {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.team-card p {
  font-size: 14px;
  color: #777676;
}

.closing-text {
  max-width: 720px;
  margin: 110px auto 0;
  text-align: center;
}

.closing-text p {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: #3a3a3a;
}

.closing-text strong {
  font-weight: 600;
}

.section-divider {
  width: 100%;
  max-width: 1100px;
  height: 1px;
  background-color: #d9d6d1;
  margin: 120px auto 0;
}

.team-card img {
  display: block;
  border: 1px solid #FDF6F1;
  box-sizing: border-box;
}

/* ========================= */
/* Modal Base */
/* ========================= */
.team-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.team-modal.active {
  display: block;
}

/* Overlay */
.team-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Modal Box */
.team-modal-content {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;      
  -ms-overflow-style: none;  
  scrollbar-width: none;     
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 32px;
  box-sizing: border-box;
}


.team-modal-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* Close button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* Body layout */
.modal-body {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

/* Modal image in grayscale */
.modal-image img,
#modalImg {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

/* Text */
.modal-text {
  flex: 1 1 0;
  min-width: 200px;
}

.modal-text h2 {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  margin-bottom: 6px;
}

.modal-text span {
  display: block;
  font-size: 14px;
  color: #777;
  margin-bottom: 16px;
}

.modal-text p {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.view-more {
  position: relative;
  display: inline-block;
  margin-left: 4px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #e67e5c;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease;
}

/* Underline animation */
.view-more::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* Hover */
.view-more:hover {
  color: #c85e3f;
}

.view-more:hover::after {
  transform: scaleX(1);
}

/* Focus (accessibility) */
.view-more:focus-visible {
  outline: none;
}

.view-more:focus-visible::after {
  transform: scaleX(1);
}

/* ========================= */
/* Mobile */
/* ========================= */
@media (max-width: 768px) {
  .team-modal-content {
    top: 2%;
    padding: 24px;
    max-height: 95vh;
  }

  .modal-body {
    flex-direction: column;
    gap: 20px;
  }

  .modal-image img {
    width: 100%;
    max-height: 300px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --card-gap: var(--gap-lg);
    --padding-xl: var(--padding-lg);
  }

  .section-divider {
    margin-top: 90px;
  }

  .team-grid {
    column-gap: var(--gap-lg);
  }
  .team-card h3 {
    text-align: center;
  }
  .team-card .role {
    text-align: center;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --card-gap: var(--gap-md);
    --padding-xl: var(--padding-md);
  }

  .page {
    padding: var(--padding-lg) 20px;
  }

  .page-header h1 {
    font-size: 36px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    row-gap: 64px;
  }

  .img-placeholder {
    height: 390px;
 
  }

  .closing-text {
    margin-top: 80px;
    padding: 0 10px;
  }

  .closing-text p {
    font-size: 16px;
  }

  .section-divider {
    margin-top: 70px;
  }
  .team-card h3 {
    text-align: center;
  }
  .team-card .role {
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    white-space: nowrap;
  }
  .mobile-break {
    display: none;
  }
}

@media (max-width: 1023px) {
  .mobile-break {
    display: inline;
  }
}
