/* variables */
:root {
  --animateTransition: 1.5s;
  --primary-tablet-color: hsl(237, 68%, 16%);
  --primary-tablet-color-2: hsl(0, 0%, 100%);
}


/* reset, html, and body styles */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}
html {
  font-size: 62.5%;
}
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url(../images/table.jpg) center/cover no-repeat;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);

}


/* common styles */
h2 {
  font-size: 3.5rem;
}
.highlight {
  color: hsl(0, 0%, 0%);
  background-color: yellow;
}

/* table styles */
.table {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}


.center-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  top: 0;
  width: 100%;
  height: 100%;
}

/* information container styles */
.center-content .anim-order {
  transform: scale(10);
  transform-origin: center;
  position: fixed;
  top: 45%; 
  right: 45%; 
  bottom: 45%;
  left: 45%; 
  margin: auto;
  z-index: 20;
}

.coffee-box:hover, .food-box:hover, .tablet:hover {
  cursor: pointer;
}

.anim-order > section,
.anim-order > h2, 
.anim-order > p,
.anim-tablet * {
  transform: translateZ(0);
  -webkit-font-smoothing: subpixel-antialiased;
  backface-visibility: hidden;
}
.anim-order > section,
.anim-order > h2, 
.anim-order > p {
  transform: translateZ(0) scale(calc(1/10));
}


.anim-food {
  transform: translate(10rem, -10rem);
}

.coffee-box, .food-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: fit-content;
  position: absolute;
  transition: var(--animateTransition);
  z-index: 6;
}


.coffee-box {
  left: 5%;
  width: 17rem;
}
.coffee-box .table-section-heading {
  left: 40px;
}
.coffee-box.anim-order {
  top: auto;
  right: auto;
  bottom: auto;
}
.food-box {
  right: 5%;
  width: 19rem;
} 

.food-box.anim-order {
  top: auto;
  left: auto;
  bottom: auto;
}

.table-section-heading {
  box-sizing: content-box;
  background-color: hsl(0, 0%, 0%, 0.6);
  color: hsl(0, 0%, 100%);
  border-radius: 5px;
  width: fit-content;
  padding: 10px;
  max-width: 120px;
  text-align: center;
  position: absolute;
  z-index: 3;
  font-size: 2.5rem;
}

.coffee, .plate {
  width: 100%;
  height: auto;
}

.food {
  width: 65%;
  height: auto;
  position: absolute;
  top: 3.5rem;
  left: center;
  z-index: 3;
  transition: 1s;
}

.table-section {
  position: absolute;
  width: 300%;
  display: none;
}
.table-section h2 {
  font-size: 4rem;
  margin-bottom: 3rem;
}
.table-section p {
  font-size: clamp(1.6rem, 2rem, 3rem);
  z-index: 2;
}

.about-me, .likes-interests {
  color: hsl(0, 0%, 0%);
}
.likes-interests p:first-of-type {
  margin-bottom: 15px;
}


/* center content */
.tablet {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20vw; 
  height: 20vh; 
  background: url(../images/realTablet.webp) center/100% 100% no-repeat;
  border-radius: 1rem;
  transition: var(--animateTransition);
  z-index: 6;
}


.anim-tablet {
  position: fixed;
  top: -100%; 
  right: -100%; 
  left: -100%; 
  bottom: -100%;
  margin: auto;
  transform: scale(5);
  z-index: 10;
}
.anim-tablet > * {
  transform: scale(calc(1/5))
}

/* ----- TABLET CONTENT ----- */
.tablet-content {
  background-color: var(--primary-tablet-color);
  color: var(--primary-tablet-color-2);
  position: absolute;
  width: 500%;
  height: 500%;
  overflow-x: hidden;
  overflow-y: scroll;
  display: none;
}

.tablet-content li,
.tablet-content p, 
.tablet-content label {
  font-size: 2rem;
}  


nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 6rem;
}
nav ul,
nav li,
nav a {
  height: 100%;
}
nav li,
nav a {
  display: flex;
  align-items: center;
}
nav ul {
  display: flex;
  align-items: center;
  list-style: none;
}
nav li {
  color: var(--primary-tablet-color-2);
  text-align: center;
}
nav a {
  color: hsl(0, 0%, 100%);
  text-decoration: none;
  padding: 25px 30px;

}
nav a:hover {
  background-color: var(--primary-tablet-color-2);
  color: var(--primary-tablet-color);
}
nav a:active {
  background-color: transparent;
  color: var(--primary-tablet-color-2);
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  height: 100%;
}
h1 {
  font-size: 8rem;
  width: 50rem;
  text-align: center;
}
.hand-img {
  width: 30rem;
  height: auto;
  rotate: -25deg;
}

/* SKILLS SECTION STYLES */
.skills-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background-color: var(--primary-tablet-color-2);
  padding: 20px;
  margin-bottom: 80px;
}
.skills-section h2, .skill-name {
  color: hsl(0, 0%, 0%);
}
.skills-section h2 {
  margin-right: 30px;
  font-size: 4rem;
}
.all-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.skill-img {
  width: 8rem;
  height: auto;
}
.skill-name {
  font-size: 2rem;
}

/* PROJECT SECTION STYLES */
.projects-section {
  margin-bottom: 100px;
}
.projects-section h2 {
  font-size: 6rem;
  text-align: center;
  margin-bottom: 40px;
}
.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin: 0 auto;
  margin-bottom: 40px;
}
.project-name {
  color: var(--primary-tablet-color-2);
  font-size: clamp(2rem, 2.5rem, 3rem);
  text-align: center;
  margin-bottom: 20px;
}
.project-img-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.project-img {
  width: auto;
  height: 30rem;
}

.project-description-wrapper {
  text-align: center;
  max-width: 60%;
  margin-bottom: 20px;
}

.project-links-wrapper {
  display: flex;
  gap: 15px;
  width: fit-content;
}
.project-link {
  font-size: 2rem;
  color: var(--primary-tablet-color-2);
  background-color: hsl(0, 0%, 0%);
  padding: 10px 50px;
  text-decoration: none;
  border-radius: 5px;
}
.project-link:hover {
  color: hsl(0, 0%, 0%);
  background-color: var(--primary-tablet-color-2);
}
.project-link:active {
  color: var(--primary-tablet-color-2);
  background-color: hsl(0, 0%, 0%);
}

/* CONTACT SECTION STYLES */
.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 100px;
  width: fit-content;
  height: fit-content;
  background-color: var(--primary-tablet-color-2);
  padding: 30px;
  border-radius: 5px;
}
.contact-section h2 {
  color: hsl(0, 0%, 0%);
  margin-bottom: 30px;
  text-align: center;
  font-size: clamp(4rem, 5rem, 6rem);
}

.social-area {
  margin-left: 0;
  width: 100%;
}
.social-area h3 {
  color: hsl(0, 0%, 0%);
  font-size: 2.5rem;
  margin-bottom: 5px;
}
.social-area ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
.social-img {
  width: 5rem;
  height: auto;
}


/* IMAGE ATTRIBUTION STYLES */
footer {
  background-color: hsl(0, 0%, 0%);
  padding: 100px;
}

.attribution-area h2 {
  font-size: clamp(2rem, 3rem, 6rem);
}
.img-attrib-description {
  margin-bottom: 30px;
}
.attribution-area ul {
  list-style-position: inside;
  width: 100%;
}

.keyboard {
  position: absolute;
  left: 42.5%;
  top: 70%;
  width: 25rem;
  height: auto;
  display: none;
}

/* BACK BUTTON STYLES */
.back-to-table {
  position: fixed;
  bottom: 1.5rem;
  border: none;
  border-radius: 9999px;
  padding: 1rem 2.5rem;
  background-color: hsl(0, 100%, 27%);
  color: hsl(0, 0%, 100%);
  font-size: 2rem;
  z-index: 100;
}
.back-to-table:hover {
  background-color: hsl(0, 100%, 60%);
}
.back-to-table:active {
  background-color: hsl(0, 100%, 27%);
}


/* javascript classes */
.hide-content {
  display: none;
}
.show-content {
  display: inline-block;
}


/* ------ MEDIA QUERIES ----- */
@media (max-width: 1000px) {
  .tablet {
    height: 18vh;
  }
  .keyboard {
    left: 35%;
  }
  nav {
    margin-bottom: 100px;
  }
  header {
    flex-direction: column;
    margin-bottom: 100px;
  }
}

@media (max-width: 800px) {
  .project-img-wrapper {
    flex-direction: column;
    align-items: center;

  }
  .desktop-img {
    width: 100%;
    height: auto;
  }
  .mobile-img {
    width: 50%;
    height: auto;
  }
  .contact-section {
    max-width: 100%;
    border-radius: 0;
  }
}

@media (max-width: 700px) {
  .tablet-heading {
    width: 200px;
  }
  .table-section {
    width: 300%;
  }
  .likes-interests h2, .likes-interests p {
    position: relative;
    left: 5rem;
  }
  .table-section h2 {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 570px) {
  .coffee-box {
    top: 8%;
    left: auto;
  }
  .coffee-box.anim-order {
    top: 45%;
    right: auto;
    bottom: auto;
    left: auto;
  }

  .food-box {
    top: auto;
    bottom: 8%;
    right: auto;
  }
  .food-box.anim-order {
    top: auto;
    right: auto;
    bottom: 45%;
    left: auto;
  }
  .table-section {
    width: 160%;
  }
  .table-section h2 {
    margin-bottom: 2rem;
    font-size: 3rem;
  }
  .skills-section {
    flex-direction: column;
  }
  .skills-section h2 {
    margin-bottom: 20px;
    margin-right: 0;
  }
  .project-links-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .project-description-wrapper {
    max-width: 80%;
  }

  footer {
    padding: 50px 25px ;
  }
}

@media (max-width: 400px) {
  .likes-interests h2, .likes-interests p {
    left: -2.55rem;
  }
  nav {
    height: 8rem;
    margin-bottom: 50px;
  }
  nav a {
    padding: 25px 20px;
  }
  header {
    gap: 50px;
    margin-bottom: 50px;
  }
  h1 {
    font-size: 5rem;
  }
  .hand-img {
    width: 20rem;
  }
  .table-section {
    width: 147%;
  }
  .table-section h2 {
    margin-bottom: 1.5rem;
    position: relative;
  }
  .table-section p {
    position: relative;
  }
  .projects-section h2 {
    font-size: 5rem;
  }
  .mobile-img {
    width: 100%;
  }
  .contact-section {
    width: 100%;
    border-radius: 0;
    margin-bottom: 0;
    padding: 30px 5px 5px;
  }
  footer {
    padding: 25px 10px 50px;
  }
}

@media (max-width: 300px) {
  h1 {
    font-size: 4.5rem;
  }
  .contact-section h2 {
    font-size: 4rem;
  }
  .likes-interests h2, .likes-interests p {
    left: 0;
  }
}


/* responsive sizing for larger screens */
@media (min-width: 1500px) {
  .coffee-box {
    left: 15%;
  }
  .food-box {
    right: 15%;
  }
}

@media (min-width: 2000px) {
  .coffee-box {
    left: 22%;
  }
  .food-box {
    right: 22%;
  }
  .table-section h2 {
    font-size: 4rem;
  }
  .table-section p {
    font-size: 2.5rem;
  }
  .project-name {
    font-size: 4rem;
  }
  .project-img {
    height: 35rem;
  }
  .project-description-wrapper .project-description {
    font-size: 2.5rem;
  }
}

@media (min-width: 2500px) {
  .coffee-box {
    left: 26%;
  }
  .food-box {
    right: 26%;
  }
  .table-section h2 {
    font-size: 4.5rem;
  }
  .table-section p {
    font-size: 3rem;
  }
  .projects-section h2 {
    font-size: 8rem;
  }
  .project-name {
    font-size: 5rem;
  }
  .project-img {
    height: 45rem;
  }
  
}

/* height media queries */
@media (max-height: 400px) {
  .table-section h2, .table-section p {
    position: relative;
    top: -7rem;
  }
  .table-section h2 {
    margin-bottom: 1rem;
  }
}

@media (max-height: 500px) {
  header {
    padding: 200px 0 200px;
  }
}