/* ============================================================
   iSyslab · Intelligent Systems Lab, HUST
   Design tokens extracted 1:1 from the Ardot design file
   ============================================================ */

:root {
  /* Brand palette */
  --c-blue:        #1E5AA8;   /* 华科蓝 — primary */
  --c-navy:        #0C2A4A;   /* deep navy — dark surfaces */
  --c-heading:     #0F1B2D;   /* near-black headings */
  --c-body:        #4B5B6E;   /* body text */
  --c-muted:       #8A98A8;   /* secondary text */
  --c-bg:          #F6F8FB;   /* light section background */
  --c-border:      #E4EAF1;   /* hairline borders */
  --c-white:       #FFFFFF;

  /* Dark-surface text */
  --c-ft-link:     #D5DFEA;
  --c-ft-muted:    #9DB0C6;
  --c-ft-head:     #6C87A8;

  /* Wordmark — the lowercase `i` is the identity cue, set larger and in a
     brighter blue than the rest of the name so it reads at a glance. */
  --c-wm-i:        #2E7BF6;   /* vivid blue · light surfaces */
  --c-wm-i-inv:    #6FB2FF;   /* vivid blue · dark surfaces */

  /* Misc */
  --c-blue-soft:   #6FA8E8;   /* brand accent on dark surfaces */
  --c-img-ph:      #EEF2F7;   /* image placeholder */
  --c-avatar:      #DDE5EE;
  --c-avatar-ring: #DCE7F5;
  --c-divider:     #C7D0DB;

  /* Fonts */
  --f-sans:  'Noto Sans SC', 'Inter', -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --f-latin: 'Inter', 'Noto Sans SC', -apple-system, 'Segoe UI', sans-serif;
  --f-serif: 'Noto Serif SC', 'Songti SC', serif;

  /* Radii (from design) */
  --r-card: 14px;
  --r-tile: 12px;
  --r-pill: 10px;
  --r-chip: 20px;
  --r-btn:  10px;
  --r-btnnav: 8px;
  --r-hero: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-latin);
  color: var(--c-body);
  background: var(--c-white);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ---------- Bilingual content generated from content/*.md ----------
   Generated text carries both languages inline; <html data-lang> decides
   which one is painted. English is the default so the page still reads
   correctly before the language script runs, and with JS switched off. */
.bi > span { display: none; }
.bi > span[lang="en"] { display: inline; }
html[data-lang="zh"] .bi > span[lang="en"] { display: none; }
html[data-lang="zh"] .bi > span[lang="zh"] { display: inline; }

/* ---------- Shared page shell (1440 design width) ---------- */
.shell { max-width: 1440px; margin: 0 auto; background: var(--c-white); }

.pad-x { padding-left: 80px; padding-right: 80px; }

/* ============================================================
   NAVBAR  (component 3:2)
   ============================================================ */
.navbar { background: var(--c-white); }
.navbar-inner {
  height: 68px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 26px;
}
/* ---------- Brand lockup (mark + two-tier wordmark) ----------
   The identity is set in the page's own type stack rather than baked into
   a bitmap, so it can never fall out of step with the site's typography.

   The wordmark is stacked on purpose:
       iSyslab                            ← the name
       Zhidong's Research Group @ HUST    ← the descriptor
   The lowercase `i` is scaled well past the rest of the name and set in a
   brighter blue, so the intelligence cue reads first and at any size. */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-navy);
  white-space: nowrap;
}
.wm-i {
  font-size: 1.55em;      /* the i towers over the rest of the name */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-wm-i);
}
.brand-sub {
  font-family: var(--f-latin);
  font-weight: 500;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.035em;
  color: var(--c-muted);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 22px;
  flex: 1;
  align-items: center;
  justify-content: flex-end;   /* 菜单贴住右端的语言切换，中间不留空档 */
}
.nav-links a {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 15px;
  color: var(--c-body);
  white-space: nowrap;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--c-blue); }
.nav-links a.active { color: var(--c-blue); font-weight: 500; }

/* 「加入我们」按钮已从顶栏移到首页主视觉区（.cta-row 里的 .btn-ghost），
   顶栏因此只剩：品牌 + 菜单 + 语言切换，宽度大幅收窄。 */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-btnnav);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  flex-shrink: 0;
}
.lang-switch .lang-div { display: none; }
/* Both options are real buttons with a comfortable hit area (the label
   alone was a ~20px target and easy to miss). The active one is driven by
   <html data-lang="en|zh"> so the state never flickers on load. */
.lang-switch .lang-opt {
  font-family: var(--f-latin);
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  color: var(--c-muted);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  min-width: 38px;
  text-align: center;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.lang-switch .lang-opt.lang-zh { font-family: var(--f-sans); }
.lang-switch .lang-opt:hover { color: var(--c-blue); background: var(--c-white); }
.lang-switch .lang-opt:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 1px;
}
html[data-lang="en"] .lang-switch .lang-en,
html[data-lang="zh"] .lang-switch .lang-zh {
  color: var(--c-blue);
  font-weight: 600;
  background: var(--c-white);
  box-shadow: 0 1px 2px rgba(12, 42, 74, .08);
}

/* ============================================================
   FOOTER  (component 3:16)
   ============================================================ */
.footer { background: var(--c-navy); }
.footer-inner {
  padding: 64px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.footer-top { display: flex; gap: 80px; }
.footer-brand {
  width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}
.footer-lockup { display: flex; align-items: center; gap: 14px; }
.footer-mark { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; }
.footer-text { display: flex; flex-direction: column; gap: 5px; }
.footer-name {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--c-white);
  white-space: nowrap;
}
.footer-name .wm-i { color: var(--c-wm-i-inv); }
.footer-sub {
  font-family: var(--f-latin);
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.045em;
  color: var(--c-ft-head);
  white-space: nowrap;
}
.footer-brand p {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-ft-muted);
}
.footer-cols { display: flex; gap: 72px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--c-ft-head);
}
.footer-col a,
.footer-col span {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 14px;
  color: var(--c-ft-link);
}
.footer-col a:hover { color: var(--c-white); }
/* The contact column carries the mailing address; cap its width so the long
   school/address lines wrap into tidy lines instead of stretching the row. */
.footer-col-contact { max-width: 272px; }
.footer-bottom {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom span {
  font-size: 13px;
  color: var(--c-ft-head);
}

/* ============================================================
   HERO (home)
   ============================================================ */
.hero { background: var(--c-bg); }
.hero-inner {
  display: flex;
  gap: 64px;
  padding: 72px 80px;
  align-items: stretch;
}
.hero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-title {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.28;
  color: var(--c-heading);
  max-width: 700px;   /* keeps the intended 2-line break from the design */
}
.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-body);
  max-width: 640px;
}
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--r-btn);
  font-size: 15px;
  transition: background .15s ease, color .15s ease;
}
.btn-primary { background: var(--c-blue); color: var(--c-white); }
.btn-primary:hover { background: #174A8C; }
.btn-secondary { background: var(--c-white); color: var(--c-blue); }
.btn-secondary:hover { background: #EDF2F8; }
/* 第三层级：透明底 + 内描边，用于主视觉区的次要入口（加入我们） */
.btn-ghost {
  background: transparent;
  color: var(--c-blue);
  box-shadow: inset 0 0 0 1px var(--c-blue);
}
.btn-ghost:hover { background: #EDF2F8; }

.stats { display: flex; gap: 48px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  color: var(--c-blue);
}
.stat-label { font-size: 13px; color: var(--c-muted); }

/* Brand panel: the identity lockup set in the page's own type stack. */
.hero-visual {
  width: 560px;
  height: 400px;
  flex-shrink: 0;
  background: var(--c-navy);
  border-radius: var(--r-hero);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-lockup { display: flex; flex-direction: column; gap: 22px; }
.hero-mark { width: 60px; height: 60px; border-radius: 15px; }
.hero-wordmark { display: flex; flex-direction: column; gap: 13px; }
.hero-name {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-white);
}
.hero-name .wm-i { color: var(--c-wm-i-inv); }
/* NB: deliberately NOT `.hero-sub` — that class belongs to the intro
   paragraph in the hero copy column. */
.hero-tag {
  font-family: var(--f-latin);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0.025em;
  color: var(--c-ft-link);
  max-width: 400px;
}
.hero-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.hero-foot p { font-size: 13px; line-height: 1.5; color: var(--c-ft-muted); }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.section-white { background: var(--c-white); }
.section-gray  { background: var(--c-bg); }

.section-block { padding: 80px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}
.section-head.tight { margin-bottom: 32px; }

.title-block { display: flex; flex-direction: column; gap: 12px; }
.eyebrow-text {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--c-blue);
}
.section-title {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.25;
  color: var(--c-heading);
}
.section-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-body);
  max-width: 900px;
}
.section-link {
  font-size: 15px;
  color: var(--c-blue);
  white-space: nowrap;
  flex-shrink: 0;
}
.section-link:hover { text-decoration: underline; }

/* ============================================================
   RESEARCH DIRECTION CARDS (home)  — 3 columns, 305px, gap 24
   ============================================================ */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}
.card {
  width: 305px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--c-blue); }
.card-num {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 12px;
  color: var(--c-blue);
}
.card-title-en {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: var(--c-navy);
}
.card-title-cn {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 12px;
  color: var(--c-muted);
}
.card-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--c-body);
}

/* ============================================================
   NEWS LIST (home + news page)
   ============================================================ */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-row {
  display: flex;
  gap: 32px;
  padding: 20px 0;
  align-items: flex-start;
}
.news-date {
  width: 110px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--c-muted);
}
.news-text {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-heading);
}
.news-tag {
  font-size: 13px;
  color: var(--c-blue);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   PAPER CARDS (home selected publications)
   ============================================================ */
.paper-list { display: flex; flex-direction: column; gap: 16px; }
.paper-card {
  background: var(--c-bg);
  border-radius: var(--r-tile);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.paper-title {
  font-size: 18px;
  line-height: 1.45;
  color: var(--c-heading);
  font-weight: 400;
}
.paper-authors { font-size: 13px; color: var(--c-body); }
.paper-note { font-size: 14px; color: var(--c-body); line-height: 1.6; }
.paper-links { font-size: 13px; color: var(--c-blue); }
.paper-links a:hover { text-decoration: underline; }

/* ============================================================
   COURSE LIST (Teaching page)
   The instructor is the heading — name on a line of its own — and the
   courses they teach flow left to right as compact pills underneath.
   One card per course filled the full 1280px column and read as six
   unrelated things; grouping answers "who teaches what" at a glance and
   the whole list fits in a fraction of the height.
   ============================================================ */
.course-groups { display: flex; flex-direction: column; gap: 28px; }
.course-group { display: flex; flex-direction: column; gap: 12px; }
.course-lecturer {
  font-family: var(--f-latin);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-heading);
}
.course-grid {
  display: flex;
  flex-wrap: wrap;      /* generated from the data — a row may hold many */
  gap: 10px 12px;
}
.course-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-heading);
  transition: border-color .15s ease, color .15s ease;
}
a.course-chip:hover { border-color: var(--c-blue); color: var(--c-blue); }
/* Level (Undergraduate / Postgraduate) rides along in the pill rather than
   becoming a second line — it is the only thing distinguishing two of the
   courses, so it cannot be dropped, but it should not carry weight either. */
.course-level { font-size: 12px; color: var(--c-muted); }
.course-note { font-size: 13px; line-height: 1.6; color: var(--c-body); }

/* ============================================================
   JOIN CTA (home)
   ============================================================ */
.cta { background: var(--c-navy); }
.cta-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 64px 80px;
}
.cta-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cta-copy h2 {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.3;
  color: var(--c-white);
}
.cta-copy p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ft-muted);
  max-width: 720px;
}
.cta-btn {
  display: inline-flex;
  padding: 16px 32px;
  border-radius: var(--r-btn);
  background: var(--c-white);
  color: var(--c-navy);
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s ease;
}
.cta-btn:hover { background: var(--c-bg); }

/* ============================================================
   PAGE HEADER (sub pages)
   ============================================================ */
.page-header {
  background: var(--c-bg);
  padding: 56px 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.page-header .eyebrow-text { letter-spacing: .04em; }
.page-title {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.2;
  color: var(--c-heading);
}
.page-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-body);
  max-width: 900px;
}

/* ---- Page hero variant (Software / Projects / Gallery) ---- */
.page-hero { padding: 56px 80px 44px; gap: 14px; }
.breadcrumb {
  font-size: 13px;
  color: var(--c-muted);
}
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-blue); }
.breadcrumb .sep { margin: 0 6px; }
.page-hero .page-title { font-size: 38px; }
.page-hero .page-sub { font-size: 15px; max-width: 760px; }

/* ============================================================
   RESEARCH PAGE — direction rows
   ============================================================ */
.dir-row {
  display: flex;
  gap: 48px;
  padding: 40px 80px;
  align-items: center;
}
.dir-row.alt { background: var(--c-bg); }
.dir-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dir-eyebrow {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--c-blue);
}
.dir-title {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  color: var(--c-heading);
}
.dir-cn {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--c-muted);
}
.dir-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-body);
}
.dir-tags { font-size: 13px; color: var(--c-muted); }
.dir-img {
  width: 420px;
  height: 240px;
  border-radius: var(--r-card);
  flex-shrink: 0;
  object-fit: cover;
  background: var(--c-img-ph);
}

/* ============================================================
   PEOPLE PAGE
   ============================================================ */
.people-section { padding: 56px 80px; display: flex; flex-direction: column; gap: 24px; }
.people-section.follow { padding-top: 8px; padding-bottom: 32px; }
.people-section.last { padding-top: 32px; padding-bottom: 56px; }
.people-h2 {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 24px;
  color: var(--c-heading);
}
.lead-card {
  background: var(--c-bg);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: center;
  /* Capped so the card reads as a card, not a full-bleed bar: at 1280px of
     column width the text block ran ~1100px and the tail was dead space. */
  max-width: 1080px;
}
.lead-avatar {
  width: 120px; height: 120px;
  border-radius: 60px;
  background: var(--c-avatar);
  object-fit: cover;
  /* Portrait photos: bias the crop upward so the face isn't clipped. */
  object-position: center 25%;
  flex-shrink: 0;
}
.lead-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lead-name {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 22px;
  color: var(--c-heading);
}
.lead-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-body);
  max-width: 820px;
}
.lead-email { font-size: 13px; color: var(--c-blue); }

.member-row { display: flex; gap: 20px; flex-wrap: wrap; }
.member-card {
  /* A lone member used to stretch to the full 1280px column — cap it so one
     person still reads as a card, and let wider groups wrap into a grid. */
  flex: 1 1 320px;
  max-width: 400px;
  background: var(--c-bg);
  border-radius: var(--r-tile);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.avatar-circle {
  width: 72px; height: 72px;
  border-radius: 36px;
  background: #DCE7F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 24px;
  color: var(--c-blue);
}
.member-name {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 17px;
  color: var(--c-heading);
}
.member-role { font-size: 13px; color: var(--c-muted); }
.member-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-body);
}
.avatar-photo {
  width: 72px; height: 72px;
  border-radius: 36px;
  object-fit: cover;
}
/* Cards that carry a real bio get a little more room than the plain
   letter-avatar tiles, so multi-line text doesn't pile up. */
.member-card.has-bio { flex: 1 1 380px; max-width: 520px; }

/* Students — a dense roster instead of cards: name / cohort / email in three
   columns, so a 20-strong group stays a short list, not a long scroll. */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 32px;
}
.roster-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.roster-name {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 15px;
  color: var(--c-heading);
}
.roster-meta {
  font-size: 13px;
  color: var(--c-muted);
  overflow-wrap: anywhere;
}
.roster-mail { color: var(--c-blue); }

.faculty-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 1080px;
}
.faculty-avatar {
  width: 120px; height: 120px;
  border-radius: 14px;
  background: var(--c-avatar);
  object-fit: cover;
  object-position: center 25%;
  flex-shrink: 0;
}
.faculty-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.faculty-affil { font-size: 13px; color: var(--c-muted); }
.faculty-name {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 17px;
  color: var(--c-navy);
}
.faculty-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-body);
  /* Same measure as .lead-bio — without a cap the line ran ~1100px wide. */
  max-width: 820px;
}
.faculty-email { font-size: 13px; color: var(--c-blue); }

.alumni-note { font-size: 14px; color: var(--c-body); }

/* ============================================================
   PUBLICATIONS PAGE
   ============================================================ */
.year-filter {
  display: flex;
  flex-wrap: wrap;      /* chips are generated from the data — may be many */
  gap: 12px;
  padding: 40px 80px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--r-chip);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  font-size: 14px;
  color: var(--c-body);
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { color: var(--c-blue); border-color: var(--c-blue); }
.chip.active {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: var(--c-white);
}

.pub-group { padding: 32px 80px; display: flex; flex-direction: column; gap: 16px; }
.pub-group.first { padding-top: 32px; }
.pub-group.follow { padding-top: 16px; padding-bottom: 56px; }
.pub-year {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 20px;
  color: var(--c-blue);
}
.pub-item {
  background: var(--c-bg);
  border-radius: var(--r-pill);
  padding: 20px 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.pub-item.bordered { border: 1px solid var(--c-border); border-radius: var(--r-tile); padding: 18px 24px; }
.pub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pub-title {
  font-size: 16px;
  line-height: 1.45;
  color: var(--c-heading);
  font-weight: 400;
}
.pub-item.bordered .pub-title { font-size: 15px; }
.pub-venue {
  width: 300px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-blue);
  overflow-wrap: break-word;
}
.pub-authors { font-size: 12px; line-height: 1.5; color: var(--c-muted); }
.pub-item.bordered .pub-authors { font-size: 12px; }
.pub-ref { font-size: 12px; line-height: 1.5; color: var(--c-muted); }
.pub-more { font-size: 13px; color: var(--c-muted); }

/* ============================================================
   JOIN PAGE
   ============================================================ */
.pos-section { padding: 40px 80px; display: flex; flex-direction: column; gap: 20px; }
.pos-h2 {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 20px;
  color: var(--c-navy);
}
.pos-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.pos-card {
  width: 413px;
  background: var(--c-bg);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pos-role {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 17px;
  color: var(--c-blue);
}
.pos-req { font-size: 14px; line-height: 1.6; color: var(--c-body); }
.pos-note { font-size: 13px; line-height: 1.55; color: var(--c-muted); }

.contact-section { padding: 8px 80px 56px; display: flex; flex-direction: column; gap: 24px; }
.contact-h2 {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 24px;
  color: var(--c-heading);
}
.contact-cards { display: flex; gap: 20px; }
.contact-card {
  flex: 1;
  background: var(--c-bg);
  border-radius: var(--r-tile);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-label { font-size: 13px; color: var(--c-muted); }
.contact-value {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 17px;
  color: var(--c-blue);
  line-height: 1.4;
}
.contact-card .contact-value.plain { color: var(--c-heading); font-weight: 400; }
.map-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-img {
  width: 100%;
  height: 340px;
  border-radius: var(--r-tile);
  object-fit: cover;
  background: var(--c-img-ph);
}
.map-link {
  align-self: flex-end;
  font-size: 13px;
  color: var(--c-blue);
}

/* ============================================================
   SOFTWARE PAGE
   ============================================================ */
.body-block { padding: 48px 80px; display: flex; flex-direction: column; gap: 24px; background: var(--c-white); }
/* second block of a merged page (Software & Projects) — no extra top gap */
.body-block.cont { padding-top: 0; }
.section-head-left { display: flex; flex-direction: column; gap: 6px; }
.head-left-title {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 22px;
  color: var(--c-navy);
}
.head-left-sub { font-size: 13px; color: var(--c-muted); }

.tool-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tool-card {
  width: 620px;
  background: var(--c-bg);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-name {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 17px;
  color: var(--c-blue);
}
.tool-desc { font-size: 14px; line-height: 1.6; color: var(--c-body); }
.tool-link { font-size: 13px; color: var(--c-blue); word-break: break-all; }
.tool-link:hover { text-decoration: underline; }

/* ============================================================
   PROJECTS PAGE
   ============================================================ */
.repo-list { display: flex; flex-direction: column; gap: 14px; }
.repo-card {
  background: var(--c-bg);
  border-radius: var(--r-card);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.repo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.repo-name {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 17px;
  color: var(--c-blue);
}
.repo-desc { font-size: 14px; line-height: 1.6; color: var(--c-body); }
.repo-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.repo-meta .m { font-size: 12px; color: var(--c-body); }
.repo-meta .m.dim { color: var(--c-muted); }
.repo-meta .m + .m::before {
  content: "·";
  color: var(--c-divider);
  margin-right: 10px;
}
.repo-link {
  font-size: 13px;
  color: var(--c-blue);
  white-space: nowrap;
  flex-shrink: 0;
}
.repo-link:hover { text-decoration: underline; }

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-body { padding: 48px 80px; display: flex; flex-direction: column; gap: 40px; background: var(--c-white); }
.album { display: flex; flex-direction: column; gap: 16px; }
.album-head { display: flex; gap: 12px; align-items: center; }
.album-title {
  font-family: var(--f-latin);
  font-weight: 600;
  font-size: 19px;
  color: var(--c-navy);
}
.album-count { font-size: 13px; color: var(--c-muted); }
.photo-row { display: flex; gap: 20px; }
.photo { width: 620px; display: flex; flex-direction: column; gap: 10px; }
.photo-img {
  width: 100%;
  height: 340px;
  border-radius: var(--r-card);
  object-fit: cover;
  background: var(--c-img-ph);
}
.photo-caption { font-size: 13px; color: var(--c-body); }
.album-note { font-size: 12px; color: var(--c-muted); }

/* ============================================================
   RESPONSIVE (graceful degradation below the 1440 canvas)
   ============================================================ */
@media (max-width: 1200px) {
  .pad-x, .section-block, .hero-inner, .cta-inner,
  .page-header, .page-hero, .dir-row, .people-section,
  .contact-section, .pos-section,
  .body-block, .gallery-body, .pub-group, .year-filter,
  .footer-inner { padding-left: 40px; padding-right: 40px; }
  .hero-visual { width: 440px; padding: 40px 36px; }
  .hero-name { font-size: 38px; }
  .hero-mark { width: 52px; height: 52px; border-radius: 13px; }
  .dir-img { width: 340px; height: 200px; }
  .tool-card { width: 100%; }
}

@media (max-width: 1200px) {
  /* the descriptor line is the first thing to go when space runs out,
     then the paddings and the gaps tighten one more notch */
  .brand-sub { display: none; }
  .navbar-inner { padding: 0 32px; gap: 20px; }
  .nav-links { gap: 18px; }
}
@media (max-width: 900px) {
  .navbar-inner { padding: 0 24px; gap: 20px; }
  .nav-links { display: none; }
  .footer-sub { display: none; }
  .hero-inner { flex-direction: column; padding: 48px 24px; }
  .hero-visual { width: 100%; }
  .hero-title { font-size: 36px; }
  .section-block, .page-header, .page-hero, .dir-row,
  .people-section, .contact-section,
  .pos-section, .body-block, .gallery-body, .pub-group,
  .year-filter, .footer-inner, .cta-inner { padding-left: 24px; padding-right: 24px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cards, .cards .card { width: 100%; }
  .card { width: 100%; }
  .dir-row { flex-direction: column; align-items: flex-start; }
  .dir-img { width: 100%; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-brand { width: 100%; }
  .footer-cols { flex-wrap: wrap; gap: 40px; }
  .member-row, .contact-cards { flex-direction: column; }
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-card { width: 100%; }
  .pub-item { flex-direction: column; }
  .pub-venue { width: auto; }
  .photo-row { flex-direction: column; }
  .photo { width: 100%; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .lead-card, .faculty-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .roster-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
