@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
}

/* Stanford CRFM-style Navigation */
.wrapper {
  position: relative;
}

.wrapper.bg-light {
  background-color: #ffffff !important;
}

.navbar {
  padding: 0.5rem 0;
  background-color: #ffffff !important;
  width: 100%;
  overflow: hidden;
}

.navbar-light {
  background-color: #ffffff !important;
  border-bottom: none;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-right: 2rem;
}

.nav-link {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.125rem;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #53A8C7;
}

/* Flexbox utilities */
.flex-lg-row {
  display: flex;
  flex-direction: row;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.align-items-center {
  align-items: center;
}

.d-flex {
  display: flex !important;
}

.flex-row {
  flex-direction: row !important;
}

.w-100 {
  width: 100% !important;
}

.ms-auto {
  margin-left: auto !important;
}

/* Bootstrap-like utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header-specific container */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  box-sizing: border-box;
}

.py-lg-8 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.gx-lg-8 {
  --bs-gutter-x: 3rem;
}

.gx-xl-12 {
  --bs-gutter-x: 4rem;
}

.py-md-4 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Typography */
.lead {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.7;
}

.fs-lg {
  font-size: 1.375rem;
}

.display-7 {
  font-size: 1.75rem;
  font-weight: 500;
}

.fs-16 {
  font-size: 1.125rem;
}

.text-uppercase {
  text-transform: uppercase;
}

.text-line {
  border-bottom: 2px solid #0066cc;
  padding-bottom: 0.5rem;
}

.text-primary {
  color: #0066cc;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mt-8 {
  margin-top: 3rem;
}

.pt-10 {
  padding-top: 3rem;
}

/* Footer */
.bg-light {
  background-color: #ffffff !important;
}

.pb-7 {
  padding-bottom: 3rem;
}

.mt-auto {
  margin-top: auto;
}

.mb-7 {
  margin-bottom: 3rem;
}

.d-md-flex {
  display: flex;
}

.justify-content-between {
  justify-content: space-between;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-lg-0 {
  margin-bottom: 0;
}

/* Logo container styles */
.logo-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav_logo2 {
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-top: 3px;
}

/* Responsive design */
@media (max-width: 768px) {
  .navbar-nav {
    flex-direction: column;
  }
  
  .nav-item {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .logo-container {
    gap: 0.5rem;
    justify-content: center;
  }
  
  .nav_logo2 {
    height: 50px;
  }
}

@media (max-width: 480px) {
  .logo-container {
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav_logo2 {
    height: 40px;
  }
  
  .header-container {
    padding: 0 10px;
  }
}

/* Ensure header doesn't overflow on any screen size */
@media (max-width: 320px) {
  .nav_logo2 {
    height: 35px;
  }
  
  .logo-container {
    gap: 0.1rem;
  }
}

/* Table column group background colors for StarEmbed tables */

/* Clustering Table - Reset group (Name, Size, Date) */
#clustering-table th:nth-child(1),
#clustering-table th:nth-child(2),
#clustering-table th:nth-child(3),
#clustering-table td:nth-child(1),
#clustering-table td:nth-child(2),
#clustering-table td:nth-child(3) {
  background-color: #f8f9fa;
}

/* Clustering Table - K-Means group */
#clustering-table th:nth-child(4),
#clustering-table th:nth-child(5),
#clustering-table th:nth-child(6),
#clustering-table td:nth-child(4),
#clustering-table td:nth-child(5),
#clustering-table td:nth-child(6) {
  background-color: #e3f2fd;
}

/* Clustering Table - Ward group */
#clustering-table th:nth-child(7),
#clustering-table th:nth-child(8),
#clustering-table th:nth-child(9),
#clustering-table td:nth-child(7),
#clustering-table td:nth-child(8),
#clustering-table td:nth-child(9) {
  background-color: #f3e5f5;
}

/* Classification Table - Reset group (Name, Size, Date) */
#classification-table th:nth-child(1),
#classification-table th:nth-child(2),
#classification-table th:nth-child(3),
#classification-table td:nth-child(1),
#classification-table td:nth-child(2),
#classification-table td:nth-child(3) {
  background-color: #f8f9fa;
}

/* Classification Table - MLP group */
#classification-table th:nth-child(4),
#classification-table th:nth-child(5),
#classification-table th:nth-child(6),
#classification-table th:nth-child(7),
#classification-table td:nth-child(4),
#classification-table td:nth-child(5),
#classification-table td:nth-child(6),
#classification-table td:nth-child(7) {
  background-color: #e8f5e8;
}

/* Classification Table - k-NN group */
#classification-table th:nth-child(8),
#classification-table th:nth-child(9),
#classification-table th:nth-child(10),
#classification-table th:nth-child(11),
#classification-table td:nth-child(8),
#classification-table td:nth-child(9),
#classification-table td:nth-child(10),
#classification-table td:nth-child(11) {
  background-color: #fff3e0;
}

/* Classification Table - Logistic group headers (both rows) */
#classification-table thead tr:nth-child(2) th:nth-child(12),
#classification-table thead tr:nth-child(2) th:nth-child(13),
#classification-table thead tr:nth-child(2) th:nth-child(14),
#classification-table thead tr:nth-child(2) th:nth-child(15) {
  background-color: #fce4ec;
}

/* Classification Table - Random Forest group headers (both rows) */

#classification-table thead tr:first-child th:nth-child(5),
#classification-table thead tr:first-child th:nth-child(4) {
  background-color: #f8f9fa;
}


#classification-table thead tr:nth-child(2) th:nth-child(16),
#classification-table thead tr:nth-child(2) th:nth-child(17),
#classification-table thead tr:nth-child(2) th:nth-child(18),
#classification-table thead tr:nth-child(2) th:nth-child(19) {
  background-color: #e0f2f1;
}

/* Classification Table - Logistic group data rows */
#classification-table td:nth-child(12),
#classification-table td:nth-child(13),
#classification-table td:nth-child(14),
#classification-table td:nth-child(15),
#classification-table td:nth-child(12),
#classification-table td:nth-child(13),
#classification-table td:nth-child(14),
#classification-table td:nth-child(15) {
  background-color: #fce4ec;
}

/* Classification Table - Random Forest group data rows */
#classification-table td:nth-child(16),
#classification-table td:nth-child(17),
#classification-table td:nth-child(18),
#classification-table td:nth-child(19),
#classification-table td:nth-child(16),
#classification-table td:nth-child(17),
#classification-table td:nth-child(18),
#classification-table td:nth-child(19) {
  background-color: #e0f2f1;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.model-link { text-decoration: none; font-weight: 600; }
.model-link:hover { text-decoration: underline; }

.mmmu-logo {
  width: 1em;
  vertical-align: middle;
}

.mmmu {
  font-variant: small-caps;
  font-weight: bold;
}

.human_expert {
  background-color: rgba(255, 208, 80, 0.15);
}

.open_source {
  background-color: rgba(249, 242, 248, 1);
}

.proprietary {
  background-color: rgba(117, 209, 215, 0.1);
}

.random_frequent {
  background-color: #f4f9fe;
  color: #808080;
}

/* StarEmbed model type colors */
.tsfm {
  background-color: rgba(33, 150, 243, 0.1);
}

.baseline {
  background-color: rgba(158, 158, 158, 0.1);
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

.publication-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}

.publication-banner {
  max-height: 100%;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: contain;
}

.publication-header .hero-body {
}

.publication-title,
.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-venue {
  color: #555;
  width: fit-content;
  font-weight: bold;
}

.publication-awards {
  color: #ff3860;
  width: fit-content;
  font-weight: bolder;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.publication-banner img {
}

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px !important;
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.publication-body img {
}

.results-carousel {
  overflow: hidden;
}

.stats-image {
  max-height: 250px;
}

#org-banners {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.org-banner {
  max-width: 100%;
  height: 6em;
  margin: 10px;
  padding: 10px;
}

.chart-grid {
  display: grid;
  grid-gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.chart-item {
  text-align: center;
}

.chart-label {
  margin-top: 5px;
}

@media (min-width: 600px) {
  .chart-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (min-width: 900px) {
  .chart-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

.bottom-text {
  margin-top: 30px;
}

.model-labels-container {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 8px;
}

.model-label {
  display: inline-block;
  padding: 4px 10px;
  margin: 5px;
  border-radius: 3px;
  color: rgb(255, 255, 255);
}

.box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 5px;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
}

.leaderboard-container {
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}

.table-row {
  display: flex;
  width: 100%;
}

.sortable:hover {
  cursor: pointer;
}

.asc::after {
  content: ' ↑';
}

.desc::after {
  content: ' ↓';
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #ddd;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 8px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  background-color: #f2f2f2;
  border-bottom: 2px solid #ddd;
}

td:hover {
  background-color: #ffffff;
}

.main-header {
  background-color: #e6e6e6;
  font-weight: bold;
  text-align: center;
}

.sub-header {
  background-color: #f2f2f2;
}

.clickable {
  cursor: pointer;
}

.clickable:hover {
  background-color: #d9d9d9;
}

.hidden {
  display: none;
}

.leaderboard-label {
  padding: 5px 10px;
  margin-right: 10px;
  border-radius: 5px;
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

@media screen and (max-width: 768px) {
  th, td {
    min-width: 100px;
  }
}

#mmmu-table {
  table-layout: auto;
  width: 100%;
}

#mmmu-table th:not(:first-child),
#mmmu-table td:not(:first-child) {
  width: auto;
}

#mmmu-table tbody td:first-child {
  text-align: left !important;
}

#toggleButton {
  background-color: #ffffff;
  border: 1px solid #dddddd;
  color: #555555;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 25px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition-duration: 0.4s;
}

#toggleButton:hover {
  box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}