* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

body {
  background-color: #f4f4f4;
  color: #333;
  margin: 0rem;
}

ul {
  padding-left: 1rem;
  margin-left: 5rem;
}

ul li {
  margin-bottom: 0.5rem;
}

h1 {
  width: 100% !important; 
  margin-bottom: 1rem !important;
  line-height: normal !important;
  position: initial;
  font-size: 2.5rem !important;
  left: auto !important;
}

h2 {
  margin-bottom: 0.5rem;
}

figure {
  margin: 1rem 0;
}

figcaption {
  text-align: center;
  font-weight: 200;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #555;
}

pre {
  background-color: #f4f4f4;
  padding: 0.5rem;
  border-radius: 5px;
  overflow-x: auto;
}

code {
  font-family: Consolas, Monaco, monospace !important;
  color: #333;
}

nav {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem;
  background-color: #112244;
  margin-bottom: 2rem;
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  display: inline-block;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0rem 1rem;
  white-space: nowrap;
  line-height: 1.5;          /* Helps the height render properly */
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;    /* Ensures padding contributes to size */
  width: fit-content;
  margin-bottom: 0rem;
}


nav ul li:hover,
nav ul li.active{
  text-decoration: underline;
}

nav ul li.active span {
  text-decoration: underline;
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-left {
  display: flex;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  margin-left: 2rem;
}

.nav-select {
  display: flex;
  flex-direction: column;
}

.nav-right {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.5rem;
  margin-right: 4rem;
  align-items: flex-end;
}

.nav-right li {
  display: block;
  padding: 0rem 1rem;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
}

.nav-right li.active,
.nav-right li:hover {
  text-decoration: underline;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #112244;
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  border: 1px solid #444;
  z-index: 10;
}

.dropdown-menu li {
  padding: 0.5rem 1rem;
  color: white;
  white-space: nowrap;
  cursor: pointer;
}

.dropdown-menu li:hover {
  background-color: #223355;
}

/* Show dropdown on open */
.dropdown.open .dropdown-menu {
  display: block;
}


.content {
  max-width: 800px;
  padding: 0rem 1rem;
  margin: 0 auto;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* Ensure normal lists are vertical */
.tab ul {
  all: revert;
  padding-left: 1.5rem;
  margin-left: 0rem;
  margin-bottom: 1.5rem;
}

.tab ul li {
  all: revert;
  margin-bottom: 0.5rem;
}


.disclaimer {
  text-align: center;
  font-size: 0.7rem;
  padding-bottom: 0.5rem;
}

.introduction {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;"
}

.project {
  margin-bottom: 3rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #222;
}

.image-grid {
  column-count: 2;
  column-gap: 0.75rem;
}

.image-grid img {
  width: 100%;
  margin-bottom: 0.75rem;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.1);
}

.soloimg {
  width: 100%;
  margin-bottom: 0.75rem;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.1);
}

.description {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.4;
}
.github-link {
  display: inline-block;
  text-decoration: none;
  color: #0366d6;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.github-link:hover {
  border-color: #0366d6;
}


@media (max-width: 768px) {
  body, .content {
    overflow: visible;
  }
  
  h1 {
    font-size: 1.5rem !important;
    width: 100% !important;
  }
  
  nav {
    flex-direction: row;
    align-items: flex-start;
    align-self: flex-start;
  }

  .nav-left {
    font-size: 1.3rem;
    margin-left: 0rem;
  }

  .menu-toggle {
    display: block;
    color: #ffffff;
    margin-left: auto;
  }

  /* Main navigation list container */
  .nav-right {
    display: none;
    flex-direction: column;
    align-items: flex-end; /* Align all nav items to the right */
    width: 100%;
    max-width: 100%;
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    overflow: visible;
    position: relative; /* Establishes a context, good practice */
  }

  nav.open .nav-right {
    display: flex;
  }

  /* Style all navigation items for consistency */
  .nav-right > li {
    text-align: right;
    width: auto;
    padding: 0rem 0rem;
  }

  /* The parent of the dropdown menu */
  .dropdown {
    position: relative; /* ✅ CRITICAL: This is the positioning anchor for the menu. */
    overflow: visible;
    display: inline-block;
  }
  
  .dropdown-toggle {
    display: inline-block;
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
  }

  /* The dropdown menu itself */
  .dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;  /* Places it directly below the toggle */
    left:auto;
    right: 0;    /* Aligns left edge with the toggle */
    z-index: 999;
    
    background-color: #112244;
    border: 1px solid #ffffff;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
    min-width: 180px;
    align-items: right;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu li {
    padding: 0.5rem 1rem;
    color: white;
    font-size: 1rem;
    white-space: nowrap;
  }

  .dropdown-menu li:hover {
    background-color: #223355;
  }
  
  .introduction {
    flex-direction: column;
  }
  
  .project-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #001100;
  }
}

