
:root {
  --app-bg: #e9eff4;
  --surface: rgba(255, 255, 255, 0.3);
  --surface-strong: rgba(255, 255, 255, 0.42);
  --surface-soft: rgba(255, 255, 255, 0.34);
  --surface-card: rgba(255, 255, 255, 0.18);
  --overlay: rgba(246, 249, 252, 0.22);
  --hero-panel: rgba(255, 255, 255, 0.12);
  --border: rgba(16, 33, 60, 0.14);
  --border-strong: rgba(16, 33, 60, 0.22);
  --text: #213042;
  --text-soft: rgba(33, 48, 66, 0.88);
  --text-faint: rgba(33, 48, 66, 0.68);
  --brand: #12395f;
  --brand-soft: rgba(0, 86, 179, 0.12);
  --accent: #0056b3;
  --success: #23c55e;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.1);
  --radius-hero: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --hero-shift: 0px;
  --page-shift: 0px;
}

html.dark {
  --app-bg: #09111a;
  --surface: rgba(8, 16, 26, 0.24);
  --surface-strong: rgba(8, 16, 26, 0.34);
  --surface-soft: rgba(8, 16, 26, 0.28);
  --surface-card: rgba(8, 16, 26, 0.18);
  --overlay: rgba(6, 12, 20, 0.16);
  --hero-panel: rgba(8, 16, 26, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #edf4fb;
  --text-soft: rgba(237, 244, 251, 0.88);
  --text-faint: rgba(237, 244, 251, 0.68);
  --brand: #f3f7fb;
  --brand-soft: rgba(138, 188, 255, 0.16);
  --accent: #8abcff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--app-bg);
}
body {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: transparent;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: -6vh -4vw;
  z-index: -2;
  background-image: url('./images/hub_hero.webp');
  background-size: cover;
  background-position: center center;
  transform: translate3d(0, var(--page-shift), 0) scale(1.1);
  transform-origin: center;
  will-change: transform;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.1)),
    radial-gradient(circle at top left, rgba(255,255,255,0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.14), transparent 26%);
  pointer-events: none;
}
html.dark body::after {
  background:
    linear-gradient(180deg, rgba(3,8,14,0.24), rgba(3,8,14,0.12)),
    radial-gradient(circle at top left, rgba(3,8,14,0.2), transparent 30%),
    radial-gradient(circle at bottom right, rgba(3,8,14,0.14), transparent 26%);
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

.topbar {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 3000;
  padding: 0 20px;
}
.topbar-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 56px;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.topbar.scrolled .topbar-inner {
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.brand-main {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  color: var(--brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  color: var(--text-faint);
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 86, 179, 0.3);
  color: var(--brand);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 160ms ease, transform 160ms ease;
}
.header-cta:hover {
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.24);
  color: var(--brand);
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.theme-toggle:hover { background: var(--brand-soft); }
.theme-toggle svg {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  margin: auto;
  transition: opacity 180ms ease, transform 180ms ease;
}
.icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.icon-sun { opacity: 0; transform: rotate(-18deg) scale(0.92); }
html.dark .icon-moon { opacity: 0; transform: rotate(18deg) scale(0.92); }
html.dark .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }

.brand-link:focus-visible,
.header-cta:focus-visible,
.theme-toggle:focus-visible,
.article-card:focus-visible,
.modal-close:focus-visible,
.ghost-btn:focus-visible,
.send-btn:focus-visible,
.back-to-top:focus-visible,
.footer-sub a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
}
.hub-main {
  padding: 118px 0 48px;
}
.hub-hero {
  position: relative;
  min-height: 360px;
  margin-bottom: 26px;
  padding: clamp(28px, 5vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  border-radius: var(--radius-hero);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.06));
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
html.dark .hub-hero {
  background: linear-gradient(180deg, rgba(8,16,26,0.16), rgba(8,16,26,0.08));
}
.hero-parallax,
.hero-overlay,
.glass-panel,
.hero-text {
  display: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hub-title {
  margin: 0 0 14px;
  max-width: 13ch;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--brand);
  text-wrap: balance;
}
.hub-lead {
  margin: 0;
  max-width: 72ch;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.reading-section { margin-top: 6px; }
.reading-head { margin-bottom: 16px; }
.reading-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.reading-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(35, 197, 94, 0.18);
  animation: pulseDot 1.4s infinite;
}
.reading-count { color: var(--text-soft); font-weight: 800; }
@keyframes pulseDot {
  0%, 45% { opacity: 1; transform: scale(1); }
  55%, 100% { opacity: 0.35; transform: scale(0.92); }
}

.article-stack {
  display: grid;
  gap: 22px;
}
.article-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(18px) saturate(126%);
  -webkit-backdrop-filter: blur(18px) saturate(126%);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.2);
}
html.dark .article-card:hover { background: rgba(8, 16, 26, 0.22); }
.article-thumb {
  min-height: 196px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.article-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.article-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 10px;
  color: var(--text-faint);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-date,
.article-tags {
  display: inline-flex;
  align-items: center;
}
.article-title {
  margin: 0 0 10px;
  font-size: clamp(1.32rem, 2vw, 1.7rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--brand);
}
.article-summary {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.68;
}
.article-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.2);
  font-weight: 800;
  color: var(--brand);
}
.article-open::after {
  content: '→';
  font-size: 1.02rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 16, 26, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(760px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.modal-kicker {
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 800;
}
.modal-title {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  letter-spacing: -0.03em;
}
.modal-close {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.28);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--brand);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.full { grid-column: 1 / -1; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--brand);
}
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.28);
  color: var(--text);
}
.input::placeholder { color: var(--text-faint); }
.input:focus {
  outline: 2px solid rgba(0,86,179,0.18);
  border-color: var(--accent);
}
.consent-wrap { margin-top: 2px; }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  line-height: 1.52;
}
.form-error {
  display: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.16);
}
.form-error.show { display: block; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.ghost-btn,
.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.ghost-btn {
  background: rgba(255,255,255,0.18);
  color: var(--brand);
}
.send-btn {
  background: var(--brand);
  color: white;
  border-color: transparent;
  font-weight: 800;
}
.send-btn[disabled] { opacity: 0.7; cursor: wait; }
.send-btn.success { background: #15803d; }
.modal-note {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2800;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--brand);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.footer {
  width: min(100% - 40px, 1120px);
  margin: 0 auto 22px;
  padding: 16px 18px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.24);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow-soft);
}
.footer-mainline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  color: var(--text-soft);
  text-align: center;
  font-size: 0.95rem;
}
.footer-motto { white-space: nowrap; }
.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.footer-logo-wrap img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.footer-divider {
  margin: 12px 0 10px;
  border-top: 1px solid var(--border);
}
.footer-sub {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
}
.footer-sub a:hover { color: var(--brand); }


@media (max-width: 900px) {
  .article-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .article-thumb { min-height: 200px; }
  .footer-mainline {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.9rem;
  }
  .footer-motto { white-space: normal; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 12px; top: 10px; }
  .topbar-inner { padding: 10px 12px; gap: 12px; }
  .brand-main { font-size: 0.82rem; }
  .brand-sub { font-size: 0.6rem; }
  .header-cta { padding: 7px 10px; font-size: 0.9rem; }
  .container { width: min(100% - 24px, 1120px); }
  .hub-main { padding-top: 98px; }
  .hub-hero {
    min-height: 300px;
    padding: 24px 20px;
    border-radius: 28px;
  }
  .hub-title { font-size: clamp(1.82rem, 10vw, 2.5rem); max-width: 100%; }
  .hub-lead { line-height: 1.62; }
  .reading-title { font-size: 0.76rem; letter-spacing: 0.08em; }
  .article-card { padding: 16px; border-radius: 22px; }
  .article-thumb {
    min-height: 196px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .brand-copy { max-width: 100%; }
  .footer-mainline {
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.5;
  }
  .footer-sep { display: none; }
}


/* Shared contact modal UI aligned with working article pages */



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

