@media (max-width: 768px) {
  /* navbar */

  .bg-img {
    height: 100vh;
  }

  header {
    width: 95%;
    height: 100vh;
  }

  .navbar-links {
    display: none;
  }

  /* important h2 underline */

  .main-about-container h2,
  .main-resume-container h2,
  .main-skill h2,
  .main-projects-container h2,
  .contact-container h2 {
    font-size: 4rem;
  }

  /* btn animation */

  .btn {
    display: inline-block;
    position: relative;

    width: 4rem;
    cursor: pointer;
    z-index: 99;
  }

  body.open .btn {
    position: fixed;
    left: 92%;
  }

  .btn span {
    display: block;
    width: 100%;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    height: 0.5rem;
    background: var(--text-color);
    transition: all 0.3s;
    position: relative;
    margin-top: 5px;
  }

  .active span:nth-child(1) {
    animation: ease 0.7s top forwards;
    background: var(--main-color);
  }

  .not-active span:nth-child(1) {
    animation: ease 0.7s top-2 forwards;
    background: var(--text-color);
  }

  .active span:nth-child(2) {
    animation: ease 0.7s scaled forwards;
    background: var(--text-color);
  }

  .not-active span:nth-child(2) {
    background: var(--main-color);

    animation: ease 0.7s scaled-2 forwards;
  }

  .active span:nth-child(3) {
    animation: ease 0.7s bottom forwards;
    background: var(--main-color);
  }

  .not-active span:nth-child(3) {
    animation: ease 0.7s bottom-2 forwards;
    background: var(--text-color);
  }
  body.open .menu-bg {
    display: block;
    position: fixed;
    width: 100%;
    height: 10vh;
    background: var(--bg-color);
    z-index: 1;
  }

  body.open .navbar-logo {
    position: fixed;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-color);
    z-index: 15;
  }

  body.open .navbar {
    width: 100%;
    padding: 0;
  }

  body.open .navbar-links {
    display: inline-block;
    position: fixed;
    width: 15rem;
    height: 85vh;
    border: 1px solid var(--main-color);
    background-color: var(--bg-color);
    top: 10vh;
    left: -30rem;
    border-radius: 1rem;
    z-index: 10;
    overflow: hidden;
    animation: openMenu 0.3s ease forwards;
  }

  @keyframes openMenu {
    to {
      left: 2rem;
    }
  }

  body.open .link-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: 2rem;
    font-size: 1.8rem;
    font-weight: 500;
    list-style: none;
    text-align: center;
    text-transform: capitalize;
    letter-spacing: 0.05rem;
    z-index: 15;
  }

  .list-item i {
    display: block;
  }

  /* ---------- header main ---------- */
  .header-main-container {
    width: 100%;
  }

  .header-main-container h3 {
    font-size: 2.4rem;
  }

  .header-main-container h1 {
    font-size: 2.8rem;
  }

  .header-btn {
    display: flex;
  }

  .header-btn button {
    width: 14rem;
    height: 4rem;
  }

  .arrow {
    width: 3rem;
    height: 3rem;
    background: #343a40b7;
  }

  .arrow a {
    font-size: 2rem;
  }

  /* ---------------------------------------- main ---------------------------------------- */
  /* ---------- main about ---------- */
  .main-about-container {
    width: 95%;
    height: auto;
  }

  .main-about {
    display: grid;
    height: auto;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
  }

  .main-img-bg {
    width: 100%;
    height: 40rem;
  }

  .img {
    background-position: center;
  }

  .main-content {
    width: 95%;
    height: auto;
    position: relative;
    padding-bottom: 10%;
  }

  .main-content h3 {
    margin-top: 2rem;
    font-size: 3.5rem;
  }

  .main-content h6 {
    font-size: 1.7rem;
  }

  .main-content p {
    font-size: 1.5rem;
  }

  .main-btn {
    font-size: 2rem;
  }

  /* ---------- main resume ---------- */
  .main-resume-bg {
    width: 100%;
    height: auto;
    background-color: var(--bg-dark-color);
    padding: 5% 0;
    margin-top: 0rem;
  }

  .main-resume-container {
    width: 95%;
    height: auto;
    margin: 0 auto 4rem;
  }

  .main-resume-timeline {
    width: 100%;
    height: auto;
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
  }

  .timeline-bg {
    width: 95%;
    height: auto;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-color);
  }

  /* ---------- timline content ---------- */
  .timeline-item {
    position: relative;
    display: flex;
    width: 100%;
    height: 30%;
    padding: 3% 5%;
    margin: 0 0 2rem;
  }

  .main-resume-content {
    width: 100%;
  }

  .main-resume-content h5 {
    font-size: 2rem;
  }

  .date {
    width: 10rem;
    color: #ffffff;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 0.05rem;
    background: var(--main-color);
    box-sizing: border-box;
    text-align: center;
  }

  .main-resume-content p:nth-child(3) {
    font-size: 1.6rem;
    line-height: 2.4rem;
    color: var(--paragraph-color);
  }

  /* ----------- main skill ----------- */

  .main-skill {
    width: 70%;
    height: auto;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    padding-bottom: 10%;
  }

  .skill-grid {
    width: 100%;
    height: auto;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }

  /* ---------- main projects ---------- */

  .cards {
    width: 95%;
  }

  /* ---------- contact ---------- */

  .contact {
    width: 90%;
    height: auto;
    margin: 4rem auto;
  }

  .name-subject {
    width: 100%;
    height: auto;
    display: block;
    gap: 2rem;
  }
}
