@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");


body {
    background-color: rgb(255, 255, 255);
    margin: 0;
    font-family: "DM Sans", sans-serif;
}

.caption{
   font-family: "DM Sans", sans-serif;
   font-size: 0.75em;
   margin-bottom: 3rem;
   margin-top: -1rem;

}

.navbar{
    color: black;
    position:fixed;
    background-color: rgb(255, 255, 255);
    border-bottom: 1px solid #333333;
    text-decoration: none;
    overflow: hidden;
    padding: 0.5em 0.5em 0.5em;
    display: flex;
    align-items: center;
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    list-style: none; /* Removes bullet points */
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    
}

.navbar a{
    padding: 2rem 2rem 1rem;
    font-family: inherit;
    font-weight:600;
}

.navbar #name {
    margin-right: auto;
}

.navbar a:not(#name) {
    margin-left: 2rem;
     font-size:1rem;
     font-weight:400;
}

#name{
  font-size:1.5rem;
  font-weight:300;
  letter-spacing:-0.03em;
}

a{
    color: black;
    text-decoration: none;
    font-family: "DM Sans", sans-serif;
    font-size: 0.75em;
}

a:hover{
        color: rgb(6, 200, 41);
}

#here_link{
  font-weight:600;
  font-size:1em;

}

.index-view{
position: relative;
    display: flex;
    flex-direction: column;
     font-family: "DM Sans", sans-serif;
    font-size:1.5em;
    padding-top:2em;
    padding-left:2em;
    padding-right:2em;
    padding-bottom: 2rem;
    font-weight: 300;
    line-height: 2;
    letter-spacing: -0.02em;
    min-height: 70vh;
    overflow: visible;
    padding-top:5em;
}

.background-preview{
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(50rem, 90vw);
    max-width: 100%;
    max-height: min(80vh, 60rem);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.background-preview.visible{
    opacity: 1;
}

.background-preview img{
    display: block;
    width: 85%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.project{
    position: relative;
    z-index: 1;
    color: black;
    text-decoration: none;
    border-bottom: 1px solid #333333;
}

.project:hover{
    color: rgb(6, 200, 41);
}

.footnote{
    padding: 1.5rem 2rem 2rem;
    text-align: left;
    font-family: "DM Sans", sans-serif;
    font-size: 0.75em;
    color: #333333;
    margin-top: 3rem;
}


.grid-page {
  padding: 4rem 3rem 3rem 3rem;
  max-width: 1600px;
   padding-top:8em;
  margin: 0 auto;
  color: #111111;
}

.project-grid {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.project-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1 1 0;
  min-width: 0;
}

.project-card {
  background: rgb(255, 255, 255);
  overflow: hidden;
  transition: opacity 0.75s ease, transform 0.35s ease;
}

.project-card.fade-card {
  opacity: 0;
  transform: translateY(1rem);
}

.project-card.fade-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover{
   transform: scale(1.02);
}



.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-copy {
  margin-top: 0.35rem;
}

.project-copy h2 {
  margin: 0;
  font-size: 1rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.project-copy h2:hover {
color: rgb(6, 200, 41);
 cursor: pointer;
}

.project-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-link:hover ~ .project-copy h2 {
  color: rgb(6, 200, 41);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 2rem;
  padding: 2rem 2rem 2rem;
  min-height: calc(100vh - 4rem);
  box-sizing: border-box;
  padding-top:6em;
  position: relative;
}

.project-layout::after {
  content: "";
  position: fixed;
  top: 8rem;
  bottom: 3rem;
  left: calc(min(320px, calc(100vw - 4rem)) + 6rem);
  width: 1px;
  background-color: #000000;
  pointer-events: none;
  z-index: 3;
}

.project-info {
  position: fixed;
  top: 8rem;
  left: 2rem;
  width: min(320px, calc(100vw - 4rem));
  max-height: calc(100dvh - 10rem);
  align-self: start;
  padding-top: 0rem;
  padding-right: 0rem;
  overflow: auto;
  box-sizing: border-box;
  z-index: 2;
  grid-column: 1;
}

.project-gallery {
  grid-column: 2;
}


.project-meta {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-info h1 {
  font-size: 1.25rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.projectyear{
  font-size: 30rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.project-info p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #222;
}

.fade-image,
.fade-card {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.75s ease var(--fade-delay, 0s), transform 0.75s ease var(--fade-delay, 0s);
  will-change: opacity, transform;
}

.fade-image.is-visible,
.fade-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.directory{
  margin-bottom:2rem;
}

.directory-mobile {
  display: none;
}

.back-link {
display: block; /* Keeps it on its own line */
  width: fit-content;
  font-size: 0.8rem;
  border-bottom: 1px solid #111;
  padding-bottom: 0.15rem;
  font-weight:800;
}

.back-link:hover {
  color: rgb(6, 200, 41);
  border-color: rgb(6, 200, 41);
}

.project-gallery {
  display: flex;
   padding-top:2em;
   padding-left:4em;
  flex-direction: column;
  gap: 2rem;
  cursor: pointer;
  padding-right: 0.25rem;
}

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

.project-gallery .gallery-image {
  cursor: pointer;
}

.project-slideshow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
  gap:10rem;
}

.project-slideshow__frame {
  position: relative;
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  padding: 1 rem;
  box-sizing: border-box;
}

.project-slideshow .project-slideshow__image {
  display: none;
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid #ececec;
    background: #f9f9f9;
}

.project-slideshow .project-slideshow__image.is-active {
  display: block;
}

.project-slideshow__controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-slideshow__button {
  background: transparent;
  border: none;
  color: #111;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
}

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  z-index: 1000;
}

.image-modal.is-open {
  display: flex;
}

.image-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.image-modal__nav {
  position: absolute;
  top: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: white;
}

.image-modal__nav--prev {
  left: 1rem;
}

.image-modal__nav--next {
  right: 1rem;
}

.image-modal img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: none;
}

.aboutbio{
  font-family: "DM Sans", sans-serif;
  font-size: 2.5rem;
  padding-right:15rem;
  margin-bottom:5rem;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0em;
}

.cv{
display: flex;
  flex-direction: row;
  flex-wrap: wrap; /* Allows columns to wrap on smaller viewports */
  gap: 20px;       /* Adds uniform space between columns */
  width: 100%;
}

.cv-container{
  border-top: 1px solid #333333;
flex: 1;         /* Ensures all columns distribute width equally */
  min-width: 250px;/* Triggers the wrap when space falls below this value */
  box-sizing: border-box;
}

.aboutheading{
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  padding-bottom: -0.5rem;
}

.aboutbody{
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.aboutbodyhover {
  color: black;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 300;
}
@media (max-width: 820px) {

  #name{
    font-size:1rem;
  }

  .navbar{
    color: black;
    position:fixed;
    background-color: rgb(255, 255, 255);
    border-bottom: 1px solid #333333;
    text-decoration: none;
    overflow: hidden;
    padding: 0.5em 0.5em 0.2em;
    margin-top:0rem;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    list-style: none; /* Removes bullet points */
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;   
}

.navbar a:not(#name) {
    margin-left: 2rem;
     font-size:1rem;
     font-weight:400;
}
  .project-grid {
    flex-direction: column;
    gap: 0.25rem;
  }

  .opensources-card {
    margin-top: 1rem;
  }

  .grid-page {
    padding: 10rem 1rem 1rem 1rem;
  }

  .project-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 0.25rem;
    padding: 1rem 1rem 1rem;
    padding-top: 8rem;
  }

  .project-info {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    max-height: none;
    min-height: auto;
    height: auto;
    border-right: none;
    padding-right: 0;
    padding-top: 0;
    grid-column: auto;
  }

  .index-view {
    font-size:2rem;
  }

  .project-info::after {
    display: none;
  }

  .project-layout::after {
    display: none;
  }

  .directory {
    display: none;
  }

  .directory-mobile {
    display: block;
    margin-top: 0.5rem;
  }

  .project-gallery {
    overflow: visible;
    padding-left: 0;
    grid-column: auto;
    padding-top:4rem;
  }

  .project-slideshow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    gap: 2rem;
  }

  .aboutbio{
  font-family: "DM Sans", sans-serif;
  font-size: 1.75rem;
  padding-right:0rem;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0em;
}

}