* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
@font-face {
  font-family: "Chonburi Regular";
  font-style: normal;
  font-weight: normal;
  src:
    local("Chonburi Regular"),
    url("Chonburi-Regular.woff") format("woff");
}
body {
  background-color: black;
  font-family: Arial, Helvetica, sans-serif;
}

.navbar {
  height: clamp(320px, 42vh, 430px);
  width: 70px;
  border-radius: 23px;
  background-color: rgba(24, 24, 24, 0.9);
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 50%;
  left: clamp(20px, 3vw, 50px);
  transform: translateY(-50%);
}

.navbar .nav-links {
  display: flex;
  flex-direction: column;
  gap: 2.7rem;
  align-items: center;
}

.navbar a {
  gap: 2rem;
  width: auto;
}

.header {
  position: relative;
  margin-bottom: 10px;
}

.heading {
  margin-top: 120px;
  color: white;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.heading h1 {
  text-align: center;
  font-family: "Chonburi Regular";
  font-weight: 300;
  margin: 0;
}
.heading .web {
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.9px white;
  font-size: clamp(2rem, 4vw, 5rem);
  text-decoration: none;
}
.heading .myName {
  font-size: clamp(2.8rem, 5vw, 6rem);
  margin-bottom: 20px;
  text-decoration: none;
}
.heading img {
  height: auto;
  width: clamp(220px, 23vw, 380px);
  display: block;

  margin-top: -3vw; /* overlap subtitle */

  z-index: 2;
}

/* @media (max-width: 1300px) {
  .main {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
  }
} */

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(40px, 8vw, 120px);
}

main > p {
  max-width: 950px;
  margin: 24px auto 0;
  line-height: 1.7;
  color: #bdbdbd;
}
.main h1 {
  font-size: 35px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 9px;
}
.main h2 {
  font-size: 25px;
}

.home-resume {
  display: flex;
  margin-top: 20px;
  align-items: center;
}

.resume {
  color: white;
  background-color: black;
  border-color: white;
  border-radius: 12px;
  width: clamp(110px, 13vw, 120px);
  height: clamp(40px, 2vw, 70px);
  background-color: rgb(24, 24, 24);
}
.resume p {
  margin: 0;
}
.r-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  margin: none;
}
#r-btn {
  margin-left: auto;
}
.three {
  display: flex;
  gap: 2vw;
}

img {
  width: 26px;
  height: 26px;
}

.skills {
  width: min(100%, 900px);
  margin: 40px auto 30px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skills img {
  width: 28px;
  height: 28px;
}
#sec {
  color: white;
  margin-top: 100px;
}

#sec h1 {
  font-size: 40px;
}

ul {
  list-style-type: url(icons/Vector.svg);
}
.pro-body {
  display: flex;
  align-items: flex-start;
  gap: clamp(35px, 5vw, 80px);
  margin-left: 20px;
}
.pro-head {
  display: flex;
  align-items: baseline;
}

.pro-head h2,
h3 {
  margin: 10px 0;
}

.pro-head h2 {
  font-size: 25px;
}

.pro-head h3 {
  margin-left: auto;
  font-size: 14px;
}
.demo {
  width: min(100%, 320px);
  aspect-ratio: 16 / 9;
  border: 2px solid white;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.demo img {
  height: 95%;
  width: 97%;
  background-color: white;
  border-radius: 14px;
}

.two {
  display: flex;
  max-width: 100%;
  justify-content: right;
  gap: 1vw;
  img {
    width: 18px;
    height: 18px;
  }
  margin-top: 4px;
}
.demo-sec {
  width: 320px;
  flex-shrink: 0;
}

.description {
  flex: 1;
  max-width: 650px;
}

.description h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tech-stack {
  display: flex;
  gap: 1vw;
  margin-top: 10px;
}

.tech-stack button {
  color: white;
  background-color: rgb(24, 24, 24);
  border: 2px solid white;
  border-radius: 6px;
  padding: 3px 5px;
}
.section {
  margin-top: 70px;
}
.view-more {
  margin-top: 15px;
}
.view-more button {
  color: white;
  background-color: rgb(24, 24, 24);
  border: 2px solid white;
  border-radius: 10px;
  font-size: 17px;
  padding: 9px 18px;
}

.achievement {
  margin-top: 70px;
}

.achievement-item {
  margin-bottom: 50px;
}

.edu-body {
  display: block;
  justify-content: space-between;
}
.edu-body p {
  margin-top: 17px;
  color: rgb(174, 174, 174);
}
.edu-head {
  display: flex;
  align-items: baseline;
  font-weight: inherit;
  .year {
    margin-left: auto;
    font-weight: 500;
  }
  p {
    margin-top: 7px;
    margin-bottom: 7px;
  }
  h2 {
    font-size: 25px;
    margin: 0;
  }
}
.section-edu {
  width: 100%;
  max-height: 300px;
  margin-top: 55px;
  max-width: 850px;
  padding-left: 45px;
  position: relative;
}
.section-edu .location {
  left: -56px;
  top: -15px;
}

.section-edu .circle {
  top: 5px;
}

footer {
  height: 50px;
  max-width: auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: rgb(24, 24, 24);
  h4 {
    color: white;
    margin: 0;
    font-weight: lighter;
    font-size: small;
  }
}

.about {
  max-width: 950px;
  margin: 90px auto;
  outline: 2px solid white;
  outline-offset: 5px;
  text-align: center;
  color: black;
  background-color: white;
  border-radius: 15px;
  padding: 40px;
  p {
    color: black;
  }
  h2 {
    font-size: xx-large;
    margin-bottom: 15px;
  }
  h3 {
    font-size: larger;
  }
  hr {
    color: black;
  }
  .get {
    text-decoration: underline;
    text-underline-offset: 4px;
    margin: 20px 0;
  }
  img {
    background-color: black;
    border-radius: 15%;
    height: 30px;
    width: 35px;
  }
  a {
    text-decoration: none;
    color: black;
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .info {
    display: flex;
    justify-content: space-evenly;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

.foot img {
  height: 22px;
  width: 22px;
  margin: 0;
}
.foot a {
  height: 24px;
  width: 28px;
}
.foot {
  display: flex;
  align-items: center;
  gap: 5px;
}

.projects {
  position: relative;
}

.projects::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 40px;
  bottom: 5px;
  border-left: 2px dashed #555;
  z-index: 1;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 40px;
  border-left: 2px dashed #555;
}

.timeline-progress {
  position: absolute;
  left: 6.5px;
  top: 15px;
  width: 4px;
  height: 0;
  background: white;
  border-radius: 20px;
  /* box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); */
  z-index: 2;
  /* FIX (added): the JS now sets `height` on every scroll event, which
     otherwise updates in a slight staircase pattern matching scroll steps.
     This transition eases each jump so the fill line reads as continuous. */
  transition: height 0.08s linear;
}

.arrow {
  position: absolute;
  left: -18.7px;
  top: 0;
  width: 55px;
  height: 60px;
  z-index: 100;
  /* FIX (added): same reasoning as .timeline-progress above — smooths the
     arrow's `top` position between scroll-event updates. */
  transition: top 0.08s linear;
}

.section {
  position: relative;
  padding-left: 45px;
}

/* .circle {
  position: absolute;
  left: 1.7px;
  top: 4px;
  width: 14px;
  transition: 0.35s;
}

.circle.active {
  filter: brightness(6);
  transform: scale(1.2);
} */

.achieve-head {
  display: flex;
}

.circle {
  position: absolute;
  left: 1.8px;
  top: 17px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #444;
  border: 2px solid #888;
  transition: 0.35s;
  z-index: 3;
}
.circle.active {
  background: #fff;
  filter: brightness(6);
  transform: scale(1.3);
}

.section-achieve {
  position: relative;
  padding-left: 45px;
  width: 100%;
  max-height: 300px;
  margin-top: 55px;
  max-width: 850px;
}

/* .circle {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #444;
  border: 2px solid #888;
  transition: 0.35s;
}
.circle.active {
  background: #fff;
  filter: brightness(6);
  transform: scale(1.3);
  box-shadow: 0 0 10px #fff;
} */

.timeline-end {
  position: relative;
  padding-left: 45px;
  margin-top: 60px;
  height: 25px;
}

.location {
  position: absolute;
  left: -21px;
  top: -15px;
  width: 60px;
  height: 60px;
  transition: 0.4s;
  z-index: 100;
}

.location.active {
  filter: brightness(6) drop-shadow(0 0 5px white);
}
.section-achieve .timeline-end {
  left: -45px;
}
.section-achieve .circle {
  top: 5px;
}
.section-achieve .location {
  top: 20px;
}

.achievement .timeline.timeline::before {
  bottom: 90px;
}
/* ===========================================
   Large Desktop (1400px ↓)
=========================================== */

@media (max-width: 1400px) {
  /* Main */
  main {
    padding-inline: clamp(40px, 15vw, 150px);
  }

  /* Hero */
  .heading img {
    width: 340px;
  }

  /* Projects */
  .pro-body {
    gap: 45px;
  }

  .demo-sec {
    width: 300px;
  }
}

/* ===========================================
   Laptop (1250px ↓)
=========================================== */

@media (max-width: 1250px) {
  /* Main */
  main {
    padding-inline: clamp(30px, 20vw, 180px);
  }

  /* Hero */
  .heading img {
    width: 300px;
  }

  /* Projects */

  .pro-body {
    gap: 30px;
  }

  .demo-sec {
    width: 280px;
  }

  .description {
    max-width: 500px;
  }

  /* Education */

  .section-edu {
    max-width: 850px;
  }

  /* Contact */

  .about {
    max-width: 900px;
  }
}

/* ===========================================
   Tablet Landscape (1024px ↓)
=========================================== */

@media (max-width: 1024px) {
  main {
    padding-inline: 160px;
  }

  .heading img {
    width: 260px;
  }

  .pro-body {
    gap: 25px;
  }

  .demo-sec {
    width: 250px;
  }

  .description {
    max-width: 100%;
  }
}

/* =======================
   Mobile View
======================= */
@media (max-width: 920px) {
  /* Navbar */

  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 65px;

    margin: 0;
    padding: 0;

    background: rgba(24, 24, 24, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);

    border-radius: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 1000;
  }

  .navbar .nav-links {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: row;

    justify-content: space-evenly;
    align-items: center;

    margin: 0;
    gap: 0;
  }

  .navbar a {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .navbar img {
    width: 28px;
    height: 28px;
  }

  /* Main */

  main {
    width: 100%;
    padding: 90px 35px 50px;
  }

  /* Hero */

  .heading {
    margin-top: 70px;
  }

  .heading .myName {
    font-size: 3rem;
    margin-bottom: 10px;
  }

  .heading .web {
    font-size: 2.8rem;
    line-height: 1;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.8px white;
    text-decoration: none;
    margin-bottom: -10px;
  }

  .heading img {
    width: 230px;
  }

  /* Home */

  .home-resume {
    justify-content: space-between;
    align-items: center;
  }

  #r-btn {
    margin-left: auto;
  }

  /* Skills */

  .skills {
    width: 100%;

    justify-content: center;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  /* Projects */

  /* ---------- Project Header ---------- */

  .pro-head {
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
  }

  .pro-head h3 {
    margin-left: auto;
  }

  .pro-head h2 {
    margin: 0;
    font-size: 1.5rem;
  }

  .pro-head h3 {
    font-size: 0.95rem;
    font-weight: 500;
  }

  /* ---------- Project Body ---------- */

  .pro-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin: 0;
  }

  /* ---------- Demo ---------- */

  .demo-sec {
    width: 100%;
    max-width: 500px;

    display: flex;
    flex-direction: column;
  }

  .demo {
    width: 100%;
    height: 250px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 2px solid white;
    border-radius: 16px;
  }

  .demo img {
    width: 98.2%;
    height: 96.8%;
    border-radius: 14px;
  }

  /* ---------- Icons ---------- */

  .two {
    max-width: 100%;
    justify-content: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;

    gap: 12px;
    margin-top: 8px;
  }

  .two img {
    width: 22px;
    height: 22px;
  }

  /* ---------- Description ---------- */

  .description {
    flex: 1;
    min-width: 250px;
  }

  .description p {
    line-height: 1.6;
    margin-bottom: 12px;
    color: rgb(155, 155, 155);
  }

  .description h3 {
    margin-bottom: 10px;
  }

  /* ---------- Tech Stack ---------- */

  .tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }

  .tech-stack button {
    padding: 5px 10px;
    font-size: 13px;
  }

  /* ---------- View More ---------- */

  .view-more {
    display: flex;
    margin-top: 30px;
    margin-left: 0;
  }

  /* Education */

  .section-edu {
    margin-left: 0;
    max-width: 100%;
  }

  .edu-head {
    flex-direction: row;
    h2 {
      font-size: 20px;
    }
    p {
      max-width: 190px;
    }
    p.year {
      margin-left: 5vw;
    }
  }

  /* Contact */

  .about {
    max-width: 100%;
    padding: 25px;
  }

  .about .info {
    display: flex;
    justify-content: space-evenly;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* Footer */

  footer {
    flex-direction: column;
    height: auto;
    gap: 8px;
    padding: 15px;
  }
  .achievement .timeline.timeline::before {
    bottom: 145px;
  }
}
