/* ── Design Tokens ─────────────────────────────────────────── */
    :root {
      --ink:       #0f1923;
      --ink-soft:  #3a4a5c;
      --ink-muted: #6b7c93;
      --paper:     #f8f9fb;
      --white:     #ffffff;
      --accent:    #00548f;   /* UMass Boston navy-adjacent */
      --accent2:   #0099cc;   /* bright teal for data/tech feel */
      --accent-glow: rgba(0, 153, 204, 0.12);
      --surface:   #eef3f8;
      --border:    #d4dde8;
      --pub-green: #2d7a3a;
      --pub-red:   #b02020;
      --radius:    10px;
      --card-radius: 14px;
      --nav-h:     64px;
    }

    /* ── Reset & Base ──────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 15px;
      line-height: 1.7;
      color: var(--ink);
      background: var(--paper);
    }
    a { color: var(--accent); text-decoration: none; }
    a:hover { text-decoration: underline; color: var(--accent2); }
    img { max-width: 100%; }
    ul { list-style: none; }

    /* ── Nav ───────────────────────────────────────────────────── */
    .nav {
      position: sticky; top: 0; z-index: 100;
      height: var(--nav-h);
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center;
    }
    .nav-inner {
      max-width: 1160px; margin: 0 auto; padding: 0 28px;
      width: 100%;
      display: flex; align-items: center; gap: 12px;
    }
    .nav-brand {
      display: flex; align-items: center; gap: 10px;
      font-weight: 700; font-size: 17px; color: var(--ink);
      text-decoration: none; flex-shrink: 0;
    }
    .nav-brand-logo {
      width: 44px; height: 44px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .nav-brand-logo img {
      width: 100%; height: 100%; object-fit: contain; display: block;
    }
    .nav-umb {
      display: flex; align-items: center; flex-shrink: 0;
      padding-left: 14px; margin-left: 4px;
      border-left: 1px solid var(--border);
    }
    .nav-umb img { height: 30px; width: auto; display: block; }
    .nav-umb:hover { opacity: 0.75; }
    .nav-links {
      display: flex; align-items: center; gap: 4px; margin-left: auto;
    }
    .nav-links a {
      padding: 7px 14px; border-radius: 6px;
      font-size: 15.5px; font-weight: 500; color: var(--ink-soft);
      text-decoration: none; transition: background 0.15s, color 0.15s;
    }
    .nav-links a:hover, .nav-links a.active {
      background: var(--surface); color: var(--accent);
      text-decoration: none;
    }
    .nav-cv {
      margin-left: 8px;
      padding: 6px 14px !important;
      /* background: var(--accent2) !important;
      color: white !important; */
      border-radius: 20px !important;
      border-width: 1.5px !important;
      border-color: var(--accent) !important;
      border-style: solid !important;
    }
    .nav-cv:hover { border-color: var(--accent2) !important;}
    .hamburger { display: none; background: none; border: none; cursor: pointer; }
    .hamburger span {
      display: block; width: 22px; height: 2px;
      background: var(--ink); margin: 5px 0; border-radius: 2px;
      transition: 0.3s;
    }

    /* ── Hero / Banner ─────────────────────────────────────────── */
    .hero {
      background: rgb(89, 89, 89);  /* fallback for browsers that don't support gradients */
      overflow: hidden;
      text-align: center;
    }
    .hero-bg {
      padding: 10px;
      width: 100%;
    }

    .hero-bg img {
      max-width: 900px;
    }

    .hero-inner {
      padding: 0px 0px 10px 0px;
      gap: 40px;
      text-align: center;
    }
    
    .hero-desc {
      padding: 20px 20px 10px 20px;
      font-size: 17px;
      /* color: rgba(255,255,255,0.8); */
      line-height: 1.5;
      font-style: italic;
      text-align: center;
      max-width: 1000px; margin: 0 auto;
      font-weight: 600;
    }

    .hero-chips {
      display: flex; flex-wrap: wrap; gap: 8px;
      justify-content: center; align-items: center;
    }
    .chip {
      font-family: 'JetBrains Mono', monospace;
      font-size: 15px; font-weight: 500;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.85);
      padding: 6px 15px; border-radius: 20px;
    }

    /* ── Section Wrappers ──────────────────────────────────────── */
    .section { padding: 22px 28px; scroll-margin-top: calc(var(--nav-h) + 16px); }
    section[id], [id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
    .section-alt { background: var(--white); }
    .container { max-width: 1160px; margin: 0 auto; }
    .section-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 16px; font-weight: 500; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--accent2);
      margin-bottom: 14px; display: block;
    }
    .section-title {
      font-family: 'DM Serif Display', Georgia, serif;
      font-size: clamp(1.6rem, 2.8vw, 2.2rem);
      color: var(--ink); margin-bottom: 36px; line-height: 1.2;
    }
    .divider {
      width: 48px; height: 3px; border-radius: 2px;
      background: var(--accent2); margin-bottom: 28px;
    }

    /* ── Research ──────────────────────────────────────────────── */
    .research-intro {
      max-width: 1160px; color: var(--ink-soft);
      line-height: 1.8; margin-bottom: 32px;
      text-align: justify;
    }

    /* ── News ──────────────────────────────────────────────────── */
    .news-list { display: flex; flex-direction: column; gap: 0; }
    .news-item {
      display: grid; grid-template-columns: 90px 1fr;
      gap: 16px; padding: 14px 0;
      border-bottom: 1px solid var(--border);
      align-items: start;
    }
    .news-item:first-child { border-top: 1px solid var(--border); }
    .news-date {
      font-family: 'JetBrains Mono', monospace;
      font-size: 14px; color: var(--ink-muted);
      font-weight: 500; padding-top: 2px;
    }
    .news-text { font-size: 16px; color: var(--ink-soft); line-height: 1.6; }
    .news-text a { color: var(--accent); }
    .badge {
      display: inline-block;
      font-size: 13px; font-weight: 600;
      padding: 2px 8px; border-radius: 4px;
      margin-right: 6px; letter-spacing: 0.03em;
    }
    .badge-pub   { background: #e6f4e8; color: var(--pub-green); }
    .badge-high  { background: #fce9e9; color: var(--pub-red); }
    .badge-svc   { background: #e5eef6; color: var(--accent); }
    .badge-award { background: #fdf1de; color: #96590d; }
    .show-more-btn {
      margin-top: 18px;
      background: none; border: 1px solid var(--border);
      border-radius: 7px; padding: 8px 20px;
      font-size: 13px; font-weight: 500; color: var(--ink-soft);
      cursor: pointer; transition: 0.15s;
    }
    .show-more-btn:hover { border-color: var(--accent); color: var(--accent); }
    .news-extra { display: none; }
    .news-extra.visible { display: contents; }

    /* ── Project Cards ─────────────────────────────────────────── */
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 22px;
    }
    .project-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--card-radius);
      overflow: hidden;
      transition: box-shadow 0.2s, transform 0.2s;
    }
    .project-card:hover {
      box-shadow: 0 8px 32px rgba(0,84,143,0.12);
      transform: translateY(-3px);
    }
    .project-card-header {
      height: 5px;
      background: linear-gradient(90deg, var(--accent), var(--accent2));
    }
    .project-card-body { padding: 20px 22px; }
    .project-card-title {
      font-weight: 600; font-size: 14.5px;
      margin-bottom: 10px; line-height: 1.4;
    }
    .project-card-text {
      font-size: 13px; color: var(--ink-soft);
      line-height: 1.65; margin-bottom: 14px;
    }
    .project-card-link {
      font-size: 12.5px; font-weight: 600;
      color: var(--accent); text-decoration: none;
      display: inline-flex; align-items: center; gap: 4px;
    }
    .project-card-link:hover { color: var(--accent2); text-decoration: none; }

    /* ── Members ───────────────────────────────────────────────── */
    /* Four cards per row, centred; a short final row stays centred too. */
    .members-grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: stretch;
      gap: 26px;
      max-width: 1010px;
      margin: 0 auto;
    }

    .member-card {
      border: 1px solid var(--border);
      border-radius: 18px;
      width: 226px !important;
      background: var(--white);
      text-align: center;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      backdrop-filter: blur(20px);
      transition:
          transform .25s ease,
          border-color .25s ease,
          box-shadow .25s ease;
    }

    .member-card:hover {
      transform: translateY(-8px);
      border-color: rgba(0,153,204,0.45);
      box-shadow:
          0 20px 40px rgba(0,0,0,0.25),
          0 0 40px rgba(0,153,204,0.08);
    }

    .member-avatar {
      width: 100%;
      height: 226px;
      flex-shrink: 0;
      margin: 0 auto 14px;
      border-radius: 0;
      overflow: hidden;
      background: linear-gradient(
          135deg,
          var(--accent),
          var(--accent2)
      );
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 4rem;
      font-weight: 700;
      font-family: 'DM Serif Display', serif;
      color: rgba(255,255,255,0.92);
    }

    .member-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .member-name {
      font-size: 15.5px;
      font-weight: 600;
      padding: 0 12px 3px;
      /* color: var(--ink); */
    }

    .member-name a {
      text-decoration: none;
      /* color: var(--ink); */
    }

    .member-name a:hover {
      color: var(--accent2);
    }

    .member-role {
      font-size: 13px;
      color: var(--ink-muted);
      padding: 0 12px 16px;
    }

    /* ── Classes ───────────────────────────────────────────────── */
    .class-list { display: flex; flex-direction: column; }
    .class-item { padding: 30px 0; border-bottom: 1px solid var(--border); }
    .class-item:first-child { padding-top: 6px; }
    .class-item:last-child { border-bottom: none; }
    .class-code {
      font-family: 'JetBrains Mono', monospace;
      font-size: 19.5px; font-weight: 500; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--accent2);
      margin-bottom: 8px;
    }
    .class-title {
      font-family: 'DM Serif Display', Georgia, serif;
      font-size: 1.65rem; line-height: 1.25; color: var(--ink);
      margin-bottom: 14px;
    }
    .class-desc {
      font-size: 15px; color: var(--ink-soft);
      line-height: 1.8; margin-bottom: 16px; max-width: 950px;
      text-align: justify;
    }
    .class-line { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 4px; }
    .class-line b {
      font-weight: 600; color: var(--ink);
    }
    .class-line a { font-weight: 500; }
    .class-line a + a { margin-left: 2px; }

    /* ── Find Us ───────────────────────────────────────────────── */
    .contact-grid {
      display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px;
      align-items: start;
    }
    .contact-stack { display: flex; flex-direction: column; gap: 26px; }
    .map-frame {
      border: 1px solid var(--border);
      border-radius: var(--card-radius);
      overflow: hidden;
      line-height: 0;
      box-shadow: 0 6px 24px rgba(0,84,143,0.07);
    }
    .map-frame iframe { width: 100%; height: 320px; border: 0; }
    .directions-note {
      font-size: 13px; color: var(--ink-muted);
      margin-top: 10px; line-height: 1.6;
    }
    .contact-item {
      display: flex; gap: 14px; align-items: flex-start;
    }
    .contact-icon {
      width: 40px; height: 40px; border-radius: 8px;
      background: var(--surface); display: flex;
      align-items: center; justify-content: center;
      font-size: 1.1rem; flex-shrink: 0;
    }
    .contact-label {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.07em; color: var(--ink-muted); margin-bottom: 3px;
    }
    .contact-value { font-size: 14px; color: var(--ink); }

    /* ── Publications: search + filters ────────────────────────── */
    .pub-filters {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
      margin: 0 0 26px;
    }
    .pub-search { position: relative; flex: 1 1 320px; min-width: 240px; }
    .pub-search-icon {
      position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
      font-size: 13px; opacity: 0.5; pointer-events: none;
    }
    .pub-search input {
      width: 100%; padding: 9px 12px 9px 34px;
      font-family: inherit; font-size: 14px; color: var(--ink);
      background: var(--white);
      border: 1px solid var(--border); border-radius: 8px;
      transition: border-color 0.15s, box-shadow 0.15s;
      -webkit-appearance: none; appearance: none;
    }
    .pub-search input:focus {
      outline: none; border-color: var(--accent2);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }
    .pub-filters select {
      padding: 9px 30px 9px 12px;
      font-family: inherit; font-size: 14px; color: var(--ink);
      background: var(--white) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7c93' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E") no-repeat right 11px center/11px 7px;
      border: 1px solid var(--border); border-radius: 8px;
      cursor: pointer; -webkit-appearance: none; appearance: none;
      transition: border-color 0.15s;
    }
    .pub-filters select:hover { border-color: var(--accent); }
    .pub-filters select:focus {
      outline: none; border-color: var(--accent2);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }
    .pub-clear {
      padding: 9px 15px;
      font-family: inherit; font-size: 13.5px; font-weight: 500;
      color: var(--ink-soft); background: none;
      border: 1px solid var(--border); border-radius: 8px;
      cursor: pointer; transition: 0.15s;
    }
    .pub-clear:hover { border-color: var(--accent); color: var(--accent); }
    .pub-clear[hidden] { display: none; }
    .pub-count {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px; color: var(--ink-muted); margin-left: auto;
      white-space: nowrap;
    }
    .pub-item[hidden], .pub-year[hidden] { display: none; }

    @media (max-width: 620px) {
      .pub-filters select, .pub-clear { flex: 1 1 auto; }
      .pub-count { margin-left: 0; width: 100%; }
    }

    /* ── Publications ──────────────────────────────────────────── */
    .pub-item {
      padding: 10px 0;
      /* border-bottom: 1px dashed var(--border); */
    }
    .pub-year {
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }

    .pub-authors {
      padding: 0 3px;
    }

    .pub-title {
      padding: 0 3px;
      font-size: 16px;
      font-weight: 600;
    }

    .pub-venue {
      padding: 0 3px;
      color: var(--ink-muted);
      font-style: italic;
    }

    .pub-links {
      padding: 0 3px;
      font-size: 16px !important;
    }

    .pub-links a:hover {
      text-decoration: none;
    }

    .pub-icon {
      padding: 0 2px;
    }

    /* ── Gallery ───────────────────────────────────── */
    .gallery { max-width: 900px; margin: 0 auto; }

    .gallery-stage {
      position: relative;
      border: 1px solid var(--border);
      border-radius: var(--card-radius);
      overflow: hidden;
      box-shadow: 0 6px 24px rgba(0,84,143,0.07);
    }
    .gallery-frame {
      height: 460px;
      background: var(--ink);
      display: flex; align-items: center; justify-content: center;
    }
    .gallery-frame img {
      max-width: 100%; max-height: 100%;
      width: auto; height: auto;
      object-fit: contain; display: block;
    }

    .gallery-arrow {
      position: absolute; top: 50%; transform: translateY(-50%);
      z-index: 2;
      width: 42px; height: 42px; padding: 0 0 3px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      background: rgba(255,255,255,0.9);
      border: 1px solid var(--border);
      color: var(--ink); font-size: 26px; line-height: 1;
      font-family: 'Inter', system-ui, sans-serif;
      cursor: pointer;
      transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    }
    .gallery-arrow:hover {
      background: var(--white); color: var(--accent2);
      box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    }
    .gallery-arrow:focus-visible {
      outline: none; box-shadow: 0 0 0 3px var(--accent-glow);
    }
    .gallery-prev { left: 14px; }
    .gallery-next { right: 14px; }

    .gallery-caption {
      text-align: center; font-size: 14px; color: var(--ink-muted);
      line-height: 1.5; margin-top: 14px; min-height: 21px;
    }

    .gallery-thumbs {
      display: flex; flex-wrap: wrap; justify-content: center;
      gap: 10px; margin-top: 16px;
    }
    .gallery-thumb {
      width: 104px; height: 68px; padding: 0;
      background: var(--surface);
      border: 2px solid transparent; border-radius: 8px;
      overflow: hidden; cursor: pointer; opacity: 0.6;
      transition: opacity 0.18s, border-color 0.18s, transform 0.18s;
    }
    .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .gallery-thumb:hover { opacity: 1; transform: translateY(-2px); }
    .gallery-thumb.active { opacity: 1; border-color: var(--accent2); }
    .gallery-thumb:focus-visible {
      outline: none; opacity: 1; box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .gallery-arrow[hidden], .gallery-thumbs[hidden] { display: none; }

    @media (max-width: 768px) {
      .gallery-frame { height: 260px; }
      .gallery-arrow { width: 34px; height: 34px; font-size: 21px; }
      .gallery-prev { left: 8px; }
      .gallery-next { right: 8px; }
      .gallery-thumb { width: 78px; height: 52px; }
    }

    /* ── Footer ────────────────────────────────────────────────── */
    .footer {
      background: var(--ink);
      border-top: 1px solid rgba(255,255,255,0.06);
      padding: 28px;
      text-align: center;
      font-size: 12.5px;
      color: rgba(255,255,255,0.35);
    }
    .footer a { color: rgba(255,255,255,0.5); }
    .footer a:hover { color: var(--accent2); }

    /* ── Responsive ────────────────────────────────────────────── */
    @media (max-width: 768px) {
      .nav-links { display: none; flex-direction: column; position: absolute;
        top: var(--nav-h); left: 0; right: 0; background: white;
        padding: 12px 20px; border-bottom: 1px solid var(--border); gap: 2px; }
      .nav-links.open { display: flex; }
      .nav-umb { padding-left: 10px; margin-left: 2px; }
      .nav-umb img { height: 24px; }
      .hamburger { display: block; margin-left: auto; }
      .hero-inner { grid-template-columns: 1fr; }
      .contact-grid { grid-template-columns: 1fr; }
    }