﻿:root {
  --uoft-blue: #365f86;
  --uoft-light-blue: #678aad;
  --uoft-gold: #caa05a;
  --text-color: #202422;
  --muted-color: #65706c;
  --border-color: #dfe7e3;
  --bg-color: #fff;
  --soft-bg: #f7fafc;
  --nav-bg: #f3f6f8;
  --nav-hover: #e4edf5;
  --ink: #1d252b;
  --mint: #eef4f7;
  --leaf: #4f779b;
  --warm: #f5f8fa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
  padding-top: 0;
  font-size: 15px;
  overflow-x: hidden;
}

.container {
  max-width: 1366px;
  margin: 0 auto;
  padding: 0 15px;
}

.container-fluid-wide {
  width: 100%;
  margin: 0 auto;
}

a {
  color: var(--uoft-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--uoft-light-blue);
  text-decoration: none;
}

/* Header & Navigation */
#site-header {
  background: #fff;
  border-bottom: 0;
}

.navbar-fixed-top {
  position: relative;
  top: auto;
  left: auto;
  z-index: 10;
  width: 100%;
  background: #fff;
  box-shadow: none;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  min-height: 80px;
  padding: 7px 30px 7px 15px;
  color: #3b516c;
  background: #fff;
  border-bottom: 0;
}

.header-top-row.container {
  max-width: 1366px;
  padding-left: 15px;
  padding-right: 30px;
}

.navbar-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.uoft-toggle {
  border: 0;
  background: #eef5fb;
  color: var(--uoft-blue);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  margin-right: 12px;
  transition: background 0.2s;
}

.uoft-toggle:hover {
  background: var(--mint);
  color: var(--uoft-blue);
}

.navbar-brand img {
  width: auto;
  height: 66px;
  display: block;
}

.header-utility {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.uoft-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #587ba9;
}

.uoft-links a {
  color: #587ba9;
}

.uoft-links li::after {
  content: "|";
  margin-left: 10px;
  color: #d1deec;
}

.uoft-links li:last-child::after {
  content: "";
}

.lang-toggle-wrap {
  display: flex;
  align-items: center;
}

.lang-toggle {
  display: flex;
  border: 1px solid #d3e2f3;
  border-radius: 999px;
  overflow: hidden;
  height: 30px;
  box-shadow: none;
}

.lang-btn {
  background: #fff;
  border: none;
  padding: 0 9px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--uoft-blue);
  letter-spacing: 0.4px;
  transition: background 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.lang-btn.active {
  background: var(--uoft-blue);
  color: #fff;
}

.slideout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 69;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.slideout-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: min(360px, 88vw);
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #d5dde8;
  z-index: 70;
  transform: translateX(-100%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 14px 16px;
  will-change: transform;
}

.slideout-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.slideout-close {
  border: 1px solid #d3e2f3;
  background: #fff;
  color: #587ba9;
  border-radius: 2px;
  padding: 5px 8px;
  font-size: 0.82rem;
  cursor: pointer;
}

.slideout-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  border-top: 1px solid #e3edf7;
}

.slideout-list li {
  border-bottom: 1px solid #e3edf7;
}

.slideout-list a {
  display: block;
  padding: 9px 4px;
  color: #587ba9;
  font-size: 0.92rem;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.slideout-list a:hover {
  transform: translateX(3px);
  color: var(--uoft-blue);
}

body.slideout-open .slideout-menu {
  transform: translateX(0);
}

body.slideout-open .slideout-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.site-title-row {
  height: 104px;
  min-height: 104px;
  padding: 8px 30px 10px;
  text-align: right;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.site-title {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Microsoft YaHei UI", "Microsoft YaHei", serif;
  font-size: clamp(30px, 2.65vw, 40px);
  font-weight: 600;
  color: #284963;
  letter-spacing: 0;
  line-height: 1.12;
  text-shadow: none;
  text-rendering: optimizeLegibility;
  max-width: min(100%, 920px);
  margin-left: auto;
  transform: translateY(-4px);
  text-align: right;
}

.site-title-main {
  font-size: inherit;
}

.site-title-sub {
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 0.62em;
  font-weight: 600;
  color: #5b6b79;
  margin-top: 4px;
}

.site-title-tag {
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 0.52em;
  font-weight: 650;
  color: #71808d;
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.main-nav-row {
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 0;
  min-height: 54px;
}

.main-nav-row .container {
  padding-left: 0;
  padding-right: 0;
}

.mobile-main-nav-toggle {
  display: none;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap; /* Keep items in one line */
  justify-content: center;
  gap: 2px;
}

.nav-list li a {
  text-decoration: none;
  color: #2f3d49;
  font-family: "Segoe UI Variable", "Aptos", "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-weight: 650;
  font-size: 15.5px;
  min-height: 52px;
  padding: 0 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: color 0.24s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  text-transform: none;
  letter-spacing: 0;
  min-width: 0;
  text-align: center;
  position: relative;
  text-rendering: optimizeLegibility;
}

/* Stable bilingual nav text */
.nav-list li a .lang-en,
.nav-list li a .lang-zh {
  display: none;
}

body.lang-en .nav-list li a .lang-en {
  display: block;
}

body:not(.lang-zh) .nav-list li a .lang-en {
  display: block;
}

body.lang-zh .nav-list li a .lang-zh {
  display: block;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: #2f5f88;
  background: transparent;
  text-decoration: none;
}

.nav-list li a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 7px;
  height: 2px;
  background: var(--leaf);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
  transform: scaleX(1);
}

/* Hero Section */
.hero-section {
  padding: 0;
  margin-bottom: 0;
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
}

/* Hero Section Slider */
.hero-slider {
  position: relative;
  width: 76%;
  max-width: 1040px;
  aspect-ratio: auto;
  height: clamp(600px, 54vw, 690px);
  background: #fff;
  overflow: hidden;
  margin: 14px auto 0;
  border: 0;
  border-radius: 0;
  isolation: isolate;
}

.slider-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.92s cubic-bezier(0.22, 1, 0.36, 1), transform 0.92s cubic-bezier(0.22, 1, 0.36, 1);
  transform: scale(1.008);
}

.slide.active {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

.slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
  cursor: zoom-in;
  user-select: none;
  will-change: transform;
}

.slide-compact-art img {
  width: 70%;
  height: 70%;
}

.image-preview {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 16, 38, 0.9);
}

.image-preview.open {
  display: flex;
}

.image-preview img {
  max-width: 96vw;
  max-height: 90vh;
  object-fit: contain;
  background: #fff;
}

.image-preview-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(0, 42, 92, 0.82);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

body.preview-open {
  overflow: hidden;
}

.slide-tall-art img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slider-nav button {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 34px;
  height: 46px;
  border: 0;
  color: #fff;
  background: rgba(29, 60, 61, 0.72);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.slider-nav button:hover {
  background: rgba(151, 178, 201, 0.92);
  transform: translateY(-50%) scale(1.03);
}

.slider-prev {
  left: 0;
}

.slider-next {
  right: 0;
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 6;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(0, 26, 92, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.dot.active {
  background: var(--leaf);
  border-color: var(--leaf);
  transform: scale(1.18);
}

.hero-text {
  padding: 28px 20px 18px;
  text-align: center;
  max-width: 1220px;
  margin: 0 auto;
}

.hero-text h1 {
  font-family: Georgia, "Times New Roman", "Microsoft YaHei UI", "Microsoft YaHei", serif;
  font-size: clamp(2rem, 3.6vw, 3.8rem);
  font-weight: 500;
  color: var(--ink);
  margin: 18px 0 8px;
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-text h2 {
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 20px;
  color: var(--uoft-blue);
  margin: 0 0 18px;
  font-weight: 700;
}

.hero-text p {
  font-size: 16px;
  font-weight: 400;
  color: #3f4b47;
  margin: 0 auto 12px;
  line-height: 1.85;
  max-width: 1030px;
  text-align: left;
}

/* Content Sections */
.content-section {
  padding: 34px 20px;
  background: #fff;
}

.section-heading {
  text-align: center;
  margin: 10px 0 20px;
  border-bottom: 0;
}

.heading-title {
  font-family: Georgia, "Times New Roman", "Microsoft YaHei UI", "Microsoft YaHei", serif;
  font-size: 28px;
  margin: 10px 0;
  font-weight: 500;
  color: var(--ink);
}

.heading-title a {
  color: inherit;
  text-decoration: none;
}

.pp-heading-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.separator-line {
  height: 1px;
  background-color: var(--border-color);
  width: 50px;
}

.separator-icon {
  color: var(--uoft-light-blue);
  font-size: 1rem;
}

/* Home Layout */
.dual-column-home {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 36px;
  max-width: 1366px;
  margin: 0 auto;
}

.home-left, .home-right {
  background: #fff;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.home-showcase {
  max-width: 1366px;
}

.home-section-heading {
  margin-top: 0;
  margin-bottom: 24px;
}

.research-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.research-row {
  background: #fff;
  border: 1px solid #dde7ef;
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.research-row:hover {
  border-color: rgba(54, 95, 134, 0.38);
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(24, 48, 70, 0.08);
}

.research-row a {
  color: inherit;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100%;
  text-decoration: none;
}

.research-row img {
  width: 100%;
  height: 150px;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  background: #f5f8fa;
  padding: 10px;
  border-right: 0;
  border-bottom: 1px solid #e4edf4;
}

.research-row-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 15px 17px 17px;
  background: linear-gradient(180deg, #fbfdfe, #f2f7fa);
}

.highlight-eyebrow {
  margin: -2px 0 7px;
  color: #617383;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.research-row h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Microsoft YaHei UI", "Microsoft YaHei", serif;
  font-weight: 500;
  line-height: 1.18;
  font-size: clamp(1.06rem, 1.25vw, 1.24rem);
}

.research-row p:not(.highlight-eyebrow) {
  margin: 0;
  color: #4f5d63;
  font-size: 0.9rem;
  line-height: 1.55;
}

.home-news-feed {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 26px;
  padding: 22px 24px;
  background: #f8fbfd;
  border-top: 1px solid #dde7ef;
  border-bottom: 1px solid #dde7ef;
}

.news-feed-title {
  display: flex;
  align-items: flex-start;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei UI", "Microsoft YaHei", serif;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ink);
}

.news-feed-title a {
  color: inherit;
}

.news-feed-list {
  display: flex;
  flex-direction: column;
}

.news-feed-link {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 14px 0;
  color: #33414c;
  border-top: 1px solid #dce6ee;
  text-decoration: none;
  transition: color 0.24s cubic-bezier(0.22, 1, 0.36, 1), transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-feed-link:first-child {
  padding-top: 0;
  border-top: 0;
}

.news-feed-link:last-child {
  padding-bottom: 0;
}

.news-feed-link:hover {
  color: var(--uoft-blue);
  transform: translateX(3px);
}

.news-feed-meta {
  color: var(--uoft-blue);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.55;
  text-transform: uppercase;
}

.news-feed-text {
  font-size: 0.98rem;
  line-height: 1.62;
}

/* Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.highlight-item {
  border: 1px solid var(--border-color);
  padding: 0;
  background: #fff;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.highlight-item:hover {
  border-color: rgba(151, 178, 201, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(18, 35, 31, 0.06);
}

.highlight-item img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f8faf8;
  margin-bottom: 0;
  padding: 14px;
}

.highlight-caption {
  padding: 16px 18px 18px;
}

.highlight-caption h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.25;
}

.highlight-caption p {
  margin: 0;
  color: var(--muted-color);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* News List */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  padding: 0 0 18px 14px;
  border-left: 2px solid #e1eaf0;
  display: block;
  font-size: 14px;
  line-height: 1.55;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-weight: 700;
  color: var(--uoft-blue);
  white-space: nowrap;
  font-size: 0.82rem;
  display: inline-block;
  margin-right: 6px;
}

.news-item [data-lang-block], .news-item [data-lang-inline] {
  color: #444;
}

/* Footer */
#site-footer {
  color: var(--text-color);
  background-color: #f8faf8;
  padding: 32px 0 36px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  max-width: none;
  min-height: 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 0;
  padding-top: 0;
}

.footer-lab-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--uoft-blue);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-info p {
  margin: 5px 0;
  font-size: 0.9rem;
  color: #46534e;
  line-height: 1.5;
}

.footer-logo img {
  width: 190px;
  height: auto;
  opacity: 1;
  background: #fff;
  padding: 8px;
}

#site-people {
  max-width: 1400px;
  min-height: 84px;
  margin: 30px auto 0;
  position: relative;
  background: url("../img/people-BKG-tile.jpg") left top repeat;
  overflow: hidden;
}

.site-people-container {
  position: absolute;
  left: 0;
  top: 0;
}

.site-people-container-inner {
  position: relative;
  right: 225px;
  top: -25px;
}

.site-people-container-inner img {
  display: block;
  max-width: none;
}

/* Language toggle style is defined in header section above */

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 0;
  }

  .header-top-row {
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    min-height: 66px;
    padding: 5px 10px;
  }

  .navbar-header {
    justify-content: flex-start;
    width: auto;
    min-width: 0;
  }

  .header-utility {
    align-items: center;
    position: relative;
    padding-top: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    width: auto;
    margin-top: 2px;
  }

  .lang-toggle-wrap {
    right: auto;
    top: auto;
    transform: none;
    order: 2;
  }

  .uoft-links {
    display: none;
  }

  .uoft-links li::after {
    content: "";
    margin-left: 0;
  }

  .uoft-links a {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid #d8e2ee;
    border-radius: 0;
    background: #f7f9fc;
    line-height: 1.2;
  }
  
  .site-title {
    font-size: clamp(1.08rem, 4.8vw, 1.4rem);
    text-align: center;
    line-height: 1.16;
    width: 100%;
    max-width: 92vw;
    margin: 0 auto;
    align-items: center;
    transform: translateY(-6px);
  }

  .site-title-row {
    height: 84px;
    min-height: 84px;
    padding: 6px 12px 8px;
    justify-content: center;
  }
  
  .nav-list {
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #eef2f7;
    width: 100%;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list li a {
    min-width: 0;
    width: 100%;
    padding: 12px 8px;
    font-size: 0.92rem;
    font-weight: 650;
    min-height: 42px;
    border-bottom: 1px solid #edf2f7;
    border-right: 1px solid #edf2f7;
  }

  .nav-list li:nth-child(2n) a {
    border-right: 0;
  }

  .mobile-main-nav-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    background: #f7f9fc;
    color: var(--uoft-blue);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 11px 12px;
    cursor: pointer;
  }

  .main-nav-row .container > .nav-list {
    display: none;
  }

  .main-nav-row.nav-open .container > .nav-list {
    display: grid;
  }

  .dual-column-home {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .research-showcase {
    grid-template-columns: 1fr;
  }

  .research-row img {
    height: clamp(160px, 42vw, 220px);
    border-bottom: 1px solid #e5edf4;
  }

  .research-row-copy {
    padding: 16px 18px 18px;
  }

  .home-news-feed {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-feed-link {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .news-feed-title {
    font-size: 1.32rem;
  }
  
  .hero-slider {
    width: 94%;
    aspect-ratio: auto;
    height: clamp(280px, 68vw, 440px);
    margin-top: 0;
  }

  .slider-nav button {
    width: 30px;
    height: 42px;
  }

  .hero-text h1 {
    font-size: 1.55rem;
    margin-bottom: 10px;
  }

  .hero-text h2 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .hero-text p {
    font-size: 0.92rem;
    margin-bottom: 8px;
    line-height: 1.5;
    text-align: left;
  }

  .home-left,
  .home-right {
    padding: 0;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .navbar-brand img {
    width: auto;
    height: 52px;
  }

  .header-top-row {
    gap: 8px;
  }

  .uoft-links a {
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .site-title {
    font-size: clamp(1.02rem, 5.3vw, 1.22rem);
  }

  .lang-btn {
    font-size: 0.68rem;
    padding: 0 8px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list li a {
    font-size: 0.9rem;
    line-height: 1.2;
    padding: 11px 8px;
    border-right: 0;
    min-height: 40px;
  }

  .hero-slider {
    width: 100%;
    height: clamp(270px, 84vw, 390px);
  }

  .hero-text {
    padding-top: 18px;
  }
}

/* Subpage Hero */
.subpage-hero {
  position: relative;
  width: 100%;
  height: 120px; /* Significantly reduced height */
  background: linear-gradient(180deg, #4f779b, #365f86);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: 0;
  border-bottom: 4px solid var(--uoft-light-blue);
}

.subpage-hero .container {
  position: relative;
  text-align: center;
}

.subpage-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

/* Subpage Content Adjustments */
body.subpage #site-content {
  padding: 28px 30px 50px;
  min-height: 600px;
  background: #fff;
  border: 1px solid #eef1f5;
  margin-top: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

body.subpage #site-content > .content-section:first-child {
  padding-top: 0;
}

body.subpage #site-content .section-heading:first-child {
  margin-top: 0;
}

.section-subtitle {
  font-size: 1.35rem;
  color: var(--uoft-blue);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 20px;
  text-transform: none;
}

.member-section {
  margin-bottom: 44px;
}

/* PI Card */
.pi-card {
  display: flex;
  gap: 40px;
  background: #fff;
  padding: 22px;
  border: 1px solid var(--border-color);
  box-shadow: none;
  border-radius: 0;
}

.pi-image {
  flex: 0 0 250px;
}

.pi-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pi-info h4 {
  font-size: 1.6rem;
  margin-bottom: 5px;
  color: var(--uoft-blue);
}

.pi-title {
  font-weight: 600;
  color: var(--muted-color);
  margin-bottom: 15px;
}

.pi-bio {
  margin-top: 20px;
  line-height: 1.8;
  color: #444;
}

/* Student Grid */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.student-item {
  text-align: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0;
  transition: border-color 0.2s;
}

.student-item:hover {
  border-color: #b8c7d9;
}

.student-placeholder-img {
  width: 120px;
  height: 120px;
  background: #eee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 3rem;
  color: #ccc;
}

.student-item h5 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.student-item p {
  font-size: 0.9rem;
  color: var(--muted-color);
}

/* Join Card */
.join-card {
  background: linear-gradient(180deg, #52799d, #365f86);
  color: #fff;
  padding: 40px;
  border-radius: 0;
  text-align: center;
}

.join-card p {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.btn-more {
  display: inline-block;
  background: #fff;
  color: var(--uoft-blue);
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.btn-more:hover {
  background: var(--uoft-blue);
  color: #fff;
  border: 1px solid #fff;
}

@media (max-width: 768px) {
  .pi-card {
    flex-direction: column;
    text-align: center;
  }
  
  .pi-image {
    flex: 0 0 auto;
    width: 200px;
    margin: 0 auto;
  }
}

/* Research Grid */
.research-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.research-item {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: 0;
  transition: border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.research-item:hover {
  border-color: #b8c7d9;
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(18, 35, 31, 0.05);
}

.research-image {
  flex: 0 0 300px;
}

.research-image img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
  border: 1px solid #e7edf4;
}

.research-content h3 {
  font-size: 1.22rem;
  color: var(--uoft-blue);
  margin-bottom: 10px;
  line-height: 1.35;
}

.research-content p {
  line-height: 1.7;
  color: #555;
}

@media (max-width: 992px) {
  .research-item {
    flex-direction: column;
  }
  
  .research-image {
    flex: 0 0 auto;
    width: 100%;
  }
  
  .research-image img {
    height: auto;
    max-height: 300px;
  }
}

/* Publications */
.year-title {
  font-size: 1.25rem;
  color: var(--uoft-blue);
  background: #f5f8fb;
  padding: 5px 15px;
  border-left: 4px solid var(--uoft-blue);
  margin-bottom: 20px;
}

.pub-list {
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}

.pub-list li {
  margin-bottom: 14px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.pub-list li::before {
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--uoft-blue);
}

.pub-authors {
  color: #333;
}

.pub-title {
  font-weight: 600;
  color: #000;
}

.pub-journal {
  color: var(--muted-color);
}

.pub-link {
  color: var(--uoft-blue);
  text-decoration: none;
  font-weight: 600;
  margin-left: 10px;
}

.pub-link:hover {
  text-decoration: underline;
}

.official-list-note {
  margin-top: 40px;
  padding: 20px;
  background: #f8fbfe;
  border-radius: 0;
  text-align: center;
  border: 1px solid var(--border-color);
}

.official-list-note a {
  color: var(--uoft-blue);
  text-decoration: none;
  font-weight: 700;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-info p {
  margin-bottom: 25px;
  line-height: 1.8;
  color: #444;
}

.contact-map {
  min-height: 430px;
  background: #f3f6fa;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.map-module {
  height: 100%;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.map-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 245px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(151, 178, 201, 0.14), rgba(255, 255, 255, 0.3)),
    linear-gradient(90deg, rgba(255,255,255,0.56) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.56) 1px, transparent 1px),
    #e7edf4;
  background-size: auto, 42px 42px, 42px 42px, auto;
}

.campus-road {
  position: absolute;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(176, 190, 205, 0.7);
}

.road-horizontal {
  left: -5%;
  right: -5%;
  top: 55%;
  height: 28px;
  transform: rotate(-9deg);
}

.road-vertical {
  top: -10%;
  bottom: -10%;
  left: 46%;
  width: 24px;
  transform: rotate(13deg);
}

.campus-block {
  position: absolute;
  padding: 9px 12px;
  border: 1px solid rgba(151, 178, 201, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #526170;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.block-north {
  top: 34px;
  left: 34px;
}

.block-central {
  top: 104px;
  left: 42%;
  color: var(--uoft-blue);
  border-color: rgba(151, 178, 201, 0.42);
}

.block-south {
  right: 34px;
  bottom: 32px;
}

.map-pin {
  position: absolute;
  top: 126px;
  left: 54%;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  color: #fff;
  background: var(--uoft-blue);
  padding: 9px 13px;
  border-radius: 3px;
  box-shadow: 0 8px 18px rgba(151, 178, 201, 0.22);
}

.map-pin i {
  color: #f4c542;
  font-size: 1.4rem;
}

.map-pin span {
  font-family: "Open Sans Condensed", "Open Sans", Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.map-panel {
  padding: 24px 26px 26px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.map-kicker {
  margin: 0 0 5px;
  color: #6d7783;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.map-panel h3 {
  margin: 0 0 10px;
  color: var(--uoft-blue);
  font-size: 1.35rem;
}

.map-panel p {
  margin: 0 0 16px;
  color: #444;
  line-height: 1.7;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.map-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  background: var(--uoft-blue);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
}

.map-actions a:hover {
  background: #0e4b8f;
}

.campus-map-link {
  color: var(--uoft-blue);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(151, 178, 201, 0.35);
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 560px) {
  .contact-map,
  .map-module {
    min-height: 500px;
  }

  .map-canvas {
    min-height: 230px;
  }

  .block-north {
    top: 28px;
    left: 18px;
  }

  .block-central {
    left: 34%;
  }

  .block-south {
    right: 18px;
  }

  .map-panel {
    padding: 20px;
  }

  .map-actions a {
    flex: 1 1 140px;
    justify-content: center;
  }
}

/* Album */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.album-item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.album-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s;
}

.album-item:hover img {
  transform: scale(1.1);
}

.album-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 42, 92, 0.8);
  color: #fff;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.album-item:hover .album-caption {
  transform: translateY(0);
}

/* Bilingual visibility */
[data-lang-block] {
  display: none;
}

body:not(.lang-zh) [data-lang-block="en"] {
  display: block;
}

body.lang-zh [data-lang-block="zh"] {
  display: block;
}

body.lang-en [data-lang-block="en"] {
  display: block;
}

[data-lang-inline] {
  display: none;
}

body:not(.lang-zh) [data-lang-inline="en"] {
  display: inline;
}

body.lang-zh [data-lang-inline="zh"] {
  display: inline;
}

body.lang-en [data-lang-inline="en"] {
  display: inline;
}

