:root {
  --bg: #0f120d;
  --bg-soft: #171a13;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.092);
  --ink: #f6efe2;
  --muted: #bcb39d;
  --subtle: #8e876f;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #f28a1d;
  --accent-soft: #f2bb24;
  --green: #6f8f6b;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(242, 138, 29, 0.19), transparent 34rem),
    radial-gradient(circle at 82% 12%, rgba(111, 143, 107, 0.21), transparent 31rem),
    linear-gradient(180deg, #0f120d 0%, #161810 54%, #0b0d09 100%);
  color: var(--ink);
  font-family: Barlow, "Noto Sans SC", "Source Han Sans SC", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.site-shell {
  position: relative;
  min-height: 100vh;
}

.site-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
}

.header-wrap,
.site-main,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 15, 15, 0.66);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  color: #fff;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.brand-copy {
  display: grid;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 0.94rem;
  letter-spacing: 0;
  text-transform: none;
}

.nav {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a,
.nav-item {
  position: relative;
}

.nav a {
  transition: color 160ms ease;
}

.nav-item {
  display: inline-flex;
  align-items: stretch;
}

.nav-parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-parent::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.nav-submenu {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 40;
  min-width: 138px;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 15, 15, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.has-submenu:hover .nav-submenu,
.has-submenu:focus-within .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-submenu-link {
  display: block;
  padding: 10px 18px;
  color: #f3f3f3;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
}

.nav-submenu-link:hover,
.nav-submenu-link.is-active {
  color: #ff7a00;
  background: rgba(255, 122, 0, 0.08);
}

.theme-toggle {
  align-self: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 122, 0, 0.45);
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.08);
  color: #ff7a00;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.language-toggle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.language-toggle:hover {
  border-color: rgba(255, 122, 0, 0.55);
  background: rgba(255, 122, 0, 0.08);
  color: #ff7a00;
}

.theme-toggle:hover {
  border-color: rgba(255, 122, 0, 0.72);
  background: rgba(255, 122, 0, 0.16);
}

.nav a:hover,
.nav .is-active,
.inline-link {
  color: var(--accent-soft);
}

.nav-admin {
  color: var(--accent);
}

.site-main {
  padding: 46px 0 82px;
}

.hero-panel {
  min-height: clamp(580px, 78vh, 820px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.82fr);
  gap: 36px;
  align-items: center;
}

.eyebrow,
.card-kicker,
.signal-label,
.featured-label {
  margin: 0 0 12px;
  color: var(--accent-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.14;
}

.hero-copy h1,
.page-hero h1,
.article-header h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  letter-spacing: -0.08em;
}

.article-header h1 {
  font-size: clamp(2.25rem, 4vw, 2.73125rem);
  letter-spacing: -0.04em;
}

.hero-summary,
.page-summary,
.article-summary {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
}

.hero-body {
  max-width: 760px;
  color: #ddd5c3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  border-radius: 999px;
  padding: 11px 18px;
  border: 1px solid rgba(242, 187, 36, 0.45);
}

.button-primary {
  color: #160d03;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
}

.hero-aside,
.featured-post,
.archive-card,
.info-card,
.empty-state {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel-strong), rgba(255, 255, 255, 0.025));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.hero-aside {
  border-radius: 34px;
  padding: 24px;
}

.signal-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 26px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.68)),
    url("/themes/halo-theme-batlab/assets/uploads/site/hero-bats.svg") center/cover no-repeat;
}

.signal-card h2 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}

.signal-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.metric-grid article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.metric-grid span {
  display: block;
  color: var(--subtle);
  font-size: 0.76rem;
}

.metric-grid strong {
  font-size: 1.12rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 38px 0 64px;
}

.info-card,
.featured-post,
.archive-card,
.empty-state {
  border-radius: 24px;
  padding: 24px;
}

.info-card h2,
.featured-post h3,
.archive-card h2 {
  margin: 0 0 12px;
}

.info-card p,
.featured-post p,
.archive-card p,
.post-card p {
  color: var(--muted);
}

.section-block {
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.06em;
}

.news-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.post-list {
  display: grid;
  gap: 12px;
}

.post-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.post-card:hover,
.archive-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 187, 36, 0.42);
  background: rgba(242, 138, 29, 0.08);
}

.post-card time,
.featured-post time,
.archive-meta,
.article-header time {
  color: var(--accent-soft);
  font-size: 0.88rem;
}

.post-card h3 {
  margin: 6px 0;
  font-size: 1.18rem;
}

.post-card.is-featured h3 {
  font-size: 1.24rem;
}

.page-hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: end;
  padding: 56px 0 46px;
}

.page-hero-meta {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.04);
}

.page-hero-meta strong {
  color: var(--ink);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.article-shell {
  max-width: 920px;
  margin: 26px auto 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: clamp(24px, 5vw, 54px);
}

.article-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.article-cover {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 24px;
  margin-top: 28px;
}

.content {
  color: #e8dfcf;
  font-size: 1.04rem;
}

.content p,
.content ul,
.content ol {
  margin: 0 0 1.18em;
}

.content img {
  display: block;
  width: min(100%, 840px);
  height: auto;
  margin: 26px auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.content a {
  color: var(--accent-soft);
  border-bottom: 1px solid rgba(242, 187, 36, 0.35);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
}

.site-footer p {
  margin: 0 0 4px;
  color: var(--ink);
}

.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.footer-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}

.footer-logo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-logo-batlab img {
  transform: scale(1.22);
}

@media (max-width: 920px) {
  .header-wrap,
  .site-footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-logo-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-panel,
  .news-layout,
  .page-hero,
  .archive-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 0;
  }

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

@media (max-width: 560px) {
  .header-wrap,
  .site-main,
  .site-footer {
    width: min(var(--max), calc(100% - 28px));
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .platform-method-grid,
  .platform-gallery {
    grid-template-columns: 1fr;
  }
}

/* Qifeiye-inspired homepage pass: full-screen dark hero and compact black nav. */
.page-home {
  background: #151515;
}

.page-home .site-noise {
  opacity: 0.22;
  background-size: 3px 3px;
}

.page-home .site-header {
  position: fixed;
  inset: 0 0 auto;
  height: 70px;
  background: rgba(15, 15, 15, 0.66);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-home .header-wrap {
  width: min(1240px, calc(100% - 108px));
  min-height: 70px;
  padding: 0;
}

.page-home .brand {
  gap: 12px;
}

.page-home .brand-mark {
  font-size: clamp(2rem, 2.7vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
}

.page-home .brand-copy {
  color: #b8b8b8;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.page-home .brand-copy strong {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.page-home .nav {
  gap: clamp(14px, 2vw, 34px);
  color: #f3f3f3;
  font-size: 0.96rem;
}

.page-home .nav a {
  padding: 25px 0 22px;
}

.page-home .nav-submenu a {
  padding: 10px 18px;
}

.page-home .nav a:hover,
.page-home .nav .is-active,
.page-home .nav-admin {
  color: #ff7a00;
}

.page-home .nav .is-active {
  box-shadow: inset 0 3px 0 #ff7a00;
}

.page-home .language-toggle {
  color: #d5d5d5;
}

.page-home .site-main {
  width: 100%;
  padding: 0;
}

.qfy-hero {
  position: relative;
  min-height: 805px;
  height: 100vh;
  overflow: hidden;
  background: #111;
}

.hero-slides {
  position: absolute;
  inset: 70px 0 0;
  z-index: 0;
  background: #111;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-image: var(--slide-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translateX(100%);
  transition: transform 720ms cubic-bezier(0.55, 0, 0.1, 1);
  will-change: transform;
}

.hero-slide.is-active {
  transform: translateX(0);
}

.hero-slide.is-prev {
  transform: translateX(-100%);
}

.hero-slide.is-next {
  transform: translateX(100%);
}

.hero-slide.no-transition {
  transition: none;
}

.hero-slide:nth-child(2) {
  background-position: center top;
}

.hero-slide:nth-child(6) {
  background-position: center center;
}

.qfy-hero::before {
  content: "";
  position: absolute;
  inset: 70px 0 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.6), transparent 42%, rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at 50% 50%, transparent, rgba(0, 0, 0, 0.48) 76%);
}

.qfy-hero::after {
  content: none;
}

.hero-center {
  position: absolute;
  z-index: 2;
  top: 33%;
  left: 18%;
  transform: translateY(-50%);
  color: #999;
}

.hero-center h1 {
  margin: 0 0 6px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.35;
}

.hero-center h1 span {
  color: #ff6500;
  font-weight: 700;
}

.hero-center p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.95rem, 1.4vw, 1.18rem);
  font-style: italic;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 52%;
  width: 38px;
  height: 38px;
  border: 0;
  border-left: 4px solid rgba(255, 255, 255, 0.74);
  border-bottom: 4px solid rgba(255, 255, 255, 0.74);
  background: transparent;
}

.hero-arrow-left {
  left: 56px;
  transform: rotate(45deg);
}

.hero-arrow-right {
  right: 56px;
  transform: rotate(225deg);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 36px;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: transparent;
  cursor: pointer;
}

.hero-dots .is-active {
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(34px, 4vw, 58px);
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 90px;
}

.home-about-panel {
  align-self: start;
  padding: 0 8px 0 0;
}

.home-about-panel .section-heading,
.qfy-news .section-heading {
  border-bottom: 1px double rgba(255, 255, 255, 0.28);
  padding-bottom: 14px;
}

.home-about-copy {
  color: #ddd;
  font-size: 1.02rem;
  line-height: 2;
}

.home-about-copy p {
  margin: 0 0 22px;
}

.qfy-intro,
.qfy-news {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.qfy-intro {
  padding: 70px 0 54px;
  color: #fff;
}

.qfy-intro h2,
.home-about-panel h2,
.qfy-news h2 {
  margin: 0;
  color: #f2bb24;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
}

.qfy-intro .content {
  max-width: 940px;
  color: #ddd;
  font-size: 1.08rem;
  line-height: 2;
}

.qfy-news {
  width: auto;
  padding: 0;
}

.qfy-news .featured-post,
.qfy-news .post-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.qfy-news .post-card:hover,
.qfy-news .archive-card:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 900px) {
  .page-home .site-header {
    position: sticky;
    height: auto;
  }

  .page-home .header-wrap {
    width: min(100% - 32px, 1240px);
    padding: 14px 0;
  }

  .qfy-hero {
    min-height: 560px;
    height: 72vh;
  }

  .qfy-hero::before,
  .qfy-hero::after {
    inset: 0;
  }

  .hero-center {
    left: 24px;
    right: 24px;
    top: 45%;
  }

  .hero-arrow-left {
    left: 24px;
  }

  .hero-arrow-right {
    right: 24px;
  }

  .qfy-intro,
  .qfy-news .news-layout {
    grid-template-columns: 1fr;
  }

  .home-overview {
    grid-template-columns: 1fr;
    width: min(100% - 32px, 1180px);
    padding: 42px 0 72px;
  }

  .home-about-panel {
    padding-right: 0;
  }
}

/* Inner pages use the same black/orange visual language as the original site. */
.page-inner {
  background:
    linear-gradient(180deg, #151515 0, #111 340px, #191919 100%);
}

.page-inner .site-header {
  position: sticky;
  height: 70px;
  background: rgba(15, 15, 15, 0.66);
  border-bottom-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-inner .header-wrap {
  width: min(1240px, calc(100% - 108px));
  min-height: 70px;
  padding: 0;
}

.page-inner .brand-mark {
  font-size: clamp(2rem, 2.7vw, 2.35rem);
  font-weight: 800;
}

.page-inner .brand-copy {
  color: #b8b8b8;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.page-inner .brand-copy strong {
  color: #fff;
}

.page-inner .nav {
  gap: clamp(14px, 2vw, 34px);
  color: #f3f3f3;
}

.page-inner .nav a {
  padding: 25px 0 22px;
}

.page-inner .nav-submenu a {
  padding: 10px 18px;
}

.page-inner .nav a:hover,
.page-inner .nav .is-active,
.page-inner .nav-admin {
  color: #ff7a00;
}

.page-inner .nav .is-active {
  box-shadow: inset 0 3px 0 #ff7a00;
}

.page-inner .language-toggle {
  color: #d5d5d5;
}

.page-inner .site-main {
  width: min(1180px, calc(100% - 48px));
  padding: 52px 0 92px;
}

.qfy-page-title {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 44px;
  align-items: end;
  min-height: 245px;
  margin-bottom: 34px;
  padding: 54px 0 34px;
  border-bottom: 1px double rgba(255, 255, 255, 0.24);
}

.qfy-page-title .eyebrow,
.qfy-article .eyebrow {
  color: #f2bb24;
}

.qfy-page-title h1,
.qfy-article h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3.1vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.qfy-page-title .page-summary,
.qfy-article .article-summary {
  margin-top: 14px;
  color: #bababa;
  font-size: clamp(0.95rem, 1.25vw, 1.12rem);
  line-height: 1.65;
}

.qfy-page-title .intro-copy {
  color: #d8d8d8;
}

.qfy-page-title .page-hero-meta {
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  padding: 0 0 0 28px;
  background: transparent;
}

.qfy-page-title .page-hero-meta span {
  color: #888;
}

.qfy-page-title .page-hero-meta strong {
  color: #f2bb24;
}

.qfy-archive-list {
  display: grid;
  gap: 0;
  max-width: 980px;
}

.qfy-archive-list .archive-card {
  display: grid;
  grid-template-columns: 145px 1fr auto;
  align-items: baseline;
  gap: 22px;
  padding: 18px 0 18px 22px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.qfy-archive-list .archive-card:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.025);
}

.qfy-archive-list .archive-meta {
  display: grid;
  gap: 2px;
  color: #bababa;
}

.qfy-archive-list .archive-meta span {
  color: #dd9933;
}

.qfy-archive-list h2 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.55;
}

.qfy-archive-list p {
  grid-column: 2;
  margin: 4px 0 0;
  color: #9f9f9f;
}

.qfy-archive-list .inline-link {
  color: #ff7a00;
  font-size: 0.88rem;
}

.archive-pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 980px;
  margin: 34px 0 0;
  padding-top: 10px;
}

.pagination-pages {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination-control,
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255, 122, 0, 0.38);
  background: transparent;
  color: #f2bb24;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.pagination-control {
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
}

.pagination-page {
  width: 38px;
  font-size: 0.92rem;
}

.pagination-control:hover,
.pagination-page:hover,
.pagination-page.is-current {
  border-color: #ff7a00;
  background: rgba(255, 122, 0, 0.1);
  color: #ff7a00;
}

.pagination-page.is-current {
  font-weight: 700;
}

.pagination-control.is-disabled {
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.32);
}

.pagination-status {
  display: none;
  color: #9f9f9f;
  font-size: 0.92rem;
  white-space: nowrap;
}

.pagination-status strong {
  color: #f2bb24;
}

.qfy-article {
  max-width: 920px;
  margin: 0 auto;
  padding: 58px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.qfy-article .article-header {
  border-bottom: 1px double rgba(255, 255, 255, 0.24);
}

.qfy-article .article-header time {
  display: inline-block;
  margin-bottom: 12px;
  color: #bababa;
}

.qfy-article .article-content {
  color: #e5e5e5;
  font-size: 1rem;
  line-height: 2;
}

.qfy-article .article-content img {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.about-section {
  margin: 0 0 42px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 20, 20, 0.82);
  color: #e6e0d5;
}

.about-section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.about-section-heading h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  padding-bottom: 12px;
  color: #f7f1e8;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.about-section-heading h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 1px;
  background: #f25a00;
  transform: translateX(-50%);
  transition: width 0.35s ease;
}

.about-section:hover .about-section-heading h2::after {
  width: 92px;
}

.about-intro-grid,
.about-two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.about-life {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.about-section figure {
  margin: 0;
}

.about-section img,
.qfy-article .article-content .about-section img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #080808;
  filter: saturate(0.92) contrast(1.04);
}

.about-copy,
.about-activity-list {
  color: #d8d2c7;
  font-size: 1.02rem;
  line-height: 2;
}

.about-copy p,
.about-activity-list p {
  margin-bottom: 1em;
}

.about-copy em {
  color: #efe8da;
}

.about-copy strong {
  color: #fff;
}

.about-activity-list h3,
.about-contact-card h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1.08rem;
}

.about-activity-list p::before {
  content: ">";
  margin-right: 0.45em;
  color: #f25a00;
  font-weight: 700;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.about-gallery img:first-child,
.about-gallery-wide img:first-child {
  grid-column: 1 / -1;
}

.about-contact-card {
  margin-top: 28px;
  padding: 24px 28px;
  border-left: 3px solid #f25a00;
  background: rgba(0, 0, 0, 0.28);
  color: #ddd6c8;
}

.about-contact-card p {
  margin: 0.35em 0;
}

.about-contact-card a {
  color: #ff9a2f;
  border-bottom-color: rgba(255, 154, 47, 0.45);
}

.platform-section {
  margin: 0 0 42px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 20, 20, 0.82);
  color: #e6e0d5;
}

.platform-video {
  position: relative;
  overflow: hidden;
  width: min(100%, 1040px);
  margin: 0 auto;
  aspect-ratio: 16 / 8;
  background: #050505;
}

.platform-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.platform-method-map {
  margin: 0 auto 34px;
}

.platform-method-map img,
.qfy-article .article-content .platform-method-map img {
  display: block;
  width: min(100%, 980px);
  max-width: none;
  height: auto;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.platform-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.platform-method-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.platform-method-card img,
.qfy-article .article-content .platform-method-card img {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.platform-method-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
  text-align: center;
}

.platform-method-card .method-en {
  margin: 0 0 14px;
  color: #a3a3a3;
  font-weight: 700;
  text-align: center;
}

.platform-method-card p {
  color: #d7d0c4;
  line-height: 1.85;
}

.platform-category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 22px;
  margin: 0 0 24px;
}

.platform-category-list span {
  color: #f2bb24;
  font-size: 1.04rem;
}

.platform-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-gallery img,
.qfy-article .article-content .platform-gallery img {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 5 / 4;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  background: #080808;
}

.team-section {
  margin: 0 0 34px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 20, 20, 0.82);
  color: #e6e0d5;
}

.team-section-lead {
  max-width: 820px;
  margin: -6px auto 24px;
  color: #cfc7ba;
  font-size: 1rem;
  line-height: 1.9;
  text-align: center;
}

.team-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.team-card,
.team-member {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.24);
}

.team-card-large {
  display: block;
  padding: 14px;
}

.team-card img,
.team-member img,
.qfy-article .article-content .team-card img,
.qfy-article .article-content .team-member img {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #080808;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.team-card-large img,
.qfy-article .article-content .team-card-large img {
  aspect-ratio: 1 / 1.08;
  margin-bottom: 14px;
}

.team-role {
  margin: 0 0 6px;
  color: #f2bb24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.72rem);
}

.team-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  color: #d6cec1;
  font-size: 0.86rem;
  line-height: 1.55;
}

.team-card dt {
  color: #918b82;
  font-weight: 700;
}

.team-card dd {
  margin: 0;
}

.team-section a {
  color: #ff9a2f;
  border-bottom-color: rgba(255, 154, 47, 0.4);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.team-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-member {
  padding: 12px;
  min-width: 0;
}

.team-member img,
.qfy-article .article-content .team-member img {
  aspect-ratio: 1 / 1.08;
  margin-bottom: 12px;
}

.team-member h3,
.team-member h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.02rem;
}

.team-member p {
  margin: 0 0 7px;
  color: #cfc8bb;
  font-size: 0.84rem;
  line-height: 1.55;
}

.team-member a {
  display: inline;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
}

.team-subsection {
  margin-top: 30px;
}

.team-subsection:first-of-type {
  margin-top: 0;
}

.team-subsection > h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  color: #f2bb24;
  font-size: 1.28rem;
  letter-spacing: 0.06em;
}

.team-subsection > h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.team-alumni {
  text-align: center;
}

.team-alumni p {
  max-width: 680px;
  margin: 0 auto 20px;
  color: #cfc7ba;
  line-height: 1.9;
}

.team-alumni-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 28px;
  border: 1px solid rgba(242, 187, 36, 0.45);
  background: rgba(242, 90, 0, 0.08);
  color: #f2bb24;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.research-section {
  margin: 0 0 42px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 20, 20, 0.82);
  color: #e6e0d5;
}

.research-lead {
  max-width: 860px;
  margin: -6px auto 30px;
  color: #cfc7ba;
  font-size: 1rem;
  line-height: 1.9;
  text-align: center;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.achievement-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.24);
}

.achievement-card img,
.qfy-article .article-content .achievement-card img {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 4 / 3;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  background: #080808;
  filter: saturate(0.92) contrast(1.04);
}

.achievement-card div {
  padding: 18px;
}

.achievement-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.04rem;
  line-height: 1.35;
}

.achievement-card p {
  margin: 0;
  color: #c9c1b4;
  font-size: 0.9rem;
  line-height: 1.6;
}

.publication-list,
.project-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: research-item;
}

.publication-list li,
.project-list li {
  position: relative;
  min-height: 48px;
  padding: 16px 18px 16px 64px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: #d8d0c3;
  line-height: 1.75;
  counter-increment: research-item;
}

.publication-list li::before,
.project-list li::before {
  content: counter(research-item, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  color: #f2bb24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.publication-list em {
  color: #fff;
}

.project-visuals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}

.project-visuals img,
.qfy-article .article-content .project-visuals img {
  display: block;
  width: 100%;
  max-width: none;
  max-height: 170px;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
}

.project-period {
  display: inline-flex;
  margin: 0 0 8px;
  color: #f2bb24;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.project-list strong {
  display: block;
  color: #fff;
  font-size: 1.04rem;
  line-height: 1.65;
}

.project-list p {
  margin: 8px 0 0;
  color: #bdb4a7;
}

.outreach-section {
  margin: 0 0 42px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 20, 20, 0.82);
  color: #e6e0d5;
}

.outreach-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 34px;
  align-items: center;
  background: rgba(20, 20, 20, 0.86);
}

.outreach-kicker {
  margin: 0 0 18px;
  color: #f2bb24;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.outreach-hero h2 {
  max-width: 700px;
  margin: 0 0 20px;
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.outreach-hero p {
  max-width: 760px;
  color: #d4ccbf;
  line-height: 1.9;
}

.outreach-hero figure {
  margin: 0;
}

.outreach-hero img,
.qfy-article .article-content .outreach-hero img {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.06);
}

.outreach-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.outreach-topic-grid article {
  min-height: 230px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.outreach-topic-grid span {
  display: inline-flex;
  margin: 0 0 18px;
  color: #f2bb24;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.outreach-topic-grid h3,
.outreach-resource-card h4,
.outreach-book-card h4 {
  margin: 0 0 10px;
  color: #fff;
  line-height: 1.35;
}

.outreach-topic-grid p,
.outreach-note p,
.outreach-resource-card p,
.outreach-book-card p {
  margin: 0;
  color: #c9c1b4;
  line-height: 1.75;
}

.outreach-note {
  padding-left: clamp(24px, 5vw, 70px);
  border-left: 3px solid #f25a00;
}

.outreach-note p + p {
  margin-top: 16px;
}

.outreach-resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 30px;
}

.outreach-resource-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(242, 187, 36, 0.35);
  color: #f2bb24;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.outreach-subtitle {
  margin: 32px 0 16px;
  color: #f2bb24;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.outreach-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.outreach-resource-card,
.outreach-book-card {
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.24);
}

.outreach-resource-card {
  grid-template-rows: auto 1fr;
}

.outreach-resource-card img,
.qfy-article .article-content .outreach-resource-card img {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  background: #080808;
}

.outreach-resource-card div,
.outreach-book-card div {
  padding: 18px;
}

.resource-meta {
  margin: 0 0 8px !important;
  color: #f2bb24 !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.outreach-book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.outreach-book-card {
  grid-template-rows: auto 1fr;
}

.outreach-book-card img,
.qfy-article .article-content .outreach-book-card img {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: 4 / 5;
  height: auto;
  margin: 0;
  padding: 18px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
}

.page-inner .site-footer {
  width: min(1180px, calc(100% - 48px));
}

@media (max-width: 900px) {
  .page-inner .site-header {
    height: auto;
  }

  .page-inner .header-wrap,
  .page-inner .site-main,
  .page-inner .site-footer {
    width: min(100% - 32px, 1180px);
  }

  .qfy-page-title,
  .qfy-archive-list .archive-card {
    grid-template-columns: 1fr;
  }

  .qfy-archive-list p {
    grid-column: auto;
  }

  .archive-pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .pagination-pages {
    order: 3;
    flex-basis: 100%;
  }

  .pagination-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .about-section {
    padding: 24px 18px;
  }

  .about-intro-grid,
  .about-two-column,
  .about-life {
    grid-template-columns: 1fr;
  }

  .platform-section {
    padding: 24px 18px;
  }

  .platform-method-grid,
  .platform-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-section {
    padding: 24px 18px;
  }

  .team-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-card-large {
    display: block;
  }

  .team-grid,
  .team-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .research-section {
    padding: 24px 18px;
  }

  .outreach-section {
    padding: 24px 18px;
  }

  .outreach-hero {
    grid-template-columns: 1fr;
  }

  .outreach-topic-grid,
  .outreach-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outreach-book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .achievement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-visuals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .team-feature-grid {
    grid-template-columns: 1fr;
  }

  .team-grid,
  .team-grid-compact,
  .platform-method-grid,
  .platform-gallery,
  .outreach-topic-grid,
  .outreach-resource-grid,
  .outreach-book-grid,
  .achievement-grid,
  .project-visuals {
    grid-template-columns: 1fr;
  }

  .team-card dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .publication-list li,
  .project-list li {
    padding: 42px 14px 14px;
  }
}

/* Light theme pass: keep the black navigation and homepage hero, brighten content. */
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f6f3ee;
  --panel: #ffffff;
  --panel-strong: #f7f4ef;
  --ink: #171410;
  --muted: #5f5a52;
  --subtle: #8c8579;
  --line: rgba(30, 24, 18, 0.12);
}

html[data-theme="light"] body {
  background: #ffffff;
  color: var(--ink);
}

html[data-theme="light"] .site-noise {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

html[data-theme="light"] .page-home {
  background: #ffffff;
}

html[data-theme="light"] .page-home .site-noise {
  opacity: 0.12;
}

html[data-theme="light"] .page-inner {
  background: #ffffff;
}

html[data-theme="light"] .qfy-intro,
html[data-theme="light"] .home-overview,
html[data-theme="light"] .qfy-news {
  color: var(--ink);
}

html[data-theme="light"] .qfy-intro {
  padding-top: 76px;
  background: #ffffff;
}

html[data-theme="light"] .qfy-intro .content {
  color: #312d27;
}

html[data-theme="light"] .home-about-copy {
  color: #3e3932;
}

html[data-theme="light"] .qfy-news {
  background: #ffffff;
}

html[data-theme="light"] .home-about-panel .section-heading,
html[data-theme="light"] .qfy-news .section-heading {
  border-bottom-color: rgba(30, 24, 18, 0.16);
}

html[data-theme="light"] .qfy-news .featured-post,
html[data-theme="light"] .qfy-news .post-card {
  border-bottom-color: rgba(30, 24, 18, 0.12);
}

html[data-theme="light"] .qfy-news .post-card:hover,
html[data-theme="light"] .qfy-news .archive-card:hover {
  background: rgba(242, 138, 29, 0.06);
}

html[data-theme="light"] .qfy-page-title {
  border-bottom-color: rgba(30, 24, 18, 0.18);
}

html[data-theme="light"] .qfy-page-title h1,
html[data-theme="light"] .qfy-article h1,
html[data-theme="light"] .qfy-archive-list h2,
html[data-theme="light"] .about-section-heading h2,
html[data-theme="light"] .about-copy strong,
html[data-theme="light"] .about-activity-list h3,
html[data-theme="light"] .about-contact-card h3,
html[data-theme="light"] .platform-method-card h3,
html[data-theme="light"] .team-card h3,
html[data-theme="light"] .team-member h3,
html[data-theme="light"] .team-member h4,
html[data-theme="light"] .achievement-card h3,
html[data-theme="light"] .publication-list em,
html[data-theme="light"] .project-list strong,
html[data-theme="light"] .outreach-hero h2,
html[data-theme="light"] .outreach-topic-grid h3,
html[data-theme="light"] .outreach-resource-card h4,
html[data-theme="light"] .outreach-book-card h4,
html[data-theme="light"] .site-footer p {
  color: #171410;
}

html[data-theme="light"] .qfy-page-title .eyebrow,
html[data-theme="light"] .qfy-article .eyebrow,
html[data-theme="light"] .qfy-page-title .page-hero-meta strong,
html[data-theme="light"] .qfy-archive-list .archive-meta span,
html[data-theme="light"] .team-role,
html[data-theme="light"] .team-subsection > h3,
html[data-theme="light"] .project-period,
html[data-theme="light"] .publication-list li::before,
html[data-theme="light"] .project-list li::before,
html[data-theme="light"] .outreach-kicker,
html[data-theme="light"] .outreach-topic-grid span,
html[data-theme="light"] .outreach-resource-tabs span,
html[data-theme="light"] .outreach-subtitle,
html[data-theme="light"] .resource-meta {
  color: #d96b00 !important;
}

html[data-theme="light"] .qfy-page-title .page-summary,
html[data-theme="light"] .qfy-article .article-summary,
html[data-theme="light"] .qfy-page-title .intro-copy,
html[data-theme="light"] .qfy-archive-list .archive-meta,
html[data-theme="light"] .qfy-archive-list p,
html[data-theme="light"] .qfy-article .article-header time,
html[data-theme="light"] .qfy-article .article-content,
html[data-theme="light"] .about-copy,
html[data-theme="light"] .about-activity-list,
html[data-theme="light"] .platform-method-card p,
html[data-theme="light"] .team-section-lead,
html[data-theme="light"] .team-card dl,
html[data-theme="light"] .team-member p,
html[data-theme="light"] .team-alumni p,
html[data-theme="light"] .research-lead,
html[data-theme="light"] .achievement-card p,
html[data-theme="light"] .publication-list li,
html[data-theme="light"] .project-list li,
html[data-theme="light"] .project-list p,
html[data-theme="light"] .outreach-hero p,
html[data-theme="light"] .outreach-topic-grid p,
html[data-theme="light"] .outreach-note p,
html[data-theme="light"] .outreach-resource-card p,
html[data-theme="light"] .outreach-book-card p {
  color: #3e3932;
}

html[data-theme="light"] .qfy-page-title .page-hero-meta {
  border-left-color: rgba(30, 24, 18, 0.16);
}

html[data-theme="light"] .qfy-page-title .page-hero-meta span,
html[data-theme="light"] .team-card dt,
html[data-theme="light"] .platform-method-card .method-en {
  color: #7f776d;
}

html[data-theme="light"] .qfy-archive-list .archive-card,
html[data-theme="light"] .qfy-article .article-header {
  border-bottom-color: rgba(30, 24, 18, 0.16);
}

html[data-theme="light"] .qfy-archive-list .archive-card:hover {
  background: rgba(242, 138, 29, 0.06);
}

html[data-theme="light"] .qfy-archive-list .archive-card {
  border: 0;
  border-bottom: 1px solid rgba(30, 24, 18, 0.12);
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .qfy-archive-list .archive-card:hover {
  border-bottom-color: rgba(217, 107, 0, 0.28);
  background: rgba(242, 138, 29, 0.06);
}

html[data-theme="light"] .pagination-control,
html[data-theme="light"] .pagination-page {
  border-color: rgba(217, 107, 0, 0.34);
  color: #d96b00;
}

html[data-theme="light"] .pagination-control:hover,
html[data-theme="light"] .pagination-page:hover,
html[data-theme="light"] .pagination-page.is-current {
  border-color: #d96b00;
  background: rgba(242, 138, 29, 0.08);
  color: #d96b00;
}

html[data-theme="light"] .pagination-control.is-disabled {
  border-color: rgba(30, 24, 18, 0.12);
  color: rgba(30, 24, 18, 0.3);
}

html[data-theme="light"] .pagination-status {
  color: #7f776d;
}

html[data-theme="light"] .pagination-status strong {
  color: #d96b00;
}

html[data-theme="light"] .about-section,
html[data-theme="light"] .platform-section,
html[data-theme="light"] .team-section,
html[data-theme="light"] .research-section,
html[data-theme="light"] .outreach-section {
  border-color: rgba(30, 24, 18, 0.12);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(35, 28, 18, 0.06);
}

html[data-theme="light"] .outreach-hero {
  background: #ffffff;
}

html[data-theme="light"] .platform-method-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .team-member,
html[data-theme="light"] .achievement-card,
html[data-theme="light"] .publication-list li,
html[data-theme="light"] .project-list li,
html[data-theme="light"] .outreach-topic-grid article,
html[data-theme="light"] .outreach-resource-card,
html[data-theme="light"] .outreach-book-card {
  border-color: rgba(30, 24, 18, 0.12);
  background: #fbf8f2;
}

html[data-theme="light"] .about-contact-card {
  background: #fff7eb;
  color: #3e3932;
}

html[data-theme="light"] .team-subsection > h3::after {
  background: rgba(30, 24, 18, 0.14);
}

html[data-theme="light"] .team-alumni-link {
  border-color: rgba(217, 107, 0, 0.35);
  background: rgba(217, 107, 0, 0.08);
  color: #d96b00;
}

html[data-theme="light"] .about-section img,
html[data-theme="light"] .qfy-article .article-content .about-section img,
html[data-theme="light"] .platform-gallery img,
html[data-theme="light"] .qfy-article .article-content .platform-gallery img,
html[data-theme="light"] .team-card img,
html[data-theme="light"] .team-member img,
html[data-theme="light"] .qfy-article .article-content .team-card img,
html[data-theme="light"] .qfy-article .article-content .team-member img,
html[data-theme="light"] .achievement-card img,
html[data-theme="light"] .qfy-article .article-content .achievement-card img,
html[data-theme="light"] .outreach-resource-card img,
html[data-theme="light"] .qfy-article .article-content .outreach-resource-card img {
  background: #f3efe7;
}

html[data-theme="light"] .platform-method-map img,
html[data-theme="light"] .qfy-article .article-content .platform-method-map img,
html[data-theme="light"] .platform-method-card img,
html[data-theme="light"] .qfy-article .article-content .platform-method-card img,
html[data-theme="light"] .project-visuals img,
html[data-theme="light"] .qfy-article .article-content .project-visuals img,
html[data-theme="light"] .outreach-book-card img,
html[data-theme="light"] .qfy-article .article-content .outreach-book-card img {
  background: #f7f3ec;
}

html[data-theme="light"] .platform-video {
  background: #050505;
}

html[data-theme="light"] .content a,
html[data-theme="light"] .team-section a,
html[data-theme="light"] .about-contact-card a,
html[data-theme="light"] .qfy-archive-list .inline-link {
  color: #d96b00;
  border-bottom-color: rgba(217, 107, 0, 0.35);
}

html[data-theme="light"] .site-footer {
  border-top-color: rgba(30, 24, 18, 0.14);
  color: #746d62;
}

html[data-theme="light"] .content {
  color: #3e3932;
}

html[data-theme="light"] .hero-aside,
html[data-theme="light"] .featured-post,
html[data-theme="light"] .archive-card,
html[data-theme="light"] .info-card,
html[data-theme="light"] .empty-state {
  border-color: rgba(30, 24, 18, 0.12);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(35, 28, 18, 0.06);
}

html[data-theme="light"] .post-card {
  border-color: rgba(30, 24, 18, 0.12);
  background: #ffffff;
}

html[data-theme="light"] .post-card:hover,
html[data-theme="light"] .archive-card:hover {
  border-color: rgba(217, 107, 0, 0.28);
  background: #fff7eb;
}

html[data-theme="light"] .info-card h2,
html[data-theme="light"] .featured-post h3,
html[data-theme="light"] .archive-card h2,
html[data-theme="light"] .post-card h3,
html[data-theme="light"] .section-heading h2 {
  color: #171410;
}

html[data-theme="light"] .info-card p,
html[data-theme="light"] .featured-post p,
html[data-theme="light"] .archive-card p,
html[data-theme="light"] .post-card p {
  color: #5f5a52;
}

html[data-theme="light"] .post-card time,
html[data-theme="light"] .featured-post time,
html[data-theme="light"] .archive-meta,
html[data-theme="light"] .article-header time,
html[data-theme="light"] .card-kicker,
html[data-theme="light"] .featured-label {
  color: #d96b00;
}

html[data-theme="light"] .metric-grid article,
html[data-theme="light"] .page-hero-meta {
  border-color: rgba(30, 24, 18, 0.12);
  background: #fbf8f2;
}

html[data-theme="light"] .content img {
  border-color: rgba(30, 24, 18, 0.12);
  background: #f3efe7;
}

/* Responsive header stabilization for the fixed BATLab navigation. */
@media (max-width: 1180px) {
  .page-home .header-wrap,
  .page-inner .header-wrap {
    width: min(100% - 32px, 1240px);
    gap: 12px;
  }

  .page-home .brand,
  .page-inner .brand {
    gap: 8px;
  }

  .page-home .brand-mark,
  .page-inner .brand-mark {
    font-size: 1.75rem;
  }

  .page-home .brand-copy,
  .page-inner .brand-copy {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  .page-home .brand-copy strong,
  .page-inner .brand-copy strong {
    font-size: 0.84rem;
  }

  .page-home .nav,
  .page-inner .nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 8px;
    font-size: 0.82rem;
  }

  .page-home .nav a,
  .page-inner .nav a {
    white-space: nowrap;
  }

  .page-home .language-toggle,
  .page-inner .language-toggle {
    width: 44px;
    height: 30px;
    min-height: 0;
    padding: 0;
    font-size: 0.76rem;
  }

  .page-home .theme-toggle,
  .page-inner .theme-toggle {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
}

@media (max-width: 920px) {
  .page-home .site-header,
  .page-inner .site-header {
    position: sticky;
    height: auto;
  }

  .page-home .header-wrap,
  .page-inner .header-wrap {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    padding: 14px 0 12px;
  }

  .page-home .brand,
  .page-inner .brand {
    flex-direction: row;
    align-items: center;
  }

  .page-home .nav,
  .page-inner .nav {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding: 6px 0 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .page-home .nav a,
  .page-inner .nav a,
  .page-home .language-toggle,
  .page-inner .language-toggle,
  .page-home .theme-toggle,
  .page-inner .theme-toggle {
    flex: 0 0 auto;
  }

  .page-home .nav a,
  .page-inner .nav a {
    padding: 10px 9px;
    white-space: nowrap;
  }

  .page-home .nav .is-active,
  .page-inner .nav .is-active {
    box-shadow: inset 0 2px 0 #ff7a00;
  }

  .page-home .theme-toggle,
  .page-inner .theme-toggle {
    margin-left: 10px;
    min-height: 32px;
  }

  .page-home .language-toggle,
  .page-inner .language-toggle {
    width: 48px;
    height: 32px;
    min-height: 0;
    padding: 0;
    margin-left: 10px;
  }

  .page-home .nav-submenu,
  .page-inner .nav-submenu {
    display: none;
  }
}

@media (max-width: 560px) {
  .page-home .header-wrap,
  .page-inner .header-wrap {
    width: min(100% - 28px, 1240px);
    gap: 12px;
  }

  .page-home .brand,
  .page-inner .brand {
    gap: 10px;
  }

  .page-home .brand-mark,
  .page-inner .brand-mark {
    font-size: 1.55rem;
    letter-spacing: -0.04em;
  }

  .page-home .brand-copy,
  .page-inner .brand-copy {
    max-width: 250px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .page-home .brand-copy strong,
  .page-inner .brand-copy strong {
    font-size: 0.84rem;
  }
}

html[data-lang="en"] .page-home .nav,
html[data-lang="en"] .page-inner .nav {
  gap: clamp(8px, 1.1vw, 16px);
  font-size: 0.82rem;
}

html[data-lang="en"] .nav-submenu {
  min-width: 180px;
}

html[data-lang="en"] .team-role {
  letter-spacing: 0.04em;
}

.nav .language-toggle,
.page-home .nav .language-toggle,
.page-inner .nav .language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 46px;
  height: 30px;
  min-height: 0;
  padding: 0;
  line-height: 1;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .page-home .nav .language-toggle,
  .page-inner .nav .language-toggle {
    width: 44px;
    height: 30px;
    padding: 0;
  }
}

@media (max-width: 920px) {
  .page-home .nav .language-toggle,
  .page-inner .nav .language-toggle {
    width: 48px;
    height: 32px;
    padding: 0;
    margin-left: 10px;
  }
}
