  :root {
  --md-sys-color-primary-light: #6750a4;
  --md-sys-color-on-primary-light: #ffffff;
  --md-sys-color-primary-container-light: #eaddff;
  --md-sys-color-on-primary-container-light: #21005d;
  --md-sys-color-secondary-container-light: #e8def8;
  --md-sys-color-on-secondary-container-light: #1d192b;
  --md-sys-color-tertiary-light: #7d5260;
  --md-sys-color-on-tertiary-light: #ffffff;
  --md-sys-color-background-light: #fffbfe;
  --md-sys-color-on-background-light: #1c1b1f;
  --md-sys-color-surface-light: #fffbfe;
  --md-sys-color-on-surface-light: #1c1b1f;
  --md-sys-color-surface-variant-light: #e7e0ec;
  --md-sys-color-on-surface-variant-light: #49454f;
  --md-sys-color-outline-light: #79747e;
  --md-sys-color-scrim-light: rgba(0, 0, 0, 0.5);

  --md-sys-color-primary-dark: #d0bcff;
  --md-sys-color-on-primary-dark: #381e72;
  --md-sys-color-primary-container-dark: #4f378b;
  --md-sys-color-on-primary-container-dark: #eaddff;
  --md-sys-color-secondary-container-dark: #4a4458;
  --md-sys-color-on-secondary-container-dark: #e8def8;
  --md-sys-color-tertiary-dark: #efb8c8;
  --md-sys-color-on-tertiary-dark: #492532;
  --md-sys-color-background-dark: #1c1b1f;
  --md-sys-color-on-background-dark: #e6e1e5;
  --md-sys-color-surface-dark: #1c1b1f;
  --md-sys-color-on-surface-dark: #e6e1e5;
  --md-sys-color-surface-variant-dark: #49454f;
  --md-sys-color-on-surface-variant-dark: #cac4d0;
  --md-sys-color-outline-dark: #938f99;
  --md-sys-color-scrim-dark: rgba(0, 0, 0, 0.6);

  --md-sys-font-family: "googlesans", "Roboto", sans-serif;
  --md-sys-motion-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --md-sys-motion-duration-short: 150ms;
  --md-sys-motion-duration-medium: 300ms;
}

@font-face {
  font-family: "googlesans";
  src: url(fonts/googlesans.ttf);
}

body {
  --md-sys-color-primary: var(--md-sys-color-primary-light);
  --md-sys-color-primary-container: var(--md-sys-color-primary-container-light);
  --md-sys-color-on-primary-container: var(
    --md-sys-color-on-primary-container-light
  );
  --md-sys-color-secondary-container: var(
    --md-sys-color-secondary-container-light
  );
  --md-sys-color-on-secondary-container: var(
    --md-sys-color-on-secondary-container-light
  );
  --md-sys-color-tertiary: var(--md-sys-color-tertiary-light);
  --md-sys-color-background: var(--md-sys-color-background-light);
  --md-sys-color-on-background: var(--md-sys-color-on-background-light);
  --md-sys-color-surface: var(--md-sys-color-surface-light);
  --md-sys-color-on-surface: var(--md-sys-color-on-surface-light);
  --md-sys-color-surface-variant: var(--md-sys-color-surface-variant-light);
  --md-sys-color-on-surface-variant: var(
    --md-sys-color-on-surface-variant-light
  );
  --md-sys-color-outline: var(--md-sys-color-outline-light);
  --md-sys-color-scrim: var(--md-sys-color-scrim-light);
}

body.dark-theme {
  --md-sys-color-primary: var(--md-sys-color-primary-dark);
  --md-sys-color-primary-container: var(--md-sys-color-primary-container-dark);
  --md-sys-color-on-primary-container: var(
    --md-sys-color-on-primary-container-dark
  );
  --md-sys-color-secondary-container: var(
    --md-sys-color-secondary-container-dark
  );
  --md-sys-color-on-secondary-container: var(
    --md-sys-color-on-secondary-container-dark
  );
  --md-sys-color-tertiary: var(--md-sys-color-tertiary-dark);
  --md-sys-color-background: var(--md-sys-color-background-dark);
  --md-sys-color-on-background: var(--md-sys-color-on-background-dark);
  --md-sys-color-surface: var(--md-sys-color-surface-dark);
  --md-sys-color-on-surface: var(--md-sys-color-on-surface-dark);
  --md-sys-color-surface-variant: var(--md-sys-color-surface-variant-dark);
  --md-sys-color-on-surface-variant: var(
    --md-sys-color-on-surface-variant-dark
  );
  --md-sys-color-outline: var(--md-sys-color-outline-dark);
  --md-sys-color-scrim: var(--md-sys-color-scrim-dark);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  width: 100%;
  height: 100vh;
  overflow-x: hidden;
  font-family: var(--md-sys-font-family);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  transition: background-color var(--md-sys-motion-duration-medium);
  display: flex;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--md-sys-color-surface-variant);
}
::-webkit-scrollbar-thumb {
  background-color: var(--md-sys-color-outline);
  border-radius: 10px;
  border: 3px solid var(--md-sys-color-surface-variant);
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--md-sys-color-on-surface-variant);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--md-sys-color-outline);
  border-radius: 10px;
  border: 3px solid var(--md-sys-color-background);
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--md-sys-color-on-surface-variant);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

.navbar {
  width: 300px;
  height: 100vh;
  background-color: var(--md-sys-color-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: fixed;
  top: 0;
  left: 0;
  flex-shrink: 0;
  transition: transform 0.3s ease, background-color var(--md-sys-motion-duration-medium);
  z-index: 100;
  overflow-y: auto;
}
.page-wrapper {
  display: flex;
  flex-grow: 1;
  margin-left: 300px;
  height: 100%;
  transition: margin-left 0.3s ease, transform 0.3s ease;
}
.main-content-wrapper {
  flex-grow: 1;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
.right-sidebar {
  width: 300px;
  flex-shrink: 0;
  padding: 24px 24px 24px 0;
  height: 100vh;
  position: sticky;
  top: 0;
  transition: opacity 0.3s ease;
}

.navbar-header {
  font-size: 1.5em;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
  padding: 12px 8px 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar-header .material-symbols-outlined {
  color: var(--md-sys-color-primary);
}
.navbar ul {
  list-style: none;
}
.nav-heading {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.2em;
  font-weight: 700;
  padding: 24px 24px 12px 24px;
}
.nav-link {
  display: block;
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.1em;
  font-weight: 400;
  padding: 16px 24px;
  border-radius: 50px;
  margin: 0 12px 8px 12px;
  position: relative;
  overflow: hidden;
  transition: all var(--md-sys-motion-duration-short)
    var(--md-sys-motion-easing-standard);
}
.nav-link:not(.active):hover {
  background-color: var(--md-sys-color-secondary-container);
}
.nav-link.active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 700;
}
hr.nav-divider {
  border: none;
  height: 1px;
  background-color: var(--md-sys-color-outline);
  opacity: 0.5;
  margin: 24px 0;
}

.main-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}
.content-card {
  background-color: var(--md-sys-color-surface-variant);
  padding: 32px;
  border-radius: 28px;
  flex-grow: 1;
  transition: background-color var(--md-sys-motion-duration-medium);
  overflow-y: auto;
  scroll-behavior: smooth;
}
#content-container {
  transition: opacity var(--md-sys-motion-duration-medium)
    var(--md-sys-motion-easing-standard);
  max-width: 90ch;
  margin: 0 auto;
}
#content-container h1 {
  color: var(--md-sys-color-on-surface);
  font-size: 3.2em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}
#content-container h1.home-title {
  font-size: 3.8em;
  line-height: 1.15;
}
#content-container h2 {
  color: var(--md-sys-color-on-surface);
  font-size: 2em;
  margin-top: 48px;
  margin-bottom: 16px;
  scroll-margin-top: 32px;
}
#content-container h3 {
  color: var(--md-sys-color-on-surface);
  font-size: 1.5em;
  margin-top: 24px;
  margin-bottom: 12px;
}
#content-container p,
#content-container li {
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface-variant);
  text-align: justify;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}
#content-container a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 500;
}
#content-container a:hover {
  text-decoration: underline;
}

.article-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.article-card {
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--md-sys-motion-duration-short);
  cursor: pointer;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.article-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: var(--md-sys-color-outline);
}
.article-card-content {
  padding: 16px;
}

.team-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.team-member {
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.team-member-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  background-color: var(--md-sys-color-outline);
  display: block;
}
.team-member h3 {
  margin-top: 0;
}
.team-member .role {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  margin-top: 8px;
  margin-bottom: 4px;
}
.team-member .contribution-desc {
  font-size: 1em;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
  hyphens: none;
}

.sidebar-content {
  padding: 24px;
  border-radius: 28px;
  height: 100%;
  transition: background-color var(--md-sys-motion-duration-medium);
}
.sidebar-title {
  font-size: 0.9em;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 16px;
  font-weight: 500;
}
.sidebar-heading {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 16px;
}
.sidebar-links ul {
  list-style: none;
}
.sidebar-links li {
  margin-bottom: 12px;
}
.sidebar-links a {
  text-decoration: none;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  font-size: 0.9em;
  transition: color var(--md-sys-motion-duration-short);
}
.sidebar-links a:hover {
  color: var(--md-sys-color-on-primary-container);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  position: relative;
  overflow: hidden;
}
.theme-switcher {
  display: flex;
  border-radius: 50px;
  border: 1px solid var(--md-sys-color-outline);
  overflow: hidden;
  background-color: var(--md-sys-color-surface-variant);
}
.theme-switcher .icon-btn {
  width: 56px;
  height: 40px;
  border-radius: 0;
  background-color: transparent;
  color: var(--md-sys-color-on-surface-variant);
}
.theme-switcher .icon-btn:first-child {
  border-right: 1px solid var(--md-sys-color-outline);
}
.theme-switcher .icon-btn.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.search-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--md-sys-color-scrim);
  display: flex;
  justify-content: center;
  padding-top: 20vh;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--md-sys-motion-duration-medium)
    var(--md-sys-motion-easing-standard);
}
.search-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.search-modal {
  background-color: var(--md-sys-color-surface);
  width: clamp(300px, 90%, 600px);
  height: min-content;
  border-radius: 28px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-modal input {
  flex-grow: 1;
  font-size: 1.2em;
  border: none;
  background: none;
  color: var(--md-sys-color-on-surface);
}
.search-modal input:focus {
  outline: none;
}

.article-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--md-sys-color-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.article-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.article-modal {
  background-color: var(--md-sys-color-surface-variant);
  border-radius: 28px;
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 650ms cubic-bezier(0.39, 1.29, 0.35, 0.98),
    opacity 400ms ease;
}
.article-overlay.visible .article-modal {
  transform: scale(1);
  opacity: 1;
}
.modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 8px 8px 0 8px;
  flex-shrink: 0;
}
.modal-content-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 32px 32px 32px;
}

#article-modal-content {
  max-width: 90ch;
  margin: 0 auto;
}
#article-modal-content h1 {
  color: var(--md-sys-color-on-surface);
  font-size: 2.6em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
#article-modal-content .article-meta {
  font-size: 0.9em;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 24px;
}
#article-modal-content h2 {
  color: var(--md-sys-color-on-surface);
  font-size: 1.5em;
  margin-top: 24px;
  margin-bottom: 12px;
}
#article-modal-content p {
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface-variant);
  text-align: justify;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.3;
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}
@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.advertisement-block {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--md-sys-color-outline);
}
.advertisement-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.advertisement-block img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  margin-bottom: 16px;
}
.advertisement-block h3 {
  font-size: 1.8em;
  margin-bottom: 8px;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}
.timeline-era-title {
  text-align: center;
  margin-top: 64px;
  margin-bottom: 32px;
}
.timeline-wrapper {
  position: relative;
}
.timeline-wrapper::before {
  content: "";
  position: absolute;
  width: 2px;
  background-color: var(--md-sys-color-outline);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}
.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}
.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 70px;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 70px;
}
.timeline-icon {
  position: absolute;
  top: 20px;
  right: -25px;
  width: 50px;
  height: 50px;
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border: 3px solid var(--md-sys-color-surface-variant);
}
.timeline-item:nth-child(even) .timeline-icon {
  left: -25px;
}
.timeline-content {
  padding: 20px 30px;
  background-color: var(--md-sys-color-surface);
  position: relative;
  border-radius: 24px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}
.timeline-content h3 {
  margin-top: 0;
  color: var(--md-sys-color-primary);
  font-size: 1.8em;
}
.timeline-content p {
  text-align: left;
  hyphens: none;
  font-size: 1em;
}
@media screen and (max-width: 900px) {
  .timeline-wrapper::before {
    left: 25px;
  }
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 80px;
    padding-right: 15px;
    text-align: left;
  }
  .timeline-icon,
  .timeline-item:nth-child(odd) .timeline-icon,
  .timeline-item:nth-child(even) .timeline-icon {
    left: 0;
  }
}

.glossary-section h2 {
  color: var(--md-sys-color-primary);
  font-size: 3em;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--md-sys-color-outline);
  padding-bottom: 8px;
}
.glossary-term-card {
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.glossary-term-card h3 {
  margin-top: 0;
  color: var(--md-sys-color-on-surface);
}
.glossary-term-card p {
  text-align: left;
  hyphens: none;
}

#search-results {
  width: clamp(300px, 90%, 600px);
  max-height: 40vh;
  overflow-y: auto;
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  padding: 8px;
  margin-top: 16px;
}
.search-result-item {
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 8px;
}
.search-result-item:hover {
  background-color: var(--md-sys-color-secondary-container);
}
.search-result-item h4 {
  color: var(--md-sys-color-on-surface);
  margin: 0 0 4px 0;
}
.search-result-item p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9em;
  margin: 0;
  text-align: left;
  hyphens: none;
}
.search-result-item strong {
  color: var(--md-sys-color-primary);
}

.menu-btn {
    display: none;
}

.navbar-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--md-sys-color-scrim);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.navbar-open .navbar-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1200px) {
    .navbar {
        width: 280px;
    }
    .page-wrapper {
        margin-left: 280px;
    }
    .right-sidebar {
        width: 280px;
    }
    #content-container h1 {
        font-size: 2.8em;
    }
    #content-container h1.home-title {
        font-size: 3.2em;
    }
}

@media (max-width: 992px) {
    .menu-btn {
        display: flex;
    }
    .main-header {
        justify-content: space-between;
    }

    .navbar {
        transform: translateX(-100%);
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }

    body.navbar-open .navbar {
        transform: translateX(0);
    }
    
    body.navbar-open .page-wrapper {
        transform: translateX(280px);
    }

    .page-wrapper {
        margin-left: 0;
    }

    .right-sidebar {
        display: none;
    }

    .main-content-wrapper {
        padding: 16px;
    }

    .content-card {
        padding: 24px;
    }

    #content-container h1 {
        font-size: 2.2em;
    }
    #content-container h1.home-title {
        font-size: 2.6em;
    }
    #content-container h2 {
        font-size: 1.8em;
    }
    #content-container p, #content-container li {
        font-size: 1em;
    }

    .article-overlay {
        padding: 16px;
    }

    .article-modal {
        max-height: 95vh;
    }
    
    #article-modal-content h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    #content-container h1 {
        font-size: 1.8em;
    }
     #content-container h1.home-title {
        font-size: 2.1em;
    }
    #content-container h2 {
        font-size: 1.5em;
    }
    
    .main-header {
        gap: 4px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }
}