* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size:0.98rem;
  /* overflow: hidden; */
}

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden; /* No scrollbars */
  width: 100%;
  height: 100%;
}


#home-body {
  width: 100%;
  height: 100%;
  background-image: url("/images/background.webp");
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* LEFT */
#home-left {
  width: 20%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
#plant-img {
  width: 100%;
  height: 30%;
}

/* MIDDLE */
#carpet {
  width: 60%;
  height: 80%;
  background-image: url("/images/carpet.webp");
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* TABLE */
#table {
  height: 70%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
#table-img {
  height: 60%;
  position: absolute;
  top: 20%;
  z-index: 1;
}
#table-contents-parent {
  height: 80%;
  display: flex;
  justify-content: center;
  flex-flow: row wrap;
  z-index: 2;
}

/* BUTTONS (replace links) */
.table-contents-child {
  height: 60%;
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transition: transform 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.table-contents-child:hover {
  transform: scale(1.3);
}

#contact-info-btn, #portfolio-btn {
  margin-top: 5rem;
}
#contact-info-btn {
  margin-top: 4rem;
  rotate: -45deg;
  padding-right: 2rem;
}
#portfolio-btn {
    margin-right: 1.6rem;
}
#portfolio-btn > div {
  rotate: 30deg;
  padding-right: 4rem;
}
#music-btn {
  display: flex;
  justify-content: flex-start;
  padding-bottom: 5rem;
}
#contact-img {
  height: 35%;
}
#cover-img {
  height: 80%;
  padding-top: 2rem;
}
#portfolio-img {
  height: 60%;
  rotate: 10deg;
}
#computer-img {
  height: 30%;
}
#chair {
  height: 30%;
  z-index: 0;
}
#chair-img {
  height: 100%;
}

/* RIGHT */
#home-right {
  width: 20%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#doggybed-img, #dog-img {
  height: 40%;
  width: 80%;
}
#dog-img {
  rotate: 60deg;
}
#dogtoy-img {
  position: absolute;
  left: 65%;
  top: 70%;
  width: 30%;
}

/* MUSIC ANIMATION */
@keyframes rotate-custom {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(10deg); }
}
.animated-image.playing {
  animation: rotate-custom 0.6s ease-in-out infinite;
}

/* EXPANDING IMAGE OVERLAY */
#expand-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#expand-image {
  width: 10%;
  height: auto;
  /* border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5); */
  transition: transform 1s ease, width 1s ease, opacity 1s ease;
  transform: scale(0.5);
  opacity: 0;
}
#expand-overlay.active #expand-image {
  width: 70%;
  transform: scale(1);
  opacity: 1;
}

/* Larger expansion just for About Me */
#expand-overlay.active #expand-image.large-expand {
  width: 90%; /* expand more than normal (default 70%) */
  transform: scale(1.1);
}


/* RESET BUTTON LOOK */
button {
  all: unset;
}

/* TEXT */
ul {
  list-style: none;
  font-family: sans-serif;
}

.title {
    text-decoration: underline;
    z-index: 1000;
}

/* Close button in overlay */
#close-overlay {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;

  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;

  z-index: 10000;
  transition: transform 0.2s ease, background 0.2s ease;
  line-height: 1; /* Prevent vertical misalignment */
  padding-bottom: 1px; /* Subtle optical balance */
}

#close-overlay:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.15);
}

/* RESPONSIVE DESIGN FIXES */
@media (max-height: 700px) {
  * {
    font-size: 0.88rem;
  }
  .table-contents-child {
    width: 25%;
    height: 50%;
  }
}
@media (max-height: 756px) {
  * {
    font-size: 0.92rem;
  }
  .table-contents-child {
    width: 28%;
    height: 48%;
  }
}
@media (max-width: 700px) {
  * {
    font-size: 0.82rem;
  }  
  #home-left, #home-right {
    width: 15%;
  }
  #carpet {
    width: 85%;
  }
  #chair-img {
    height: 85%;
  }
  #plant-img {
    height: 15%;
  }
  #doggybed-img, #dog-img {
    height: 20%;
    width: 120%;
  }
}
@media (max-width: 550px) {
  * {
    font-size: 0.75rem;
  }
  #home-left, #home-right {
    width: 20%;
  }
  #carpet {
    width: 80%;
    height: 60%;
  }
  #table {
    width: 100%;
  }
  #table-img {
    height: 40%;
    top: 30%;
  }
  #table-contents-parent {
    height: 70%;
  }
  #cover-img {
    height: 100%;
  }
  #plant-img {
    height: 14%;
  }
  #doggybed-img, #dog-img {
    height: 20%;
    width: 100%;
  }
}



@media (max-width: 472px) {
  * {
    font-size: 0.65rem;
  }
  #plant-img {
    height: 12%;
  }
  #doggybed-img, #dog-img {
    height: 15%;
  }
}
@media (max-width: 410px) {
  #table-img {
    height: 35%;
    top: 35%;
  } 
  #plant-img {
    height: 10%;
  }
  #doggybed-img, #dog-img {
    height: 12%;
  } 
}
@media (max-width: 400px) {
  .table-contents-child {
    width: 22%;
    transform: scale(0.85);
  }
}

@media (max-width: 350px) {
  * {
    font-size: 0.7rem;
  }
  #carpet {
    height: 50%;
    width: 90%;
  }
  #table {
    width: 80%;
  }
  #table-img {
    height: 30%;
    top: 38%;
  }
  #table-contents-parent {
    height: 70%;
    /* width: 50%; */
  }
  #table-contents-child {
    justify-content: center;
  }
  #portfolio-btn {
    margin-right: 0.5rem;
  }
}
@media(max-width: 315px) {
  * {
    font-size: 0.66rem;
  }
  #carpet {
    height: 60%;
    width: 90%;
  }
  #table {
    width: 80%;
  }
  #table-img {
    height: 30%;
    top: 38%;
  }
  #table-contents-parent {
    height: 80%;
    width: 110%;
  }
  #table-contents-child {
    height: 15%;
    justify-content: center;
    width: 15%;
  }
  #cover-img {
    height: 60%;
  }
  #contact-img {
    height: 30%;
  }
  #portfolio-btn {
    margin-right: 0;
  }
}