/* --- Global Styles & Background --- */
:root {
  --border-color: #505050;
  /* Global scope variable */
  --spacing: 20px;
}

body {
  background: #000000;
  background-size: cover;
  background-attachment: fixed;
  color: rgb(183, 183, 183);
  margin: 0;
  padding: 0;
  font-size: 17px;
}

html {
  font-family: 'Figtree', Arial, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* Hides scrollbar */
  scrollbar-width: none;
  /* For Firefox */
}

/* Hides scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar {
  display: none;
}

* {
  box-sizing: border-box;
}

::selection {
  color: rgb(0, 0, 0);
  background: rgb(255, 255, 255);
}

/* --- Navigation Bar --- */
nav ul {
  list-style-type: none;
  margin: 0;
  padding: 10px 0px;
  position: fixed;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;

  /* Glass effect for the nav bar */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  ;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.9);
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

footer {
  border-top: 1px solid var(--border-color);
  font-size: .7em;
  color: var(--border-color) !important;
  text-align: left;
  padding: 20px;

  p {
    margin: 0;
    margin-bottom: 0px;
  }

  a {
    color: var(--border-color) !important;
  }
}

img {
  position: relative;
  padding: 0px;
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
  z-index: -1;
  display: block;
  /* Remove extra space below image */
}

.cover {
  filter: brightness(1.2);
  width: 600px;
  margin: -120px 0px -120px 0px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  object-fit: cover;
}


nav li {
  padding: 0px 5px;
  margin: 0px 0px;
  /* Removes inherited line-height spacing */
  display: flex;
  /* Ensures li tightly wraps content */
  align-items: center;
}

li {
  list-style-type: none;
  padding: 0px 0px;
}

li a {
  display: block;
  color: white;
  text-align: center;
  max-width: fit-content;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

a {
  margin: 0px auto;
}

ul li {
  list-style-type: none;
}

#active {
  background-color: #ffffffcb;
  color: black;
}

li a:hover {
  background-color: rgba(131, 131, 131, 0.3);
}

#active:hover {
  background-color: rgb(236, 236, 236);
}

/* --- Main Content Wrapper --- */
.wrapper {
  overflow-x: hidden;
  perspective: 15px;
  /* KEY FIX: Pushes content down to avoid being covered by fixed nav */
  padding-top: 70px;
  padding-bottom: 0px;
}



/* --- Title Section --- */
.top {
  text-align: center;
  padding: 10px;
  /* Added more space below title */
}

strong {
  color: rgb(238, 238, 238);
}

h1.title {
  color: rgb(255, 255, 255);
  font-size: clamp(4em, 12vw, 120px);
  /* Responsive: min, preferred, max */
  font-family: 'Lexend', Arial, sans-serif;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 0 0px rgba(0, 0, 0, 0.5);
  /* Adds depth */
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.5em;
  /* Adds some padding around the grid */
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-item {
  width: 100%;
  height: 30em;
  display: flex;
  /* Makes each item a flex container for its content */
  justify-content: center;
  /* Centers content within each item horizontally */
  align-items: center;
  /* Centers content within each item vertically */
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  /* ensures cropped parts are hidden */
}

.grid-item:first-child {
  grid-column: 1 / -1;
}

.grid-item div {
  display: block;
  position: absolute;
  transform: translateY(5em);
  color: white;
  text-align: center;
  width: 100%;
  margin-top: auto;
  /*This is really bad.*/
}

.grid-item img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensures the image covers the entire grid item */
}

.art-container {
  display: flex;
  /* Makes the container a flex container */
  flex-wrap: wrap;
  /* Allows items to wrap to the next line */
  justify-content: center;
  /* Centers items horizontally along the main axis */
  align-items: flex-start;
  /* Prevents items from stretching to the tallest item's height by default */
}

.art-item {
  width: 25em;
  /* Fixed width for grid items */
  display: flex;
  /* Makes each item a flex container for its content */
  position: relative;
  overflow: hidden;
  /* ensures cropped parts are hidden */
  aspect-ratio: 17/22;

}

.art-item img {
  width: 100%;
  /* Image takes the full width of its grid cell */
  height: auto;
  /* Height is automatically calculated to maintain aspect ratio */
  display: block;
  /* Removes any default inline margins/spacing */
  max-width: 100%;
  object-fit: cover;
}

p.title {
  font-style: italic;
  font-weight: 100;
  margin-top: 10px;
}

.horizontal {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0px;
  gap: 1em;
}

/* --- Content Sections --- */
section {
  margin: 10px auto;
  padding: 30px;
  max-width: 700px;
  border-radius: 10px;

  /* Glass effect */
  border: 1px solid var(--border-color);
  ;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

section ul:not(.horizontal) {
  list-style-type: disc !important;
  display: block !important;
  padding-left: 40px !important;
  margin: 1em 0;
  justify-content: unset;
  align-items: unset;
}

section li:not(.horizontal) {
  list-style-type: disc !important;
  display: list-item !important;
  margin: 0.5em 0;
  padding: 0;
}

section.blue {
  background-color: rgba(0, 112, 239, 0.25);
}

/* --- Typography Enhancements --- */
h2 {
  color: rgb(255, 255, 255);
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 20px;
  /* Space between heading and text */
  padding: 0;
}

p,
li {
  line-height: 1.7;
  /* Increased for better readability */
  margin: 1em 0;
}


ul {
  padding: 10px 0;
  padding-left: 0px;
  list-style-type: none;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;

}

.glow {
  text-shadow: #ffffff8e 0px 0px 10px, #FFF 0px 0px 15px, #00bfdcc9 0px 0px 20px, #2da0ff 0px 0px 12px, #2d8fff 0px 0px 30px, #2d5aff 0px 0px 35px, #2d73ff 0px 0px 50px;
  font-size: 2.5em;
  font-weight: 400;
}


/* --- Other Elements --- */
details {
  float: left;
  width: 50%;
  padding: 0 10px;
  margin-bottom: 20px;
}

summary {
  background-color: rgba(64, 64, 64, 0.3);
  border-radius: 10px;
  padding: 15px;
  margin: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

summary:hover {
  background-color: rgba(147, 147, 147, 0.4);
}

.glass-card {
  background: rgba(42, 42, 42, 0.1);
  color: white;
  text-align: center;
  padding: 10px 30px;
  text-decoration: none;
  border-radius: 100px;
  white-space: nowrap;
  overflow: hidden;
  /* Hides the overflowing content */
  text-overflow: ellipsis;
  /* Displays an ellipsis (...) for truncated text */
  font-size: medium;
  border: 0px solid var(--border-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 1px 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 9px 3px rgba(255, 255, 255, 0.15);
  display: inline-block;
  /* Ensure it behaves like a block for padding */
  transition: background-color 0.3s ease;
}

.glass-card:hover {
  background-color: rgba(131, 131, 131, 0.3);
}

a.grid-item {
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  /* Ensure it keeps flex layout */
  text-decoration: none;
  /* Remove underline */
  color: inherit;
  /* Inherit color */
}

a.grid-item:hover {
  transform: translateY(-5px);
  border-color: #fff;
}

section.centered {
  text-align: center !important;
  align-items: center;
  border: 0px;
  background-color: #00000000;
  margin: 1em auto;
  padding: 1px;
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 1000px) {

  /* KEY FIX 1: Add padding to the bottom of the body. */
  /* This prevents the fixed nav bar from covering the last bit of content. */
  body {
    padding-bottom: 80px;
  }

  .wrapper {
    /* Remove top padding since mobile nav is no longer at the top */
    padding: 0;
    margin: 0;
  }

  img {
    max-width: 100%;
  }

  nav ul {
    position: fixed;
    bottom: 0;
    left: 0;
    flex-direction: row;
    /* Arrange items side-by-side */
    justify-content: center;
    /* Distribute items evenly */
    padding: 10px 0px;
    border-top: 1px solid var(--border-color);
    /* Move border to top */
    border-bottom: none;
    /* Remove bottom border */
    background-image: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
  }

  .grid-container {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .grid-item {
    width: 100%;
    height: 40vh;
  }

  nav li {
    width: auto;
    /* Let the buttons size themselves */
    margin: 0 0px;
  }

  li a {
    padding: 0px 0px;
    /* Adjust padding for a more compact button */
  }

  /* --- Other mobile styles remain the same --- */
  .top {
    padding: 20px 20px 0px 20px;
  }

  /* Fix for mobile sticky hover: animate once then return */
  a.grid-item:hover {
    transform: none;
    border-color: var(--border-color);
    animation: mobile-lift 0.6s ease;
  }


  section {
    padding: 25px 20px;
    margin: 10px;

  }

  h2 {
    font-size: 1.5em;
  }

  details {
    width: 100%;
    float: none;
    padding: 0;
    margin-bottom: 15px;
  }
}

@keyframes mobile-lift {
  0% {
    transform: translateY(0);
    border-color: var(--border-color);
  }

  50% {
    transform: translateY(-5px);
    border-color: #fff;
  }

  100% {
    transform: translateY(0);
    border-color: var(--border-color);
  }
}