/* ============================================================
       Design tokens — light Metro / Fluent, Queen's University hues
       ============================================================ */
    :root {
      --bg:        #F4F6F9;   /* page background: light blue-gray  */
      --surface:   #FFFFFF;   /* cards / tiles                     */
      --ink:       #1C2430;   /* primary text                      */
      --muted:     #5B6675;   /* secondary text                    */
      --navy:      #002452;   /* Queen's dark blue (primary)       */
      --navy-soft: #123A6B;   /* hover / gradient partner          */
      --gold:      #EEB111;   /* Queen's gold (accent, sparing)    */
      --steel:     #40709B;   /* muted technology blue             */
      --slate:     #5E7186;   /* secondary Queen's-inspired tile   */
      --line:      #E3E8EF;   /* hairline borders                  */
      --tile-r:    3px;       /* Metro tiles: nearly square        */
    }

    html { scroll-behavior: smooth; scroll-padding-top: 76px; }

    body {
      background: var(--bg);
      color: var(--ink);
      font-family: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
      font-size: 1rem;
      line-height: 1.65;
    }

    h1, h2, h3, h4, .display-font {
      font-family: "Titillium Web", "Segoe UI Light", "Segoe UI", sans-serif;
    }

    a { color: var(--steel); text-decoration: none; }
    a:hover { color: var(--navy); text-decoration: underline; }

    ::selection { background: var(--gold); color: var(--navy); }

    :focus-visible {
      outline: 2px solid var(--steel);
      outline-offset: 2px;
    }

    /* ============================================================
       Navigation
       ============================================================ */
    .navbar {
      background: rgba(255, 255, 255, 0.92);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--line);
    }
    .navbar-brand {
      font-family: "Titillium Web", sans-serif;
      font-weight: 700;
      color: var(--navy) !important;
      letter-spacing: .02em;
    }
    .navbar-brand .brand-mark {
      display: inline-block;
      width: 10px; height: 10px;
      background: var(--gold);
      margin-right: .5rem;
    }
    .navbar .nav-link {
      color: var(--muted);
      font-size: .92rem;
      padding-inline: .7rem;
    }
    .navbar .nav-link:hover,
    .navbar .nav-link.active { color: var(--navy); }
    .navbar .nav-link.active { font-weight: 600; }

    .btn-cv {
      background: var(--navy);
      color: #fff;
      border: none;
      border-radius: var(--tile-r);
      font-size: .9rem;
      padding: .45rem 1rem;
    }
    .btn-cv:hover { background: var(--navy-soft); color: #fff; }

    /* ============================================================
       Hero — headline + a small Metro "start screen" tile cluster
       ============================================================ */
    .hero {
      background:
        linear-gradient(180deg, #FDFEFF 0%, var(--bg) 100%);
      border-bottom: 1px solid var(--line);
      padding: 5.5rem 0 4rem;
    }
    .hero .eyebrow {
      color: var(--steel);
      font-size: .85rem;
      letter-spacing: .18em;
      text-transform: uppercase;
      font-weight: 600;
    }
    .hero h1 {
      font-weight: 200;
      font-size: clamp(2.6rem, 6vw, 4rem);
      color: var(--navy);
      letter-spacing: -.01em;
      margin: .3rem 0 .4rem;
    }
    .hero h1 strong { font-weight: 700; }
    .hero .role { color: var(--ink); font-size: 1.12rem; }
    .hero .role a { font-weight: 600; }
    .hero .lede { color: var(--muted); max-width: 46rem; }


    .hero-links {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-start;
      gap: .8rem 1.6rem;
    }
    .hero-links a.icon-link {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      margin: 0;
      color: var(--muted);
      font-size: .95rem;
      line-height: 1.25;
      white-space: nowrap;
    }
    .hero-links a.icon-link:hover {
      color: var(--navy);
      text-decoration: none;
    }
    .hero-links a.icon-link i {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.25rem;
      flex: 0 0 1.25rem;
      color: var(--steel);
      line-height: 1;
    }

    .portrait-tile {
      width: 128px; height: 128px;
      border-radius: var(--tile-r);
      object-fit: cover;
      border: 1px solid var(--line);
      background: var(--surface);
    }
    .portrait-fallback {
      width: 128px; height: 128px;
      border-radius: var(--tile-r);
      background: var(--navy);
      color: var(--gold);
      display: flex; align-items: center; justify-content: center;
      font-family: "Titillium Web", sans-serif;
      font-weight: 700; font-size: 2.4rem;
    }

    /* Metro tile cluster */
    .tile-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      max-width: 380px;
    }
    .tile {
      border-radius: var(--tile-r);
      color: #fff;
      padding: 1rem;
      min-height: 108px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: transform .15s ease, box-shadow .15s ease;
    }
    .tile i { font-size: 1.5rem; opacity: .9; }
    .tile span { font-size: .88rem; font-weight: 600; letter-spacing: .01em; }
    .tile:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 36, 82, .16); }
    .tile-navy  { background: var(--navy); }
    .tile-steel { background: var(--steel); }
    .tile-slate { background: #5E7186; }
    .tile-gold  { background: var(--gold); color: var(--navy); }
    .tile-gold i { color: var(--navy); }

    /* ============================================================
       Sections
       ============================================================ */
    section.block { padding: 4.25rem 0; }
    section.block.alt { background: var(--surface); border-block: 1px solid var(--line); }

    .section-head { margin-bottom: 2.4rem; }
    .section-head .kicker {
      display: inline-flex; align-items: center; gap: .55rem;
      color: var(--steel);
      font-size: .8rem; font-weight: 700;
      letter-spacing: .18em; text-transform: uppercase;
    }
    .section-head .kicker::before {
      content: "";
      width: 10px; height: 10px;
      background: var(--gold);
      display: inline-block;
    }
    .section-head h2 {
      font-weight: 200;
      font-size: clamp(1.9rem, 4vw, 2.6rem);
      color: var(--navy);
      margin: .35rem 0 0;
    }
    .section-head p.sub { color: var(--muted); margin: .5rem 0 0; max-width: 44rem; }

    /* Generic flat card */
    .card-flat {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--tile-r);
      transition: transform .15s ease, box-shadow .15s ease;
      height: 100%;
    }
    .card-flat:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(28, 36, 48, .07); }

    /* ============================================================
       Research highlight cards
       ============================================================ */
    .research-card { padding: 1.5rem; border-top: 3px solid var(--navy); }
    .research-card.accent-gold  { border-top-color: var(--gold); }
    .research-card.accent-steel { border-top-color: var(--steel); }
    .research-card.accent-slate { border-top-color: #5E7186; }
    .research-card i { font-size: 1.6rem; color: var(--steel); }
    .research-card h3 { font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: .7rem 0 .5rem; }
    .research-card p { color: var(--muted); font-size: .95rem; margin: 0; }

    /* ============================================================
       Publications
       ============================================================ */
    .pub {
      background: var(--surface);
      border: 1px solid var(--line);
      border-left: 4px solid var(--navy);
      border-radius: var(--tile-r);
      padding: 1.25rem 1.5rem;
      margin-bottom: 1rem;
    }
    .pub h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .3rem; }
    .pub h3 a { color: var(--navy); }
    .pub .authors { color: var(--muted); font-size: .93rem; margin-bottom: .2rem; }
    .pub .authors b { color: var(--ink); }
    .pub .venue { font-size: .95rem; color: var(--ink); font-style: italic; margin-bottom: .55rem; }
    .pub .venue .year { font-style: normal; color: var(--muted); }

    .badge-flat {
      display: inline-block;
      border-radius: 2px;
      font-size: .74rem;
      font-weight: 600;
      letter-spacing: .02em;
      padding: .28rem .55rem;
      margin: 0 .35rem .25rem 0;
    }
    .badge-status { background: #EDF2F8; color: var(--navy); border: 1px solid #D8E2EE; }
    .badge-award  { background: #FDF4DA; color: #7A5A00; border: 1px solid #F3E2AB; }

    .pub-links a {
      font-size: .85rem;
      font-weight: 600;
      color: var(--steel);
      margin-right: .9rem;
    }
    .pub-links a i { margin-right: .25rem; }
    .pub-note { color: var(--muted); font-size: .85rem; }

    /* ============================================================
       Teaching & service
       ============================================================ */
    .panel { padding: 1.5rem; }
    .panel h3 {
      font-size: 1.05rem; font-weight: 700; color: var(--navy);
      display: flex; align-items: center; gap: .5rem;
      margin-bottom: 1rem;
    }
    .panel h3 i { color: var(--steel); }
    .panel ul { padding-left: 1.1rem; margin: 0; }
    .panel li { margin-bottom: .55rem; color: var(--ink); font-size: .95rem; }
    .panel li .meta { color: var(--muted); font-size: .87rem; }


    /* ============================================================
       Footer
       ============================================================ */
    footer {
      background: var(--navy);
      color: #B9C6D9;
      padding: 2.5rem 0;
      font-size: .92rem;
    }
    footer a { color: #E7ECF4; }
    footer a:hover { color: var(--gold); }
    footer .footer-name { font-family: "Titillium Web", sans-serif; font-weight: 700; color: #fff; }

    /* ============================================================
       Reveal-on-scroll (subtle; disabled when reduced motion)
       ============================================================ */
    .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
    .reveal.in { opacity: 1; transform: none; }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .reveal { opacity: 1; transform: none; transition: none; }
      .tile, .card-flat { transition: none; }
    }

    @media (max-width: 575.98px) {
      .hero { padding: 3.5rem 0 3rem; }
      .tile-grid { max-width: 100%; }
    }

/* ============================================================
   Project pages
   ============================================================ */
a.research-card { display: block; color: inherit; }
a.research-card:hover { text-decoration: none; }
.card-more {
  display: inline-block;
  margin-top: .8rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--steel);
}
a.research-card:hover .card-more { color: var(--navy); }

.project-hero {
  background: linear-gradient(180deg, #FDFEFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 2.75rem;
}
.project-hero .eyebrow {
  color: var(--steel);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
}
.project-hero .eyebrow::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--gold);
  display: inline-block;
  margin-right: .55rem;
}
.project-hero h1 {
  font-weight: 200;
  font-size: clamp(2rem, 5vw, 3.1rem);
  color: var(--navy);
  margin: .4rem 0 .6rem;
  letter-spacing: -.01em;
}
.project-hero .summary { color: var(--muted); max-width: 50rem; font-size: 1.05rem; }
.project-hero .meta-badges { margin-top: 1rem; }
.project-links { margin-top: 1.1rem; }
.project-links .btn {
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  border-radius: var(--tile-r);
  font-size: .88rem;
  font-weight: 600;
  padding: .4rem .9rem;
  margin: 0 .5rem .5rem 0;
}
.project-links .btn:hover { background: var(--navy); color: #fff; }
.breadcrumb-lite { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.breadcrumb-lite a { color: var(--steel); }

/* Stat tiles */
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--tile-r);
  padding: 1rem 1.1rem;
  height: 100%;
}
.stat-tile .value {
  font-family: "Titillium Web", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--navy);
  line-height: 1.2;
}
.stat-tile .label { font-size: .84rem; color: var(--muted); }

/* Prose */
.project-body h2 {
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--navy);
  margin: 2.4rem 0 1rem;
}
.project-body h2:first-child { margin-top: 0; }
.project-body p { color: var(--ink); }
.project-body ul li { margin-bottom: .4rem; }

/* Citation card */
.cite-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--tile-r);
  padding: 1.1rem 1.3rem;
  font-size: .95rem;
}
.cite-card .title { font-weight: 700; color: var(--navy); }
.cite-card .authors { color: var(--muted); }
.cite-card .venue { font-style: italic; }

/* ============================================================
   Video player (local / YouTube / Bilibili)
   ============================================================ */
.vplayer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--tile-r); overflow: hidden; }
.vplayer .stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0E1622;
}
.vplayer .stage iframe,
.vplayer .stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
  background: #0E1622;
}
.vplayer .stage .stage-msg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .5rem;
  color: #AFBCCD;
  font-size: .92rem;
  text-align: center;
  padding: 1rem;
}
.vplayer .stage .stage-msg i { font-size: 2rem; color: var(--gold); }
.vplayer .playlist { border-top: 1px solid var(--line); max-height: 260px; overflow-y: auto; }
.vplayer .pl-item {
  display: flex; align-items: center; gap: .7rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: .65rem .9rem;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.vplayer .pl-item:last-child { border-bottom: 0; }
.vplayer .pl-item:hover { background: #F2F5F9; }
.vplayer .pl-item.active { background: #EDF2F8; box-shadow: inset 3px 0 0 var(--gold); }
.vplayer .pl-item .pl-title { font-size: .9rem; flex: 1; }
.vplayer .pl-item .src-badge {
  flex: 0 0 auto;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: .18rem .45rem;
}
.src-youtube  { background: #FCE9E7; color: #A02015; }
.src-bilibili { background: #E6F3FB; color: #0B6E99; }
.src-local    { background: #EDF2F8; color: var(--navy); }
.vplayer .pl-item .num {
  flex: 0 0 auto;
  font-family: "Titillium Web", sans-serif;
  font-weight: 700;
  color: var(--steel);
  font-size: .85rem;
  width: 1.4rem;
}

/* Project navigation footer */
.project-pager { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; }
.project-pager a { font-weight: 600; }

/* ============================================================
   Home page: integrated About, focus areas, and research features
   ============================================================ */
/* Home-page layout refinements */
    .hero.hero-about {
      padding-top: clamp(3.75rem, 6vw, 5.5rem);
      padding-bottom: clamp(3.75rem, 6vw, 5rem);
    }

    .hero-profile {
      margin-bottom: clamp(2rem, 3.5vw, 2.75rem) !important;
    }

    .profile-copy {
      flex: 1 1 auto;
      min-width: 0;
      max-width: 68rem;
    }

    .hero-profile .portrait-tile,
    .hero-profile .portrait-fallback {
      width: 136px;
      height: 136px;
      flex: 0 0 136px;
    }

    .hero-profile h1 {
      margin: 0 0 .75rem !important;
      line-height: 1;
    }

    .hero-profile .eyebrow {
      margin: 0 0 .55rem !important;
      line-height: 1.3;
    }

    .hero-profile .role {
      max-width: 68rem;
      line-height: 1.55;
    }

    .hero-main-row {
      --bs-gutter-y: 2.25rem;
    }

    .hero-bio {
      border-left: 3px solid var(--gold);
      padding-left: clamp(1.25rem, 2.4vw, 2rem);
    }

    .hero-about-copy {
      max-width: 46rem;
      margin-top: 0;
      font-size: 1.03rem;
    }

    .hero-about-copy p {
      margin: 0 0 1rem;
      line-height: 1.72;
    }

    .hero-about .hero-links {
      display: grid;
      grid-template-columns: repeat(2, max-content);
      gap: .7rem 2rem;
      margin-top: 1.25rem !important;
    }


    .focus-panel {
      width: 100%;
      max-width: 460px;
      padding: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .hero .focus-panel-title {
      display: flex;
      align-items: center;
      gap: .65rem;
      margin: 0 0 1rem;
      color: var(--steel);
    }

    .focus-panel-title::before {
      content: "";
      width: 10px;
      height: 10px;
      flex: 0 0 10px;
      background: var(--gold);
    }

    .focus-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: .75rem;
    }

    .focus-tile {
      min-height: 132px;
      min-width: 0;
      padding: clamp(1rem, 1.7vw, 1.25rem);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      color: #ffffff;
      border: 0;
      border-radius: var(--tile-r);
      box-shadow: 0 8px 22px rgba(0, 36, 82, .08);
      transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    }

    .focus-tile:hover {
      transform: translateY(-3px);
      box-shadow: 0 14px 28px rgba(0, 36, 82, .16);
      filter: brightness(1.04);
    }

    .focus-tile--navy { background: var(--navy); }
    .focus-tile--gold { background: var(--gold); color: var(--navy); }
    .focus-tile--steel { background: var(--steel); }
    .focus-tile--slate { background: var(--slate); }

    .focus-tile i {
      color: currentColor;
      font-size: 2rem;
      line-height: 1;
    }

    .focus-tile span {
      display: block;
      margin-top: 1rem;
      font-size: 1.12rem;
      font-weight: 600;
      line-height: 1.25;
    }

    .research-list {
      display: grid;
      gap: 1.5rem;
    }

    .research-feature {
      overflow: hidden;
      border-radius: var(--tile-r);
      border: 1px solid rgba(34, 62, 92, .14);
      background: #ffffff;
      box-shadow: 0 12px 34px rgba(24, 50, 82, .08);
    }

    .research-feature.tone-navy .research-copy {
      color: #ffffff;
      background: var(--navy);
    }

    .research-feature.tone-steel .research-copy {
      color: #ffffff;
      background: var(--steel);
    }

    .research-feature.tone-slate .research-copy {
      color: #ffffff;
      background: var(--slate);
    }

    .research-feature.tone-gold .research-copy {
      color: var(--navy);
      background: var(--gold);
    }

    .research-feature .research-copy h3,
    .research-feature .research-copy p,
    .research-feature .research-copy .project-link {
      color: inherit;
    }

    .research-media {
      position: relative;
      min-height: 280px;
      height: 100%;
      overflow: hidden;
      background: #ffffff;
      border-right: 1px solid var(--line);
    }

    .research-media img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      padding: clamp(1rem, 2.4vw, 2rem);
      transition: transform .4s ease;
    }

    .research-feature:hover .research-media img {
      transform: scale(1.015);
    }

    .research-media-fallback {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: .8rem;
      padding: 2rem;
      color: var(--navy);
      background: linear-gradient(145deg, #f8fafc, #edf2f7);
      text-align: center;
    }

    .research-media-fallback i {
      font-size: 3rem;
      line-height: 1;
    }

    .research-media-fallback span {
      max-width: 240px;
      font-size: 1.05rem;
      font-weight: 600;
      letter-spacing: .02em;
    }

    .research-copy {
      min-height: 280px;
      height: 100%;
      padding: clamp(2rem, 4vw, 3rem);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
    }

    .research-copy h3 {
      margin-bottom: 1rem;
      font-size: clamp(1.55rem, 2.5vw, 2.15rem);
      line-height: 1.16;
    }

    .research-copy p {
      max-width: 760px;
      margin-bottom: 1.4rem;
      font-size: 1.04rem;
      line-height: 1.68;
    }

    .project-link {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      font-weight: 700;
      text-decoration: none;
    }

    .project-link i {
      transition: transform .2s ease;
    }

    .project-link:hover {
      color: inherit;
      text-decoration: none;
    }

    .project-link:hover i {
      transform: translateX(4px);
    }

    @media (max-width: 991.98px) {
      .focus-panel {
        max-width: 460px;
      }

      .research-media,
      .research-copy {
        min-height: 280px;
      }
    }

    @media (max-width: 575.98px) {
      .hero.hero-about {
        padding-top: 3rem;
        padding-bottom: 3.25rem;
      }

      .hero-about .hero-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem 1rem;
      }

      .hero-links a.icon-link {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
      }

      .focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
      }

      .focus-tile {
        min-height: 120px;
        aspect-ratio: auto;
        padding: 1rem;
      }

      .hero-profile {
        align-items: flex-start !important;
        gap: 1rem !important;
      }

      .hero-profile .portrait-tile,
      .hero-profile .portrait-fallback {
        width: 104px;
        height: 104px;
        flex: 0 0 104px;
      }

      .hero-profile h1 {
        font-size: clamp(2.15rem, 11vw, 2.6rem);
        margin-bottom: .55rem !important;
      }

      .hero-profile .eyebrow {
        margin-bottom: .4rem !important;
      }

      .hero-profile .role {
        font-size: .96rem;
        line-height: 1.45;
      }

      .focus-tile i {
        font-size: 1.75rem;
      }

      .focus-tile span {
        font-size: 1rem;
      }

      .research-media {
        min-height: 230px;
      }

      .research-copy {
        min-height: auto;
        padding: 1.75rem;
      }
    }

    @media (max-width: 419.98px) {
      .hero-profile {
        flex-direction: column;
        align-items: flex-start !important;
      }

      .hero-about .hero-links,
      .focus-grid {
        grid-template-columns: 1fr;
      }

      .focus-tile {
        min-height: 108px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .research-media img,
      .project-link i,
      .focus-tile {
        transition: none;
      }

      .research-feature:hover .research-media img,
      .project-link:hover i,
      .focus-tile:hover {
        transform: none;
      }
    }
