* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Trirong";
}

:root {
    --bg-color: white;
    --second-bg-color: #2c3e50;
    --text-color: #34495e;
    --second-text-color: #ecf0f1;
    --main-color: #758c8d;
}

html {
    font-size: 60%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

@keyframes fadeIn {
    0%{
        opacity: 0;    
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeDown {
    0%{
        transform: translateY(-80px);
    }
    100%{
        transform: translateY(0px);
    }
}

.fade-in {
    animation-name: fadeIn;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 0.75s;
}

.fade-down {
    animation-name: fadeDown;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 1s;
}

.fade-section {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(-40px);
  transition: opacity 0.5s ease-in-out, transform 0.4s ease;
}

.fade-section.faded {
  opacity: 0.2;
  filter: blur(5px);
  transition: opacity 0.4s ease-in-out;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    padding: 4rem 12% 4rem;
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active{
    border-bottom: 3px solid var(--text-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--second-text-color);
    display: none;
}

section {
    min-height: 100vh;
    padding: 10rem 12% 10rem;
}

.about {
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
}

.about-border {
    background-color: var(--second-text-color);
    border: 2px solid var(--main-color);
    border-radius: 1%;
    padding: 1rem;
}

.about p {
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 400;
}

.home {
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.home-content{
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: left;
    justify-content: center;
}

span {
    color: var(--main-color);
}

.logo span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 6rem;
    font-weight: 650;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.home-content h3 {
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3.5rem;
}

.home-content p {
    font-size: 1.75rem;
    font-weight: 200;
}

.home-content p span {
    color: var(--main-color);
    font-size: 1.75rem;
    font-weight: 900;
}

.home-img {
    position: relative;
    border-radius: 50%;
    transition: 0.4s ease-in-out;
}

.home-img img {
    border-radius: 50%;
    transition: 0.4s ease-in-out;
}

.home-content {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
}

.social-icons {
    margin: auto;
    position: relative;
}

.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--second-bg-color);
    border: 1px solid var(--text-color);
    color: var(--bg-color);
    font-size: 2.5rem;
    border-radius: 50%;
    transition: 0.3s ease-in-out;
}

.social-icons a:hover {
    transform: scale(1.3);
    background-color: var(--bg-color);
    color: var(--second-bg-color);
    border: 1px solid var(--second-bg-color);
}

.btn {
    display: inline-block;
    align-items: center;
    padding: 1rem 3rem;
    margin-right: 15px;
    margin-top: 15px;
    background: var(--second-bg-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--second-text-color);
    border: 1.5px solid var(--second-bg-color);
    letter-spacing: 0.1rem;
    font-weight: 800;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn1 {
    display: inline-block;
    align-items: center;
    padding: 1rem 3rem;
    margin-right: 15px;
    margin-top: 15px;
    background: var(--bg-color);
    border: 1.5px solid var(--second-bg-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: 0.1rem;
    font-weight: 800;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.1);
    background-color: var(--bg-color);
    color: var(--second-bg-color);
}

.btn1:hover {
    transform: scale(1.1);
    background-color: var(--second-bg-color);
    color: var(--second-text-color);
}

.text-animation {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
    cursor: text;
}

.text-animation span {
    position: relative;
}

.text-animation span::before {
    content: "Web Developer";
    color: var(--main-color);
    animation: words 20s infinite;
}
.text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--main-color);
    top: 1px;
    right: -9px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
    to {
        border-left: 2px solid var(--bg-color);
    }
}

@keyframes words {
    0%,
    20% {
        content: "Web Designer";
    }
    21%,
    40% {
        content: "Web Developer";
    }
    41%,
    60% {
        content: "Quality Engineer";
    }
    61%,
    80% {
        content: "Software Developer";
    }
    81%,
    100% {
        content: "Software Engineer";
    }
}

@keyframes typing {
    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90%,
    95% {
        width: 0;
    }
    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85% {
        width: calc(100% + 8px);
    }
}

.heading {
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-color);
}

/*::-webkit-scrollbar-track {
    background-color: var(--bg-color);
    width: 15px;
}*/

.projects {
    background-color: var(--bg-color);
}

.projects h2 {
    color: var(--text-color);
}

.projects h3 {
    color: var(--text-color);
    font-size: 3rem;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.project-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.project .heading {
    margin-bottom: 5rem;
}

.project-item {
    min-height: 500px;
    max-width: 450px;
    background-color: white;
    border-radius: 2rem;
    box-shadow: 1px 2px 10px black;
    margin: 0 2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    transition: 0.4s ease-in-out;
}

.project-item:hover {
    transform: scale(1.03);
}

.project-item img {
    height: 150px;
    width: 200px;
    border-radius: 3%;
}

.project-item h2 {
    font-size: 3rem;
}

.project-item p {
    font-size: 1.5rem;
    margin: 0 5rem;
    color: black;
}

.skills {
    background-color: var(--bg-color);
    color: black;
}

.skills h2 {
    margin-bottom: 4rem;
    color: var(--text-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    align-items: center;
    justify-content: center;
    gap: 5rem;
}

.skill-box {
    background-color: white;
    width: max/3px;
    height: 425px;
    border-radius: 3rem;
    border: 3px solid transparent;
    box-shadow: 1px 2px 10px black;
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

.skill-box:hover {
    color: black;
    transform: scale(1.03);
    transition: 0.5s ease-in-out;
    box-shadow: 1px 3px 8px black;
}

.skill-info {
    display: flex;
    flex-direction: column;
    max-height: 250px;
    justify-content: left;
    align-items: baseline;
    padding: 5rem 5rem;
}

.skill-info h4 {
    margin: auto;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 650;
    line-height: 1.5;
}

.skill-info li {
    font-size: 1.7rem;
    font-weight: 500;
    max-height: 200px;
    line-height: 1.5;
    margin: auto;
}

.skill-info span {
    font-size: 1.7rem;
    font-weight: 700;
    max-height: 200px;
    line-height: 1.5;
    margin: auto;
    color: black;
}

.contact {
    background-color: var(--bg-color);
}

.contact h2 {
    margin-bottom: 3rem;
    color: var(--text-color);
}

.contact form {
    display: block;
    justify-content: center;
    gap: 1rem;
    margin: 3rem auto;
    text-align: center;
}

.contact form .input-box {
    width: 100%;
    display: inline-flex;
    gap: 1rem;
    justify-content: center;
}

.contact form input,
.contact form textarea {
    width: 100%;
    padding: 2rem;
    font-family: "Trirong";
    font-size: 1.7rem;
    color: rgb(0, 0, 0);
    font-weight: 600;
    background: var(--bg-color);
    border-radius: 1.5rem;
    border: 3px solid var(--main-color);
    margin: 1rem 0;
}

.contact form .btn {
    margin-top: 2rem;
    background-color: var(--main-color);
    border: 0px;
    color: white;
}

.contact form .btn:hover {
    background-color: var(--second-bg-color);
    border: 10px;
    color: white;
}

#contact-container {
    display: inline-flex;
    justify-content: center;
}

#contact-form.sent-message {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px; /* adjust as needed */
  font-size: 1.5rem;
  color: green;
  font-weight: bold;
  text-align: center;
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
    background-color: var(--second-bg-color);
}

.footer .social {
    text-align: center;
    color: var(--main-color);
}

.footer .social a {
    font-size: 25px;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    border: 1px solid var(--text-color);
    color: var(--second-bg-color);
    width: 42px;
    height: 42px;
    line-height: 46px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 10px;
    transition: 0.3s ease-in-out;
}

.footer .social a:hover {
    transform: scale(1.3);
    background-color: var(--second-bg-color);
    color: var(--bg-color);
    border: 1px solid var(--second-text-color);
}

.footer ul {
    margin-top: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.footer ul li a {
    color: var(--second-text-color);
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}

.footer ul li a:hover {
    border-bottom: 3px solid var(--second-text-color);
}

.footer ul li {
    display: inline-block;
    padding: 0 15px;
}

.footer .copyright {
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: var(--second-text-color);
}

@media(max-width:2560px) {

    .project-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .project-container a {
        flex-direction: column;
        align-items: center;
    }

    .project-box {
        background-size: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .project .heading {
        margin-bottom: 5rem;
    }

    .project-item {
        margin: auto;
        min-height: 500px;
        max-width: 525px;
        border-radius: 2rem;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        transition: 0.4s ease-in-out;
    }
}

@media(max-width:1285px) {
    html {
        font-size: 55%;
    }
    
    .skills-container {
        padding-bottom: 7rem;
        grid-template-columns: repeat(2,1fr);
        margin: 0 5rem;
    }
}

@media(max-width:1024px) {

    .home {
        flex-direction: column-reverse;
        margin: 5rem 4rem;
    }

    .home-content h1 {
        text-align: center;
    }

    .home-content h3{
        font-size: 3rem;
        margin: 0 auto;
        text-align: center;
    }

    .home-img img{
        height: 570px;
    }

    .text-animation {
        font-size: 34px;
        font-weight: 600;
        min-width: 280px;
    }

    .home-content h1 {
        font-size: 8rem;
        margin-top: 3rem;
    }

    .home-content p {
        max-width: 600px;
        margin: 0 auto;
        text-align: center;
    }

    .home-img img {
        width: 56vw;
    }

    .social-icons {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: auto;
    }

    .social-icons a{
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 4.5rem;
        height: 4.5rem;
        font-size: 2.5rem;
        border-radius: 50%;
        margin: 3rem 1.5rem 3rem 0;
        transition: 0.3s ease-in-out;
    }

    .btn-group {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.2rem;
        margin: auto;
    }

    .skills-container {
        display: grid;
        grid-template-columns: repeat(3,1fr);
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }

    .skill-box {
        margin: auto;
        width: 300px;
        height: 500px;
        border-radius: 3rem;
        border: 5px solid transparent;
        cursor: pointer;
        transition: 0.4s ease-in-out;
    }

}

@media(max-width:991px) {
    header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .project-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .project-container a {
        flex-direction: column;
        align-items: center;
    }

    .project-box {
        background-size: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .project .heading {
        margin-bottom: 5rem;
    }

    .project-item {
        min-height: 550px;
        max-width: 400px;
        border-radius: 2rem;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        transition: 0.4s ease-in-out;
    }

    .project-item h2 {
        font-size: 3rem;
    }

    .project-item p {
        font-size: 1.5rem;
    }

    .contact form {
        flex-direction: column;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media(max-width:895px) {
    #menu-icon {
        position: relative;
        display: block;
        right: -25px;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3%;
        background-color: azure;
        border-bottom-left-radius: 2rem;
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column-reverse;
        margin: 5rem 4rem;
    }

    .home-content h1 {
        text-align: center;
    }

    .home-content h3{
        font-size: 3rem;
        margin: 0 auto;
        text-align: center;
    }

    .home-img img{
        height: 450px;
    }

    .text-animation {
        font-size: 34px;
        font-weight: 600;
        min-width: 280px;
    }

    .home-content h1 {
        font-size: 8rem;
        margin-top: 3rem;
    }

    .home-content p {
        max-width: 600px;
        margin: 0 auto;
    }

    .home-img img {
        width: 56vw;
    }

    .project-container {
        display: block;
        grid-template-columns: repeat(3, 1fr);
        gap: 5rem;
    }

    .project-box {
        background-size: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    
    .project .heading {
        margin-bottom: 5rem;
    }
    
    .project-box img {
        width: 15rem;
        border-radius: 50%;
    }
    
    .project-item {
        min-height: 350px;
        border-radius: 2rem;
        border: 5px solid transparent;
        margin-bottom: 5rem;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 1.5rem;
        transition: 0.4s ease-in-out;
    }
        
    .project-item h2 {
        font-size: 3rem;
    }
    
    .project-item p {
        font-size: 2rem;
    }

    .skills h2 {
        margin-bottom: 3rem;
    }

    .skills-container {
        grid-template-columns: repeat(1,1fr);
    }

    .skill-box {
        margin: auto;
        width: 100%;
        height: 250px;
        border-radius: 3rem;
        border: 5px solid transparent;
        cursor: pointer;
        transition: 0.4s ease-in-out;
    }
}

@media(max-width:430px) {

    .header {
        position: fixed;
        top: 0;
        left: 0;
        max-width: 100%;
        display: flex;
        backdrop-filter: blur(0px);
        justify-content: space-between;
        align-items: center;
        z-index: 5;
    }

    .logo {
        position: relative;
        text-align: center;
        justify-content: center;
        font-size: 2rem;
        font-weight: 800;
        cursor: pointer;
        transition: 0.3s ease;
        width: 100%;
        padding-left: 25px;
    }

    .logo:hover {
        transform: scale(1);    
    }
    
    #menu-icon {
        position: relative;
        display: block;
        color: var(--text-color)
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3%;
        background-color: azure;
        border-bottom-left-radius: 2rem;
        border-top-left-radius: 2rem;
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column-reverse;
        margin: 3rem 2rem;
    }

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

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content h3 {
        margin-bottom: 2rem;
        margin-top: 1rem;
        padding-left: 3rem;
        font-size: 22px;
        text-align: left;
    }

    .home-content h1 span {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .home-content p {
        font-size: 1.75rem;
        font-weight: 600;
        text-align: center;
    }

    .home-img {
        height: 250px;
    }

    .home-img img {
        height: 250px;
    }

    .btn {
        display: inline-block;
        border-radius: 4rem;
        font-size: 1.5rem;
        border: 2px solid transparent;
        font-weight: 600;
        transition: 0.3s ease-in-out;
        cursor: pointer;
    }

    .btn-group {
        position: relative;
        align-items: center;
        width: auto;
    }

    .text-animation span {
        position: absolute;
        padding-left: 0.8rem;
    }  

    .text-animation span::before {
        content: "Web Developer";
        color: var(--main-color);
        animation: words 20s infinite;
        font-size: 22px
    }
    .text-animation span::after {
        content: "";
        background-color: var(--bg-color);
        position: absolute;
        width: calc(100% + 8px);
        height: 100%;
        border-left: 3px solid var(--main-color);
        top: 1px;
        right: -17px;
        animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
    }

    .heading {
        font-size: 5rem;
        text-align: center;
        margin: 5rem 0;
    }

    .skill-box {
        height: 350px;
        border-radius: 3rem;
        border: 5px solid transparent;
        cursor: pointer;
        transition: 0.4s ease-in-out;
        overflow-y: auto;
        display: flex;
    }
    
    .project-container {
        display: block;
        grid-template-columns: repeat(3, 1fr);
        gap: 5rem;
    }

    .project-box {
        background-size: cover;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    
    .project .heading {
        margin-bottom: 5rem;
    }
    
    .project-box img {
        width: 15rem;
        border-radius: 50%;
    }
    
    .project-item {
        min-height: 350px;
        border-radius: 2rem;
        border: 5px solid transparent;
        margin: 0 5rem 5rem;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 1.5rem;
        transition: 0.4s ease-in-out;
    }
        
    .project-item h2 {
        font-size: 3rem;
    }
    
    .project-item p {
        font-size: 2rem;
    }
    
    .contact form {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        margin: 5rem auto;
        text-align: center;
    }
    
    .contact form .input-box {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .contact form .input-box input,
    .contact form textarea {
        width: 90%;
        padding: 2.5rem;
        font-size: 1.8rem;
        border-radius: 2rem;
        margin: 1.5rem 0;
        resize: none;
    }
    
    .contact form .btn {
        margin-top: 2rem;
    }
    
    .footer {
        position: relative;
        bottom: 0;
        width: 100%;
        padding: 40px 0;
    }
    
    .footer .social {
        text-align: center;
        padding-bottom: 25px;
    }
    
    .footer .social a {
        font-size: 25px;
        width: 42px;
        height: 42px;
        line-height: 42px;
        display: inline-block;
        text-align: center;
        border-radius: 50%;
        margin: 0 10px;
        transition: 0.3s ease-in-out;
    }
    
    .footer .social a:hover {
        transform: scale(1.3);
    }
    
    .footer ul {
        margin-top: 0;
        padding: 0;
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 0;
        text-align: center;
    }
    
    .footer ul li a {
        border-bottom: 3px solid transparent;
        transition: 0.3s ease-in-out;
    }
    
    .footer ul li {
        display: flex;
        justify-content: center;
    }
    
    .footer .copyright {
        margin-top: 50px;
        margin-bottom: 25px;
        text-align: center;
        font-size: 16px;
    }
}