* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  margin: 0; 
}  

.row {
  display: flex;
}

.sidebar {
  position: fixed;
  width: 20%;
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
}

.main-content {
  margin-left: 20%;
  width: 80%;
  padding: 24px;
}

.main-content-links {
  margin-left: 20%;
  width: 80%;
  padding: 100px;
}

.main-content-links ul {
    list-style: none;
    padding: 0;
}

.image-container {
    width: 100%;
    margin-top: 20px;
    overflow: hidden; 
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 1.2em 0;     /* similar spacing to your paragraphs */
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.main-content-links li {
  margin-bottom: 20px;
  font-size: 15pt;
  line-height: 1.0;
}

.title {
  font-size: 15pt;
  line-height: 1.5;
  padding: 0 0 16px 0;
}

.menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  font-size: 15pt;
  line-height: 1.5;
}

.col-3 {
  font-size: 15pt;
  line-height: 1.5;
  width: 100%;
}

.col-9 {
  font-size: 15pt;
  line-height: 1.5;
  width: 100%;
}

a {
  text-decoration: none;
  color: black;
}

a:hover {
  color: darkorchid;
}

.menu a.active {
  color: darkorchid;
}

.grid {
  margin: 0;
  padding-left: 0;
  width: 100%;

  /* left-to-right, row-by-row flow */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4vw;
}

.grid-item {
  display: block;
  width: 100%;
  margin-bottom: 0;
}

.grid-sizer {
  display: none;
}

.work-grid-video {
  width: 100%;
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 600px;
  object-fit: cover;
}

.grid-item img:hover {
  box-shadow: 0 0 7px 3px lightgrey;
}

.grid-item-gif {
  position: relative;
  visibility: hidden;
}

.grid-item:hover .grid-item-gif {
  visibility: visible;
}

.work-name {
  margin-top: 8px;
  margin-bottom: 2px;
  padding: 4px 0;
}

.grid-item:nth-child(7n+1) img {
  aspect-ratio: 1;
}

.grid-item:nth-child(7n+2) img {
  aspect-ratio: 1;
}

.grid-item:nth-child(7n+3) img {
  aspect-ratio: 1;
}

.grid-item:nth-child(7n+4) img {
  aspect-ratio: 1;
}

.grid-item:nth-child(7n+5) img {
  aspect-ratio: 1;
}

.grid-item:nth-child(7n+6) img {
  aspect-ratio: 1;
}

.grid-item:nth-child(7n+7) img {
  aspect-ratio: 1;
}

@media only screen and (min-width: 1025px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-item img {
    height: auto;
    min-height: 200px;
  }

}

@media only screen and (min-width: 1400px) {
  .sidebar {
    width: 18%;
  }
  
  .main-content {
    margin-left: 18%;
    width: 82%;
  }
  
  .grid {
    column-gap: 1.2vw;
  }
}

@media only screen and (max-width: 1200px) {
  .grid {
    column-gap: 1.6vw;
  }
}


@media only screen and (max-width: 1024px) {
  .sidebar {
    width: 25%;
  }
  
  .main-content {
    margin-left: 25%;
    width: 75%;
  }
  
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2vw;
  }
}

@media only screen and (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 16px;
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }
  
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3vw;
    width: 100%;
    padding: 0;
  }
  
  .grid-item {
    margin-bottom: 3vw;
  }
  
  .grid-item img {
    aspect-ratio: unset;
  }
}

@media only screen and (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .grid-item {
    margin-bottom: 24px;
  }
  
  .title {
    font-size: 24px; 
  }
}

@media only screen and (max-width: 480px) {
  .sidebar, .main-content {
    padding: 12px;
  }
  
  .grid-item {
    margin-bottom: 20px;
  }
}