:root {
  --bg: #ffffff;
  --text: #1b2838;
  --text-muted: #5a6b7d;
  --panel: #f2f4f6;
  --overlay: #ffffff;
  --accent: #3d5a80;
  --border: #e2e6ea;
  --header-h: 72px;
  --gutter: clamp(16px, 3vw, 32px);
  --serif: "Libre Baskerville", "Times New Roman", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

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

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: transform 0.3s ease, background 0.3s ease;
}

.site-header.hidden { transform: translateY(-100%); }

.site-header.over-hero {
  background: transparent;
  color: var(--overlay);
}

.site-header.solid {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: 0.06em;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-link:hover { opacity: 1; }

.nav-link.workspace {
  border: 1px solid currentColor;
  padding: 6px 14px;
  opacity: 1;
}

/* Language switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 2px;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.lang-btn:hover,
.lang-btn.active { opacity: 1; }

.lang-divider {
  opacity: 0.35;
  font-size: 10px;
  user-select: none;
}

.site-header.solid .lang-btn { color: var(--text); }

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s;
}

/* ── Menu overlay ── */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.menu-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
}

.menu-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
}

.menu-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.menu-nav a {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.menu-nav a:hover { opacity: 0.5; }

/* ── LEARNING login modal ── */
.learning-login-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.learning-login-modal.open {
  opacity: 1;
  visibility: visible;
}
.learning-login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.learning-login-panel {
  position: relative;
  width: min(420px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 28px 24px 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
.learning-login-panel h2 {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  font-weight: 400;
  margin-bottom: 8px;
}
.learning-login-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.45;
}
.learning-login-panel label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.learning-login-panel input[type="password"],
.learning-login-panel input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  margin-bottom: 12px;
}
.learning-login-panel input[type="password"]:focus,
.learning-login-panel input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.learning-login-error {
  color: #b91c1c;
  font-size: 13px;
  margin: 0 0 12px;
}
.learning-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.learning-login-cancel,
.learning-login-submit {
  border: 1px solid var(--border);
  background: #fff;
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.learning-login-submit {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.learning-login-cancel:hover { background: var(--panel); }
.learning-login-submit:hover { opacity: 0.9; }
.learning-login-submit:disabled { opacity: 0.55; cursor: wait; }

/* ── Hero ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media-static {
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 45%, #334155 100%);
}

.hero-media img,
.hero-media video,
.hero-media iframe.hero-video {
  border: 0;
}

.hero-media .hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-media iframe.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-media iframe.hero-video.is-playing {
  opacity: 1;
}

.hero-media:has(iframe.hero-video.is-playing) .hero-poster {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-cta {
  position: absolute;
  bottom: var(--gutter);
  right: var(--gutter);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--overlay);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  z-index: 2;
}

.hero-cta:hover { opacity: 0.75; }

.hero-cta .chevron { font-size: 16px; }

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.15) 0%,
    rgba(15, 23, 42, 0.45) 55%,
    rgba(15, 23, 42, 0.72) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Video modal */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.video-modal.open {
  opacity: 1;
  visibility: visible;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.video-modal-content {
  position: relative;
  width: min(960px, 92vw);
  z-index: 1;
}

.video-modal-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

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

.video-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

/* ── Discovery grid ── */
.discovery {
  padding: var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--panel);
}

.card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media { transform: scale(1.02); }

.card-label {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--overlay);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.card-text {
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  height: 100%;
}

.card-text .card-label {
  position: static;
  color: var(--text-muted);
  text-shadow: none;
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  line-height: 1.35;
}

.card-excerpt {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 42ch;
}

.card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.2s;
}

.card-journal-video {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 320px;
  cursor: default;
}

.card-journal-video .card-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.card-journal-video .card-video-embed {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-journal-video .card-video-embed iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.card-journal-video:has(iframe.is-playing) .card-video-poster {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.card-journal-video .card-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    transparent 35%,
    transparent 55%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
}

.card-journal-video .card-label {
  position: static;
  color: var(--overlay);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.card-journal-video .card-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--overlay);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  margin-top: auto;
}

.card-workspace-video {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 320px;
  cursor: default;
}

.card-workspace-video .card-video-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card-workspace-video .card-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    transparent 40%
  );
  pointer-events: none;
}

.card-workspace-video .card-label {
  position: static;
  color: var(--overlay);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Grid spans */
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.row-tall { min-height: 420px; }
.row-med { min-height: 320px; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(40px, 6vw, 72px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  font-size: 14px;
  transition: opacity 0.2s;
}

.footer-col a:hover { opacity: 0.5; }

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom p {
  margin: 0;
  display: block;
}

.footer-bottom .footer-credit {
  margin-top: 6px;
  color: var(--text-muted);
  opacity: 0.85;
}

/* ── Workspace login ── */
.workspace-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.workspace-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 32px) var(--gutter) 48px;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 8px;
}

.login-card .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 15px;
  background: transparent;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: var(--text); }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}

.btn-primary:hover { opacity: 0.85; }

.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.form-error {
  font-size: 13px;
  color: #c0392b;
  margin-top: 12px;
  display: none;
}

.form-error.visible { display: block; }

/* ── Workspace dashboard placeholder ── */
.workspace-dashboard {
  padding: calc(var(--header-h) + 32px) var(--gutter) 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.workspace-dashboard h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gutter);
  margin-top: 40px;
}

.dept-card {
  border: 1px solid var(--border);
  padding: 28px;
  transition: border-color 0.2s;
}

.dept-card:hover { border-color: var(--text); }

.dept-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
}

.dept-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 6; }
}

@media (max-width: 768px) {
  .header-actions .nav-link:not(.workspace) { display: none; }
  .lang-switch { margin-right: 4px; }

  .discovery { grid-template-columns: 1fr; }
  .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: span 1; }

  .row-tall, .row-med { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
