/* =========================
   Base
   ========================= */

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f5f6f8;
  padding-left: 20px;  /* Keeps text away from the left edge */
  padding-right: 20px; /* Keeps text away from the right edge */
}

a {
  color: #002145;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1, h2, h3 {
  margin-top: 0;
  font-weight: 600;
  color: #111;
}

p {
  margin: 0 0 0.9rem;
}

ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.3rem;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================
   Header with full-width UBC image
   ========================= */

.site-header {
  position: relative;
  background-color: #00162f;
  border-bottom: 1px solid #000814;
  color: #fff;
  min-height: 220px;
}

.header-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.header-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 65%; /* center horizontally, slightly lower vertically */
  display: block;
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 25, 0.20);
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0.35rem 1.1rem;
  flex-wrap: wrap;
}

.brand .name {
  font-size: 1.8rem;
  margin: 0;
  color: #fff;
}

.brand .title {
  font-size: 0.95rem;
  color: #d9e2ef;
  margin: 0.2rem 0 0;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.95rem;
}

.main-nav a {
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  color: #f3f6fb;
}

.main-nav a:hover,
.main-nav a:focus {
  border-bottom-color: #00A7E1;
}

/* =========================
   Main layout: content + sidebar
   ========================= */

.main {
  padding: 2.2rem 0 2.6rem;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.3fr);
  gap: 2rem;
}

/* Content column */
.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
  border-bottom: 2px solid #e0e3e7;
  padding-bottom: 0.3rem;
}

/* News & link lists */
.news-list,
.link-list {
  list-style: disc;
}

/* Text-with-image blocks */
.text-with-image,
.text-with-image-reverse {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
  margin-top: 0.8rem;
}

.text-with-image-reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
}

.text-block p {
  margin: 0 0 0.9rem;
}

/* =========================
   Image blocks and sizing
   ========================= */

.image-block img {
  width: 100%;
  max-width: 150px;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 2px solid #002145;
}

.side-portrait {
  max-width: 150px;
}

/* =========================
   Students circular layout
   ========================= */

.students-circle-wrapper {
  margin-top: 1.2rem;
  margin-bottom: 1.4rem;
}

.students-circle {
  position: relative;
  width: 100%;
  max-width: 660px;
  margin: 2rem auto;
  aspect-ratio: 1 / 1;
}

/* Central text block */
.students-circle .circle-text {
  position: absolute;
  inset: 24%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  border: 1px solid #d1d5dd;
  font-size: 0.95rem;
  line-height: 1.5;
}

.students-circle .circle-text p {
  margin: 0.4rem 0 0;
}

/* Images arranged around the circle */
.students-circle .circle-pic {
  position: absolute;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #002145;
  background: #fff;
}

/* Positions around the circle */
.students-circle .circle-pic.top {
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
}

.students-circle .circle-pic.right {
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
}

.students-circle .circle-pic.bottom {
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
}

.students-circle .circle-pic.left {
  top: 50%;
  left: -20px;
  transform: translateY(-50%);
}

/* Responsive: stack vertically on small screens */
@media (max-width: 700px) {
  .students-circle {
    max-width: 260px;
  }

  .students-circle .circle-pic {
    position: static;
    width: 100%;
    height: auto;
    margin: 0.8rem auto;
    display: block;
    border-radius: 6px;
    transform: none !important;
  }

  .students-circle .circle-text {
    position: static;
    inset: auto;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    margin-top: 1rem;
  }
}

/* =========================
   Sidebar
   ========================= */

.sidebar {
  font-size: 0.9rem;
}

.sidebar-section {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  border: 1px solid #d1d5dd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  margin-bottom: 1.4rem;
}

.sidebar-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: #002145;
}

.sidebar-links {
  list-style: disc;
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

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

.site-footer {
  border-top: 1px solid #d1d5dd;
  background-color: #ffffff;
  padding: 1.1rem 0 1.5rem;
  font-size: 0.86rem;
  color: #555555;
}

.footer-inner {
  text-align: center;
}

.site-footer a {
  color: #002145;
}

/* =========================
   Responsive layout tweaks
   ========================= */

@media (max-width: 850px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    margin-top: 1.5rem;
  }

  .text-with-image,
  .text-with-image-reverse {
    grid-template-columns: 1fr;
  }

  .image-block {
    order: -1; /* image on top on small screens */
  }

  .side-portrait {
    max-width: 260px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .brand .name {
    font-size: 1.4rem;
  }

  .main {
    padding: 1.8rem 0 2.2rem;
  }
}
