@import url("https://fonts.googleapis.com/css2?family=Comfortaa&family=Kaushan+Script&family=Oswald&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Sarabun&display=swap");

:root {
  --primary-color: rgb(255, 92, 92);
  --primary-variant: #ff2d2d;
  --secondary-color: #1b9999;
  --on-primary: rgb(250, 250, 250);
  --on-background: rgb(66, 66, 66);
  --on-background-alt: rgba(66, 66, 66, 0.7);
  --background: rgb(255, 255, 255);
  --box-shadow: 0 5px 20px 1px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
  --primary-color: rgb(150, 65, 255);
  --primary-variant: #6c63ff;
  --secondary-color: #03dac5;
  --on-primary: #000;
  --on-background: rgba(255, 255, 255, 0.9);
  --on-background-alt: rgba(255, 255, 255, 0.7);
  --background: #121212;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--on-background);
  font-family: Comfortaa, sans-serif;
  background-color: var(--background);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  margin-left: auto;
  margin-right: auto;
}

section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
}

h1 {
  font-family: Kaushan Script, sans-serif;
  font-size: 90px;
  margin-bottom: 0;
}

h2 {
  color: var(--on-background-alt);
  font-size: 30px;
  font-weight: normal;
}

/* Navigation */
nav {
  z-index: 10;
  position: fixed;
  font-family: Oswald, sans-serif;
  font-size: 24px;
  letter-spacing: 3px;
  padding: 25px;
  width: 100vw;
  background: rgb(255 255 255 / 50%);
  display: flex;
  justify-content: space-between;
}

nav a {
  margin-right: 25px;
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  font-weight: bold;
  text-transform: uppercase;
}

nav a:hover,
nav a:focus {
  color: var(--on-background);
  border-bottom: 3px solid;
}

/* Mobile Navigation */
.container {
  z-index: 11;
  position: fixed;
  top: 25px;
  right: 25px;
  display: none;
  cursor: pointer;
}

.bar1,
.bar2,
.bar3 {
  width: 35px;
  height: 5px;
  background-color: var(--primary-color);
  margin: 6px 0;
  transition: 0.4s;
}

.change .bar1 {
  -webkit-transform: rotate(-45deg) translate(-9px, 6px);
  transform: rotate(-45deg) translate(-9px, 6px);
}

.change .bar2 {
  opacity: 0;
}

.change .bar3 {
  -webkit-transform: rotate(45deg) translate(-8px, -8px);
  transform: rotate(45deg) translate(-8px, -8px);
}

.mobile-nav {
  display: flex;
  transform: translateX(100%);
  transition: 1s;
  z-index: 10;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}
.active {
  animation: openNavigation 1s ease-in-out forwards;
}
.inactive {
  animation: closeNavigation 1s ease-in-out forwards;
}
@keyframes openNavigation {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0%);
  }
}
@keyframes closeNavigation {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(100%);
  }
}
.mobile-nav div {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: center;
}
.mobile-nav a {
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}
.mobile-nav a:hover {
  border-bottom: 3px solid white;
}

#color1 {
  background-color: #256e5e;
}
#color2 {
  background-color: #2c4770;
}
#color3 {
  background-color: #aa7f39;
}
#color4 {
  background-color: #aa6439;
}
/* Home Section */
#home {
  flex-direction: row;
  justify-content: space-around;
}

.title-group {
  text-align: center;
  flex: 1 0 auto;
}

#image-container {
  flex: 1 0 300px;
}

#profile-picture {
  max-width: 600px;
  width: 100%;
}

/* About Section */
.about-container {
  display: flex;
}

.text-box {
  width: 40%;
  text-align: justify;
  background: rgb(0 0 0 / 50%);
  color: var(--on-primary);
  border-radius: 10px;
  padding: 30px;
}

p {
  margin: 0;
  line-height: 25px;
}

/* Projects Section */

h3 {
  font-family: Sarabun, sans-serif;
  font-size: 50px;
  color: #ff0033;
}
/* Contact Section */
#contact {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
}
.fab {
  font-size: 100px;
  margin: 25px;
  cursor: pointer;
  color: var(--primary-color);
}

.fab:hover {
  color: var(--on-background);
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 50px;
}

.theme-switch-wrapper span {
  margin-right: 10px;
  font-size: 1rem;
}

.toggle-text {
  position: relative;
  top: -4px;
  right: 5px;
  color: var(--on-background);
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
}

.slider::before {
  background: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 26px;
}

input:checked + .slider {
  background: var(--primary-color);
}

input:checked + .slider::before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round::before {
  border-radius: 50%;
}

.fas {
  font-size: 30px;
  margin-right: 5px;
}

/* Media Queries */
@media all and (max-width: 1350px) {
  h1 {
    font-size: 70px;
  }

  h2 {
    font-size: 25px;
  }

  h3 {
    font-size: 40px;
  }

  image-container {
    width: 300px;
  }
}

@media all and (max-width: 1000px) {
  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 20px;
  }
  h3 {
    font-size: 30px;
  }
  #home {
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
  }

  #home div {
    flex: 0 1 auto;
  }

  #profile-picture {
    max-width: 300px;
  }

  nav {
    display: none;
  }
  .container {
    display: inline-block;
  }

  .text-box {
    width: 60%;
  }

  .fab {
    font-size: 70px;
    margin: 20px;
  }
}

@media all and (max-width: 700px) {
  h1 {
    font-size: 40px;
  }

  h2,
  h3 {
    font-size: 15px;
  }
  .fab {
    font-size: 40px;
    margin: 15px;
  }
}
