:root{
  --paper:#ECEFEC;
  --card:#FFFFFF;
  --ink:#182422;
  --ink-soft:#4C5955;
  --line:#D7DBD6;
  --required:#00847D;
  --required-bg:#DCF7F4;
  --preferred:#946400;
  --preferred-bg:#FBEEDC;
  --bonus:#8C5799;
  --bonus-bg:#F9EBFC;
  --blue:#2874AE;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.5;
  padding: 48px 20px;
}

.board {
  max-width: 820px;
  margin: 0 auto;
}

.site-header {
  max-width: 820px;
  margin: 0 auto 24px;
}
.site-header a {
  display: inline-flex;
}
.site-header img {
  height: 50px;
  width: auto;
  display: block;
}

.page-title {
  max-width: 820px;
  margin: 0 auto 28px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---- repeating unit: pic card (left) | looking-for (right) ---- */
.unit {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 32px;
}
.unit:last-child {
  margin-bottom: 0;
}

/* -- pic card (left): cover photo + name + bio, one card -- */
.pic-card {
  grid-column: 1;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pic-card-cover {
  height: 200px;
  overflow: hidden;
}

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

.pic-card-info {
  background: var(--card);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 54px 18px 10px;
}

.pic-card-avatar {
  position: absolute;
  left: 18px;
  top: -42px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--card);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

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

.pic-card-name h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  text-align: left;
}

/* -- bio (bottom of the same pic card) -- */
.pic-card-bio {
  padding: 2px 18px 20px;
}

.pic-card-bio p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.55;
}

.lab-link {
  margin-top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.lab-link:hover { background: var(--ink); color: var(--card); }
.lab-link svg { width: 16px; height: 16px; }

/* -- looking-for panel (right) -- */
.looking-for {
  grid-column: 2;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
}

.req-section { margin-bottom: 22px; }
.req-section:last-of-type { margin-bottom: 0; }
.req-section-head { margin-bottom: 10px; }
.req-section-head h3 { font-size: 0.95rem; font-weight: 600; margin: 0; font-family: "Fraunces", Georgia, serif; }
.req-section.required h3 { color: var(--required); }
.req-section.preferred h3 { color: var(--preferred); }
.req-section.bonus h3 { color: var(--bonus); }

ul.req-list { list-style: none; margin: 0; padding: 0; }
ul.req-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
ul.req-list li:first-child { border-top: none; }

.icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.required .icon { background: var(--required-bg); color: var(--required); }
.preferred .icon { background: var(--preferred-bg); color: var(--preferred); }
.bonus .icon { background: var(--bonus-bg); color: var(--bonus); }
.icon svg { width: 13px; height: 13px; }

/* ====================================================================
   Desktop viewport scaling — each unit fills ~one screen.

   Everything below is written as clamp(default, vh/vw-based, cap), so the
   low end of every clamp is exactly the fixed default above (used as-is
   below this breakpoint, and as the floor on a short/cramped desktop
   window), the middle term ties the value to viewport size, and the top
   end caps it so nothing balloons on a huge or ultra-tall monitor.

   Gated to min-width so narrow/mobile layouts (designed separately later)
   are completely untouched.
   ==================================================================== */
@media (min-width: 1100px) {
  body { padding: 24px 20px; }

  .board { max-width: min(1300px, 92vw); }
  .page-title { max-width: min(1300px, 92vw); font-size: 2.4rem; }
  .site-header { max-width: min(1300px, 92vw); }

  .unit {
    grid-template-columns: minmax(260px, 32%) 1fr;
    gap: clamp(20px, 2.5vw, 40px);
    height: max(560px, calc(80vh - 48px));
    margin-bottom: clamp(32px, 3vh, 56px);
  }

  .pic-card-cover {
    height: auto;
    flex: 1 1 auto;
    min-height: 160px;
  }

  .pic-card-info {
    padding-top: clamp(54px, 8vh, 95px);
  }

  .pic-card-avatar {
    width: clamp(84px, 13.5vh, 165px);
    height: clamp(84px, 13.5vh, 165px);
    top: clamp(-75px, -6.75vh, -42px);
  }

  .pic-card-name h2 {
    font-size: clamp(1.9rem, 4.4vh, 3.2rem);
  }

  .pic-card-bio p {
    font-size: clamp(0.88rem, 1.9vh, 1.15rem);
  }

  .lab-link {
    margin-top: clamp(14px, 2vh, 22px);
    width: clamp(34px, 5vh, 48px);
    height: clamp(34px, 5vh, 48px);
  }
  .lab-link svg {
    width: clamp(16px, 2.2vh, 22px);
    height: clamp(16px, 2.2vh, 22px);
  }

  .looking-for {
    padding: clamp(26px, 4vh, 46px) clamp(28px, 3vw, 56px);
  }

  .req-section { margin-bottom: clamp(22px, 3vh, 34px); }
  .req-section-head { margin-bottom: clamp(10px, 1.4vh, 16px); }
  .req-section-head h3 { font-size: clamp(0.95rem, 2.2vh, 1.3rem); }

  ul.req-list li {
    gap: clamp(11px, 1.4vw, 18px);
    padding: clamp(9px, 1.6vh, 16px) 0;
    font-size: clamp(0.9rem, 2vh, 1.15rem);
  }

  .icon {
    width: clamp(24px, 3.4vh, 34px);
    height: clamp(24px, 3.4vh, 34px);
    border-radius: clamp(7px, 1vh, 10px);
  }
  .icon svg {
    width: clamp(13px, 1.9vh, 19px);
    height: clamp(13px, 1.9vh, 19px);
  }
}

/* ====================================================================
   Tablet (640–1099px) — still two columns (this is the un-overridden
   base grid below), just a wider pic card / narrower Looking For than
   either the mobile stack or the wide-desktop 32% split.
   ==================================================================== */
@media (min-width: 640px) and (max-width: 1099px) {
  .unit {
    grid-template-columns: minmax(300px, 38%) 1fr;
  }
}

/* ====================================================================
   Mobile (<640px) — single column: pic+bio card, then Looking For card,
   repeat per professor. Each card is full-width and sized to its own
   content; they no longer need to match each other's height (no more
   grid/stretch).
   ==================================================================== */
@media (max-width: 639px) {
  .unit {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
  }
}
