html {
    margin: 0;
}

body {
    font-family: "DM Sans", sans-serif;
    max-width: 960px;
    margin: 96px auto 64px;       
    padding: 16px;  
    visibility: hidden;
    opacity: 0;  
    background: #fefcf2;
}

body.loaded {
  margin: 128px auto 64px; 
  transition: all ease-in-out 1200ms;
  opacity: 1;
  background: #fefcf2;
  visibility: visible;
}

h1{
  font-family: "Caprasimo", serif;
  font-weight: 400;
  font-size: 3rem;
}

#nav-placeholder {
  visibility: hidden;
}

#nav-placeholder.loaded {
  transition: all ease-in-out 800ms;
  visibility: visible;
}

p{
    line-height: 1.6;
    color: rgb(52, 52, 52);
}

.top-nav {
    z-index: 999;
    position: fixed;
    top: 40px;
    right: 40px;
    display: flex;
    gap: 16px;

   a{
    font-size: 24px;
    color: #000;
    text-decoration: none;
    padding: 0 8px;
   }
   a.active{
    opacity: 0.3;
   }
   a:hover{
    text-decoration: underline;
   }
  }

.idontknow{
  display: flex;
  gap: 64px;
  img{
    width: 40%;
  }
}

.sarunyoo{
  h1{
    margin: 0;
    font-weight: 400;
    font-family: "Caprasimo", serif;
    font-size: 96px;
    color: #000;
  }
  p{
    margin: 8px 0 56px 0;
  }
  a{
    font-size: 24px;
    text-decoration: none;
    color: #fff;
  }
  .hot-button{
    background-color: #000;
    padding: 20px 40px;
    border-radius: 999px;
  }
  .hot-button:hover{
    background-color: #222;
    padding: 20px 40px;
    border-radius: 999px;
  } 
} 

.work-list {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    counter-reset: work;
    h1{
        color: #000;
    }
  }
  
  .work-item {
    display: flex;
    flex-direction: row-reverse;
    gap: 24px;
    counter-increment: work;
    position: relative;
    padding-bottom: 1rem;
    padding: 24px;
    border: 1px solid #cfcfcf;
    border-radius: 24px;
    h2{
      margin: 0;
    }
  }
  .work-item__extra-info{
    margin: 0;
  }

  .work-item__thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  }
  
  .work-item__title-link {
    color: #000;
    text-decoration: none;
    font-size: 2rem;
    margin: 0;
  }
  
  .work-item__title-link:hover {
    text-decoration: underline;
  }
  
  
  .work-item__description {
    color: #333;
    line-height: 1.5;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; 
    overflow: hidden;
  }

/* Project detail */

  .back-button{
    text-decoration: none;
    color: #000;
  }

  .project-detail__section-header{
    margin: 24px 0 0 0;
    font-weight: bold;
    color: #000;
  }

  .project-detail__paragraph{
    font-weight: 300;
    margin: 8px 0 40px 0;
    line-height: 1.5;
  }
  
  .project-detail__title{
    font-size: 3rem;
  }

  /* Container for image grids */
  .project-detail__image-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin: 8px 0;
  }

  /* Each image inside the grid */
  .project-detail__grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
  }

  .project-detail__links{
    a{
      border-radius: 999px;
      padding: 8px 12px;
      color: #fff;
      text-decoration: none;
      background-color: #000;
    }
  }


/* Project detail */

/* CV */
.cv-header{
  display: flex;
  justify-content: space-between;
    .cv-name{
      font-weight: 400;
      font-family: "Caprasimo", serif;
      font-size: 72px;
      margin: 0;
    }
    p{
        font-size: 1rem;
        margin-top: 8px;
        margin-bottom: 32px;
    }
    .download-button {
      align-items: center;
        display: flex;
        padding: 10px 20px;
        background-color: #000;
        color: #fff;
        text-decoration: none;
        border-radius: 999px;
        height: 40px;
  }
  .download-button:hover {
    background-color: #222;
  }
}

.cv-section{
    display: flex;
    h2{
        width: 100%;
    }
    .cv-job-wrapper{
        width: 100%;
    }
}

.cv-job{
    margin-bottom: 40px;
    .cv-job-title{
        margin-bottom: 8px;
    }
    .cv-job-dates{
        margin-top: 0px;
    }
}

.cv-contact a{
    text-decoration: none;
    color: #000;
}

/* CV */

footer {
  color: #fff;
  display: flex;
}

.footer-content{
  background-color: #000;
  padding: 12px 32px;
  right: 0;
  left: 0;
  bottom: 0;
  position: fixed;
  justify-content: space-between;
  width: auto;
  display: flex;
}

footer a {
  color: #fff;
  text-decoration: none;
  padding: 0 12px;
}

footer a:hover {
  text-decoration: underline;
}


@media (max-width: 768px) {
  .idontknow{
    align-items: center;
    flex-direction: column-reverse;
    gap: 24px;
    img{
      width: 50%;
    }
  }
  .cv-section{
    flex-direction: column;
  }
  body.loaded {
    padding: 32px; 
  }
  h1{
    font-size: 2.5rem;
  }
  .sarunyoo h1{
    margin: 0 0 32px 0;
    font-size: 4rem;
  }
  .sarunyoo .main-menu{
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }
  .sarunyoo .hot-button{
    width: 100%;
    text-align: center;
  }
  .cv-header{
    flex-direction: column;
  }
  .cv-header .cv-name{
    font-size: 3rem;
  }
  .cv-header .download-button {
    display: none;
  }
  .work-item {
    padding: 16px;
  }
   .work-item__thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
  }
  .work-item__title-link {
    font-size: 1.5rem;
  }
}