:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #172b4d;
  --muted: #6b778c;
  --primary: #0d47a1;
  --primary-dark: #003c8f;
  --accent: #1e88e5;
  --card-border: #dfe1e6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

.container {
  padding: 3rem 1.5rem;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid #dfe1e6;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.85;
}

nav a:hover {
  opacity: 1;
  color: var(--primary);
}

.hero {
  min-height: 68vh;
  display: grid;
  place-items: center;
  color: var(--text);
  padding-top: 4rem;
  background: #f6f8fb;
}

.hero-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

.hero-title-row {
  padding: 0.75rem 0;
}

.hero-title-row h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
  color: #0d1f4a;
}

.hero-authors {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: #0d1f4a;
}

.hero-affiliations {
  margin: 0;
  font-size: 0.98rem;
  color: #334e6e;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.hero-media-wide {
  width: 100%;
}

.hero-media-wide img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #dfe1e6;
}

.hero-media-wide video {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #dfe1e6;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-content h1 {
  margin: 0 0 1rem;
  line-height: 1.1;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  color: #0d1f4a;
}

.hero p {
  color: var(--muted);
  max-width: 44rem;
}

.hero-abstract {
  background: #ffffff;
  border: 1px solid #dfe1e6;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

.hero-video-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0.2rem 0 1rem;
}

.hero-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.hero-video-grid video {
  width: 100%;
  border-radius: 0;
  border: 0;
  background: #000;
}

.hero-abstract h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: #0d1f4a;
}

.hero-abstract p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero-media img {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(135, 151, 179, 0.25);
}

.btn,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #10161f;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-weight: 700;
  text-decoration: none;
  margin-top: 1rem;
}

.btn-secondary {
  background: rgba(56, 189, 248, 0.2);
  color: var(--text);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.hero-quick-links .btn {
  margin-top: 0;
  background: #3d3f45;
  color: #ffffff;
  padding: 0.72rem 1.2rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hero-quick-links .btn:hover {
  background: #2f3136;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.hero-quick-links .btn-coming-soon {
  background: #4a4c52;
  color: #ffffff;
  cursor: default;
  pointer-events: none;
  opacity: 0.88;
}

.icon-btn {
  gap: 0.55rem;
  line-height: 1;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
}

.section {
  padding: 0;
}

.section .container {
  padding-top: 1.5rem;
  padding-bottom: 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #0d1f4a;
}

.cards-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(5, 13, 26, 0.06);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  color: #0d1f4a;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 1;
}

.feature-list li {
  margin-bottom: 0.6rem;
  padding-left: 1.2rem;
  position: relative;
}

.feature-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.8rem;
}

.grid-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-gallery.two-per-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-card {
  border: 1px solid var(--card-border);
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  padding: 0.8rem;
  box-shadow: 0 1px 2px rgba(5, 13, 26, 0.06);
}

.demo-container {
  width: min(1100px, 100%);
}

.exp1-header {
  margin-bottom: 0.9rem;
}

.exp1-header h2 {
  margin: 0;
  font-size: 2rem;
  color: #0d1f4a;
}

.exp1-underline {
  width: 100%;
  height: 3px;
  margin-top: 0.6rem;
  background: #f37a1f;
}

.exp1-two {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.exp1-block {
  padding: 0.2rem;
}

.exp1-block-label {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 1.95rem;
  font-family: Georgia, "Times New Roman", serif;
  color: #101010;
  font-weight: 500;
}

.exp1-block-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  grid-template-areas:
    "gif xy"
    "gif traj";
  gap: 0.6rem;
  align-items: stretch;
}

.exp1-card {
  margin: 0;
  border: 1px solid #8d939e;
  background: #f4f4f4;
  overflow: hidden;
}

.exp1-card img {
  display: block;
  width: 100%;
  height: auto;
}

.exp1-item-gif img {
  height: 320px;
  width: 100%;
  object-fit: cover;
}

.exp1-item-gif {
  grid-area: gif;
  height: 100%;
}

.exp1-item-xy img,
.exp1-item-traj img {
  height: 157px;
  width: 100%;
  object-fit: cover;
}

.exp1-item-xy {
  grid-area: xy;
}

.exp1-item-traj {
  grid-area: traj;
}

.experiment {
  margin-bottom: 2rem;
  padding: 1.2rem;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(13, 23, 42, 0.08);
}

.experiment-title,
.slide-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid #f37a1f;
  padding-bottom: 0.4rem;
  color: #0d1f4a;
}

.experiment-subtitle {
  margin: 1.1rem 0 0.6rem;
  font-size: 1.35rem;
  color: #0d1f4a;
}

.experiment-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(270px, 2fr) minmax(180px, 1fr);
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 1rem;
}

.experiment-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #dfe1e6;
}

.rkmpc-formula-box {
  background: #ffffff;
  border: 1px solid #dfe1e6;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-top: 0.8rem;
  box-shadow: 0 1px 3px rgba(13, 23, 42, 0.06);
}

.rkmpc-ocp-equation {
  margin: 0.1rem 0 0;
}

.rkmpc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.2rem;
}

.rkmpc-box {
  background: #ffffff;
  border: 1px solid #dfe1e6;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 5px rgba(13, 23, 42, 0.08);
}

.rkmpc-box h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  color: #0d1f4a;
}

.rkmpc-box img,
.rkmpc-gif img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
}

.rkmpc-gif {
  margin-top: 1rem;
  text-align: center;
}

.rkmpc-gif h3 {
  margin-bottom: 0.7rem;
}

.simulation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-top: 1.2rem;
}

.sim-card {
  background: #ffffff;
  border: 1px solid #dfe1e6;
  border-radius: 10px;
  padding: 0.8rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.sim-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #0d1f4a;
}

.multi-video-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.video-label {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #334e6e;
  text-align: center;
}

.video-wrapper {
  max-width: 480px;
  width: 100%;
  margin: 0.6rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 21, 39, 0.14);
  border: 1px solid #dfe1e6;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.sim-panel-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #0d1f4a;
}

.sim-video-card {
  padding: 0.8rem;
}

.sim-video-card video {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid #dfe1e6;
}

.video-wrapper video,
.video-wrapper img {
  width: 100%;
  max-width: 470px;
  height: auto;
  display: block;
  object-fit: contain;
}

.experiment-subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.experiment-full {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.experiment-full .big-card,
.experiment-full .side-card {
  background: #ffffff;
  border: 1px solid #dfe1e6;
  border-radius: 10px;
  padding: 0.8rem;
  box-shadow: 0 1px 3px rgba(5, 13, 26, 0.08);
}

.experiment-full .side-card {
  display: grid;
  gap: 0.7rem;
}

.experiment-full h4 {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #0d1f4a;
}

.experiment-full .big-card img,
.experiment-full .side-card img {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #dfe1e6;
}

.media-card h4 {
  margin: 0 0 0.5rem;
  color: #0d1f4a;
}

.media-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(135, 151, 179, 0.20);
}

.media-card video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(135, 151, 179, 0.20);
  display: block;
  background: #000;
}


.media-card-fixed img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}

.media-card-fixed video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}


.cta {
  text-align: center;
  margin-top: 2rem;
}

.site-footer {
  padding: 1.5rem 0;
  background: #f6f8fb;
  border-top: 1px solid var(--card-border);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer p + p {
  margin-top: 0.4rem;
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  color: var(--primary-dark);
}

@media (max-width: 976px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-media {
    max-width: 100%;
  }

  nav {
    overflow-x: auto;
    padding: 0.2rem 0;
  }

  .slide-content,
  .fig-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-video-grid {
    grid-template-columns: 1fr;
  }

  .grid-gallery.two-per-row {
    grid-template-columns: 1fr;
  }

  .exp1-block-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gif"
      "xy"
      "traj";
  }

  .exp1-item-gif img,
  .exp1-item-xy img,
  .exp1-item-traj img {
    height: 220px;
  }
}


.slide-image img {
  width: 100%;
  max-width: 950px;
  height: auto;
  transform: scale(1.05);
  transform-origin: center center;
}

.fig-card img {
  width: 110%;
  max-width: 1240px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dfe1e6;
  margin: 0 auto;
  display: block;
}

.fig-card p {
  text-align: center;
  font-weight: 600;
  color: #334e6e;
  margin-top: 0.7rem;
}

.fig-caption {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: #1f3557;
  font-weight: 500;
  font-style: italic;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.fig-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: max-width 0.2s ease;
}

.fig-card-small img {
  max-width: 480px;
}

.fig-card-medium img {
  max-width: 720px;
}

.fig-card-large img {
  max-width: 1024px;
}

.fig-card-plain {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.fig-card-plain img {
  border: 0;
  border-radius: 0;
}

.rkmpc-framework-raw {
  margin-top: 1.75rem;
  margin-bottom: 1rem;
}

.rkmpc-framework-raw img {
  width: 100%;
  max-width: 900px;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  border: 0;
}

.video-wrapper img {
  width: 100%;
  height: auto;
  max-width: 480px;   /* smaller */
  display: block;
  margin: 0 auto;
}
