:root {
  --fg: #1a1a1a;
  --muted: #666;
  --bg: #ffffff;
  --accent: #2a5db0;
  --border: #e5e5e5;
  --soft: #f7f7f8;
  --max: 960px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: underline; }
a:hover { text-decoration: underline; animation: link-underline-flash 0.5s ease; }

/* On hover, flash the underline (disappears then reappears) so it feels alive */
@keyframes link-underline-flash {
  0%, 100% { text-decoration-color: currentColor; }
  50%      { text-decoration-color: transparent; }
}

/* Icon and nav links are not text, so keep them underline-free */
.tab,
.intro-contacts a,
.member-social a { text-decoration: none; }

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  font-family: "Dancing Script", cursive;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.3px;
  color: var(--fg);
  line-height: 1;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tab {
  display: inline-block;
  background: transparent;
  border: none;
  padding: 6px 14px;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.tab:hover { color: var(--fg); background: var(--soft); text-decoration: none; }

.tab.active {
  color: white;
  background: var(--accent);
}
.tab.active:hover { color: white; background: var(--accent); }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.panel { display: none; }
.panel.active { display: block; }

h1 { font-size: 28px; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 32px 0 12px; }

/* Home intro */
.intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}

.intro-figure { width: 100%; text-align: center; padding-top: 40px; }

.intro-name {
  margin: 14px 0 4px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.intro-affiliation {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.intro-affiliation + .intro-affiliation { margin-bottom: 0; }
.intro-email { margin-top: 8px; }

.intro-figure img,
.intro-figure .placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.placeholder {
  background: var(--soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.intro-text h1 { margin-top: 0; }
.intro-text .title {
  color: var(--muted);
  margin: 0 0 4px;
}

.intro-contacts {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #1a1a1a;
}
.intro-contacts a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.intro-contacts a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .intro {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .intro-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    max-width: 260px;
    margin: 0 auto;
  }
  .intro-text { text-align: left; }
}

/* News */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.news-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  font-size: 18px;
}

.news-list .date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.news-list li.hidden { display: none; }

.ghost-btn {
  margin-top: 16px;
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: var(--fg);
}
.ghost-btn:hover { background: var(--soft); }

/* Review and Service */
.service h3 {
  font-size: 19px;
  margin: 20px 0 4px;
}
.service-role {
  font-weight: 600;
  font-size: 18px;
  margin: 10px 0 2px 1.6em;
}
.service-list {
  margin: 0 0 8px;
  padding-left: 22px;
  margin-left: 1.6em;
}
.service-list li {
  margin-bottom: 3px;
  font-size: 18px;
}

/* Publications */
.pub-list, .course-list, .member-list {
  padding-left: 18px;
}
.course-list li { margin-bottom: 12px; }
.pub-list li { margin-bottom: 20px; }

/* Paper titles are italic.
   Each title is tagged with .pub-title in publication.astro — plain-text
   titles use <span class="pub-title">, linked titles use <a class="pub-title">.
   (Targeting a tag like <strong> wouldn't work since titles aren't all the same tag.) */
.pub-title { font-style: italic; }

/* Nested (secondary) list under a course — tighter spacing */
.course-list ul { margin: 4px 0 0; }
.course-list ul li { margin-bottom: 2px; }

/* Venue badge (e.g. SIGMOD 2026) */
.pub-venue {
  display: inline-block;
  background: #4a148c;
  color: #fff;
  font-style: normal;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 0.88em;
  letter-spacing: 0.4px;
}

/* Gallery */
.gallery {
  position: relative;
  margin: 16px 0 32px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--soft);
  outline: none;
}

.gallery-track {
  display: flex;
  transition: transform .6s ease;
  touch-action: pan-y;
}

.gallery-slide {
  flex: 0 0 100%;
  min-width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  font-size: 18px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.gallery-nav:hover { background: rgba(0,0,0,0.65); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: none;
  padding: 0;
  cursor: pointer;
}
.dot.active { background: white; }

/* Team member cards */
.section-title {
  text-align: center;
  font-size: 28px;
  margin: 40px 0 8px;
  font-weight: 500;
}
.section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: #5fd4d6;
  margin: 8px auto 0;
}

.member-group { margin-top: 36px; }

.group-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.member-card {
  background: #e8e9eb;
  display: flex;
  flex-direction: column;
}

.member-photo {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  background: #e1e2e4;
  overflow: hidden;
}
.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.member-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
}

.member-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.member-role {
  margin: 0 0 4px;
  font-size: 13px;
  color: #4a4a4a;
}

.member-name {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
  color: #1a1a1a;
}

.member-bio {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #3a3a3a;
  flex: 1;
}

/* Bio rendered as an icon list — each item leads with a category icon instead of a bullet */
.member-bio .bio-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.member-bio .bio-list li {
  margin: 0 0 3px;
  padding-left: 1.6em;
  position: relative;
}
.member-bio .bio-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.95em;
  line-height: inherit;
}
.member-bio .bio-date::before  { content: "📅"; }   /* start date */
.member-bio .bio-topic::before { content: "🔍"; font-size: 1.1em; }   /* research topics */
.member-bio .bio-award::before { content: "🏆"; }   /* award */

/* ABCD research-pillar tags — colors match the "ABCD" on the home page.
   Subtle tinted chip (lighter than the teaching-page "NEW" badge). */
.member-bio .abcd {
  display: inline-block;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 6px;
  vertical-align: baseline;
}
.member-bio .abcd-a { color: #4285F5; background: rgba(66, 133, 245, 0.13); }  /* AI infrastructure */
.member-bio .abcd-b { color: #D73B0C; background: rgba(215, 59, 12, 0.13); }   /* Blockchain */
.member-bio .abcd-c { color: #ECB111; background: rgba(236, 177, 17, 0.16); }  /* Cloud computing */
.member-bio .abcd-d { color: #33A752; background: rgba(51, 167, 82, 0.14); }   /* DBMS */

.member-social {
  display: flex;
  gap: 14px;
  color: #1a1a1a;
}
.member-social a {
  color: inherit;
  display: inline-flex;
  align-items: center;
}
.member-social a:hover { color: var(--accent); }

@media (max-width: 1000px) {
  .member-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .member-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .member-grid { grid-template-columns: 1fr; }
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px 32px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* Join Us page */
.joinus { max-width: 760px; }

.joinus-hero {
  background: linear-gradient(135deg, #eef4ff, #e7fbf1);
  border: 1px solid #d8e6ff;
  border-radius: 14px;
  padding: 24px 28px;
  margin: 8px 0 24px;
}
.joinus-lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: #2a2a2a;
}

.joinus-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 0 0 22px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.joinus-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 19px;
}
.joinus-card__icon { font-size: 1.2em; }
.joinus-card p { line-height: 1.6; margin: 0 0 14px; }
.joinus-card > p:last-child { margin-bottom: 0; }

.joinus-note {
  background: var(--soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  line-height: 1.6;
  font-size: 16.5px;
}

.joinus-checklist {
  list-style: none;
  padding-left: 0;
  margin: 0 0 18px;
}
.joinus-checklist > li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 9px;
  line-height: 1.55;
}
.joinus-checklist > li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #2e9e5b;
  font-weight: 700;
}
.joinus-checklist ul {
  list-style: none;
  margin: 8px 0 0;
  padding-left: 0;
}
.joinus-checklist ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 4px;
  color: #555;
  font-size: 17px;
}
.joinus-checklist ul li::before {
  content: "–";
  position: absolute;
  left: 2px;
  color: var(--muted);
}

.joinus-subject-label {
  margin: 0 0 8px !important;
  font-weight: 600;
}
.joinus-subject {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #1f2430;
  color: #e7ecf3;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.joinus-eg {
  margin: 8px 0 0 !important;
  font-size: 16px;
  color: var(--muted);
  font-style: italic;
}
.joinus-disclaimer {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 17px;
  color: var(--muted);
}
.joinus a { font-weight: 600; }

/* Recruiting banner (home page) */
.recruit-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #eef4ff, #e7fbf1);
  border: 1px solid #cde2ff;
  border-left: 5px solid #4285F5;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 24px 0 8px;
}
.recruit-banner__icon {
  font-size: 1.4em;
  line-height: 1.5;
}
.recruit-banner p {
  margin: 0;
  line-height: 1.6;
  font-size: 18px;
  color: #2a2a2a;
}
.recruit-banner a {
  font-weight: 600;
}

/* R&D (Research) page */
.rd-intro {
  font-size: 18px;
  line-height: 1.6;
  color: #2a2a2a;
  margin: 0 0 24px;
  max-width: 760px;
}
.rd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.rd-card {
  position: relative;
  border: 1px solid var(--border);
  border-top: 3px solid var(--muted);
  border-radius: 12px;
  padding: 20px 22px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.rd-card__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 6px;
}
.rd-card h2 {
  margin: 0 0 10px;
  font-size: 18.5px;
  line-height: 1.3;
}
.rd-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: #3a3a3a;
}
/* ABCD accent colors on the top border + tag */
.rd-a { border-top-color: #4285F5; }
.rd-a .rd-card__tag { color: #4285F5; }
.rd-b { border-top-color: #D73B0C; }
.rd-b .rd-card__tag { color: #D73B0C; }
.rd-c { border-top-color: #ECB111; }
.rd-c .rd-card__tag { color: #ECB111; }
.rd-d { border-top-color: #33A752; }
.rd-d .rd-card__tag { color: #33A752; }

@media (max-width: 700px) {
  .rd-grid { grid-template-columns: 1fr; }
}

/* R&D — Featured project link */
.rd-projects-title {
  margin-top: 36px;
}
.rd-project {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  background: #fff;
  text-decoration: none;
  color: var(--fg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow .15s ease, transform .15s ease;
}
.rd-project:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.rd-project__emoji { font-size: 28px; line-height: 1; }
.rd-project__text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.rd-project__text strong { font-size: 17px; }
.rd-project__sub { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

/* ===== R&D page (src/pages/rd.astro) ===== */
.rdx { max-width: 880px; }

/* Hero */
.rdx-hero { margin-bottom: 34px; }
.rdx-abcd { font-weight: 800; letter-spacing: 1px; }
.rdx-lead {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: #3a4258;
}

/* ===== Research stack diagram (compact) ===== */
.flow-stage {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 20px auto 34px;
  aspect-ratio: 7 / 5;
  container-type: inline-size;
}
.flow-arrows {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
/* glowing dot wall */
.wdot { animation: wall-twinkle 2.6s ease-in-out infinite; }
.wdot--blue  { fill: #5a9bff; filter: drop-shadow(0 0 1.2px rgba(66, 133, 245, 0.85)); }
.wdot--green { fill: #2ec27e; filter: drop-shadow(0 0 1.2px rgba(30, 168, 100, 0.85)); }
@keyframes wall-twinkle { 0%, 100% { opacity: .12; } 50% { opacity: 1; } }

/* small route labels above each dot column */
.flow-route {
  position: absolute;
  z-index: 2;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 2.5cqw;
  font-weight: 700;
  letter-spacing: .3px;
  opacity: .85;
}
.flow-route--blue { color: #2f6fe0; }
.flow-route--green { color: #1ea864; }

.flow-top, .flow-bottom {
  position: absolute;
  left: 3%; right: 3%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  border: 0.4cqw solid #103a63;
  border-radius: 3cqw;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.12);
  z-index: 1;
}
.flow-top {
  top: 0; height: 16%;
  background: linear-gradient(180deg, #eaf3fc, #cfe3f6);
  color: #3f7fe6;
  font-size: 5.4cqw;
  text-shadow: 0 1px 5px rgba(63, 127, 230, 0.22);
}
.flow-bottom {
  bottom: 0; height: 14%;
  background: linear-gradient(180deg, #eef5fb, #dbe9f6);
  color: #111;
  font-size: 5.4cqw;
}

.flow-word {
  position: absolute;
  z-index: 1;
  font-weight: 800;
  color: #111;
  white-space: nowrap;
  font-size: 3.6cqw;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.flow-word b { font-size: 1.28em; }

.flow-btn {
  position: absolute;
  z-index: 2;
  background: #fff;
  border: 0.35cqw solid #1f5e8a;
  color: #11405f;
  font-weight: 700;
  font-size: 2.6cqw;
  padding: 0.9cqw 2.2cqw;
  border-radius: 2cqw;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1cqw 2.2cqw rgba(0, 0, 0, 0.10);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  outline: none;
}
.flow-btn:hover, .flow-btn:focus-visible {
  transform: translateY(-2px);
  border-color: #3f7fe6;
  box-shadow: 0 1.6cqw 3.2cqw rgba(0, 0, 0, 0.18);
}

/* static item chips (blue column) */
.flow-item {
  position: absolute;
  z-index: 2;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.94);
  border: 0.3cqw solid #a9c8f5;
  color: #1c4e86;
  font-weight: 600;
  font-size: 2.4cqw;
  padding: 0.7cqw 1.9cqw;
  border-radius: 1.6cqw;
  box-shadow: 0 0.6cqw 1.6cqw rgba(0, 0, 0, 0.08);
}
.flow-item--green { border-color: #9bdcbb; color: #157a49; }

.flow-tip {
  position: absolute;
  top: calc(100% + 1.2cqw);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 52cqw;
  max-width: 250px;
  background: #0e2748;
  color: #dce8fb;
  border: 1px solid #2a4a78;
  border-radius: 1.6cqw;
  padding: 2.2cqw 2.6cqw;
  font-size: 2.3cqw;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 2cqw 5cqw rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 6;
}
.flow-tip b {
  display: block;
  color: #79e6ff;
  margin-bottom: 0.7cqw;
  font-size: 1.08em;
}
/* keep edge tooltips from running off the right side */
.flow-tip--right { left: auto; right: 0; transform: translateX(0) translateY(6px); }

.flow-btn:hover .flow-tip,
.flow-btn:focus-within .flow-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.flow-btn:hover .flow-tip--right,
.flow-btn:focus-within .flow-tip--right {
  transform: translateX(0) translateY(0);
}

/* Topic cards */
.rdx-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.rdx-card {
  position: relative;
  padding: 20px 22px 20px 26px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8edf5;
  overflow: hidden;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* animated flowing-gradient left edge */
.rdx-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--c2), var(--c), var(--c2), var(--c));
  background-size: 100% 300%;
  animation: edge-flow 7s linear infinite;
}
@keyframes edge-flow {
  from { background-position: 0 0; }
  to   { background-position: 0 300%; }
}
.rdx-card:hover {
  background: #f7faff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20, 40, 80, 0.08);
}
.rdx-card:hover::before { animation-duration: 3.5s; }

.rdx-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.rdx-icon {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  background: var(--tint);
}
.rdx-icon svg { width: 21px; height: 21px; }
.rdx-card__title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #14213d;
}
.rdx-card__body {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #485068;
}
.rdx-card__body + .rdx-card__body { margin-top: 10px; }
.rdx-card__list {
  margin: 10px 0;
  padding-left: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: #485068;
}
.rdx-card__list li + li { margin-top: 8px; }
.rdx-card__body a, .rdx-card__list a { color: var(--c); font-weight: 600; text-decoration: none; }
.rdx-card__body a:hover, .rdx-card__list a:hover { text-decoration: underline; }
.rdx-airbus-name { color: #00357a; text-decoration: none; }
.rdx-airbus-name:hover { text-decoration: underline; }

.rdx--blue  { --c:#4285F5; --c2:#a7c8ff; --tint:rgba(66,133,245,.12); }
.rdx--red   { --c:#D73B0C; --c2:#ff9b78; --tint:rgba(215,59,12,.12); }
.rdx--amber { --c:#E0A009; --c2:#ffdf8a; --tint:rgba(236,177,17,.16); }
.rdx--green { --c:#33A752; --c2:#8fe3b1; --tint:rgba(51,167,82,.14); }

/* In-card project link — button style */
.rdx-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 18px;
  border-radius: 9px;
  border: 1.5px solid var(--c);
  background: rgba(0, 0, 0, 0.03);
  font-size: 14px;
  font-weight: 700;
  color: var(--c);
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.rdx-card__link:hover {
  background: var(--c);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.rdx-card__link--airbus {
  border-color: #00357a;
  color: #00357a;
  background: rgba(0, 53, 122, 0.06);
}
.rdx-card__link--airbus:hover { background: #00357a; color: #fff; }
.rdx-card__link-arrow {
  display: inline-block;
  transition: transform .2s ease;
  animation: link-arrow-nudge 1.6s ease-in-out infinite;
}
@keyframes link-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}
.rdx-card__link:hover .rdx-card__link-arrow {
  animation-play-state: paused;
  transform: translateX(6px);
}

/* Scroll reveal (R&D page) */
.rdx [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.rdx [data-reveal].in { opacity: 1; transform: none; }
.rdx .rdx-card:nth-child(2) { transition-delay: .06s; }
.rdx .rdx-card:nth-child(3) { transition-delay: .12s; }
.rdx .rdx-card:nth-child(4) { transition-delay: .18s; }

/* ===== Sponsors & collaborators (R&D page) ===== */
.rdx-sponsors { margin-top: 50px; }
.rdx-sponsors h2 { margin: 0 0 8px; }
.rdx-sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 24px;
  align-items: center;
  margin-top: 22px;
}
.rdx-sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 8px 14px;
}
.rdx-sponsor img {
  max-height: 66px;
  max-width: 82%;
  width: auto;
  object-fit: contain;
  transition: transform .25s ease;
}
.rdx-sponsor img.mid { max-height: 78px; max-width: 88%; }
.rdx-sponsor img.big { max-height: 92px; max-width: 94%; }
.rdx-sponsor img:hover { transform: scale(1.06); }

@media (max-width: 720px) {
  .rdx-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .rdx-sponsor-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
  .rdx-sponsor { min-height: 78px; }
  .rdx-sponsor img { max-height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .rdx [data-reveal] { opacity: 1; transform: none; transition: none; }
  .rdx .wdot { animation: none; opacity: .55; }
  .rdx .rdx-card::before { animation: none; }
  .rdx .rdx-card__link-arrow { animation: none; }
}
.rd-project__arrow { font-size: 22px; color: var(--accent); }
