:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0a0a0a;
  color: #d8dadd;
  font-family: Roboto, -apple-system, "system-ui", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.5rem 2rem;
}

header {
  text-align: center;
  max-width: 640px;
  margin-bottom: 2rem;
}

.mlins-logo {
  width: 56px;
  height: 56px;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #f2f5fa;
}

header .subtitle {
  margin: 0;
  color: #8f9190;
  font-size: 0.95rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #262626;
  width: 100%;
  max-width: 920px;
  margin-bottom: 2rem;
}

.tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8f9190;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: #d8dadd;
}

.tab.active {
  color: #57abe6;
  border-bottom-color: #2a9fd6;
}

/* Panels */
.panels {
  width: 100%;
  max-width: 920px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: fade-in 0.15s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1e1e1e;
  margin-bottom: 1.5rem;
}

.panel-header-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.panel-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.panel-heading {
  flex: 1;
  min-width: 200px;
}

.panel-heading h2 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
  color: #f2f5fa;
}

.panel-heading .tagline {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #57abe6;
}

.panel-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn-launch {
  background: #2a9fd6;
  color: #fff;
}

.btn-github {
  background: transparent;
  color: #d8dadd;
  border: 1px solid #3a3a3a;
}

/* Model weights */
.weights-box {
  background: #12181d;
  border: 1px solid #1c2b35;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.weights-heading {
  flex: 1;
  min-width: 180px;
}

.weights-heading h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #f2f5fa;
}

.weights-heading p {
  margin: 0;
  font-size: 0.85rem;
  color: #8f9190;
}

.weights-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.weight-download {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #1a2530;
  border: 1px solid #2a9fd6;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.weight-download:hover {
  background: #223143;
}

.weight-icon {
  font-size: 1rem;
  color: #57abe6;
}

.weight-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.weight-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d8dadd;
}

.weight-filename {
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #8f9190;
}

/* Panel body / content sections */
.panel-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

.content-section.has-figure {
  flex-direction: row;
  align-items: flex-start;
  gap: 1.75rem;
}

.section-text {
  flex: 1;
  min-width: 0;
}

.content-section h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: #f2f5fa;
}

.content-section p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #b3b5b8;
  max-width: 62ch;
}

.content-section ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #b3b5b8;
}

.content-section li {
  margin-bottom: 0.2rem;
}

.content-section table {
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  width: 100%;
  max-width: 520px;
}

.content-section th,
.content-section td {
  border: 1px solid #262626;
  padding: 0.5rem 0.85rem;
  text-align: left;
}

.content-section th {
  background: #141414;
  color: #f2f5fa;
  font-weight: 600;
}

.content-section td {
  color: #b3b5b8;
}

/* Research figures: white card behind them since the source PNGs assume a light
   background (standard academic-figure convention), which would look broken
   floating directly on this page's near-black background otherwise. */
.section-figure {
  flex: 0 0 300px;
  margin: 0;
  background: #f4f4f4;
  border-radius: 8px;
  padding: 0.6rem;
  align-self: flex-start;
}

.section-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .content-section.has-figure {
    flex-direction: column;
  }

  .section-figure {
    flex: none;
    width: 100%;
  }
}

footer {
  margin-top: 3rem;
  font-size: 0.85rem;
}

footer a {
  color: #8f9190;
  text-decoration: none;
}

footer a:hover {
  color: #57abe6;
}
