:root {
  --bg-primary: #f1f8fd;
  --bg-secondary: #ffffff;
  --bg-accent: #f6c667;
  --bg-blur: #ffffff8f;

  --text-primary: #2a2a2a;
  --text-on-accent: #2a2a2a;

  --brand-primary: #c70039;
  --text-on-brand: #f6c667;
  --text-on-brand-alt: #ffffff;

  --border-color: #f6c667;
  --shadow-color: rgba(0, 0, 0, 0.2);

  --theme-transition: background-color 0.4s ease, color 0.4s ease,
    border-color 0.4s ease;
}

[data-theme="dark"] {
  --bg-primary: #1f2937;
  --bg-secondary: #374151;
  --bg-accent: #f6c667;
  --bg-blur: #1f2937bf;

  --text-primary: #f1f8fd;
  --text-on-accent: #2a2a2a;

  --brand-primary: #e11d48;
  --text-on-brand: #f6c667;
  --text-on-brand-alt: #f1f8fd;
  --border-color: #f6c667;
  --shadow-color: rgba(246, 198, 103, 0.15);
}
html{
  scrollbar-width: thin;
  scrollbar-color: var(--brand-primary) var(--bg-primary);
  transition: var(--theme-transition);
}
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  transition: var(--theme-transition);
}

::-webkit-scrollbar-thumb {
  background-color: var(--brand-primary);
  border-radius: 20px;
  border: 3px solid var(--bg-primary);
  transition: var(--theme-transition);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--bg-accent); 
}
html,
body {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: block;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  transition: var(--theme-transition);
}
.container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-flow: column wrap;
  background-color: var(--bg-primary);
  transition: var(--theme-transition);
  animation: fadeIn 1s ease-in-out;
  width: 1440px;
  margin: 0 auto;
}
.container .section {
  display: inline-flex;
  width: 100%;
  flex-wrap: wrap;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--theme-transition);
}
.theme-toggle:hover {
  background-color: var(--border-color);
}

.theme-toggle .icon {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
  transition: var(--theme-transition);
}

.theme-toggle .moon {
  display: none;
}
[data-theme="dark"] .theme-toggle .moon {
  display: block;
}
[data-theme="dark"] .theme-toggle .sun {
  display: none;
}

/*****************************Home Style*****************************/

.container .section .right-half {
  margin-left: 61px;
  margin-top: 28px;
}
.container .section .left-half {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 710px;
}
.container .section .left-quarter {
  display: flex;
  height: 755px;
  width: 257px;
  flex-flow: column wrap;
  z-index: 1;
}
.container .section .Slogo {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  background-color: var(--brand-primary);
  transition: var(--theme-transition);
  color: var(--text-on-brand);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 3rem;
  font-family: "Inconsolata", monospace;
  margin-top: 16px;
  margin-right: 36px;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5.5px;
  z-index: 1000;
}

.hamburger-btn .line {
  width: 21px;
  height: 3px;
  background-color: var(--brand-primary);
  transition: var(--theme-transition);
  margin: 4px 0;
  transition: 0.4s;
}
.container .section .nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 492px;
  height: 40px;
  gap: 8px;
}
.container .section .nav .nav-link {
  display: flex;
  padding: 8px 0px;
  gap: 8px;
  font-size: 16px;
  line-height: 1.495;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--theme-transition);
  width: 92px;
  height: 40px;
  justify-content: center;
  align-items: center;
  font-family: "Kanit", sans-serif;
}
.container .section .nav .nav-link:hover {
  color: var(--brand-primary);
  border-bottom: 3px solid var(--brand-primary);
  transition: var(--theme-transition);
}

.container .section .small {
  display: flex;
  width: 257px;
  height: 582px;
  margin-top: 93px;
  background: var(--text-on-brand);
}
.container .section .big {
  width: 480px;
  height: 684px;
  background: var(--text-on-brand);
  z-index: 2;
}
.container .section .elipse {
  width: 336px;
  height: 336px;
  margin-top: 106px;
  margin-left: 81px;
  background: var(--bg-primary);
  transition: var(--theme-transition);
  border-radius: 50%;
}
.container .section .my-img {
  width: 391px;
  height: 558px;
  margin-top: 20px;
  margin-left: -20px;
}
.container .section .identity {
  width: 468px;
  display: flex;
  height: 248px;
  margin-top: 160px;
  gap: 40px;
  flex-flow: column nowrap;
}

.container .section .identity .myname {
  width: 468px;
  height: 96px;
  font-family: "Kanit", sans-serif;
  font-size: 72px;
  font-weight: 500;
  line-height: 1.33;
  color: var(--text-primary);
  transition: var(--theme-transition);
}
.container .section .identity .role {
  width: 326px;
  height: 48px;
  font-family: "Kanit", sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.33;
  text-align: left;
  color: var(--text-primary);
  transition: var(--theme-transition);
}
.container .section .identity .check-work {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 249px;
  height: 64px;
  padding: 12px 0;
  gap: 10px;
  font-family: "Kanit", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
  background-color: var(--brand-primary);
  transition: var(--theme-transition);
  transition: background-color 0.3s ease, color 0.3s ease,
    transform 0.2s ease-out, box-shadow 0.3s ease;
}
.container .section .identity .check-work a {
  text-decoration: none;
  color: var(--text-on-brand-alt);
  transform: translateY(-4px);
}
.container .section .identity .check-work:hover a {
  color: var(--brand-primary);
}
.container .section .identity .check-work:hover {
  background: var(--bg-secondary);
  border: 3px solid var(--brand-primary);
  transition: var(--theme-transition);
  box-shadow: 0 8px 15px var(--brand-primary);
}
.container .section .empty {
  width: 412px;
  height: 360px;
  margin-top: 137px;
  margin-left: 253px;
  border-width: 4px 0 4px 4px;
  border-style: solid;
  border-color: var(--text-on-brand);
}
.container .section .full {
  width: 210px;
  height: 376px;
  margin-top: 77px;
  margin-left: 202px;
  background-color: var(--text-on-brand);
}

/********************Portfolio Style*************************/

.container .section .work-header {
  width: 430px;
  height: 305px;
  justify-content: center;
  align-items: center;
  background-color: var(--text-on-brand);
  display: flex;
}

.container .section .work-header h1 {
  font-family: "Kanit", sans-serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 48px;
  text-align: left;
  color: var(--brand-primary);
  transition: var(--theme-transition);
}

.container .section .work-studio {
  margin-top: 230px;
  margin-left: -300px;
  width: 1150px;
  height: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.container .section .work-studio .work-item {
  width: 376px;
  height: 364px;
  perspective: 1000px;
  transition: box-shadow 0.3s ease;
}
.container .section .work-studio .work-item:hover {
  box-shadow: 0 8px 16px var(--shadow-color);
}
.container .section .work-studio .work-item .inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
  box-shadow: 0 4px 8px var(--shadow-color);
}

.work-item .inner {
  transition: transform 0.8s ease 0.2s;
}

.work-item:hover .inner {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border: 2px solid var(--text-on-brand);
}

.front {
  transform: rotateY(0deg);
  background-color: white;
}

.back {
  transform: rotateY(180deg);
  background-color: var(--bg-accent);
}

.container .section .work-studio .work-img {
  width: 372px;
  height: 280px;
}

.container .section .work-studio .work-item .work-item-name {
  width: 376px;
  height: 84px;
  gap: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Kanit", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  text-align: left;
  color: var(--text-on-accent);
}

.back a {
  text-decoration: none;
  color: var(--text-on-accent);
  transition: var(--theme-transition);
  font-size: 24px;
  font-family: "Kanit", sans-serif;
  margin: 10px 0;
}

.back a:hover {
  text-decoration: underline;
}

/*****Skills Section Style ******/

#Skills {
  margin-top: 200px;
}
.section .skills-header {
  width: 278px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section .skills-header h1 {
  display: flex;
  font-family: "Kanit", sans-serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 48px;
  text-align: left;
  color: var(--brand-primary);
  transition: var(--theme-transition);
}
.section .skills-container {
  width: 1162px;
  height: 273px;
  background-color: var(--text-on-brand);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-flow: row wrap;
  gap: 20px;
}
.section .skills-container .skill-img {
  margin: 0 auto;
  object-fit: contain;
  width: 107px;
  height: 107px;
  border-radius: 16px;
  transition: transform 0.3s ease-out;
}
.section .skills-container .skill-img:hover {
  transform: scale(1.15);
}

/*****About Section Style ******/

#About {
  margin-top: 200px;
}
.container .section .left {
  display: flex;
  flex-flow: column wrap;
  z-index: 1;
  width: fit-content;
}
.container .section .right {
  z-index: 2;
  display: flex;
  width: fit-content;
}
.container .section .left .about-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 523px;
  height: 304px;
  background-color: var(--text-on-brand);
}
.container .section .left .about-header h1 {
  display: flex;
  font-family: "Kanit", sans-serif;
  margin-left: 130px;
  margin-top: 85px;
  font-size: 36px;
  font-weight: 500;
  line-height: 48px;
  text-align: left;
  color: var(--brand-primary);
  transition: var(--theme-transition);
}
.container .section .left .border-rectangle {
  width: 391px;
  height: 407px;
  margin-top: -103px;
  margin-left: 130px;
  border-bottom: 2px solid var(--text-on-brand);
  border-left: 2px solid var(--text-on-brand);
  z-index: 1;
}
.container .section .right .about-img {
  width: 1030px;
  height: 687px;
  margin-top: 61px;
  margin-left: -113px;
  z-index: 2;
}

.container .section .right .vague-rectangle {
  margin-top: 208px;
  margin-left: -1280px;
  width: 689px;
  height: 336px;
  gap: 10px;
  backdrop-filter: blur(10px);
  background: var(--bg-blur);
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  transition: var(--theme-transition);
}
.container .section .right .vague-rectangle .text {
  font-family: "Kanit", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  text-align: left;
  color: var(--text-primary);
  transition: var(--theme-transition);
  box-sizing: border-box;
  padding: 56px 72px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  height: 100%;
}

/****Contact me Section***/

.container .footer {
  margin-top: 200px;
  display: inline-flex;
  width: 100%;
  height: fit-content;
  gap: 56px;
  flex-flow: column wrap;
  align-items: center;
}
.container .footer .mystatus {
  width: 316px;
  height: 80px;
  gap: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container .footer .Slogo {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-primary);
  transition: var(--theme-transition);
  color: var(--text-on-brand);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 48px;
  font-family: "Inconsolata", monospace;
}
.container .footer .info .myname {
  font-family: "Kanit", sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 48px;
  text-align: left;
  color: var(--text-primary);
  transition: var(--theme-transition);
}
.container .footer .info .role {
  font-family: "Kanit", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  text-align: left;
  color: var(--text-primary);
  transition: var(--theme-transition);
}
.container .footer .contact-info {
  width: 100%;
  height: 388px;
  gap: 72px;
  background-color: var(--text-on-brand);
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  flex-flow: column wrap;
}

.container .footer .contact-info .intro {
  font-family: "Kanit", sans-serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 48px;
  text-align: left;
  color: var(--brand-primary);
  transition: var(--theme-transition);
  margin-top: 56px;
}
.container .footer .contact-info .details {
  width: 1180px;
  height: 108px;
  gap: 20px;
  background-color: var(--text-on-brand);
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
}
.container .footer .contact-info .details .detail-item {
  font-family: "Kanit", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
  text-align: left;
  display: flex;
  flex-flow: column wrap;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--theme-transition);
}
.container .footer .contact-info .details .detail-item .SVG {
  transition: transform 0.3s ease-out;
}
.container .footer .contact-info .details .detail-item:hover .SVG {
  transform: translateY(-5px) scale(1.05);
}
/*Animations*/

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  /*Home Section  SmallScreens*/

  .container .section .right-half {
    margin-left: 18px;
    margin-top: 0;
  }
  .container .section .left-half {
    flex-direction: column;
    width: 172px;
    justify-content: flex-start;
  }

  .container .section .left-quarter {
    height: 60px;
    width: 100%;
    flex-flow: row wrap;
  }

  .container .section .Slogo {
    width: 32px;
    height: 32px;
    font-size: 24px;
    margin: 16px 35px 17px 16px;
  }

  .container .section .small {
    display: flex;
    width: 89px;
    height: 100%;
    margin-top: 0;
  }

  .container .section .big {
    width: 172px;
    height: 214px;
  }

  .container .section .elipse {
    width: 99px;
    height: 99px;
    margin-top: 25px;
    margin-left: 38px;
  }
  .container .section .my-img {
    width: 130px;
    height: 188px;
    margin-top: 1px;
    margin-left: -15px;
  }
  .container .section .hamburger-btn {
    display: block;
    position: absolute;
    top: 9px;
    left: 317px;
  }

  .container .section .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 42px;
    right: 15px;
    background-color: var(--brand-primary);
    transition: var(--theme-transition);
    width: 70px;
    height: 100px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
    z-index: 999;
    gap: 2px;
  }

  .container .section .nav.show {
    display: flex;
  }

  .container .section .nav .nav-link {
    width: 93%;
    height: auto;
    padding: 0;
    font-size: 10px;
    text-align: left;
    background-color: var(--bg-secondary);
    border-radius: 8px;
  }

  .container .section .nav .nav-link:hover {
    border-bottom: none;
    background-color: var(--bg-primary);
    transition: var(--theme-transition);
  }
  .theme-toggle {
    width: 15px;
    height: 15px;
  }
  .container .section .identity {
    width: 130px;
    height: 100px;
    margin-top: 115px;
    gap: 16px;
  }

  .container .section .identity .myname {
    width: 130px;
    height: 30px;
    font-size: 20px;
    line-height: 100%;
  }
  .container .section .identity .role {
    width: 125px;
    height: 21px;
    font-size: 14px;
    font-weight: 300;
    line-height: 100%;
  }
  .container .section .identity .check-work {
    width: 113px;
    height: 33px;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 100%;
  }
  .container .section .empty {
    width: 196px;
    height: 224px;
    margin-top: 131px;
    margin-left: -16px;
    border-width: 2px 0 2px 2px;
  }
  .container .section .full {
    width: 107.5px;
    height: 213px;
    margin-top: 24px;
    margin-left: 88.67px;
  }

  /** Portfolio Section Small Screens **/

  .container #Work {
    flex-flow: column wrap;
    margin-top: -228px;
  }
  .container .section .work-header {
    width: 164px;
    height: 80px;
    background-color: transparent;
    justify-content: flex-start;
    margin-left: 22px;
  }

  .container .section .work-header h1 {
    font-size: 24px;
    line-height: 100%;
    margin-left: 6px;
  }

  .container .section .work-studio {
    margin-top: 0;
    margin-left: 22px;
    width: 316px;
    gap: 16px;
    flex-flow: column wrap;
  }

  .container .section .work-studio .work-item {
    width: 316px;
    height: 272px;
  }

  .container .section .work-studio .work-img {
    width: 316px;
    height: 212px;
  }

  .container .section .work-studio .work-item .work-item-name {
    width: 316px;
    height: 60px;
    gap: 10px;
    font-size: 18px;
    line-height: 100%;
  }

  .back a {
    font-size: 20px;
    line-height: 100%;
  }

  /** Skills Section Small Screens **/

  #Skills {
    margin-top: 72px;
    flex-flow: column wrap;
  }
  .section .skills-header {
    width: 58px;
    height: 36px;
    margin-left: 36px;
  }

  .section .skills-header h1 {
    font-size: 24px;
    line-height: 100%;
  }
  .section .skills-container {
    width: 360px;
    min-height: 416px;
    gap: 59px;
    box-sizing: border-box;
    padding: 20px;
  }
  .section .skills-container .skill-img {
    width: 80px;
    height: 80px;
  }

  /** About Small Screens Adjustments **/

  #About {
    margin-top: 72px;
    flex-flow: column wrap;
  }
  .container .section .left {
    height: 626px;
  }
  .container .section .right {
    margin-top: -590px;
    flex-flow: column wrap;
  }
  .container .section .left .about-header {
    width: 105px;
    height: 36px;
    background-color: transparent;
    margin: 0 0 0 36px;
  }
  .container .section .left .about-header h1 {
    margin: 0;
    font-size: 24px;
    line-height: 100%;
  }
  .container .section .left .border-rectangle {
    width: 360px;
    height: 0;
    margin-top: 507px;
    margin-left: 0;
    border-left: 0;
  }
  .container .section .right .about-img {
    width: 360px;
    height: 213px;
    margin: 0;
  }
  .container .section .right .vague-rectangle {
    margin-top: -42px;
    margin-left: 20px;
    width: 320px;
    height: 320px;
  }
  .container .section .right .vague-rectangle .text {
    font-size: 16px;
    line-height: 129%;
    padding: 16px;
  }

  /** Footer Section Small Screens **/

  .container .footer {
    margin-top: 72px;
    width: 360px;
    gap: 24px;
  }
  .container .footer .mystatus {
    width: 165px;
    height: 48px;
    gap: 8px;
  }
  .container .footer .Slogo {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  .container .footer .info .myname {
    font-size: 18px;
    line-height: 100%;
  }
  .container .footer .info .role {
    font-size: 14px;
    font-weight: 300;
    line-height: 100%;
  }
  .container .footer .contact-info {
    height: fit-content;
    box-sizing: border-box;
    padding: 22px 40px;
    gap: 0;
  }
  .container .footer .contact-info .intro {
    font-size: 36px;
    line-height: 100%;
    margin-top: 0;
  }
  .container .footer .contact-info .details {
    width: 100%;
    height: fit-content;
    flex-flow: column wrap;
    justify-content: center;
    margin-top: 40px;
    gap: 40px;
  }
  .container .footer .contact-info .details .detail-item {
    font-size: 18px;
    font-weight: 400;
    line-height: 100%;
    gap: 8px;
  }
  .container .footer .contact-info .details .detail-item .SVG {
    width: 30px;
    height: 30px;
  }
}
