:root {
  --mbsj-bg: #0f172a;
  --mbsj-panel: rgba(255, 255, 255, 0.04);
  --mbsj-border: rgba(255, 255, 255, 0.12);
  --mbsj-accent: linear-gradient(135deg, #5ce1e6 0%, #7c7bff 100%);
  --mbsj-text: #e9f0ff;
  --mbsj-subtext: #b9c4de;
  --mbsj-strong: #fdfdff;
}

body.dark-page {
  background: radial-gradient(circle at 10% 20%, rgba(124, 123, 255, 0.14), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(92, 225, 230, 0.16), transparent 30%),
              var(--mbsj-bg);
  color: var(--mbsj-text);
}

body.dark-page a {
  color: #9ad8ff;
}

body.dark-page #main {
  background: transparent;
}

body.dark-page #container {
  max-width: 1220px;
  width: 96%;
  background: transparent;
  padding: 12px 18px 0 18px;
}

body.dark-page #header h1,
body.dark-page #header h2 a {
  color: var(--mbsj-strong);
}

body.dark-page #contents {
  color: var(--mbsj-text);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

body.dark-page hr.line {
  display: none;
}

body.dark-page #contents h2 {
  margin: 0 0 12px 0;
  padding: 0;
  font-size: 22px;
  color: var(--mbsj-strong);
  background: none;
  border: none;
  height: auto;
}

.section-title {
  margin: 0 0 12px 0;
  font-size: 22px;
  color: var(--mbsj-strong);
}

body.dark-page #contents h3 {
  margin: 10px 0 8px 0 !important;
  padding: 0 !important;
  font-size: 17px !important;
  color: var(--mbsj-strong) !important;
  background: none !important;
  border: none !important;
}

.hero,
.mbsj-hero {
  background: linear-gradient(145deg, rgba(124, 123, 255, 0.35), rgba(92, 225, 230, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(5px);
  margin-bottom: 24px;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d8e5ff;
  font-size: 12px;
  margin: 0 0 8px;
}

.hero-title {
  font-size: 28px;
  margin: 0 0 10px;
  color: var(--mbsj-strong);
}

.hero-lede {
  margin: 0 0 18px;
  color: var(--mbsj-subtext);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-solid,
.btn-ghost,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-solid {
  background: var(--mbsj-accent);
  color: #0b1220;
  box-shadow: 0 12px 30px rgba(92, 225, 230, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--mbsj-strong);
}

.btn-line {
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--mbsj-strong);
  background: rgba(255, 255, 255, 0.02);
}

.btn-solid:hover,
.btn-ghost:hover,
.btn-line:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  border-radius: 999px;
  color: #dbe7ff;
  font-size: 13px;
}

.panel,
.mbsj-panel {
  background: var(--mbsj-panel);
  border: 1px solid var(--mbsj-border);
  border-radius: 14px;
  padding: 18px 16px;
  margin: 12px 0 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.panel .social-links,
.mbsj-panel .social-links {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.panel .social-links a,
.mbsj-panel .social-links a {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 10px 0 24px;
}

.card,
.mbsj-card {
  background: var(--mbsj-panel);
  border: 1px solid var(--mbsj-border);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.card.accent,
.mbsj-card.accent {
  background: linear-gradient(145deg, rgba(124, 123, 255, 0.22), rgba(92, 225, 230, 0.18));
  border-color: rgba(255, 255, 255, 0.22);
}

.card.wide,
.mbsj-card.wide {
  margin: 14px 0;
}

.card.note,
.mbsj-card.note {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.card-header h3 {
  margin: 0;
  color: var(--mbsj-strong);
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d6e3ff;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.pill.muted {
  background: rgba(255, 255, 255, 0.08);
  color: #b4c4de;
}

.card-text {
  margin: 0 0 12px;
  color: var(--mbsj-subtext);
  line-height: 1.6;
}

.contact-panel {
  background: linear-gradient(135deg, rgba(92, 225, 230, 0.12), rgba(124, 123, 255, 0.12));
  border-style: dashed;
}

.contact-panel p {
  margin: 0;
}

.timeline {
  position: relative;
  padding-left: 30px;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #5ce1e6, #7c7bff);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  display: flex;
  align-items: flex-start;
}

.timeline-date {
  min-width: 100px;
  font-weight: bold;
  color: #a8c8ff;
  font-size: 14px;
  margin-right: 20px;
  text-align: right;
  padding-top: 5px;
}

.timeline-content {
  position: relative;
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 15px;
  margin-left: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(255, 255, 255, 0.05);
}

.timeline-marker {
  position: absolute;
  left: -46px;
  top: 15px;
  width: 12px;
  height: 12px;
  background: #7c7bff;
  border: 3px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timeline-marker.award {
  background: #ffd700;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.timeline-marker.conference {
  background: #62b9b4;
  box-shadow: 0 2px 8px rgba(98, 185, 180, 0.4);
}

.timeline-marker.publication {
  background: #ff7f50;
  box-shadow: 0 2px 8px rgba(255, 127, 80, 0.4);
}

.timeline-content p {
  margin: 0;
  line-height: 1.6;
  color: var(--mbsj-text);
}

.subsection + .subsection {
  margin-top: 14px;
}

.panel ul,
.panel p {
  color: var(--mbsj-text);
}

@media (max-width: 640px) {
  .hero,
  .mbsj-hero {
    padding: 22px 18px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .timeline {
    padding-left: 20px;
  }

  .timeline-item {
    flex-direction: column;
  }

  .timeline-date {
    text-align: left;
    margin-bottom: 10px;
    margin-right: 0;
  }

  .timeline-content {
    margin-left: 0;
  }

  .timeline-marker {
    left: -36px;
  }
}
