/* =========================================================
   Global Reset & Variables
   ========================================================= */

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

:root {
  /* Brand */
  --brand: #2d9aa0;
  --brand-soft: #7fd1c9;

  /* Backgrounds */
  --bg: #0b1f24;
  --surface: #102f33;
  --surface-2: #143c41;

  /* Text */
  --text: #e6f4f5;
  --muted: #b8d9dc;

  /* Utility */
  --warning: #f2b84b;
  --danger: #e56b6f;
  --border: rgba(184, 217, 220, 0.18);

  /* Effects */
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --radius: 18px;

  /* Layout */
  --maxw: 1100px;
  --pad: 20px;

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* =========================================================
   Typography & Links
   ========================================================= */

h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: var(--brand-soft);
  text-decoration: underline;
}

/* =========================================================
   Layout Helpers
   ========================================================= */

.container {
  width: min(var(--maxw), 100%);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: 48px 0;
}

.grid {
  display: grid;
  gap: 20px;
}

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

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Cards
   ========================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* =========================================================
   Header / Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 31, 36, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.brand-badge {
  width: 45px;
  height: 45px;
  border-radius: 100%;
  background-image: url("images/square_logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: 150ms ease;
}

.nav-links a:hover {
  background: rgba(45, 154, 160, 0.15);
  border-color: rgba(45, 154, 160, 0.35);
  color: var(--text);
  text-decoration: none;
}

.nav-links a.active {
  background: rgba(45, 154, 160, 0.25);
  border-color: var(--brand);
  color: var(--text);
}

/* =========================================================
   Hero Section
   ========================================================= */

.hero {
  padding: 56px 0 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-2);
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.hero h1 span {
  color: var(--brand);
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  transition: 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(45, 154, 160, 0.18);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #083236;
  border: none;
}

.btn.primary:hover {
  filter: brightness(1.05);
}

/* =========================================================
   Lists & Tags
   ========================================================= */

.list {
  padding-left: 1.2rem;
  color: var(--muted);
}

.list li {
  margin: 0.4rem 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* =========================================================
   Tables
   ========================================================= */

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
}

.table th {
  background: var(--surface-2);
  color: var(--text);
}

.table td {
  background: var(--surface);
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* =========================================================
   Team / Contact Cards
   ========================================================= */

/* 4-column grid on large screens */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 20px;
  justify-content: center; /* centers the whole grid block if it’s narrower */
}

/* Responsive breakpoints */
@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
  }
}
@media (max-width: 850px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}
@media (max-width: 520px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Center the last row when it isn't full (works automatically) --- */
/* If there is 1 item in the last row */
.team-grid:has(.member-card:nth-last-child(1):nth-child(4n + 1)) {
  grid-auto-flow: row;
}
.team-grid:has(.member-card:nth-last-child(1):nth-child(4n + 1)) .member-card:last-child {
  grid-column: 2 / span 2;
}

/* If there are 2 items in the last row (your current team of 6) */
.team-grid:has(.member-card:nth-last-child(2):nth-child(4n + 1)) .member-card:nth-last-child(2) {
  grid-column: 2;
}
.team-grid:has(.member-card:nth-last-child(2):nth-child(4n + 1)) .member-card:last-child {
  grid-column: 3;
}

/* If there are 3 items in the last row */
.team-grid:has(.member-card:nth-last-child(3):nth-child(4n + 1)) .member-card:nth-last-child(3) {
  grid-column: 2;
}
.team-grid:has(.member-card:nth-last-child(3):nth-child(4n + 1)) .member-card:nth-last-child(2) {
  grid-column: 3;
}
.team-grid:has(.member-card:nth-last-child(3):nth-child(4n + 1)) .member-card:last-child {
  grid-column: 4;
}

.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
}

.member-photo {
  width: 110px;
  height: 110px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand);
  background: var(--surface-2);
}

.member-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.member-role {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.member-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.member-links a {
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: 150ms ease;
}

.member-links a:hover {
  background: rgba(45, 154, 160, 0.18);
  border-color: var(--brand);
  text-decoration: none;
}


/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: rgba(11, 31, 36, 0.85);
  color: var(--muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.small {
  font-size: 0.95rem;
}