:root{
      --photo-width: 20%;
      --gap: 16px;
      --bg-odd: #ffffff;
      --bg-even: #f7f7f9;
      --accent: #2b6cb0;
      --muted: #666;
      --card-padding: 18px;
      --max-width: 1100px;
      --radius: 6px;
    }

    /* page layout */
    body{
      font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      margin: 0;
      background: #eee;
      color: #222;
      -webkit-font-smoothing:antialiased;
      -moz-osx-font-smoothing:grayscale;
      line-height:1;
    }

    .wrap{
      margin: 28px auto;
      padding: 0 16px;
      display: grid;
      grid-template-columns: 1fr;
      gap: var(--gap);
    }

    h1.page-title{
      margin: 8px 0 20px;
      font-size: 1.6rem;
      color: var(--accent);
      text-align: center;
    }

    /* each member section */
    .member{
      display: flex;
      gap: var(--gap);
      align-items: stretch; /* equal height columns */
      background: var(--bg-odd);
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 0;
      box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    }

    .member:nth-child(even){
      background: var(--bg-even);
    }

    .photo{
      flex: 0 0 var(--photo-width);
      min-width: 260px; /* prevents photo from collapsing on large-resizable containers */
      max-width: 260px;
      position: relative;
      background: #ddd;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .photo img{
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      aspect-ratio: 1 / 1; /* square crop */
    }

    .info{
      flex: 1 1 auto;
      padding: var(--card-padding);
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .position{
      margin: 0 0 8px;
      color: var(--accent);
      font-size: 1.1rem;
      font-weight: 600;
    }

    .details{
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 6px 18px;
      align-items: start;
      color: #333;
      font-size: 0.98rem;
    }

    .details dt{
      font-weight: 700;
      color: var(--muted);
      font-size: 0.86rem;
      margin: 0;
    }

    .details dd{
      margin: 0;
      color: #111;
      font-weight: 500;
    }

    .contact a{
      color: var(--accent);
      text-decoration: none;
    }
    .contact a:hover{ text-decoration: underline; }

    /* small helper for occupation/education lines when longer */
    .muted{
      color: var(--muted);
      font-weight: 400;
    }

    /* Responsive: on small screens make the card horizontal (photo left, info right)
       and add a very-small-screen fallback below */
    @media (max-width: 768px){
      .member{
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
      }
      .photo{
        /* occupy ~35% of the card on mobile */
        flex: 0 0 36%;
        min-width: 110px;
        max-width: 42%;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .photo img{
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        object-fit: cover;
        display: block;
      }
      .info{
        padding: 5px;
      }
      .details{
        /* two-column details when horizontal to utilize width */
        grid-template-columns: 1fr 1fr;
        gap: 6px 12px;
      }
      .details dt{
        text-align: left;
        margin-top: 0;
      }
      .details dd{
        margin-bottom: 0;
      }
    }

    /* Very narrow screens: keep photo and info side-by-side but use smaller photo width
       to avoid wrapping while preserving readability */
    @media (max-width: 420px){
      .member{
        flex-direction: row;
        gap: 8px;
        align-items: flex-start;
      }
      .photo{
        flex: 0 0 30%;
        min-width: 80px;
        max-width: 36%;
        height: auto;
      }
      .photo img{
        width: 100%;
        height: auto;
      }
      .info{
        padding: 5px;
      }
      .details{
        grid-template-columns: 1fr 1fr;
        gap: 6px 8px;
      }
      .details dt{
        font-size: 0.82rem;
      }
      .details dd{
        font-size: 0.92rem;
      }
    }

    /* small visual tweak for labels on large screens */
    @media (min-width: 768px){
      .details dt{
        text-align: right;
        padding-right: 4px;
        color: var(--muted);
      }
      .details dd{
        text-align: left;
      }
    }

/* At >=768px show two members per row (two columns) */
@media (min-width: 768px) {
  .wrap {
    grid-template-columns: repeat(2, 1fr);
  }
  .member {
    margin-bottom: 0; /* grid gap handles spacing */
  }
}

    /* Navbar Styling*/
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: linear-gradient(90deg, #0d47a1, #42a5f5);
        /* Gradient background from blue to light blue */
        padding: 10px 20px;
        color: white;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .back-button {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px 10px 30px; /* room for the arrow triangle */
      background: var(--accent);
      color: #fff;
      text-decoration: none;
      font-size: 14px;
      line-height: 1;
      border: none;
      border-radius: 6px;
      min-height: 44px;
      box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    }

    /* left-pointing triangle that forms the arrow shape */
    .back-button::before{
      content: "";
      position: absolute;
      left: 0;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 0;
      height: 0;
      border-top: 18px solid transparent;
      border-bottom: 18px solid transparent;
      border-right: 18px solid var(--accent);
    }

    /* make the triangle match hover state as well */
    .back-button:hover{
      background: #234e7a; /* slightly darker */
      color: #fff;
    }

    .back-button:hover::before{
      border-right-color: #234e7a;
    }

    .logo-container {
        height: 80px;
        /* Adjust based on your navbar height */
        width: auto;
        /* Keep width dynamic */
        display: flex;
        align-items: center;
    }

    .logo {
        max-height: 100%;
        /* Constrain the height */
        max-width: 100%;
        /* Constrain the width */
        object-fit: contain;
        /* Ensures the whole logo fits */
    }
