.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-left: 10px;
  line-height: 1;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.theme-toggle:hover {
  background: var(--border);
}
:root {
  --primary: #2c3e50;
  --secondary: #1a73e8;
  --accent: #7b2cf5;
  --card-bg: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #dfe7ef;
  --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e6eef5 100%);
}

[data-theme='dark'] {
  --primary: #f9fafb;
  --secondary: #60a5fa;
  --accent: #a78bfa;
  --card-bg: #111827;
  --text: #d1d5db;
  --text-light: #9ca3af;
  --border: #374151;
  --bg-gradient: linear-gradient(135deg, #030712 0%, #111827 100%);
  --link-color: #60a5fa;
}

:root {
  --link-color: #1a73e8;
}

a {
  color: var(--link-color);
}

.publication-card a {
  color: var(--primary) !important;
}

.publication-card a:hover {
  color: var(--secondary) !important;
}


* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

img {
  max-width: 100%;
}


.container {
  max-width: 1060px;
  margin: 24px auto 40px;
  padding: 0 28px;
  position: relative;
}

.site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 4px 20px;
  flex-wrap: wrap;
}

.site-topbar-badge { display: none; }

.site-topbar-badge-image {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.site-brand-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 10px 22px rgba(35, 63, 92, 0.16);
  padding: 0;
}


.site-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.site-brand-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  /* white-space: nowrap; */
  max-width: 270px;
  white-space: normal;
  line-height: 1.35;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  margin-left: auto;
  padding-right: 0;
  flex-shrink: 0;
}

.main-nav a {
  color: #516477;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.12rem;
  padding: 8px 2px 10px;
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.main-nav a:hover {
  color: var(--secondary);
}

.main-nav a.is-active {
  color: var(--primary);
}

.main-nav a.is-active::after,
.main-nav a:hover::after {
  transform: scaleX(1);
}

.site-mobile-controls {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.site-mobile-controls .theme-toggle {
  margin-left: 0;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin-top: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(36, 61, 87, 0.12);
}

.mobile-nav-toggle:hover {
  background: var(--border);
  transform: none;
  box-shadow: 0 4px 12px rgba(36, 61, 87, 0.12);
}

.mobile-nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.mobile-nav-toggle.is-open .mobile-nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-toggle.is-open .mobile-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.is-open .mobile-nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  font-size: 0.98rem;
  color: var(--text-light);
}

.lang-switch a {
  padding: 6px 0;
  font-size: 0.98rem;
}

.lang-switch a::after {
  display: none;
}

.lang-switch a.is-active {
  color: var(--primary);
  font-weight: 800;
}

.lang-divider {
  color: #8da0b3;
}

.admin-return-link {
  margin-left: 16px;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
}

.admin-return-link:hover {
  text-decoration: underline;
}

.content-card,
.portal-news-card,
.news-card,
.portal-highlight-card,
.portal-carousel,
.portal-about,
.portal-side-card,
.publications-access-card,
.publication-card {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
}

.content-card {
  min-height: calc(100vh - 260px);
  padding: 18px 0 64px;
}

.content-card-home {
  width: calc(100% + 48px);
  margin-inline: -24px;
  padding-inline: 16px;
}

@media (min-width: 821px) and (max-width: 1100px) {
  .content-card-home {
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: 8px;
  }
}

.portal-side-stat {
  background: var(--bg-gradient);
  border: 1px solid var(--border);
}

.portal-highlight-trigger {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe7f3;
  background: #f8fbff;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.portal-highlight-trigger:hover,
.portal-highlight-trigger.is-active {
  background: var(--border);
  color: var(--text);
}

.portal-slide {
  background: var(--card-bg);
}

.portal-slide-summary,
.portal-slide-title,
.portal-slide-authors,
.portal-slide-meta {
  color: var(--text);
}

.portal-slide-media {
  background: #e9f0f7;
  min-height: 368px;
}

.news-card-image-link {
  background: var(--border);
}

.publication-thumb,
.news-detail-image {
  background: var(--border);
}

h2 {
  color: var(--primary);
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

h3 {
  color: var(--primary);
}

p {
  font-size: 17px;
  margin: 16px 0;
  text-align: center;
  color: var(--text);
}

.btn,
button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 32px;
  background: var(--secondary);
  color: white;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.28);
}

.btn-emphasis {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-emphasis:hover {
  background: linear-gradient(135deg, #219150 0%, #27ae60 100%);
  box-shadow: 0 6px 16px rgba(46, 204, 113, 0.45);
}

.btn:hover,
button:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

form {
  max-width: 520px;
  margin: 0 auto;
}

label {
  display: block;
  margin: 20px 0 8px;
  font-weight: 600;
  color: var(--primary);
  text-align: left;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--secondary);
}

.portal-hero {
  position: relative;
  overflow: hidden;
  height: 500px;
  min-height: 500px;
  border-radius: 20px;
  margin-bottom: 20px;
  background:
    linear-gradient(118deg, rgba(22, 46, 74, 0.95) 0%, rgba(34, 77, 125, 0.82) 48%, rgba(111, 147, 190, 0.55) 100%);
  box-shadow: 0 18px 40px rgba(36, 61, 87, 0.18);
}

.portal-hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
}

.portal-hero-backdrop::before,
.portal-hero-backdrop::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.portal-hero-backdrop::before {
  left: 28px;
  top: 146px;
  width: 520px;
  height: 220px;
  opacity: 0.36;
  background:
    radial-gradient(circle at 12% 28%, rgba(75, 217, 255, 0.72) 0 4px, transparent 5px),
    radial-gradient(circle at 36% 62%, rgba(255, 255, 255, 0.58) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 38%, rgba(75, 217, 255, 0.56) 0 4px, transparent 5px),
    radial-gradient(circle at 92% 68%, rgba(201, 32, 50, 0.62) 0 4px, transparent 5px),
    linear-gradient(22deg, transparent 10%, rgba(83, 207, 255, 0.48) 10.4%, rgba(83, 207, 255, 0.48) 11.2%, transparent 11.6%),
    linear-gradient(156deg, transparent 28%, rgba(255, 255, 255, 0.3) 28.4%, rgba(255, 255, 255, 0.3) 29.2%, transparent 29.6%),
    linear-gradient(0deg, transparent 61%, rgba(83, 207, 255, 0.32) 61.4%, rgba(83, 207, 255, 0.32) 62.2%, transparent 62.6%);
  filter: blur(0.2px);
}

.portal-hero-backdrop::after {
  left: 52px;
  top: 190px;
  width: 360px;
  height: 132px;
  border: 1px solid rgba(214, 232, 255, 0.18);
  border-radius: 22px;
  opacity: 0.42;
  background:
    linear-gradient(rgba(214, 232, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 232, 255, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
}

.portal-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 36px 38px 32px;
  color: #f5f9ff;
}

.portal-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: stretch;
  height: 100%;
}

.portal-hero-copy {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.portal-hero-brand-visual {
  margin: 0 0 10px;
  max-width: min(100%, 540px);
  transform: translateX(-8px);
}

.portal-hero-brand-link {
  display: block;
  text-decoration: none;
}

.portal-hero-brand-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(16, 32, 54, 0.18);
}

.portal-hero-brand-fallback {
  display: none;
}

.portal-hero-side {
  display: flex;
  justify-content: flex-end;
  height: 100%;
}

.portal-hero-panel {
  width: min(100%, 430px);
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 32px rgba(14, 29, 47, 0.16);
  backdrop-filter: blur(4px);
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portal-hero-panel-label {
  margin-bottom: 14px;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}

.portal-hero-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 12px;
}

.portal-hero-title {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  line-height: 1.08;
  text-align: left;
  color: #ffffff;
}

.portal-hero-title-link {
  color: inherit;
  text-decoration: none;
}

.brand-wordmark {
  color: #5ce1ff;
  text-shadow: 0 0 18px rgba(92, 225, 255, 0.72), 0 0 34px rgba(26, 115, 232, 0.42);
}

.portal-hero-full-name {
  margin: 0 0 12px;
  max-width: 620px;
  text-align: left;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 700;
}

.portal-brand-accent {
  color: #5ce1ff;
  text-shadow: 0 0 12px rgba(92, 225, 255, 0.48), 0 0 20px rgba(26, 115, 232, 0.3);
}

.portal-hero-subtitle {
  margin: 0 0 8px;
  text-align: left;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
  font-weight: 600;
}

.portal-hero-subtitle-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.portal-hero-subtitle-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.75);
}

.portal-hero-summary {
  margin: 0;
  max-width: 520px;
  text-align: left;
  color: rgba(245, 249, 255, 0.86);
  font-size: 0.95rem;
  line-height: 1.48;
  white-space: pre-line;
}

.portal-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px 18px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.portal-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.portal-hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 600;
}

.portal-hero-btn {
  margin-top: 0;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 10px 22px rgba(17, 36, 58, 0.24);
}

.portal-hero-btn:hover {
  background: #f8fbff;
  color: var(--primary);
}

.portal-hero-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 2px;
}

.portal-hero-link:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.portal-carousel-section {
  margin-bottom: 18px;
}

.portal-carousel-section .portal-section-head {
  padding-left: 8px;
}

.portal-news-preview {
  margin-bottom: 24px;
}

.portal-news-card,
.news-card {
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(44, 62, 80, 0.08);
}

.portal-news-card {
  padding: 18px 20px;
}

.portal-news-meta,
.news-card-date,
.news-detail-meta {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
}

.portal-news-title,
.news-card-title {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.4;
}

.portal-news-title:hover,
.news-card-title:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.portal-news-summary,
.news-card-summary,
.news-detail-summary,
.news-detail-content {
  text-align: left;
}

.portal-news-summary,
.news-card-summary {
  margin: 10px 0 0;
}

.portal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.portal-section-head h3 {
  margin: 0;
  font-size: 1.18rem;
}

.portal-section-note {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.portal-highlights-section {
  margin-bottom: 24px;
}

.portal-highlights {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.portal-highlights-hero {
  grid-template-columns: minmax(146px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.portal-highlight-nav {
  display: grid;
  gap: 10px;
  height: auto;
  grid-auto-rows: minmax(0, auto);
}

.portal-highlight-trigger {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe7f3;
  background: #f8fbff;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.portal-hero-panel .portal-highlight-trigger {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe7f3;
  background: #f8fbff;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.portal-highlight-trigger:hover,
.portal-highlight-trigger:focus-visible,
.portal-highlight-trigger.is-active {
  background: linear-gradient(145deg, #ffffff 0%, #f1f7ff 100%);
  border-color: #b9d4f5;
  box-shadow: 0 10px 22px rgba(44, 62, 80, 0.08);
  transform: translateY(-1px);
}

.portal-hero-panel .portal-highlight-trigger:hover,
.portal-hero-panel .portal-highlight-trigger:focus-visible,
.portal-hero-panel .portal-highlight-trigger.is-active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.portal-highlight-display {
  position: relative;
  min-height: 0;
  height: 100%;
  width: 100%;
}

.portal-highlight-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  padding: 24px 24px 22px;
  border-radius: 18px;
  border: 1px solid #e4ebf3;
  background: linear-gradient(145deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 12px 26px rgba(44, 62, 80, 0.08);
  transition: opacity 0.25s ease;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

.portal-hero-panel .portal-highlight-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 28, 48, 0.28);
  box-shadow: none;
}

.portal-highlight-card.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.portal-highlight-index {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}

.portal-hero-panel .portal-highlight-index {
  color: rgba(214, 232, 255, 0.8);
}

.portal-highlight-card h4 {
  margin: 0 0 10px;
  font-size: 1.26rem;
  line-height: 1.28;
  min-height: calc(1.28em * 2);
}

.portal-hero-panel .portal-highlight-card h4,
.portal-hero-panel .portal-highlight-card p {
  color: #f5f9ff;
}

.portal-highlight-card p {
  margin: 0;
  text-align: left;
  line-height: 1.56;
  font-size: 1rem;
  color: rgba(245, 249, 255, 0.92);
  min-height: 0;
  max-height: calc(1.56em * 8.6);
  overflow: hidden;
}

.portal-carousel {
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(44, 62, 80, 0.08);
  overflow: hidden;
}

.portal-carousel-track {
  position: relative;
  height: 420px;
  min-height: 420px;
}

.portal-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr);
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.portal-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.portal-slide-media {
  background: #ffffff;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.portal-slide-content {
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  overflow: hidden;
}

.portal-slide-index {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 12px;
}

.portal-slide-title {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.28rem;
  line-height: 1.36;
  font-weight: 800;
}

.portal-slide-title:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.portal-slide-authors,
.portal-slide-meta,
.portal-slide-summary {
  text-align: left;
}

.portal-slide-authors {
  margin: 10px 0 6px;
  color: #4b5f73;
  font-size: 0.95rem;
}

.portal-slide-meta {
  margin: 0;
  color: #7f8c9b;
  font-style: italic;
  font-size: 0.95rem;
}

.portal-slide-summary {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  max-height: calc(1.7em * 6);
  overflow: hidden;
}

.portal-slide-actions {
  margin-top: 16px;
  margin-top: auto;
}

.portal-slide-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 700;
}

.portal-slide-link:hover {
  text-decoration: underline;
}

.portal-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px 16px;
}

.portal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: #cad7e5;
  cursor: pointer;
  margin-top: 0;
  padding: 0;
  box-shadow: none;
}

.portal-dot.is-active {
  background: var(--secondary);
  transform: scale(1.15);
}

.portal-dot:hover {
  background: #5e93dc;
  transform: scale(1.08);
  box-shadow: none;
}

.portal-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  column-gap: 20px;
  row-gap: 12px;
  align-items: stretch;
}

.portal-home-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.portal-about-card,
.portal-side-card,
.portal-latest-news-card,
.portal-join-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(44, 62, 80, 0.08);
  flex: 1 1 auto;
}

/* .portal-about {
  padding: 0;
} */

.portal-about-card {
  padding: 9px 16px;
}

.portal-about-body p:first-child {
  margin-top: 0;
}

.portal-about-card .portal-section-head {
  margin-bottom: 4px;
}

.portal-about-card h3 {
  margin-top: 0;
  margin-bottom: 4px;
}

.portal-about-card,
.portal-side-card,
.portal-latest-news-card,
.portal-join-card {
  min-height: auto;
}

.portal-about-body {
  white-space: pre-line;
  text-align: left;
  color: var(--text);
  line-height: 1.55;
  font-size: 0.92rem;
  margin-top: 0;
}

.portal-side-card {
  padding: 9px 16px;
}

.portal-side-card-tight {
  margin-bottom: 12px !important;
}

.portal-side-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.portal-side-text,
.portal-user-line {
  text-align: left;
}

.portal-side-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.portal-user-line {
  margin: 12px 0 0;
  color: #516477;
  font-size: 0.95rem;
}

.portal-inline-link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
}

.portal-inline-link:hover {
  text-decoration: underline;
}

.portal-side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.portal-side-stats-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-side-stat {
  background: linear-gradient(145deg, #f7fbff 0%, #eef5fd 100%);
  border: 1px solid #dde8f4;
  border-radius: 14px;
  padding: 12px 9px;
  text-align: center;
  min-width: 0;
}

.portal-side-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.portal-side-metric {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.portal-latest-news {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e3eaf2;
}

.portal-latest-news-card {
  padding: 9px 16px;
}

.portal-join-card {
  padding: 3px 16px;
}

.portal-join-copy {
  display: grid;
  gap: 8px;
}

.portal-join-copy p,
.portal-join-apply p,
.portal-join-direction p {
  margin: 0;
  text-align: left;
  color: var(--text);
}

.portal-join-copy p {
  line-height: 1.55;
  font-size: 0.92rem;
}

.portal-join-directions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.portal-join-direction {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(145deg, #f8fbff 0%, #eef5fd 100%);
}

[data-theme='dark'] .portal-join-direction {
  background: rgba(255, 255, 255, 0.04);
}

.portal-join-direction h4 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.35;
}

.portal-join-direction p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.6;
}

.portal-join-apply {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.portal-join-apply p {
  line-height: 1.55;
  font-size: 0.91rem;
}

.portal-latest-news-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.portal-latest-news-item {
  display: grid;
  gap: 3px;
}

.portal-news-title-inline {
  display: inline-block;
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.portal-news-summary-inline {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.portal-section-head-compact {
  margin-bottom: 10px;
}

.portal-lower .portal-section-head {
  padding-left: 8px;
}

.portal-section-head-tightest {
  margin-bottom: 6px;
}

.publication-card,
.team-entry,
.news-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.publication-card:hover,
.team-entry:hover,
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.08);
  border-color: #d7e6f7 !important;
}

.publication-card h3,
.team-entry-body a {
  word-break: break-word;
}

.team-entry-body {
  min-width: 0;
}

.team-entry-body a,
.team-entry-body div {
  overflow-wrap: anywhere;
}

.publication-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.publication-star {
  color: #d4a017;
  line-height: 1.1;
  flex: 0 0 auto;
}

.person-detail-photo,
.publication-thumb,
.team-entry-photo {
  background: #eef3f8;
}

.person-detail-layout {
  max-width: 100%;
  overflow: hidden;
}

.person-detail-body {
  min-width: 0;
  max-width: 100%;
}

.person-contact-line,
.person-detail-body p,
.person-links,
.person-links a,
.person-detail-body a {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.paper-detail-page .btn {
  min-width: 206px;
}

.paper-detail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.paper-detail-title {
  margin: 0;
  text-align: left;
  flex: 1;
}

.paper-download-inline {
  color: #7f8c9b;
  font-size: 0.9rem;
  white-space: nowrap;
}

.paper-links-row a {
  text-decoration: none;
}

.paper-links-row a:hover {
  text-decoration: underline;
}

.paper-detail-page .paper-action-row {
  margin-top: 18px !important;
}

.resource-include-note {
  margin: -4px 0 0;
  color: var(--text-light);
  font-size: 0.86rem;
  text-align: center;
}

.person-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.person-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(145deg, #f7fbff 0%, #eef5fd 100%);
  border: 1px solid #dce8f3;
  color: #4b6480;
  font-size: 0.84rem;
  font-weight: 700;
}

.publication-year-group {
  margin-bottom: 26px;
}

/* Research Focus Text Contrast Fix - Improved for both modes */
.portal-highlight-card p,
.portal-highlight-card h4,
.portal-highlight-index {
  color: #2d3748 !important; /* Dark grey for light mode */
}

[data-theme='dark'] .portal-highlight-card p,
[data-theme='dark'] .portal-highlight-card h4,
[data-theme='dark'] .portal-highlight-index {
  color: #f9fafb !important; /* Off-white for dark mode */
}

/* Fix People/Detail White Block Issues */
.person-detail-layout,
.team-entry,
.person-tag-pill {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
}

/* Ensure Research Focus Trigger visibility */
.portal-highlight-trigger {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe7f3;
  background: #f8fbff;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

[data-theme='dark'] .portal-highlight-trigger {
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe7f3;
  background: #f8fbff;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

/* Restore Portal Lower Layout for index page */
.portal-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 20px;
}

.portal-section-container {
  margin-bottom: 24px;
}

.publication-year-heading {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dbe5f0;
  font-size: 1.4rem;
}

.publication-empty {
  text-align: left;
  color: var(--text-light);
  font-size: 0.98rem;
  margin: 0 0 18px;
}

.publications-page {
  max-width: 940px;
  margin: 0 auto;
  text-align: left;
}

.publications-head {
  margin-bottom: 16px;
}

.publications-access-note {
  margin-bottom: 26px;
}

.sources-page {
  max-width: 940px;
  margin: 0 auto;
  text-align: left;
}

.sources-head {
  margin-bottom: 16px;
}

.sources-access-note {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: 0 10px 22px rgba(44, 62, 80, 0.06);
}

.sources-access-note p {
  margin: 0;
  text-align: left;
  color: var(--text);
  font-size: 0.95rem;
}

.sources-access-note .portal-inline-link {
  display: inline-block;
  margin-top: 12px;
}

.sources-access-note .portal-user-line {
  margin-top: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.sources-list {
  display: grid;
  gap: 14px;
}

.source-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: 0 12px 26px rgba(44, 62, 80, 0.08);
}

.source-card-meta {
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-card-title {
  margin: 6px 0;
  color: var(--primary);
  font-size: 1.08rem;
  line-height: 1.35;
}

.source-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.source-card-star {
  margin-top: 2px;
}

.source-card-authors {
  margin: 0;
  text-align: left;
  color: var(--text);
  font-size: 0.94rem;
}

.source-kind-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.source-kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 700;
}

.source-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.source-open-btn {
  min-width: 150px;
  margin-top: 0;
  padding: 10px 18px;
}

.news-list {
  display: grid;
  gap: 18px;
}

.news-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.news-card-pinned {
  border-color: #b9d4f5 !important;
}

.news-pin-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.1);
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-card-image-link {
  display: block;
  min-height: 180px;
  background: #e9f0f7;
}

.news-card-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.news-card-body {
  padding: 18px 20px;
}

.news-detail-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  margin-bottom: 18px;
  background: #e9f0f7;
}

.news-detail-summary {
  font-size: 1.06rem;
  color: #4b5f73;
  margin-bottom: 12px;
}

.news-detail-content {
  white-space: pre-wrap;
  color: var(--text);
}

footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
  color: var(--text-light);
  font-size: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.78fr);
  gap: 26px;
  align-items: stretch;
}

.footer-left {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-right: 8px;
}

.footer-right {
  text-align: right;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 420px;
  justify-self: end;
  align-self: stretch;
  justify-content: flex-end;
}

.footer-text {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}

.separator {
  margin: 0 8px;
  color: #cbd5e0;
}

.footer-meta {
  color: var(--text-light);
  padding-left: 2px;
  line-height: 1.35;
}

.footer-credit {
  margin-top: 3px;
  font-size: 0.76rem;
  opacity: 0.72;
}

.footer-version {
  opacity: 0.75;
}

.footer-credit a {
  color: inherit;
  text-decoration: none;
}

.footer-credit a:hover {
  color: inherit;
  text-decoration: underline;
}

.footer-links-strip {
  display: grid;
  grid-template-columns: repeat(4, 44px);
  gap: 10px;
  width: fit-content;
}

.footer-link-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(209, 221, 235, 0.65);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.footer-link-card:hover {
  border-color: rgba(152, 182, 214, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(36, 61, 87, 0.08);
}

.footer-link-image,
.footer-link-fallback {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
}

.footer-link-image {
  object-fit: contain;
}

.footer-link-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b6480;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: transparent;
  border: 1px solid rgba(209, 221, 235, 0.65);
}

footer a:not(.footer-link-card) {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:not(.footer-link-card):hover {
  color: var(--accent);
  text-decoration: underline;
}

.photon-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(123,44,245,0.26) 0%, rgba(26,115,232,0.12) 58%, rgba(255,255,255,0) 72%);
  box-shadow: 0 0 6px rgba(26,115,232,0.1);
  transform: translate(-50%, -50%) scale(0.35);
  animation: photonTrailPulse 320ms ease-out forwards;
  z-index: 9998;
}

.photon {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(123,44,245,0.9) 0%, rgba(26,115,232,0.6) 50%, rgba(255,255,255,0) 70%);
  box-shadow: 0 0 12px rgba(123,44,245,0.5), 0 0 24px rgba(26,115,232,0.35);
  transform: translate(-50%, -50%) scale(0);
  animation: photonPulse 600ms ease-out forwards;
  z-index: 9999;
}

@keyframes photonPulse {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
  70% { opacity: 0.25; }
  100% { transform: translate(-50%, -50%) scale(16); opacity: 0; }
}

@keyframes photonTrailPulse {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.32; }
  100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
}

@keyframes linkNudge {
  0% { transform: translate3d(0, 0, 0); }
  28% { transform: translate3d(1px, 0, 0); }
  52% { transform: translate3d(-1px, 0, 0); }
  76% { transform: translate3d(1px, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@media (hover: hover) and (pointer: fine) {
  a.link-hover-cue.is-wiggling:not(.footer-link-card) {
    animation: linkNudge 220ms ease 1;
  }

  .footer-link-card.link-hover-cue.is-wiggling .footer-link-image,
  .footer-link-card.link-hover-cue.is-wiggling .footer-link-fallback {
    animation: linkNudge 220ms ease 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photon,
  .photon-trail {
    display: none;
    animation: none !important;
  }

  a.link-hover-cue.is-wiggling:not(.footer-link-card),
  .footer-link-card.link-hover-cue.is-wiggling .footer-link-image,
  .footer-link-card.link-hover-cue.is-wiggling .footer-link-fallback {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .portal-slide {
    grid-template-columns: 1fr;
  }

  .portal-slide-media {
    background: #ffffff;
    min-height: 368px;
  }
}

@media (max-width: 700px) {
  .container {
    margin: 16px auto 28px;
  }

  .site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 4px 20px;
  flex-wrap: wrap;
}

  .site-brand-subtitle {
    white-space: normal;
  }

  .main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  margin-left: auto;
  padding-right: 0;
  flex-shrink: 0;
}

  .admin-return-link {
    margin-left: 0;
  }

  .content-card {
    padding: 22px 18px 44px;
  }

  .portal-hero {
    height: auto;
    min-height: auto;
  }

  .portal-hero-content {
    padding: 26px 20px 24px;
  }

  .portal-hero-title {
    font-size: 2rem;
  }

  .portal-hero-tags {
    gap: 8px;
  }

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

  .portal-highlight-nav {
    height: auto;
    grid-template-rows: none;
  }

  .portal-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-highlight-display {
    height: auto;
    min-height: 0;
  }

  .portal-highlight-card {
    position: relative;
    display: none;
    min-height: 0;
    height: auto;
  }

  .portal-highlight-card.is-active {
    display: block;
  }

  .portal-slide-content {
    padding: 20px 18px 18px;
  }

  .portal-carousel-track {
    height: auto;
    min-height: 0;
  }

  .portal-slide {
    height: auto;
  }

  .portal-side-stats {
    grid-template-columns: 1fr;
  }

  .portal-lower {
    grid-template-columns: 1fr;
  }

  .portal-join-card {
    padding: 18px 16px;
  }

  .portal-join-directions {
    grid-template-columns: 1fr;
  }

  .paper-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .publication-card {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .publication-thumb {
    width: 100% !important;
    max-width: 240px;
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .publication-card-body p,
  .publication-card-body h3 {
    text-align: left;
  }

  .news-card-image {
    min-height: 220px;
  }

  .team-grid {
    display: block !important;
  }

  .team-entry {
    flex: 1 1 100% !important;
    margin-bottom: 14px;
    width: 100%;
    max-width: 100%;
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start !important;
    gap: 12px !important;
  }

  .team-entry-photo {
    width: 82px !important;
    height: 82px !important;
  }

  .team-entry-body {
    min-width: 0;
    width: 100%;
  }

  .person-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .person-detail-layout p,
  .person-links {
    text-align: left !important;
  }

  .person-detail-photo {
    width: 100% !important;
    max-width: 240px;
    height: auto !important;
    aspect-ratio: 1 / 1;
  }

  .paper-action-row,
  .paper-links-row {
    flex-direction: column;
    align-items: stretch;
  }

  .paper-detail-page p {
    text-align: left;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    grid-template-columns: 1fr;
  }

  .footer-left,
  .footer-right {
    text-align: center;
    align-items: center;
    justify-self: stretch;
  }

  .footer-links-strip {
    grid-template-columns: repeat(4, 44px);
    width: fit-content;
    justify-content: center;
  }

  .footer-link-card {
    width: 44px;
  }
}

@media (max-width: 820px) {
  .container {
    margin: 16px auto 28px;
    padding: 0 18px;
  }

  .content-card-home {
    width: auto;
    margin-inline: 0;
  }

  .home-page {
    margin-inline: -4px;
  }

  .site-topbar {
    position: relative;
    align-items: center;
    gap: 14px;
    padding: 14px 0 18px;
  }

  .site-brand {
    flex: 1;
    gap: 12px;
  }

  .site-brand-logo {
    width: 52px;
    height: 52px;
  }

  .site-brand-name {
    font-size: 1.02rem;
  }

  .site-brand-subtitle {
    white-space: normal;
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .site-mobile-controls {
    display: inline-flex;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    margin-left: 0;
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(36, 61, 87, 0.12);
    backdrop-filter: blur(12px);
  }

  [data-theme='dark'] .main-nav {
    background: rgba(17, 24, 39, 0.96);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 10px 4px;
    font-size: 1rem;
    line-height: 1.25;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav .theme-toggle {
    display: none;
  }

  .lang-switch {
    display: flex;
    gap: 10px;
    margin-left: 0;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
  }

  .admin-return-link {
    margin-left: 0;
    order: 4;
  }

  .content-card {
    padding: 22px 18px 44px;
  }

  .portal-hero {
    height: auto;
    min-height: 0;
    margin-bottom: 18px;
  }

  .portal-hero-content {
    height: auto;
    padding: 24px 18px 20px;
  }

  .portal-hero-main {
    grid-template-columns: 1fr;
    gap: 18px;
    height: auto;
  }

  .portal-hero-copy,
  .portal-hero-side {
    max-width: none;
    height: auto;
  }

  .portal-hero-brand-visual {
    display: none;
  }

  .portal-hero-brand-fallback {
    display: block;
  }

  .portal-hero-side {
    justify-content: stretch;
  }

  .portal-hero-panel {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 18px;
  }

  .portal-hero-panel-label {
    margin-bottom: 10px;
  }

  .portal-hero-title {
    font-size: clamp(1.95rem, 8vw, 2.6rem);
  }

  .portal-hero-subtitle {
    font-size: 1rem;
  }

  .portal-hero-full-name {
    font-size: 0.96rem;
  }

  .portal-hero-summary {
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .portal-highlights-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .portal-highlight-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .portal-highlight-trigger,
  .portal-hero-panel .portal-highlight-trigger {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 86px;
    padding: 10px 11px;
    font-size: clamp(0.8rem, 3.35vw, 0.92rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .portal-highlight-display {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .portal-highlight-card {
    padding: 18px 18px 16px;
    overflow: visible;
  }

  .portal-highlight-card h4 {
    min-height: 0;
    font-size: 1.08rem;
  }

  .portal-highlight-card p {
    max-height: none;
    overflow: visible;
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .portal-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-section-head h3 {
    font-size: 1.12rem;
  }

  .portal-carousel-track {
    height: auto;
    min-height: 0;
  }

  .portal-slide {
    height: auto;
  }

  .portal-slide-media {
    min-height: 220px;
    padding: 16px 16px 0;
    align-items: flex-start;
  }

  .portal-slide-image {
    max-height: 260px;
  }

  .portal-slide-content {
    padding: 18px 18px 16px;
    overflow: visible;
  }

  .portal-slide-title {
    font-size: 1.12rem;
  }

  .portal-slide-summary {
    line-height: 1.6;
    max-height: calc(1.6em * 4);
  }

  .portal-carousel-dots {
    padding: 10px 16px 16px;
  }

  .portal-lower {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .portal-about-card {
    padding: 18px 18px 20px;
  }

  .portal-side-card,
  .portal-latest-news-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .portal-about-body,
  .portal-side-text,
  .portal-user-line {
    font-size: 0.96rem;
  }

  .source-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .source-card-actions {
    align-items: stretch;
  }

  .source-open-btn {
    width: 100%;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    text-align: center;
    align-items: center;
    justify-self: stretch;
    max-width: none;
    padding-right: 0;
  }

  .footer-links-strip {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .home-page {
    margin-inline: -2px;
  }

  .site-brand-logo {
    width: 46px;
    height: 46px;
  }

  .site-brand-name {
    font-size: 0.96rem;
  }

  .team-entry {
    grid-template-columns: 70px minmax(0, 1fr);
    padding: 10px !important;
  }

  .team-entry-photo {
    width: 70px !important;
    height: 70px !important;
  }

  .site-brand-subtitle {
    font-size: 0.8rem;
  }

  .content-card {
    padding: 18px 14px 40px;
  }

  .portal-hero-content {
    padding: 22px 16px 18px;
  }

  .portal-hero-title {
    font-size: 1.82rem;
  }

  .portal-hero-full-name {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .portal-highlight-trigger,
  .portal-hero-panel .portal-highlight-trigger {
    min-height: 78px;
    padding: 9px 10px;
    font-size: 0.82rem;
  }

  .portal-slide-media {
    min-height: 190px;
    padding: 14px 14px 0;
  }

  .portal-slide-content,
  .portal-about-card,
  .portal-side-card,
  .portal-latest-news-card {
    padding-left: 14px;
    padding-right: 14px;
  }
}












/* Settings Menu Styles */
.settings-container {
  position: relative;
  margin-left: 10px;
}
.settings-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 8px;
}
.settings-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 8px;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 120px;
}
.settings-dropdown.is-open {
  display: block;
}
.settings-item {
  display: block;
  padding: 5px 0;
  color: var(--text);
  text-decoration: none;
}
