/* =============================================================
   [1/3] INDEX.HTML STYLES (shared base + homepage components)
   ============================================================= */

/* ===== Local fonts (flagship_event/guidebook) ===== */
@font-face {
  font-family: "Source Han Sans HC";
  src: url("../fonts/%E6%80%9D%E6%BA%90/SourceHanSansHC-Light.otf")
    format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans HC";
  src: url("../fonts/%E6%80%9D%E6%BA%90/SourceHanSansHC-Regular.otf")
    format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans HC";
  src: url("../fonts/%E6%80%9D%E6%BA%90/SourceHanSansHC-Medium.otf")
    format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans HC";
  src: url("../fonts/%E6%80%9D%E6%BA%90/SourceHanSansHC-Bold.otf")
    format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ITC Avant Garde Std";
  src: url("../fonts/ITCAvantGardeStd-Bk.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ITC Avant Garde Std";
  src: url("../fonts/ITCAvantGardeStd-Md.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MStiffHeiHK";
  src: url("../fonts/MStiffHeiHK-Medium.OTF") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* 
--- desktop
@media (max-width: 1024px)
@media (max-width: 900px)
--- mobile
@media (max-width: 720px)
@media (max-width: 640px)
@media (max-width: 480px)
@media (max-width: 390px)  */

/* ===== Reset / base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  background-color: #fff;
  /* Must be set on BOTH html and body to actually contain the overflow — the
     root/body overflow-propagation rules ignore it when set on only one. See
     the body rule for why (Windows scrollbar-gutter phantom horizontal scroll). */
  overflow-x: clip;
  /* Full-viewport line texture; not clipped by --max-width--global column */
  background-image: url("../images/background_line.png");
  background-position-y: -530px;
  background-repeat: repeat-y;
  background-size: 100%;
  background-attachment: fixed;
}
body {
  font-family:
    "Noto Sans TC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1a1a2e;
  background-color: transparent;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  overflow-x: clip;
}

/* 1440px column — apply via className; excludes site-header / homepage hero */
.global-max-width {
  max-width: var(--max-width--global);
  margin-inline: auto;
  width: 100%;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
button {
  font: inherit;
}

/* ===== Design tokens ===== */
:root {
  --color-teal: #17b2a6;
  --color-red: #d9344b;
  --color-navy: #1a3a5c;
  --color-text: #1a1a2e;
  --color-text-muted: #6b6b78;
  --color-black: #000;

  --font-en: "Montserrat", sans-serif;
  --font-zh: "Noto Sans TC", sans-serif;

  --max-width--global: 1440px;
  --max-width: 1300px;
  --space-section: 15px;

  --section-padding: 1.5rem;

  --homepage-tail-nudge--desktop: 100px;
  --homepage-tail-nudge--mobile: -50px;
  --homepage-sections-lift: 30px;

  --site-footer-inner-top-padding: 1.15rem;
  --site-footer-pseudo-padding: 0.95rem;
  --site-footer-pill-width: clamp(30px, 18vw, 80px);
  --site-footer-pill-height: clamp(18px, 2.2vw, 26px);
  --site-footer-pill-split-ratio: 0.52;
  --site-footer-divider-gap: clamp(1.5rem, 3vw, 2.5rem);

  --site-nav-overlay-top: clamp(104px, 14vh, 148px);
  --site-nav-panel-bg: #00c2ba;
  --site-nav-panel-bg-hover: #009b94;

  --site-nav-panel-desktop-top: 10px;
  --site-nav-panel-desktop-right: 20px;
  --site-nav-panel-desktop-scale: 0.7;
  --site-nav-panel-mobile-top: 0px;
  --site-nav-panel-mobile-right: 0px;

  --site-nav-drawer-font-size: clamp(1.2rem, 1rem + 2vw, 1.55rem);
  --anchor-scroll-offset: 130px;
}

/* Edu/pub token overrides */
body.edu {
  --font-en: "ITC Avant Garde Std", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-zh: "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  --font-display-zh:
    "MStiffHeiHK", "Source Han Sans HC", "Noto Sans TC", "PingFang TC",
    sans-serif;

  --article-width: 720px;
}

/* ===== Shared ===== */
.section-title {
  justify-content: center;
  position: relative;
  z-index: 2;
  justify-self: center;
}
.section-title.desktop {
  margin-bottom: 35px;
  margin-top: 20px;
}
.section-title.mobile {
  max-width: calc(100vw - 48px);
  /* Center the box itself — Safari ignores justify-self on block-level boxes */
  margin-inline: auto;
  margin-bottom: 20px;
}
.section-title--desktop {
  max-height: 90px;
}
.section-title--mobile {
  max-height: 80px;
}

.future .section-title {
  margin-top: 60px;
}
.edu.pub .section-title.desktop {
  margin: 50px 0px;
}
.edu.pub .section-title.mobile {
  margin: 20px auto;
}

/* guidebook.html — 思源黑體 Normal */
body.edu.pub {
  --font-display-zh:
    "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  font-family: var(--font-zh);
  font-weight: 400;
  font-style: normal;
}
body.edu.pub .publication-card__title,
body.edu.pub .publication-card__subtitle,
body.edu.pub .publication-card__desc {
  font-family: var(--font-zh);
  font-weight: 400;
  font-style: normal;
}

body.edu .site-nav__link {
  font-family: "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}
body.edu .site-nav__mobile-link {
  font-family: "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  font-weight: 500;
  font-style: normal;
  line-height: 1.3;
}

/* ===== Site header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: hidden;
  isolation: isolate;
}

/* Full-viewport white bar — header column is capped at --max-width--global */
.site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  background-color: #fff;
}

.site-nav-body-lock {
  overflow: hidden;
}
.site-content {
  position: relative;
  display: flex;
}
.site-header-grey {
  position: absolute;
  left: 0px;
  bottom: 5.5px;
  width: 100%;
  height: 20px;
  background: #8f9094;
  z-index: 1;
  /* Overlay top is derived from this bar’s bottom edge in navbar.js — change height/bottom here if layout shifts */
}
.site-header__inner {
  position: relative;
  z-index: 2;
  padding: 0.24rem 3rem 0.14rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}
.site-header__logo::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: clamp(-0.85rem, -1.6vw, -0.38rem);
  right: clamp(-0.9rem, -1.7vw, -0.4rem);
  height: 22px;
  background: #fff;
  z-index: -1;
}
.site-header__logo-img {
  position: relative;
  top: 6.8px;
  width: min(308px, 36vw);
  min-width: 162px;
  height: auto;
}
.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 100%;
}

site-navbar {
  display: contents;
}
.site-nav-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 2;
  gap: 20px;
  /* Align menu's right edge with the 1440px content column; keep ≥40px gap on narrower screens */
  padding-right: max(40px, calc((100vw - var(--max-width--global)) / 2));
}
.site-nav__link {
  font-size: 14px;
  color: #fff;
  font-family: "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  font-weight: 700;
  transition: opacity 180ms ease;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.site-nav__link::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d9344b;
  margin-right: 0.46rem;
}
.site-nav__link:hover {
  opacity: 0.85;
}
.site-nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.site-nav__toggle-img {
  display: block;
  width: 32px;
  height: auto;
}
.site-nav__backdrop {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Dimming starts here. Match .site-header-grey bottom via JS (--site-nav-overlay-top). */
  top: var(--site-nav-overlay-top);
  z-index: 0;
  background: rgba(0, 0, 0, 0.5);
}
.site-nav.is-open .site-nav__backdrop {
  display: block;
  max-width: var(--max-width--global);
  margin-left: auto;
  margin-right: auto;
}

/* Wide viewports: nudge dimmer up 1px to meet grey bar edge (≤900px unchanged) */
@media (min-width: 901px) {
  .site-nav.is-open .site-nav__backdrop {
    top: calc(var(--site-nav-overlay-top) - 1px);
  }
}

.site-nav__mobile-panel {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  /* Same top as .site-nav__backdrop; set in JS from grey bar bottom */
  top: var(--site-nav-overlay-top);
  bottom: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  background-color: transparent;
}

/* Caret + open panel: shared; position/size split in desktop (721px+) vs mobile (720px) blocks */
.site-nav__mobile-panel::before {
  content: "";
  position: absolute;
  background: var(--site-nav-panel-bg);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.site-nav.is-open .site-nav__mobile-panel {
  display: flex;
  flex-direction: column;
  background-color: var(--site-nav-panel-bg);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

.site-nav.is-open .site-nav__mobile-panel::before {
  opacity: 1;
}

.site-nav__close {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav.is-open .site-nav__close {
  position: absolute;
  top: 0.2rem;
  right: var(--site-nav-close-inset, var(--space-section));
  z-index: 1;
  min-height: 40px;
}

.site-nav__close-glyph {
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
}

.site-nav__mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: none;
  padding: 2.35rem 0 0.5rem;
  box-sizing: border-box;
}

.site-nav__mobile-list-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.site-nav__mobile-list-group--desktop {
  display: none;
}

.site-nav__mobile-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 1.15rem;
  background: transparent;
  color: #fff;
  font-size: 1.8rem;
  font-family: "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 0;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

button.site-nav__mobile-link {
  -webkit-appearance: none;
  appearance: none;
}

.site-nav__mobile-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
  margin-right: 0.55rem;
  flex-shrink: 0;
}

.site-nav__mobile-link:hover,
.site-nav__mobile-link:focus-visible {
  background-color: var(--site-nav-panel-bg-hover);
}

.site-nav__pub-panel {
  display: none;
}

.site-nav__pub-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (min-width: 721px) {
  /* No dimming overlay on tablet/desktop drawer */
  .site-nav.is-open .site-nav__backdrop {
    display: none;
  }

  .site-nav__mobile-panel {
    left: auto;
    top: calc(var(--site-nav-overlay-top) + var(--site-nav-panel-desktop-top));
    right: calc(
      max(0px, (100vw - var(--max-width--global)) / 2) +
        var(--site-nav-panel-desktop-right)
    );
    width: min(420px, calc(var(--max-width--global) - 100px));
    bottom: auto;
    max-height: min(520px, 78vh);
  }

  .site-nav__mobile-list-group--desktop .site-nav__mobile-link {
    white-space: nowrap;
  }

  .site-nav__mobile-panel::before {
    top: -6.5px;
    left: var(--site-nav-caret-center-x, 50%);
    right: auto;
    transform: translateX(-50%);
    width: 18px;
    height: 10px;
  }

  .site-nav.is-open .site-nav__mobile-panel {
    padding-bottom: 0.55rem;
    transform: scale(var(--site-nav-panel-desktop-scale));
    transform-origin: var(--site-nav-caret-center-x, 50%) top;
  }

  .site-nav.is-open .site-nav__close {
    display: none;
  }

  .site-nav__mobile-list {
    padding-top: 0.65rem;
  }

  .site-nav__mobile-list-group--mobile {
    display: none;
  }

  .site-nav__mobile-list-group--desktop {
    display: flex;
  }
}

.spinning-cube__container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}
.spinning-cube {
  max-width: 150px;
}
.desktop {
  display: flex;
}
.mobile {
  display: none;
}

/* ===== Hero ===== */
.hero {
  color: var(--color-navy);
  padding: var(--space-section) 0;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero__content {
  position: relative;
  width: 100%;
  max-width: 2806px;
}
.hero__animation {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.hero__title {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* ===== Featured slider ===== */
body:has(.hero) .featured {
  margin-top: calc(-1 * var(--homepage-sections-lift));
}

.featured {
  padding: var(--space-section) 0px 0px 0px;
}

#featured,
#cooperation {
  scroll-margin-top: var(--anchor-scroll-offset);
}

.featured__inner {
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: var(--space-section) 0;
  background-color: #0e2744;
  background-image: url("../images/slider_background.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: #fff;
  overflow: hidden;
}

.featured__slider {
  position: relative;
  padding: 2rem 0 0;
}

.featured-swiper {
  overflow: visible;
  padding-bottom: 4rem;
}
.featured-swiper .swiper-wrapper {
  align-items: center;
}
.featured-swiper .swiper-slide {
  width: min(60%, 740px);
  aspect-ratio: 16 / 9;
  transition:
    opacity 500ms ease,
    filter 500ms ease,
    transform 500ms ease;
  opacity: 0.42;
  filter: saturate(0.65) brightness(0.72);
  position: relative;
  transform: translateX(0);
}
.featured-swiper .swiper-slide-active {
  opacity: 1;
  filter: none;
  z-index: 3;
}
.featured-swiper .swiper-slide-prev {
  transform: translateX(14%) scale(0.84);
  z-index: 2;
}
.featured-swiper .swiper-slide-next {
  transform: translateX(-14%) scale(0.84);
  z-index: 2;
}

.featured-slide__link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 6px;
  transition:
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 500ms ease,
    border-color 500ms ease;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  border: 3px solid transparent;
}
.featured-slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-slide__overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 3vw, 2rem);
  color: #fff;
  pointer-events: none;
}
.featured-slide__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    transparent 42%,
    rgba(10, 20, 40, 0.76) 100%
  );
  pointer-events: none;
}
.featured-swiper
  .swiper-slide:not(.swiper-slide-active)
  .featured-slide__overlay {
  opacity: 0;
  visibility: hidden;
}
.featured-slide__title {
  font-family: var(--font-zh);
  font-size: clamp(1.95rem, 2.8vw, 2.35rem);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 2px 12px rgba(0, 0, 0, 0.48);
}

.featured-swiper .swiper-slide-active .featured-slide__link {
  transform: skewX(-6deg);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.58);
  border-radius: 28px 0 28px 0;
}
.featured-swiper .swiper-slide-active .featured-slide__link::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  pointer-events: none;
  z-index: 3;
  border-radius: 20px 0 20px 0;
}
/* Active slide: skewed frame/border, straight image + title (counter-skew) */
.featured-swiper .swiper-slide-active .featured-slide__img {
  position: absolute;
  left: -6%;
  top: 50%;
  width: 112%;
  height: auto;
  min-height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: skewX(6deg) translateY(-50%);
}
.featured-swiper .swiper-slide-active .featured-slide__overlay {
  transform: skewX(6deg);
}
.featured-swiper .swiper-slide-active .featured-slide__overlay::before {
  inset: -6% -12%;
}

.featured__pagination {
  position: absolute;
  bottom: -7px !important;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}
.featured__pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #fff;
  opacity: 0.55;
  margin: 0 6px;
  transition:
    transform 300ms ease,
    opacity 300ms ease,
    background 300ms ease;
  border-radius: 50%;
}
.featured__pagination .swiper-pagination-bullet-active {
  transform: scale(1.35);
  opacity: 1;
  background: #fff;
}

/* ===== Future ===== */
.future {
  position: relative;
  overflow: visible;
}
.future__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.future-animation {
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: visible;
}
.future-animation--desktop {
  --future-image-x: 50%;
  --future-image-y: 25%;
  --future-image-focal-x: 50%;
  --future-image-focal-y: 42%;
  --future-image-width: 108%;
  --future-hitzone-width: 64.8%;
  --future-hitzone-height: 85%;
}
.future-animation--desktop .future-animation__stage {
  position: relative;
  width: 100%;
  margin-inline: auto;
  aspect-ratio: 4554 / 3190;
  top: 50px;
}
.future-animation--desktop .future-animation__visual {
  position: absolute;
  left: var(--future-image-x);
  top: var(--future-image-y);
  width: var(--future-image-width);
  height: auto;
  max-width: 100vw;
  max-height: none;
  aspect-ratio: 4554 / 3190;
  transform: translate(
    calc(-1 * var(--future-image-focal-x)),
    calc(-1 * var(--future-image-focal-y))
  );
  /* Fixed frame for every stacked frame (5A + combine) */
  box-sizing: border-box;
}
.future-animation--desktop .future-animation__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.future-animation--desktop .future-animation__image.is-active {
  opacity: 1;
  z-index: 1;
}
.future-animation--desktop .future-animation__hitzone {
  position: absolute;
  z-index: 1;
  left: var(--future-image-x);
  top: var(--future-image-y);
  width: var(--future-hitzone-width);
  height: var(--future-hitzone-height);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.future-animation__overlay {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.future-animation__backdrop {
  pointer-events: auto;
  fill: transparent;
}
.future-animation__wedge {
  pointer-events: auto;
  fill: transparent;
  cursor: pointer;
  outline: none;
}
.future-animation__wedge:focus,
.future-animation__wedge:focus-visible {
  outline: none;
  fill: transparent;
}

/* Future — mobile (≤720px): header + staggered pill cards */
.future-animation--mobile {
  display: none;
  overflow: visible;
}

.future-animation__mobile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 1rem);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  margin-bottom: clamp(0.75rem, 3vw, 1.25rem);
}

.future-animation__mobile-logo {
  flex: 0 0 auto;
  width: clamp(6.5rem, 34vw, 9.5rem);
  height: auto;
}

.future-animation__mobile-title {
  flex: 0 0 auto;
  width: auto;
  max-width: min(11rem, 48vw);
  height: auto;
  margin: 0;
}

.future-animation__mobile-cards {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0;
  width: min(100%, 24rem);
  margin: clamp(-3.1rem, -8.25vw, -1.9rem) auto 0;
  padding: 0;
  overflow: visible;
  /* 奇數項靠右、偶數項靠左（對應設計稿 zigzag） */
  --future-mobile-card-shift: clamp(1rem, 5.5vw, 1.75rem);
}

.future-animation__mobile-card {
  position: relative;
  width: 86%;
  margin: 0;
}

.future-animation__mobile-card:not(:first-child) {
  margin-top: clamp(-1.35rem, -4.25vw, -0.75rem);
}

/* 奇數：右；偶數：左 */
.future-animation__mobile-card:nth-child(odd) {
  justify-self: end;
  transform: translateX(var(--future-mobile-card-shift));
}

.future-animation__mobile-card:nth-child(even) {
  justify-self: start;
  transform: translateX(calc(-1 * var(--future-mobile-card-shift)));
}

.future-animation__mobile-card-img {
  width: 100%;
  height: auto;
}

/* ===== Cooperation ===== */

.cooperation {
  padding: var(--space-section) var(--section-padding);
  position: relative;
}
.cooperation__text-content {
  justify-content: center;
}
.cooperation__text-content.desktop img {
  max-width: 65%;
}
.cooperation-gallery {
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 2.2rem auto 0;
}
.cooperation-gallery__stage {
  position: relative;
}
.cooperation-gallery__mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* Slightly taller top/middle rows so 1-col portrait tiles aren’t cropped */
  grid-template-rows: 1.12fr 1.05fr 1fr;
  gap: 4px;
  background: #fff;
  padding: 0;
  border-radius: 8px;
  aspect-ratio: 1.08 / 1;
}
.cooperation-gallery__tile {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  border: 0;
  border-radius: 2px;
  overflow: visible;
  padding: 0;
  cursor: pointer;
  background: transparent;
  transition:
    transform 220ms ease,
    filter 220ms ease,
    opacity 220ms ease;
}

.cooperation-gallery__corner-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  z-index: 3;
  pointer-events: none;
}

.cooperation-gallery__corner-dot--top-left {
  top: 0;
  left: 0;
  transform: translate(-62%, -62%);
}

.cooperation-gallery__corner-dot--top-right {
  top: 0;
  right: 0;
  transform: translate(62%, -62%);
}

.cooperation-gallery__corner-dot--bottom-left {
  bottom: 0;
  left: 0;
  transform: translate(-62%, 62%);
}

.cooperation-gallery__corner-dot--bottom-right {
  bottom: 0;
  right: 0;
  transform: translate(62%, 62%);
}

.cooperation-gallery__tile:hover {
  transform: translateY(-2px);
}

.cooperation-gallery__tile.is-active {
  transform: skewY(1.4deg) scale(1.01);
}

.cooperation-gallery.is-focus-open .cooperation-gallery__tile {
  opacity: 0.45;
  filter: grayscale(10%);
}

.cooperation-gallery.is-focus-open .cooperation-gallery__tile.is-active {
  opacity: 0.8;
  filter: none;
}

.cooperation-gallery__tile--a {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}
.cooperation-gallery__tile--b {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.cooperation-gallery__tile--c {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}
.cooperation-gallery__tile--d {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
}
.cooperation-gallery__tile--e {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}
.cooperation-gallery__tile--f {
  grid-column: 4 / 5;
  grid-row: 2 / 3;
}
.cooperation-gallery__tile--g {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}
.cooperation-gallery__tile--h {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}
.cooperation-gallery__tile--i {
  grid-column: 3 / 5;
  grid-row: 3 / 4;
}

.cooperation-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.cooperation-gallery__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.cooperation-gallery__overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cooperation-gallery__overlay[hidden] {
  display: none;
}

.cooperation-gallery__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  background: rgba(55, 58, 62, 0.72);
}

.cooperation-gallery__focus-card {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: fit-content;
  max-width: min(860px, calc(100% - 2rem));
  max-height: calc(100% - 0.75rem);
  overflow: visible;
  margin: 0 auto;
  z-index: 1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-overflow-scrolling: touch;
}

.cooperation-gallery__focus-media {
  height: auto;
}

.cooperation-gallery__focus-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  height: auto;
  line-height: 0;
  border: 3px solid #27d2d4;
  border-radius: 14px;
  box-sizing: border-box;
  box-shadow:
    0 0 0 1px rgba(39, 210, 212, 0.42),
    0 4px 14px rgba(39, 210, 212, 0.36);
  overflow: hidden;
  cursor: pointer;
}

.cooperation-gallery__focus-image-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cooperation-gallery__focus-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  background: transparent;
}

.cooperation-gallery__focus-caption {
  position: static;
  /* width:0 keeps the caption text out of the card's shrink-to-fit width, so
     the image alone sets it; min-width then stretches the caption back to it. */
  width: 0;
  min-width: 100%;
  padding: 0.7rem 0.85rem 0.85rem;
  margin-top: 0.4rem;
  border-radius: 0 0 14px 14px;
  pointer-events: auto;
  color: #fff;
  background: #8f9094;
}

.cooperation-gallery__focus-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: #fff;
}

.cooperation-gallery__focus-description {
  margin: 0.35rem 0 0;
  font-size: clamp(0.92rem, 1.6vw, 1.35rem);
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.95);
}

.cooperation-gallery__focus-description b {
  font-weight: 700;
}

.cooperation-gallery__focus-close {
  position: absolute;
  top: -16px;
  right: -10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  overflow: hidden;
  cursor: pointer;
}

.cooperation-gallery__focus-close-label {
  display: none;
}

.cooperation-gallery__focus-close::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/cooperation-gallery/close_button.png") center /
    contain no-repeat;
}

@media (max-width: 768px) {
  .cooperation-gallery {
    width: calc(100% - 1.8rem);
  }

  .cooperation-gallery__focus-caption {
    padding: 0.9rem 1rem 1rem;
  }

  .cooperation-gallery__focus-card {
    max-width: calc(100% - 4rem);
  }
}

/* Cooperation gallery — mobile only (≤720px): 2-1-1-2-1-2 + full-viewport modal */
@media (max-width: 720px) {
  .cooperation-gallery__mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-items: stretch;
    gap: 4px;
    aspect-ratio: auto;
    background: #fff;
    border-radius: 8px;
  }

  .cooperation-gallery__tile {
    width: 100%;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    min-width: 0;
    overflow: hidden;
    border-radius: 2px;
  }

  .cooperation-gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .cooperation-gallery__tile--a {
    grid-column: 1 / 2;
    grid-row: 1;
    aspect-ratio: 37 / 52;
  }

  .cooperation-gallery__tile--b {
    grid-column: 2 / 3;
    grid-row: 1;
    /* 深港澳大賽.jpg ≈ 3:2 */
    aspect-ratio: 3 / 2;
  }

  /* Full-width banners — match source ~16:9 to avoid top/bottom crop */
  .cooperation-gallery__tile--c,
  .cooperation-gallery__tile--d,
  .cooperation-gallery__tile--g {
    aspect-ratio: 16 / 9;
  }

  .cooperation-gallery__tile--c {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .cooperation-gallery__tile--d {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .cooperation-gallery__tile--g {
    grid-column: 1 / 3;
    grid-row: 5;
  }

  .cooperation-gallery__tile--e {
    grid-column: 1 / 2;
    grid-row: 4;
    aspect-ratio: 16 / 9;
  }

  .cooperation-gallery__tile--f {
    grid-column: 2 / 3;
    grid-row: 4;
    /* 識法交流團.jpg — very wide */
    aspect-ratio: 1024 / 440;
  }

  .cooperation-gallery__tile--h {
    grid-column: 1 / 2;
    grid-row: 6;
    aspect-ratio: 3 / 2;
  }

  .cooperation-gallery__tile--i {
    grid-column: 2 / 3;
    grid-row: 6;
    aspect-ratio: 16 / 9;
  }

  .cooperation-gallery__corner-dot {
    width: 11px;
    height: 11px;
  }

  .cooperation-gallery__media {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .cooperation-gallery__tile:hover {
    transform: none;
  }

  .cooperation-gallery__tile.is-active {
    transform: none;
  }

  .cooperation-gallery__overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 120;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0)
      env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    box-sizing: border-box;
  }

  .cooperation-gallery__focus-card {
    max-width: min(520px, calc(100% - 1.5em));
    max-height: min(92vh, 92dvh);
  }

  .cooperation-gallery__focus-title {
    font-size: clamp(1.1rem, 4.7vw, 1.55rem);
  }

  .cooperation-gallery__focus-description {
    font-size: clamp(0.92rem, 3.9vw, 1.22rem);
  }
}

/* ===== Partner ===== */
.partner {
  padding: 1rem var(--section-padding) 4rem;
}

.partner_inner {
  width: min(1100px, 100%);
  margin: 0 auto;
}

body:has(.partner) .cooperation {
  margin-top: calc(-1 * var(--homepage-tail-nudge--desktop));
}
footer-bottom {
  display: block;
}

/* ===== Cross ===== */

.cross__container.left {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  /* overflow-x: clip; */
}
.cross__container.right {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 100%;
  height: 100%;
  /* overflow-x: clip; */
}
.cross__left {
  position: absolute;
  /* top: -350px;
  left: -750px; */
  top: -250px;
  left: -600px;
  transform-origin: center;
  /* transform: scale(1); */
  transform: scale(0.5);
}
.cross__right {
  position: absolute;
  top: -100px;
  right: -650px;
  transform-origin: center;
  transform: scale(0.5);
}

/* ===== Footer ===== */
.site-footer {
  padding: 20px 0px 0px 0px;
}
.site-footer__info {
  display: flex;
  flex-direction: column;
  padding-left: 30px;
  gap: 3px;
  font-weight: 700;
}
.site-footer__info-emails {
  display: flex;
  flex-direction: column;
}
.site-footer__info-row {
  margin: 0px;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.site-footer__info-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.1em;
}
.site-footer__info-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35rem;
}
.site-footer__inner {
  background: #ececef;
  max-width: 100vw;
  margin: 0 auto;
  padding: var(--site-footer-inner-top-padding) 1.5rem
    var(--site-footer-pseudo-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.site-footer__inner::before {
  position: relative;
  top: calc(
    (var(--site-footer-inner-top-padding) * -1) -
      (var(--site-footer-pill-height) * var(--site-footer-pill-split-ratio))
  );
  content: "";
  display: block;
  width: var(--site-footer-pill-width);
  height: var(--site-footer-pill-height);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #1cbec0 0%,
    #1cbec0 calc(var(--site-footer-pill-split-ratio) * 100%),
    #112266 calc(var(--site-footer-pill-split-ratio) * 100%),
    #112266 100%
  );
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.25),
    0 2px 4px rgba(10, 20, 70, 0.15);
}
.site-footer__content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}

@media (min-width: 721px) {
  .site-footer__divider {
    flex-shrink: 0;
    width: 2px;
    background-color: #00c2ba;
  }

  .site-footer__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
  }

  .site-footer__brand {
    grid-column: 1;
    justify-self: end;
    max-width: none;
    padding-right: var(--site-footer-divider-gap);
  }

  .site-footer__contact {
    grid-column: 2;
    display: flex;
    align-items: stretch;
    gap: var(--site-footer-divider-gap);
    justify-self: start;
  }

  .site-footer__divider {
    display: block;
    flex-shrink: 0;
    width: 2px;
    height: auto;
    margin: 0;
    align-self: stretch;
  }

  .site-footer__info {
    padding-left: 0;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  max-width: 395px;
}
.site-footer__logo {
  display: inline-flex;
  align-items: center;
}
.site-footer__logo-img {
  width: min(400px, 28vw);
  min-width: 170px;
  height: auto;
}
.site-footer__logo-border {
  content: "";
  height: 8px;
  background: #fff;
  position: relative;
  display: block;
  bottom: 0px;
  left: 0px;
  width: calc(100% - 15px);
}
.site-footer__title--desktop {
  position: relative;
  text-align: center;
  font-family: var(--font-zh);
  font-size: 2.05rem;
  font-weight: 700;
  color: #222745;
  line-height: 1.05;
}
.site-footer__title--mobile {
  position: relative;
  text-align: center;
  font-family: var(--font-zh);
  font-size: 2.05rem;
  font-weight: 700;
  color: #222745;
  line-height: 1.05;
  padding: 40px 0px;
}
.site-footer__nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 1.7rem;
  margin-top: 30px;
}
.site-footer__link {
  white-space: nowrap;
  position: relative;
  font-family: var(--font-zh);
  font-size: 1.3rem;
  font-weight: 500;
  color: #232843;
  text-decoration: none;
  line-height: 1.25;
  transition:
    color 180ms ease,
    opacity 180ms ease;
}
.site-footer__link::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9344b;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.site-footer__link.no_dot::before {
  display: none;
}
.site-footer__link:hover {
  color: var(--color-red);
  opacity: 0.9;
}
.site-footer__bottom_section {
  height: 100%;
  background: #fff;
}
.site-footer__bottom_inner {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding: 40px 0px 20px 0px;
}
.site-footer__bottom_copyright {
  margin: 14px 0 0;
  padding: 0 16px;
  color: #202020;
  text-align: center;
  font-family:
    "ITC Avant Garde Std", "Source Han Sans HC", "Noto Sans TC", "PingFang TC",
    sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.005em;
}
.site-footer__bottom_copyright-line {
  display: inline;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .cross__left {
    top: -300px;
    left: -700px;
  }
  .cross__right {
    bottom: 115px;
    right: -700px;
  }
  .site-footer__nav {
    gap: 1rem;
  }
  .site-footer__link {
    font-size: 1rem;
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    padding: 0.24rem 2rem 0.14rem 2rem;
  }
  .site-header__logo-img {
    max-width: 200px;
    min-width: unset;
  }
  .cross__left {
    top: -250px;
    left: -650px;
  }
  .cross__right {
    bottom: 100px;
    right: -620px;
  }
  .site-footer__inner {
    flex-direction: column;
    gap: 1rem;
  }
  .site-footer__brand {
    align-items: center;
    text-align: center;
  }
  .site-footer__logo-img {
    width: min(250px, 62vw);
  }
  .site-footer__title--desktop {
    font-size: clamp(1.4rem, 6vw, 1.9rem);
  }
  .site-footer__link {
    font-size: 0.8rem;
  }
  .site-footer__nav {
    margin-top: 10px;
  }
  .site-footer__bottom_copyright {
    font-size: 16px;
  }
}

@media (max-width: 720px) {
  :root {
    --anchor-scroll-offset: 92px;
  }

  .desktop {
    display: none;
  }
  .mobile {
    display: flex;
  }

  .future__inner {
    display: none;
  }

  .future-animation--desktop {
    display: none;
  }

  .future-animation--mobile {
    display: block;
  }

  .future {
    padding-top: 1.5rem;
  }
  .site-header-grey {
    display: none;
  }
  .site-nav-container {
    display: none;
  }
  .site-header__inner {
    padding: 0px;
  }
  .site-header__logo-img {
    max-width: 50vw;
    width: 50vw;
  }
  .site-content {
    padding: var(--space-section);
  }

  /* Open menu: raise stacking; dimmer/panel start below .site-content */
  .site-header:has(.site-nav.is-open) {
    z-index: 100;
    overflow: visible;
  }

  .site-header:has(.site-nav.is-open) .site-content {
    position: relative;
    z-index: 2;
  }

  .site-nav__backdrop {
    top: var(--site-nav-overlay-top);
  }

  .site-nav {
    padding-right: 20px;
    justify-content: flex-end;
  }
  .site-nav__toggle--mobile {
    display: flex;
    padding: 0px;
    position: relative;
    z-index: 3;
  }
  .site-nav__toggle--mobile .site-nav__toggle-img {
    width: 36px;
    height: auto;
  }

  /* Mobile panel + caret (--site-nav-caret-center-x from navbar.js) */
  .site-nav__mobile-panel {
    left: auto;
    top: calc(var(--site-nav-overlay-top) + var(--site-nav-panel-mobile-top));
    right: calc(
      max(var(--space-section), (100vw - var(--max-width--global)) / 2) +
        var(--site-nav-panel-mobile-right)
    );
    /* Hug menu text — avoid large empty right margin inside the teal panel */
    width: max-content;
    max-width: calc(100vw - 2 * var(--space-section));
    bottom: auto;
    max-height: min(480px, 72vh);
  }

  .site-nav__mobile-panel::before {
    top: -9px;
    left: var(--site-nav-caret-center-x, 50%);
    right: auto;
    transform: translateX(-50%);
    width: 16px;
    height: 9px;
  }

  .site-nav.is-open .site-nav__close {
    top: 0.1rem;
    min-height: 44px;
    right: 15px;
  }

  .site-nav.is-open .site-nav__mobile-list {
    padding-top: 2.45rem;
    padding-bottom: 0.65rem;
  }

  .site-nav__mobile-panel.site-nav__drawer,
  .site-nav__pub-panel.site-nav__drawer {
    font-family:
      "Noto Sans TC", "Source Han Sans HC", "PingFang TC", sans-serif;
    font-weight: 500;
    font-style: normal;
  }

  .site-nav__drawer .site-nav__mobile-link,
  .site-nav__drawer button.site-nav__mobile-link,
  body.edu .site-nav__drawer .site-nav__mobile-link,
  body.edu .site-nav__drawer button.site-nav__mobile-link {
    font-family:
      "Noto Sans TC", "Source Han Sans HC", "PingFang TC", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: var(--site-nav-drawer-font-size);
    line-height: 1.3;
    padding-right: 1.15rem;
    white-space: nowrap;
  }

  /* Mobile 刊物 flyout — match main drawer width + type scale */
  .site-nav__pub-panel {
    position: fixed;
    z-index: 3;
    left: auto;
    width: max-content;
    max-width: calc(100vw - 2 * var(--space-section));
    box-sizing: border-box;
    flex-direction: column;
    background-color: var(--site-nav-panel-bg);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    overflow: visible;
  }

  .site-nav.is-pub-open .site-nav__pub-panel {
    display: flex;
  }

  .site-nav__pub-panel::after {
    content: "";
    position: absolute;
    top: var(--site-nav-pub-caret-center-y, 24px);
    right: -7px;
    transform: translateY(-50%);
    width: 8px;
    height: 14px;
    background: var(--site-nav-pub-caret-bg, var(--site-nav-panel-bg));
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    pointer-events: none;
  }

  .site-nav__pub-panel .site-nav__mobile-link:nth-child(2) {
    white-space: normal;
  }

  .site-nav__mobile-link--panel-toggle.is-active {
    background-color: var(--site-nav-panel-bg-hover);
  }

  .spinning-cube__container {
    margin-top: 0px;
  }
  .spinning-cube {
    max-width: 120px;
    margin-bottom: var(--space-section);
  }
  .featured__pagination {
    bottom: -12px !important;
  }
  body:has(.partner) .cooperation {
    margin-top: calc(-1 * var(--homepage-tail-nudge--mobile));
  }
  .cross__left {
    top: 420px;
    left: -420px;
    transform: scale(0.6);
  }
  .cross__right {
    top: -850px;
    right: -420px;
    transform: scale(0.6);
  }
  .site-footer__inner::before {
    display: none;
  }
  .site-footer__content {
    justify-content: center;
    flex-direction: column;
    padding-left: 0px;
  }
  .site-footer__divider {
    display: none;
  }
  .site-footer__title--desktop {
    display: none;
  }
  .site-footer__logo-img {
    width: min(300px, 62vw);
    /* border-bottom: 3px solid #ffffff; */
  }
  .site-footer__bottom_logo {
    max-width: 250px;
  }
  .site-footer__title--mobile {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .site-footer__title--mobile::after {
    content: "";
    display: block;
    flex-shrink: 0;
    width: max(32px, calc(var(--site-footer-pill-width) - 80px));
    height: max(8px, calc(var(--site-footer-pill-height) - 15px));
    margin-top: 15px;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      #1cbec0 0%,
      #1cbec0 50%,
      #112266 50%,
      #112266 100%
    );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset -1px 0 0 rgba(255, 255, 255, 0.2),
      0 2px 4px rgba(10, 20, 70, 0.15);
  }
  .site-footer__link {
    font-size: 0.8rem;
  }
  .site-footer__nav {
    gap: 0.5rem;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .cooperation-gallery {
    width: 100%;
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 640px) {
  :root {
    --site-nav-drawer-font-size: clamp(0.92rem, 0.72rem + 1.1vw, 1.1rem);
  }

  .site-nav__drawer .site-nav__mobile-link {
    padding: 0.4rem 0.55rem 0.4rem 0.72rem;
  }

  .site-nav {
    padding-right: 10px;
  }
  .site-nav__link {
    display: none;
  }
  .featured-swiper .swiper-slide {
    width: 85%;
  }
  .featured-slide__title {
    font-size: clamp(1.2rem, 5.2vw, 1.6rem);
  }
  .partner {
    padding-bottom: 3rem;
  }
  .cross__right {
    top: -800px;
    right: -360px;
  }
  .cross__left {
    top: 460px;
    left: -380px;
  }
  .site-footer__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    align-items: center;
    gap: 0.65rem 0.5rem;
  }
  .site-footer__navbar.privacy .site-footer__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .site-footer__bottom_inner {
    padding: 20px 0px;
  }
  .site-footer__bottom_copyright {
    margin-top: 10px;
    font-size: 14px;
  }
  .site-footer__link::before {
    width: 3px;
    height: 3px;
    margin-right: 0.38rem;
  }
  .site-footer__link.no_dot::before {
    display: none;
  }
  .site-footer__title--mobile {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .cooperation-gallery {
    margin: 1.5rem auto 0;
  }
  .cross__left {
    top: 520px;
    left: -280px;
  }
  .cross__right {
    top: -785px;
    right: -280px;
  }
  .site-footer__info {
    padding-left: 0px;
    font-size: 0.8rem;
  }
  .site-footer__bottom_copyright-line {
    display: block;
  }
  .site-footer__bottom_copyright-line--mobile {
    margin-top: 2px;
  }
  .site-footer__link {
    font-size: 0.8rem;
  }

  .site-nav__pub-panel::after {
    display: none;
  }

  .site-nav__pub-panel::before {
    content: "";
    position: absolute;
    top: -9px;
    left: var(--site-nav-pub-caret-center-x, 50%);
    right: auto;
    transform: translateX(-50%);
    width: 16px;
    height: 9px;
    background: var(--site-nav-panel-bg);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    pointer-events: none;
  }

  .site-nav.is-pub-open .site-nav__pub-panel::before {
    opacity: 1;
  }
}

@media (max-width: 440px) {
  :root {
    --site-nav-drawer-font-size: clamp(1.02rem, 0.82rem + 1.35vw, 1.2rem);
  }

  .site-nav__drawer .site-nav__mobile-link {
    padding: 0.48rem 0.55rem 0.48rem 0.8rem;
  }
}

@media (max-width: 390px) {
  .cross__left {
    top: 480px;
    left: -220px;
  }
  .cross__right {
    top: -700px;
    right: -235px;
  }
}

/* =============================================================
   [2/3] FLAGSHIP_EVENT STYLES
   ============================================================= */

/* flagship_event — 思源黑體 Bold */
body.edu.edu-home-bg {
  --font-display-zh:
    "Source Han Sans HC", "Noto Sans TC", "PingFang TC", sans-serif;
  font-family: var(--font-zh);
  font-weight: 700;
  font-style: normal;
}
body.edu.edu-home-bg .page-title,
body.edu.edu-home-bg .article,
body.edu.edu-home-bg .article__title,
body.edu.edu-home-bg .article__subhead,
body.edu.edu-home-bg .article p,
body.edu.edu-home-bg .article__awards li,
body.edu.edu-home-bg .article__source {
  font-family: var(--font-zh);
  font-weight: 700;
  font-style: normal;
}

/* flagship_event hero: straight image, skewed frame/border only; no hover */
body.edu.edu-home-bg .hero-photo__frame {
  cursor: default;
  transition: none;
  height: clamp(450px, 37vw, 560px);
}
body.edu.edu-home-bg .hero-photo__frame::before {
  transition: none;
}
body.edu.edu-home-bg .hero-photo__img {
  position: absolute;
  left: -6%;
  top: 50%;
  width: 112%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  margin: 0;
  transform: skewX(5deg) translateY(-50%);
}
body.edu.edu-home-bg .hero-photo__frame:hover,
body.edu.edu-home-bg .hero-photo__frame:focus-visible {
  transform: skewX(-5deg);
  box-shadow: 0 20px 42px rgba(15, 35, 60, 0.2);
  outline: none;
}
body.edu.edu-home-bg .hero-photo__frame:hover::before,
body.edu.edu-home-bg .hero-photo__frame:focus-visible::before {
  transform: none;
  border-color: rgba(255, 255, 255, 0.82);
}
body.edu.edu-home-bg .hero-photo__frame:hover .hero-photo__img,
body.edu.edu-home-bg .hero-photo__frame:focus-visible .hero-photo__img {
  transform: skewX(5deg) translateY(-50%);
  filter: none;
}

/* ===== Page background ===== */
.edu main {
  position: relative;
  background: transparent;
  overflow: hidden;
}
.edu main::after {
  content: "";
  display: block;
  position: relative;
  z-index: 1;
  height: 14px;
  background: #ededed;
}

/* ===== Page title ===== */
.page-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display-zh);
  font-size: clamp(1.95rem, 4vw, 2.85rem);
  font-weight: 500;
  text-align: center;
  color: var(--color-navy);
  letter-spacing: 0.12em;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0.6rem;
}
.page-title__flagship {
  color: var(--color-red);
}
.page-title__accent {
  position: relative;
  display: inline-block;
}
.page-title__accent::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -8px;
  height: 3px;
  background: var(--color-red);
}

body.edu .edu-reveal,
.edu.has-motion .edu-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
body.edu .edu-reveal.is-visible,
.edu.has-motion .edu-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== Hero photo with side decorations ===== */
.hero-photo {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: clamp(1.75rem, 4vw, 2.75rem) auto 0;
  padding: clamp(1.5rem, 3.5vw, 3rem) 1.5rem clamp(1.75rem, 4vw, 3.5rem);
  isolation: isolate;
}
.hero-photo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(1240px, 132vw);
  height: min(520px, 58vw);
  background: url("../images/bg_top_line.png") center center / 112% auto
    no-repeat;
  opacity: 0.62;
  transform: translate(-50%, -44%);
  pointer-events: none;
}

.hero-photo__frame {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 2;
  display: block;
  width: min(860px, calc(100vw - 3rem));
  max-width: none;
  margin: 0 auto;
  border-radius: 34px 0 34px 0;
  overflow: hidden;
  transform: skewX(-5deg);
  box-shadow: 0 20px 42px rgba(15, 35, 60, 0.2);
  transition:
    box-shadow 260ms ease,
    transform 260ms ease;
}
.hero-photo__frame::before {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px 0 24px 0;
  pointer-events: none;
  transition:
    transform 260ms ease,
    border-color 260ms ease;
}
.hero-photo__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 42%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 255, 255, 0.12) 58%,
    transparent 100%
  );
  transform: translateX(-130%);
  pointer-events: none;
}
body.edu .hero-photo__frame::after {
  content: none;
}
.hero-photo__frame:hover,
.hero-photo__frame:focus-visible {
  transform: skewX(-5deg) translateY(-8px) scale(1.012);
  box-shadow: 0 26px 54px rgba(15, 35, 60, 0.24);
  outline: none;
}
.hero-photo__frame:hover::before,
.hero-photo__frame:focus-visible::before {
  transform: translate(8px, -8px);
  border-color: #fff;
}
.hero-photo__frame.is-active::after {
  animation: photo-shine 760ms ease;
}
.hero-photo__img {
  width: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo__frame:hover .hero-photo__img,
.hero-photo__frame:focus-visible .hero-photo__img {
  transform: skewX(5deg) scale(1.145);
  filter: saturate(1.08) contrast(1.03);
}

/* ===== Article ===== */
.article {
  position: relative;
  z-index: 1;
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 1.5rem clamp(3rem, 6vw, 5rem);
  font-family: var(--font-zh);
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.95;
}
.article.is-highlighted .article__title {
  animation: title-highlight 900ms ease;
}
body.edu .article.is-highlighted .article__title {
  animation: none;
}
.article__title {
  font-family: var(--font-display-zh);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 700;
  color: var(--color-navy);
  text-align: center;
  letter-spacing: 0.05em;
  margin: 1.25rem 0 2.25rem;
}
.article p {
  margin: 0 0 1.5rem;
}
.article__subhead {
  font-family: var(--font-display-zh);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-black);
  margin: 2.25rem 0 0.75rem;
  letter-spacing: 0.04em;
}
.article__awards {
  margin: 0 0 1.25rem;
}
.article__awards li {
  margin: 0;
  font-size: 1rem;
  line-height: 1.95;
}
.article__source {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  word-break: break-all;
}
.article__source:has(.article__detail-link) {
  word-break: normal;
  text-align: center;
}
.article__detail-link {
  display: inline-block;
}
.article__detail-btn {
  display: block;
  width: min(132px, 38.6vw);
  height: auto;
}
.article_content_bottom {
  margin-bottom: 36px !important;
}
.article a {
  color: inherit;
  word-break: break-all;
}
.article a:hover {
  color: var(--color-red);
}

/* =============================================================
   [3/3] GUIDEBOOK.HTML STYLES
   ============================================================= */

/* ===== Pub publications ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.publications {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: clamp(2rem, 4vw, 3.3rem) auto 0;
  padding: 0px 16px 100px 16px;
}
.publications__list {
  display: grid;
  gap: clamp(1.35rem, 2.8vw, 2rem);
}
.publication-card {
  display: grid;
  grid-template-columns: clamp(118px, 14vw, 155px) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.7rem);
  align-items: start;
  padding-bottom: clamp(1.25rem, 2vw, 1.75rem);
}
.publication-card__border-link {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  width: 100%;
  min-height: calc(100px * 59 / 222);
  overflow: visible;
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  background: none;
}
.publication-card__border-link::before {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background: var(--color-teal);
}
.publication-card__border-link::after {
  content: "";
  flex: 0 0 auto;
  width: 100px;
  aspect-ratio: 222 / 59;
  background: url("../images/guidebook/guidebook_more.png") center / 100% 100%
    no-repeat;
}
.publication-card__border-link:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}
.publication-card__border-link:not(.publication-card__border-link--disabled) {
  cursor: pointer;
}
.publication-card__border-link--disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.publication-card__media {
  width: 100%;
  aspect-ratio: 0.72 / 1;
}
.publication-card__media-link {
  display: block;
  width: 100%;
  height: 100%;
}
.publication-card__media-link:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}
.publication-card__img,
.publication-card__placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(10, 37, 70, 0.16);
}
.publication-card__placeholder {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(217, 52, 75, 0.92),
    rgba(255, 199, 65, 0.9) 46%,
    rgba(23, 178, 166, 0.9)
  );
  color: #fff;
  font-family: var(--font-en);
  padding: 0.8rem;
}
.publication-card__placeholder::before,
.publication-card__placeholder::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.publication-card__placeholder::before {
  width: 80px;
  height: 80px;
  right: -22px;
  top: 18px;
}
.publication-card__placeholder::after {
  width: 120px;
  height: 120px;
  left: -42px;
  bottom: -34px;
}
.publication-card__placeholder span,
.publication-card__placeholder strong {
  position: relative;
  z-index: 1;
  display: block;
}
.publication-card__placeholder span {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}
.publication-card__placeholder strong {
  margin-top: 0.4rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}
.publication-card__content {
  color: var(--color-navy);
  padding-top: 0.1rem;
  padding-bottom: 0.5rem;
}
.publication-card__title {
  font-family: var(--font-display-zh);
  font-size: clamp(1.12rem, 2.1vw, 1.55rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}
.publication-card__desc {
  font-size: clamp(1rem, 1.2vw, 2rem);
  line-height: 1.8;
  margin: 0;
}

@keyframes photo-shine {
  from {
    transform: translateX(-130%);
  }
  to {
    transform: translateX(130%);
  }
}

@keyframes title-highlight {
  0%,
  100% {
    color: var(--color-navy);
  }
  45% {
    color: var(--color-red);
    text-shadow: 0 8px 24px rgba(217, 52, 75, 0.16);
  }
}

/* ===== Education / guidebook shared footer ===== */
.edu-footer {
  background: #fff;
  text-align: center;
  border-top: 0;
}
@media (max-width: 720px) {
  .hero-photo {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-photo::before {
    top: 52%;
    width: 168vw;
    height: min(380px, 82vw);
    background-size: 128% auto;
    opacity: 0.56;
  }
  .hero-photo__frame {
    width: min(100%, 620px);
    border-radius: 22px 0 22px 0;
    transform: skewX(-3deg);
  }
  .hero-photo__frame:hover,
  .hero-photo__frame:focus-visible {
    transform: skewX(-3deg) translateY(-5px) scale(1.008);
  }
  .hero-photo__img {
    transform: skewX(3deg) scale(1.08);
  }
  .hero-photo__frame:hover .hero-photo__img,
  .hero-photo__frame:focus-visible .hero-photo__img {
    transform: skewX(3deg) scale(1.105);
  }
  body.edu.edu-home-bg .hero-photo__frame:hover,
  body.edu.edu-home-bg .hero-photo__frame:focus-visible {
    transform: skewX(-3deg);
    box-shadow: 0 20px 42px rgba(15, 35, 60, 0.2);
  }
  body.edu.edu-home-bg .hero-photo__frame {
    height: auto;
    aspect-ratio: 8 / 5;
  }
  body.edu.edu-home-bg .hero-photo__img {
    left: -4%;
    width: 108%;
    transform: skewX(3deg) translateY(-50%);
  }
  body.edu.edu-home-bg .hero-photo__frame:hover .hero-photo__img,
  body.edu.edu-home-bg .hero-photo__frame:focus-visible .hero-photo__img {
    transform: skewX(3deg) translateY(-50%);
    filter: none;
  }
  /* guidebook.html */
  .publications {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .publication-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-bottom: 20px;
  }
  .publication-card__media {
    max-width: 250px;
    width: 100%;
    margin-inline: auto;
  }
  .publication-card__content {
    display: block;
    width: 100%;
    text-align: center;
    padding-top: 0.15rem;
    padding-bottom: 0.75rem;
  }
  .publication-card__content h3 {
    font-size: 1.5rem;
  }

  .publication-card__subtitle,
  .publication-card__desc {
    display: none;
  }
  .publication-card__title {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
  }
  .publication-card__border-link {
    display: block;
    width: 100px;
    min-height: unset;
    margin-inline: auto;
    aspect-ratio: 222 / 59;
    background: url("../images/guidebook/guidebook_more.png") center / 100% 100%
      no-repeat;
  }
  .publication-card__border-link::before,
  .publication-card__border-link::after {
    display: none;
  }
  /* flagship_event article pages */
  .article {
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  /* guidebook.html */
  .publication-card {
    grid-template-columns: 1fr;
    padding-bottom: 1.5rem;
  }
  .publication-card__content h3 {
    font-size: 1rem;
  }
}

/* Education / guidebook reduced-motion (scoped to .edu so index.html keeps its
   own gentler 200ms reduced-motion handling) */
@media (prefers-reduced-motion: reduce) {
  .edu *,
  .edu *::before,
  .edu *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  .hero-photo__frame,
  .edu-reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .article {
    margin-top: 60px;
  }
}
