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

html,
body {
  height: 100%;
  width: 100%;
  font-family: "Kanit", sans-serif;
}

.container {
  display: flex;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.section {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  scroll-snap-align: start;
}

.main-content {
  flex: 0 0 85vw;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.side-title,
.side-title a,
.side-title a:hover,
.side-title a:visited {
  flex: 0 0 15vw;
  background: #fff;
  color: #ff4800;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 5rem;
  font-weight: bold;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

.intro {
  background: black;
  color: white;
}
.about {
  background: black;
  color: #d1c1bb;
}
.work {
  background: black;
  color: #d1c1bb;
}
.contact {
  background: #f8961e;
  color: #4c3b47;
}

.intro .main-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: 2rem;
}

.intro h1 {
  font-size: 8rem;
  line-height: 10rem;
}
.intro h1 span {
  color: #f8961e;
  font-size: 14rem;
  line-height: 0.5rem;
}
.intro p {
  font-size: 1.2rem;
  padding-left: 0.5rem;
}

.about p {
  max-width: 65vw;
  max-height: 90vh;
  text-align: justify;
  font-size: 1.2rem;
  margin-left: 10vw;
  overflow: auto;
  padding: 1rem;
}

.about p strong {
  color: #f8961e;
}

.work .grid {
  display: grid;
  grid-template-columns: repeat(4, 200px);
  grid-template-rows: repeat(2, 150px);
  gap: 1rem;
}
.work .item {
  background: black;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #f8961e #111;
}

.work .item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
  border: 8px solid #f8961e;
}

.work .item img:hover {
  border: 8px solid #f7c78c;
}

.container::-webkit-scrollbar,
.work .item::-webkit-scrollbar,
.about p::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.container::-webkit-scrollbar-track,
.work .item::-webkit-scrollbar-track,
.about p::-webkit-scrollbar-track {
  background: #111;
  border-radius: 4px;
}

.container::-webkit-scrollbar-thumb,
.work .item::-webkit-scrollbar-thumb,
.about p::-webkit-scrollbar-thumb {
  background: #f8961e;
  border-radius: 4px;
}

.work .item a {
  color: #f8961e;
  text-decoration: none;
}

.work .item a:hover {
  color: #f7c78c;
  text-decoration: overline;
}

.contact .main-content {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.contact .content-block {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact footer {
  margin-top: auto;
}

.contact p {
  font-size: 5rem;
}
.contact p a {
  color: #111;
  background-color: #f7c78c;
  border: 10px #111 solid;
  padding: 1rem;
  text-decoration: none;
}

.contact p a:hover {
  background-color: #ac5f01;
  text-decoration: none;
}

.social {
  display: flex;
  gap: 1rem;
  font-size: 2rem;
}

.fa-linkedin {
  font-size: 2rem;
  color: #0a66c2;
}

.fa-github {
  font-size: 2rem;
  color: #000;
}

footer a {
  color: #4c3b47;
  font-weight: bold;
}
footer a:hover {
  text-decoration: overline;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
  }

  .section {
    flex: 0 0 auto;
    width: 100vw;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-snap-align: none;
    padding: 2rem 1rem;
  }

  .main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .side-title,
  .side-title a,
  .side-title a:hover,
  .side-title a:visited {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    background: #fff;
    color: #ff4800;
    font-size: 2.5 rem;
    writing-mode: horizontal-tb !important;
    text-orientation: initial !important;
    margin: 0.5rem 0;
    position: relative;
    left: 0;
    text-decoration: none;
  }

  .intro h1 {
    font-size: 4rem;
    line-height: 1.2;
  }

  .intro h1 span {
    font-size: 6rem;
    line-height: 1;
  }

  .about p {
    max-width: 100%;
    max-height: none;
    margin-left: 0;
    padding: 1rem 0;
  }

  .work .grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .work .side-title {
    display: none;
  }

  .work .item {
    width: 100%;
    height: auto;
  }

  .work .item img {
    max-width: 100%;
    max-height: none;
  }

  .contact .main-content {
    flex: 1 1 auto;
    width: 100%;
    padding: 2rem 1rem;
  }

  .contact p {
    font-size: 1.5rem;
  }

  .social {
    font-size: 1.5rem;
  }

  html {
    scroll-behavior: smooth;
  }
}
