/* ===============================
   Global Reset & Base Styles
   =============================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  color: #1C1440;
  width: 100%;
  overflow-x: hidden;
}

/* On small screens, stack sidebar above content */
@media only screen and (max-width: 600px) {
  body {
    flex-direction: column;
  }
}

/* Global hover for images */
img:hover {
  transform: scale(1.01);
  transition: transform 0.3s ease;
}

/* ===============================
   Sidebar
   =============================== */

.sidebar {
  width: 220px;
  position: fixed;
  height: 100vh;
  background-color: white;
  padding: 49px 47px 47px 47px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.3s ease, padding 0.3s ease;
  box-sizing: border-box;
}

@media only screen and (max-width: 600px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 2em;
  }
}

/* Logo */
.logo img {
  width: 80%;
  margin-bottom: 20px;
  transform: none;
}

/* Top nav links */
.top-links ul {
  list-style: none;
  padding: 0;
}

.top-links ul li {
  margin-bottom: 10px;
}

.top-links ul li a {
  text-decoration: none;
  color: #1C1440;
  font-size: 16px;
}

.top-links ul li a:hover {
  color: #4BA7BE;
}

.top-links ul li a.active {
  color: #AA0909;
}

/* Bottom links */
.bottom-links {
  margin-bottom: auto;
  margin-top: 39px;
}

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

.bottom-links ul li a {
  text-decoration: none;
  color: #1C1440;
  font-size: 16px;
}

.bottom-links ul li a:hover {
  color: #4BA7BE;
}

.bottom-links ul li a.active {
  color: #AA0909;
}

/* Instagram icon */
.instagram-logo img {
  width: 17px;
  margin-top: 10px;
}

/* ===============================
   Work / Index Page
   =============================== */

.content {
  margin-left: 240px;
  padding: 20px;
  width: calc(100% - 240px);
}

@media only screen and (max-width: 600px) {
  .content {
    margin: 0;
    width: 100%;
    padding: 1em;
  }
}

/* Year sections */
.year-section {
  margin-bottom: 40px;
}

.year-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.year-title {
  margin-bottom: 2rem;
  font-size: 20px;
}

/* Image list layout (work) */
.image-container {
  width: 95%;
  margin: auto;
  padding: 40px 0;
}

@media only screen and (max-width: 600px) {
  .image-container {
    padding: 1em 0;
  }
}

.image-gallery {
  display: flex;
  gap: 20px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.image-item {
  text-align: center;
  margin-bottom: 33px;
}

.image-item img {
  width: 100%;
  height: 100%;
}

.caption {
  margin-top: 11px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .image-gallery {
    flex-direction: column;
  }
}

/* ===============================
   About Page
   =============================== */

.about-content {
  margin-left: 240px;
  padding-left: 20px;
  margin-top: 49px;
  margin-right: 20px;
  width: calc(100% - 240px);
  box-sizing: border-box;
  font-size: 16px;
}

@media only screen and (max-width: 600px) {
  .about-content {
    margin: 0;
    width: 100%;
    padding: 0;
  }
}

.about-container {
  width: 95%;
  margin: auto;
  padding: 40px 0;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto 49px auto;
  align-items: start;
}

.about-gallery img {
  /* reserved for future tweaks */
}

@media only screen and (max-width: 600px) {
  .about-gallery {
    display: flex;
    flex-direction: column;
  }
}

/* ===============================
   Illustration Page
   =============================== */

.illustration-content {
  margin-left: 240px;
  padding-left: 20px;
  margin-top: 49px;
  margin-right: 20px;
  width: calc(100% - 240px);
  box-sizing: border-box;
}

@media only screen and (max-width: 600px) {
  .illustration-content {
    margin: 0;
    width: 100%;
  }
}

.illustration-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto 49px auto;
}

.illustration-item {
  width: 100%;
  height: auto;
}

.illustration-item.wide {
  grid-column: span 2;
}

@media (max-width: 1024px) {
  .illustration-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .illustration-gallery {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Books & Prints Page
   =============================== */

.books-prints-content {
  margin-left: 240px;
  padding-left: 20px;
  margin-top: 49px;
  margin-right: 20px;
  width: calc(100% - 240px);
  box-sizing: border-box;
}

@media only screen and (max-width: 600px) {
  .books-prints-content {
    margin: 0;
    width: 100%;
  }
}

.books-gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto;
}

/* Individual book item */
.book-item {
  position: relative;
  display: block;
  overflow: visible;
  border-radius: 5px;
}

.book-item img {
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}

.book-item:hover img {
  transform: scale(1.01);
}

/* Overlay for “artist book; thesis” etc. */
.book-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0);
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 1;
}

.book-item:hover::after {
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.01);
}

.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 44px;
  font-weight: bold;
  color: #1C1440;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-family: 'Anaheim', sans-serif;
  z-index: 2;
}

.book-item:hover .overlay-text {
  opacity: 1;
}

@media (max-width: 768px) {
  .overlay-text {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .overlay-text {
    font-size: 16px;
  }
}

/* ===============================
   Thesis Page
   =============================== */

.thesis-content {
  margin-left: 240px;
  padding-left: 20px;
  margin-top: 49px;
  margin-right: 20px;
  width: calc(100% - 240px);
  box-sizing: border-box;
}
/* FIX: full-width thesis on mobile */
@media only screen and (max-width: 600px) {
  .thesis-content {
    margin: 0;
    padding: 1em;
    width: 100%;
  }
}

.thesis-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto;
}

/* Top “overall” item */
.thesis-top-item {
  position: relative;
  display: block;
  overflow: visible;
  border-radius: 5px;
}

.thesis-top-item img {
  width: 100%;
  height: auto;
  transform: none;
}

/* Individual thesis images */
.thesis-item {
  position: relative;
  overflow: visible;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

.thesis-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

/* 2 columns */
@media (max-width: 1024px) {
  .thesis-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 column on small screens */
@media (max-width: 768px) {
  .thesis-gallery {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Zine Layout
   =============================== */

.zine-content {
  margin-left: 240px;
  padding-left: 20px;
  margin-right: 20px;
  margin-top: 49px;
  width: calc(100% - 240px);
  box-sizing: border-box;
}

/* Top zine image */
.zine-top-item {
  position: relative;
  display: block;
  overflow: visible;
}

.zine-top-item img {
  width: 100%;
  height: auto;
  transform: none;
}

.zine-top-gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto;
}

/* Zine bottom grid */
.zine-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto;
}

.zine-item {
  position: relative;
  overflow: visible;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

.zine-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
  .zine-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .zine-gallery {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Children's Book (Coco)
   =============================== */

.coco-content {
  margin-left: 240px;
  padding-left: 20px;
  margin-right: 20px;
  margin-top: 49px;
  width: calc(100% - 240px);
  box-sizing: border-box;
}

.coco-top-item {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: visible;
  margin-bottom: 74px;
}

.coco-top-item img {
  width: 45%;
  height: auto;
  margin: 0 auto;
  transform: none;
}

@media (max-width: 768px) {
  .coco-top-item img {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .coco-top-item img {
    width: 100%;
    padding: 10px;
  }
}

.coco-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  width: 95%;
  margin: 0 auto;
}

.coco-item {
  position: relative;
  overflow: visible;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

.coco-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
  .coco-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .coco-gallery {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   Fullscreen Viewer (artwork.html)
   =============================== */

.fullscreen-content {
  margin: 0 auto;
  margin-left: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  padding-top: 49px;
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
}

@media only screen and (max-width: 600px) {
  .fullscreen-content {
    height: 100%;
    padding: 0;
    margin-left: 0;
  }
}

.artwork-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: calc(100% - 260px);
}

.artwork-fullscreen {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.artwork-fullscreen img {
  max-width: 100%;
  max-height: calc(100vh - 49px);
  object-fit: contain;
  cursor: auto;
  min-width: 300px;
  min-height: 300px;
}

/* Nav arrows */
.nav-arrow {
  font-size: 24px;
  font-weight: bold;
  color: #1C1440;
  background: none;
  border: none;
  cursor: pointer;
  visibility: visible;
  opacity: 1;
}

.nav-arrow.hidden {
  visibility: hidden;
  opacity: 0;
}

.nav-arrow:hover {
  color: #4BA7BE;
}

.left-arrow {
  align-self: center;
}

.right-arrow {
  align-self: center;
}

#artwork-image {
  transform: none;
  transition: opacity 0.9s ease-in-out;
}
