:root {
  --bg-color: #ffffff;
  --text-color: #3614af;
  --max-width: 1600px;
}

body {
  font-family: "Inter Tight", sans-serif;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

footer p {
  font-size: 0.8rem;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 1vw;
  background: #dedede;
}

.container {
  margin: 0 auto;
  margin-bottom: 1rem;
  padding: 1vw;
  background: #dedede;
}

h1 {
  font-family: "Roboto Slab", serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-color);
}

nav {
  margin: 0rem 0;
  padding: 0vw;
  position: relative;
}

.nav-desktop {
  background: #a7ff8a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
  border-bottom: 1px solid var(--text-color);
  box-sizing: border-box;
}

.nav-right a:hover {
  background-color: #ffbbfd;
}

.nav-left a:hover {
  background-color: #ffdb92;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.nav-left a,
.nav-right a {
  padding: 0.3rem 0.7rem;
  font-family: "Roboto Slab", serif;
  font-size: 1.8rem;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.nav-left a.active,
.nav-right a.active,
.nav-mobile-menu a.active {
  background-color: #ffff8d;;
}


.nav-mobile-menu {
  display: none;
}

.nav-mobile-menu a {
  display: block;
  width: 100%;
  padding: 0rem 0.89rem;
  text-decoration: none;
  color: var(--text-color);
  font-family: "Roboto Slab", serif;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--text-color);
  box-sizing: border-box;
  background-color: #dedede;
}

.nav-mobile-menu a:nth-child(1) {
  background-color: #a7ff8a;
}

.nav-mobile-menu a:nth-child(6) {
  background-color: #ffbbfd;
}


.project .project-body {
  margin: 0 auto;
  }

.tag-bio {
  margin: 0 auto;
  }

.tag-bio a {
  color: #20c320;
  text-decoration: none;
}

.intro {
    display: block;
    margin-top: 1rem;
    color: #686868;
    text-shadow: 0 0 8px #ffbbfd, 0 0 16px #ffbbfd, 0 0 24px #ffbbfd;
  }
  
  .intro p {
    font-size: 1rem;
    font-weight: 300;
    margin: 1rem 0;
  }

  .intro a {
    color: #20c320;
  }
  
.contact .contact-body {
  margin: 0 auto;
  }

.all {
    text-align: center;
    margin-top: 1rem;
    color: #686868;
    text-shadow: 0 0 8px #a7ff8a, 0 0 16px #a7ff8a, 0 0 24px #a7ff8a;
}

.all-other {
    text-align: right;
    color: #686868;
    text-shadow: 0 0 8px #a7ff8a, 0 0 16px #a7ff8a, 0 0 24px #a7ff8a;
  }

.contact a {
    color: #686868;
    text-decoration: none;
    text-shadow: 0 0 8px #ffff8d, 0 0 16px #ffff8d, 0 0 24px #ffff8d;
  } 


@media (max-width: 800px) {

  
  footer {
  margin-top: 1rem;
  margin-bottom: 1rem;
  background: #dedede;
  padding: 3vw 1vw 3vw 0.89vw;
  }

  footer p {
    margin: 0 0.64rem;
  }

  h1 {
   margin: 0 0.64rem;
   margin-top: 1rem; 
  }
  
  .project .project-body {
  margin: 0 0.64rem;
  }

  .tag-bio {
  margin: 0 0.64rem;
  }

  .tag-bio a {
  color: #20c320;
  text-decoration: none;
  }

  .intro {
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    color: #686868;
    text-shadow: 0 0 8px #ffbbfd, 0 0 16px #ffbbfd, 0 0 24px #ffbbfd;
  }
  
  .intro p {
    font-size: 1rem;
    font-weight: 300;
    margin: 1rem 0.64rem;
  }

  .intro a {
    color: #20c320;
  }

  .all {
  margin-top: 1rem;
  margin: 0 0.64rem;
  }

  .contact .contact-body {
  margin: 0 0.64rem;
  margin-bottom: 1rem;
  }

  .nav-desktop {
    display: none;
  }

  .nav-mobile-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .color-controls {
    margin: 0 0.64rem;
  }

}


.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin: 2rem 0;
}

.home-section {
  background: #dedede;
  padding: 1vw;
  border-top: 1px solid var(--text-color);
}

.home-grid {
  padding-top: 0;
}

.project-grid a {
  text-decoration: none;
  color: var(--text-color);
  display: block;
  transition: transform 0.2s ease;
}


.project-grid a:hover img {
  transform: translateY(-4px);
}

.project-card {
  background: inherit;
  height: auto;
  max-width: 250px;
  margin: 0 auto;
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 0rem;
  border-bottom: 1px solid var(--text-color);
  box-sizing: border-box;
}

.project-card h2 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  margin-bottom: 1rem;
}

/* Media queries now come LAST, so they correctly override the base rules above */

@media (max-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-card {
    max-width: 100%;
    margin: 0 0.64rem;
  }

  .project-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 0rem;
  }

  .project-card h2 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    max-width: 100%;
    margin: 0 0.64rem;
  }

  .project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0rem;
  }

  .project-card h2 {
  font-size: 1.4rem;
  margin: 0.5rem 0;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 300;
  margin-bottom: 1rem;
  }

}



.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.project-gallery img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.project-gallery figure:only-child {
  max-width: 400px;
  margin: 0 auto;
}

.project-gallery figcaption {
  font-size: 0.7rem;
  color: var(--text-color);
  margin-top: 0.4rem;
  text-align: left;
  font-family: "Inter Tight", sans-serif;
}

@media (max-width: 500px) {
  .project-gallery figure:only-child {
  max-width: 400px;
  margin: 0 0.64rem;
  margin-bottom: 1rem;
}

}



.project .project-body a {
  color: #20c320;
}



.color-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-label {
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .color-label {
    display: none;
  }

  .color-controls {
    gap: 0.75rem;
  }
}

.color-controls input[type="color"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.color-controls label {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 1px solid #ffffff;
  cursor: pointer;
}

.color-controls label:hover {
  border-color: #ff0000;
}

#bg-color-btn {
  background-color: var(--bg-color);
}

#text-color-btn {
  background-color: var(--text-color);
}




#custom-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plex Mono', monospace;
    max-width: 300px;
    margin-bottom: 2rem;
  }

  .audio-btn {
    background-color: transparent; 
    color: #ff00ff;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .audio-btn svg {
    width: 15px;
    height: 15px;
    display: block;
    fill: #ff00ff;
  }

  .progress-container {
    flex: 1;
    height: 8px;
    background-color: rgba(0, 255, 0, 0.4);
    position: relative;
    cursor: pointer;
  }

  .progress-bar {
    height: 100%;
    background-color: #ff00ff;
    width: 0%;
  }

  .time {
    font-size: 12px;
    color: #ff00ff;
    min-width: 80px;
    text-align: right;
  }



  .lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 255, 0, 0.4);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: var(--text-color);
  cursor: pointer;
  line-height: 1;
}



.project-tags a {
  text-decoration: none;
  font-size: 0.75rem;
  font-family: "Roboto Slab", serif;
  font-weight: 400;
  color: var(--text-color);
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0.5rem auto;
  max-width: 250px;
}

@media (max-width: 800px) {
  .project-card {
    max-width: 100%;
    margin: 0 0.64rem;
  }

  .project-tags {
    max-width: 100%;
    margin: 0.5rem 0.62rem;
  }
}


@media (max-width: 600px) {
.project-card {
    max-width: 100%;
    margin: 0 0.64rem;
  }

  .project-tags {
    max-width: 100%;
    margin: 0.5rem 0.62rem;
  }
}

.project-tags li {
  font-size: 0.75rem;
  font-family: "Roboto Slab", serif;
  font-weight: 400;
  text-decoration: none;
  background: rgba(0, 255, 0, 0.4);
  color: var(--text-color);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.article-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0.5rem 0;
}

@media (max-width: 800px) {

  .article-tags {
  margin: 0.5rem 0.62rem;
}

}
.article-tags a {
  text-decoration: none;
  font-size: 0.75rem;
  font-family: "Roboto Slab", serif;
  font-weight: 400;
  color: var(--text-color);
}

.article-tags li {
  font-size: 0.75rem;
  font-family: "Roboto Slab", serif;
  font-weight: 400;
  text-decoration: none;
  background: rgba(0, 255, 0, 0.4);
  color: var(--text-color);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}