/* --- Index page theme --- */

/* --- Self-hosted Open Sans --- */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/OpenSans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/OpenSans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/OpenSans-700.woff2') format('woff2');
}

:root {
  --theme-dk1: #000000;
  --theme-lt1: #FFFFFF;
  --theme-hlink: #467886;
  --font-major: "Open Sans", Arial, sans-serif;
  --font-minor: "Open Sans", Arial, sans-serif;
}

/* --- Base layout --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #F0F0F0;
  overflow-y: auto;
}

.page-wrapper {
  max-width: 1024px;
  margin: 0 auto;
  background: #FFFFFF;
  min-height: 100vh;
}

.slide-layout {
  display: flex;
}

#slide-menu {
  width: 256px;
  flex-shrink: 0;
  background: #F8F8F8;
  border-right: 1px solid #E0E0E0;
  overflow-y: auto;
  height: calc(100vh - 40px);
  position: sticky;
  top: 40px;
  padding: 0;
}

#slide-content {
  flex: 1;
  min-width: 0;
  max-width: 768px;
  color: var(--theme-dk1, #000000);
}

/* --- Header component --- */
.slide-header-bar {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Navigation panel --- */
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E0E0E0;
}

.nav-deck-title {
  font-family: var(--font-minor);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--theme-dk1);
}

#nav-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--theme-dk1);
  padding: 0 0.25rem;
}

.nav-list {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.nav-item a {
  display: block;
  padding: 0.35rem 1rem;
  font-family: var(--font-minor);
  font-size: 0.8rem;
  color: var(--theme-dk1);
  text-decoration: none;
  line-height: 1.4;
}

.nav-item a:hover {
  background: #EEEEEE;
}

.nav-level-1 a { padding-left: 1.5rem; }

.nav-active a {
  font-weight: 700;
  color: var(--theme-hlink);
}

/* --- Hamburger (mobile only) --- */
#nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

@media (max-width: 1023px) {
  .slide-layout {
    display: block;
  }

  #slide-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 9999;
    transition: left 0.3s ease;
    border-right: 1px solid #E0E0E0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    padding-bottom: 2rem;
  }

  #slide-menu.open {
    left: 0;
  }

  #nav-hamburger {
    display: block;
  }

  #nav-close {
    display: block;
  }

  #slide-content {
    max-width: 100%;
  }
}

h1 {
  font-family: var(--font-minor);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--theme-dk1, #000000);
  padding: 0.75rem 0rem 0.5rem;
  margin: 0 1.5rem 1rem;
  border-bottom: 2px solid lightgrey;
}

/* --- Info container --- */
.info-container {
  padding: 0 1.5rem 1.5rem;
}

.info-container p {
  font-family: var(--font-minor);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--theme-dk1, #000000);
  margin: 0 0 0.75rem;
}

.info-container a {
  color: var(--theme-hlink);
  text-decoration: underline;
}

.content-separator {
  border: none;
  height: 1px;
  background-color: #E0E0E0;
  margin: 1.5rem 0;
}

/* --- Index page components --- */
.researchers {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.researcher {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.researcher img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 0.3rem;
}

.researcher p {
  font-family: var(--font-minor);
  font-size: 0.75rem;
  color: var(--theme-dk1);
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
  max-width: 100%;
}

.deck-card {
  text-align: center;
  text-decoration: none;
  border: 2px solid;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.info-container .deck-card {
  text-decoration: none;
}

.deck-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #FFFFFF;
  flex-shrink: 0;
}

.deck-card-label {
  font-family: var(--font-minor);
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  padding: 0.6rem 0.5rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar-switch breakpoint: smaller label text on narrow screens */
@media (max-width: 1023px) {
  .deck-card-label {
    font-size: 0.8rem;
  }
}
