:root {
  --brand-primary-color: #ffb401;
  --c-dark: #7f98ac;
  --brand-secondary-color: #538aff;
  --text-color: #495057;
  --light-color-primary: #fff;
  --font-main: "Bai Jamjuree", sans-serif;
  --font-logo: "Playfair Display", serif;
  --hero-bg: #060816;
  --brand-color: #915eff;
  --light-color-secondary: #e9ecef;
  --body-bg: #f8f9fa;
  --body-bg-light: #f8f9facb;
  --alternate-text: #7f98ac;
  --text-color-1: #4b6274;
  --gear-color: #c7d0d0;

  ---background: linear-gradient(
    90deg,
    rgba(255, 180, 1, 1) 0%,
    rgba(255, 155, 1, 1) 100%,
    rgba(255, 155, 1, 1) 100%
  );
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  background: #ffffff;
  color: #6c757d;
  overflow-x: hidden;
}

.hero,
.about {
  min-height: 100vh;
}
#projects {
  min-height: 90vh;
}
#contact {
  scroll-margin-top: 40px;
}
.section-divider {
  border: none;
  border-top: 2px solid var(--gear-color);
  opacity: 0.2;
  /* margin-top: 5em; */
  margin-bottom: 2em;
  width: 100%;
  margin-inline: auto;
}

/* ===================================================================
                           TYPOGRAPHY
====================================================================== */

.nav-link {
  text-decoration: none;
  color: var(--text-color-1);
  font-size: 1.8rem;
  font-weight: 600;
}
.hero-title {
  margin: 0;
  line-height: 1.4;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color-1);
}
.hero-sub {
  font-size: 1rem;
}

.about-title,
.skills-title {
  font-size: 1.5rem;

  text-align: center;
}

.about-info,
.item-info {
  font-size: 1rem;
}
.heading {
  font-size: 1.5rem;
  text-align: center;
}
.project-title {
  font-size: 1.2rem;
}
.project-info {
  font-size: 1rem;
}
.contact-title {
  font-size: 1.5rem;

  text-align: center;
}

.accent-color {
  background-image: linear-gradient(to right, #ffb401, #df8b03);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  background-origin: padding-box;
}
/* ===================================================================
                           NAVIGATION
====================================================================== */
.main-grid {
  display: grid;
  grid-template-columns: minmax(1em, 1fr) minmax(0px, 500px) minmax(1em, 1fr);
  align-items: center;
  grid-row-gap: 1em;
  width: 100%;
}
.logo-image {
  height: 25px;
  width: auto;
  display: block;
  transition: transform 0.4s ease-out;
}
.logo-name:hover .logo-image,
.logo-name:focus .logo-image {
  transform: scale(1.05) rotate(-3deg);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--light-color-primary);
  z-index: 100;
  box-shadow: rgba(33, 35, 38, 0) 0px 10px 10px -10px;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 2/-2;
  padding-top: 0.5em;
}
.logo-name {
  text-decoration: none;
  font-size: 1.6rem;
}
.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 0;
  margin-top: 3em;
}
.nav-link {
  font-size: 2.5rem;
}

.menu-buttons-wrapper {
  position: relative;
  width: 2em;
  height: 2em;
}
.menu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  background: 0;
  border: none;
  font-size: 1.8em;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
  margin: 0;
}
.close-btn {
  display: none;
}

.nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: var(--body-bg-light);
  z-index: 1000;
  transform: translateX(100%);
  overflow: hidden;
}
header.nav-open .nav {
  transform: translateX(0%);
  transition: transform 800ms ease-out;
}
.open-btn {
  color: var(--brand-primary-color);
}
.close-btn {
  color: var(--brand-primary-color);
}
.header.nav-open .open-btn {
  display: none;
}
.header.nav-open .close-btn {
  display: block;
}
.nav-link {
  transition:
    color 0.3s ease-in-out,
    transform 0.3s ease-in-out;
}
.nav-link:hover,
.nav-link:focus {
  color: #ffb401;
  transform: translateY(-2px);
}
/* ===================================================================
                           BUTTON
====================================================================== */

.btn-primary {
  display: block;
  margin-top: 1em;
  text-align: center;
  transition:
    transform 0.6s ease-out,
    box-shadow 0.6s ease-out;
}
.btn-primary,
.btn-secondary {
  text-decoration: none;
  font-weight: 700;
  color: var(--light-color-primary);
  font-size: 1.175rem;
  background: var(---background);
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  padding: 0.5em 3em;
  border-radius: 2px;
  border: 0;
}
.btn-primary:hover,
.btn-primary:focus-visible,
.btn-secondary:hover,
.btn-primary:focus {
  transform: scale(1.05);
  outline: none;
}
.btn-secondary {
  margin-top: 1.5em;
  display: block;
  width: fit-content;
  text-align: center;
  margin-inline: auto;
  transition:
    transform 0.6s ease-out,
    box-shadow 0.6s ease-out;
}

/* ===================================================================
                           HERO
====================================================================== */
.hero-sub {
  margin-bottom: 0;
}
.hero {
  grid-column: 2/-2;
  row-gap: 0.2em;
  padding-top: 1.5em;
}
.hero-col-1 {
  padding-top: 3em;
  justify-self: center;
  align-items: center;
}
.hero-col-2 {
  padding-top: 0;
  justify-self: center;
  align-items: center;
}
.hero-col-1,
.hero-col-2 {
  grid-column: 2 /-2;
}
/* STYLING AND ALIGNING THE IMAGE AND SVG */
.hero-art {
  display: grid;
  grid-template-areas: "layer";
  justify-content: center;
  align-items: center;
}
/* --- B. Force Overlap and Layering --- */
.hero-image,
.hero-art svg {
  grid-area: layer;
  position: relative;
  max-width: 100%;
  height: auto;
}
.hero-image {
  z-index: 2;
}
.hero-art svg {
  z-index: 1;
}
.hero-image {
  width: 75vw;
  transform: translate(2%, 5%);
}
.hero-art svg {
  width: 90vw;
  transform: translate(1%, -5%);
}
.medium-gear {
  animation: rotate-right 4.5s infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

@keyframes rotate-right {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.big-gear {
  animation: rotate-right 5s infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

@keyframes rotate-right {
  from {
    transform: rotate(-0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}
.small-gear {
  animation: rotate-left 3s infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

@keyframes rotate-left {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* ===================================================================
                           ABOUT-ME
====================================================================== */
.about {
  padding-bottom: 3em;
}
.about-title {
  margin: 0;
}

.about-wrapper {
  grid-column: 2/-2;
  border: 0;
  background: rgba(235, 235, 235, 0.5);
  border-radius: 4px;
  padding: 1em 1em;
}

.skills-list {
  display: grid;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1em;
  padding: 0;
}
.skills-item {
  display: flex;
  align-items: center;
  border-radius: 2px;
  border: 0;
  background: var(--brand-secondary-color);
  padding: 0.5em 0.75em;
  gap: 0.5em;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
  color: var(--light-color-primary);
  font-weight: 500;
}
.skills-item:hover {
  background: var(--brand-primary-color);
  transition: 800ms;
  box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
}
/* ===================================================================
                           PTOJECTS
====================================================================== */
.projects {
  grid-column: 2/-2;
  display: grid;
  grid-template-columns: 1fr;
  padding-bottom: 3em;
  justify-content: start !important;
  align-items: center;
}
.project-content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  align-items: center;
  justify-content: start;
  padding: 0 1em;
}
.heading {
  margin: 0;
  text-align: center;
  width: 100%;
}
.tagline {
  text-align: center;
  margin-bottom: 0;
}
.github-link {
  color: var(--brand-secondary-color);
}
.projects-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  grid-row-gap: 2em;
  width: 100%;
}
.project-title {
  margin-bottom: 0;
  margin-top: 0.3em;
}
.project-info {
  line-height: inherit;
}
.project-card {
  padding: 0.6em;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(235, 235, 235, 0.5);
  border: 0;
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
  transition:
    transform 0.9s ease-out,
    box-shadow 0.9s ease-out;
}
.project-links {
  display: flex;
  gap: 1em;
  justify-content: flex-start;
  margin-top: auto;
}

.project-card:hover {
  transform: translateY(-25px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.repo-link {
  text-decoration: none;
  font-weight: 500;
  color: var(--alternate-text);
  margin-top: auto;
}
.repo-link:hover,
.repo-link:focus {
  color: var(--brand-primary-color);
}
.project-image {
  display: block;
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}
/* ===================================================================
                           CONTACT
====================================================================== */
.contact {
  grid-column: 2/-2;
  display: grid;
  justify-content: start;
}
.contact-wrapper {
  grid-column: 2/-2;
}
.contact-title {
  grid-column: 2/-2;
  margin: 0;
}
.contact-box {
  grid-column: 2/-2;
  border: 0;
  padding: 0.9em 1.5em;
  background: rgba(235, 235, 235, 0.5);
  border-radius: 6px;
}
.contact-form {
  display: grid;
  gap: 0.2em;
  text-align: left;
  /* max-width: 500px; */
}
.contact-form label {
  font-size: 0.9rem;
  font-weight: 500;
}
.contact-tagline {
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-size: 0.9rem;
  padding: 1em 0.4em;
  font-weight: 550;
  color: rgb(93, 93, 93);
  margin-bottom: 1em;
  border: 0;
  border-radius: 4px;
  background: rgba(195, 195, 195, 0.5);
}
.contact-form input:focus,
textarea:focus {
  outline: none;
}
textarea {
  resize: none;
  height: 100px;
}
/* ===================================================================
                           FOOTER
====================================================================== */
.footer {
  display: grid;
  grid-template-columns: 1fr;
  grid-column: 2/-2;
}
.footer-main {
  display: grid;
  grid-template-columns: 1fr;
}
.footer-left {
  text-align: center;
}

.footer-line {
  font-size: 0.85rem;
}
.copyrights {
  font-size: 0.75rem;
  display: block;
}
.social-list {
  display: flex;
  list-style: none;
  justify-content: center;
  gap: 1em;
  margin: 0;
  padding: 0;
}
.social-item {
  font-size: 1.5rem;
  color: var(--text-color-1);
}
.social-link {
  color: var(--text-color-1);
}
.social-link:hover,
.social-link:focus {
  opacity: 0.6;
}
.footer-bottom {
  text-align: center;
}
footer {
  padding-top: 3em;
  padding-bottom: 3em;
}
.footer-divider {
  border: none;
  border-top: 0.2px solid #adb5bd;
  width: 100%;
}
@media (min-width: 768px) {
  .main-grid {
    grid-template-columns: minmax(2em, 1fr) repeat(4, minmax(0, 250px)) minmax(
        2em,
        1fr
      );
    grid-column-gap: 2em;
  }
  .logo-image {
    height: 30px;
    width: auto;
    display: block;
  }
  .menu-buttons-wrapper {
    display: none;
  }

  .open-btn {
    display: none;
  }
  .close-btn {
    display: none;
  }
  .header-content {
    grid-column: 2/-2;
    display: flex;
    justify-content: space-between;
  }
  .logo-title {
    font-size: 2.2rem;
  }
  .nav-link {
    font-size: 1.2rem;
  }
  .nav {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    background: none;
    overflow: visible;
    transition: none;
  }
  header.nav-open .nav {
    transform: none;
  }

  .nav-list {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 0;
    gap: 1em;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .hero {
    grid-column: 2/-2;
    display: grid;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
  }
  .hero-col-1 {
    grid-column: 2/4;

    order: 0;
    text-align: left;
    align-self: center;
    padding: 0;
  }

  .hero-col-2 {
    grid-column: 4/ 6;

    order: 0;
    align-self: center;
  }
  .hero-art {
    justify-self: center;
    align-self: center;
    /* max-width: 600px; */
  }

  .hero-image,
  .hero-art svg {
    /* max-width: 550px; */
    height: auto;
  }

  .hero-image {
    width: 60vw;
    /* transform: translate(1rem, 1rem); */
    /* width: 100%; */
    transform: translate(-1.1rem, 1rem);
  }
  .hero-art svg {
    width: 85vw;
    /* width: 100%; */
    transform: translate(0.9rem, -1.2rem);
  }
  .btn-primary {
    width: fit-content;
  }
  .about-title,
  .skills-title {
    font-size: 2rem;
  }
  .about-wrapper {
    grid-column: 2/-2;
    display: grid;
    grid-template-columns: 1fr;
    grid-row-gap: 1.5em;
    border: 0;
    padding: 3em 1em;
  }
  .about-info,
  .item-info {
    font-size: 1.175rem;
  }
  .about-me {
    max-width: 700px;
    justify-self: center;
  }
  .skills-list {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    justify-content: center;
  }
  .projects {
    display: grid;
    grid-template-columns: minmax(2em, 1fr) repeat(4, minmax(0, 250px)) minmax(
        2em,
        1fr
      );

    width: 100%;
  }
  .project-content-wrapper {
    grid-column: 2/-2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .heading {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
    padding: 0;
  }
  .tagline {
    font-size: 1.105rem;
    font-weight: 450;
  }
  .project-title {
    font-size: 1.3rem;
    font-weight: 500;
  }
  .projects-wrapper {
    grid-column: 2/-2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-column-gap: 1em;
    width: 100%;

    grid-row-gap: 2em;
  }
  .project-card {
    width: 100%;
    height: auto;
  }
  .contact-tagline {
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
    font-size: 1.2rem;
    margin: 0;
    padding-bottom: 1em;
  }
  .contact {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-content: center;
  }
  .contact-title {
    grid-column: 1/-1;
    text-align: center;
    font-size: 2.2rem;
    /* padding-bottom: 1em; */
  }
  .contact-box {
    grid-column: 2/6;
    max-width: initial;
  }
  .contact-form {
    padding: 1em 1.5em;
  }
  .contact-form input,
  .contact-form textarea {
    width: 100%;
  }
  textarea {
    resize: none;
    height: 150px;
  }
  .footer-line {
    font-size: 1rem;
  }
  .copyrights {
    font-size: 0.85rem;
    display: block;
  }
  .social-item {
    font-size: 1.6rem;
  }
  footer {
    display: grid;
    padding-top: 5em;
    padding-bottom: 3em;
  }
  .footer-main {
    display: grid;
    grid-column: 2/-2;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    align-items: center;
  }
  .footer-left {
    grid-column: 1/2;
    text-align: left;
  }
  .footer-right {
    grid-column: 2/3;
  }
  .footer-bottom {
    grid-column: 2/-2;
  }
  .social-list {
    display: flex;
    justify-content: flex-end;
  }
  .contact-form input,
  .contact-form textarea {
    margin-bottom: 2em;
  }
}
@media (min-width: 1440px) {
  .main-grid {
    grid-template-columns: minmax(2em, 1fr) repeat(4, minmax(0, 250px)) minmax(
        2em,
        1fr
      );
    grid-column-gap: 4em;
  }
  .nav-link {
    font-size: 1.1rem;
  }
  .hero {
    padding: 0 1em;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-sub {
    font-size: 1rem;
  }
  .hero-art {
    max-width: 550px;
  }

  .hero-image,
  .hero-art svg {
    /* max-width: 550px; */
    height: auto;
  }
  .hero-image {
    /* width: 30vw; */
    width: 90%;
    transform: translate(-1.1rem, 1rem);
  }
  .hero-art svg {
    /* width: 45vw; */
    width: 100%;
    transform: translate(1.3rem, -1.4rem);
  }
  .about-info {
    line-height: 1.7;
    letter-spacing: 0.5px;
  }
  .about-info,
  .item-info {
    font-size: 1rem;
  }
  .project-card {
    padding: 1em;
  }
  .contact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-content: center;
  }
  .contact-box {
    grid-column: 2/4;
  }
}
