:root {
    --primary-bg-color: #323437;
    --main-color: #e2b714;
    --caret-color: #e2b714;
    --sub-color: #646669;
    --sub-alt-color: #2c2e31;
    --text-color: #d1d0c5;
    --error-color: #ca4754;
    --error-extra-color: #7e2a33;
    --colorful-error-color: #ca4754;
    --colorful-error-extra-color: #7e2a33;
    --primary-horinzontal-margin: 0px 10% 0px 10%;
    --font-family-others: "Roboto", sans-serif;
    --font-family-title: "Lexend Deca", sans-serif;
    --secondary-horizontal-margin: 0px 5% 0px 5%;
}

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary-bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Nav bar section */

nav {
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    font-family: var(--font-family-others);
    width: 100%;
    font-size: 2rem;
    background-color: #32343780;
    backdrop-filter: blur(5px);
    z-index: 99999999;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav ul li {
    list-style: None;
    padding: 30px 0px;
    transition: all 1s;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
}

nav ul li:hover {
    cursor: pointer;
    color: var(--main-color);
    transform: scale(1.10);
}

@media (max-width: 900px){
    nav {
        font-size: 1rem;
    }
}

/* popup model */
.Popup {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #32343790;
    backdrop-filter: blur(5px);
    z-index: 10000;
}

.Popup p {
    font-size: 4rem;
    font-family: var(--font-family-title);
}

.hidden {
    display: None;
}

.Popup .contact-container {
    display: flex;
    position: relative;
    gap: 20px;
}

.Popup .contact-container p {
    position: absolute;
    top: -50px;
    right: -50px;
    font-size: 3rem;
}

.Popup .contact-container p:hover {
    color: var(--main-color);
    cursor: pointer;
}


.contact-card {
    display: flex;
    flex-direction: column;
    gap:5px;
    height: 200px;
    width: 300px;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--main-color);
    border-radius: 10px;
    padding: 5px;
}

.contact-card a {
    text-decoration: none;
    color: var(--text-color);
}

.contact-card .fa {
    color: var(--main-color);
}

@media (max-width: 900px){
    .Popup p {
        font-size: 1rem;
    }
    .contact-container {
        display: flex;
        flex-direction: column;
    }
    .contact-card {
        height: 150px;
        width: 210px
    }
}

/* .contact-card p {
    color: var(--text-color);
    font-family: var(--font-family-others);
    font-weight: bold;
    font-size: 8px;
} */

/* Hero section */

#hero {
    margin: var(--primary-horinzontal-margin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 10vh;
    position: relative;
}

.contact-button {
    border: 0px solid transparent;
}

.contact-button:hover {
    cursor: pointer;
    box-shadow: 0px 0px 50px var(--main-color);
}

/* Hero section background grid */
.bg-grid {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: linear-gradient(to right, #e2b71430, transparent 1px),linear-gradient(to bottom, #e2b71430, transparent 1px);
    animation: moveGrid 2s linear infinite;
}

@keyframes moveGrid {
    from {background-position: 0 0;}
    to {background-position: 40px -40px;}
}

.hero-tag {
    position: relative;
    display: flex;
    padding: 10px 30px;
    border: 1px solid var(--main-color);
    width: fit-content;
    font-family: var(--font-family-title);
    font-weight: 900;
    color: var(--main-color);
    animation: blink 2.5s ease-in-out infinite;
}

@keyframes blink {
    0% {
        box-shadow: 0 0 20px var(--main-color);
    }
    50% {
        box-shadow: 0 0 50px var(--main-color);
    }
    100% {
        box-shadow: 0 0 20px var(--main-color);
    }
}

.hero-tag-dot {
    /* position: absolute; */
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background-color: var(--main-color);
}

#hero .hero-main-container {
    display: flex;
    gap: 20px;
    font-family: var(--font-family-others);
    font-weight: 300;
    animation: slide-x 1s linear;
}

.hero-sub-container-1 {
    display: flex;
    gap: 10px;
    flex-direction: column;
    justify-content: space-evenly;
}

.before-developer-name {
    font-weight: 100;
    font-size: 3rem;
}

.developer-name {
    font-family: var(--font-family-title);
    font-size: 4rem;
    color: var(--caret-color);
}

.hero-subcontainer-1 .typewriter-text {
    font-family: var(--font-family-title);
    color: var(--caret-color);
}

.hero-sub-container-1 button {
    background-color: var(--main-color);
    padding: 10px;
    color: var(--primary-bg-color);
    font-weight: 100;
    font-size: 1rem;
    border-radius: 8px 8px;
    width: fit-content;
}

#hero .image-container {
    overflow-x: hidden;
    animation: slide-x-opp 1s linear;
}

#hero .image-container img{
    object-fit: cover;
    height: 400px;
    width: 600px;
}


.circle-1 {
    z-index: -99999;
    position: absolute;
    top: 20;
    left:20;
    height: 180px;
    width: 60px;
    border: 1px solid var(--main-color);
    /* border-top: 5px solid var(--main-color); */
    border-radius: 50%;
    animation: rotateClockWise 8s linear infinite;
}

.circle-2 {
    z-index: -99999;
    position: absolute;
    top: 20;
    left:20;
    height: 160px;
    width: 80px;
    border: 1px solid var(--main-color);
    /* border-top: 3px solid var(--main-color); */
    border-radius: 50%;
    animation: rotateAntiClockWise 8s linear infinite;
}
.circle-3 {
    z-index: -99999;
    position: absolute;
    top: 20;
    left:20;
    height: 140px;
    width: 70px;
    border: 1px solid var(--main-color);
    /* border-top: 1px solid var(--main-color); */
    border-radius: 50%;
    animation: rotateClockWise 8s linear infinite;
}
.circle-4 {
    z-index: -99999;
    position: absolute;
    top: 20;
    left:20;
    height: 100px;
    width: 50px;
    border: 1px solid var(--main-color);
    /* border-top: 1px solid var(--main-color); */
    border-radius: 50%;
    animation: rotateAntiClockWise 8s linear infinite;
}
.circle-5 {
    z-index: -99999;
    position: absolute;
    top: 20;
    left:20;
    height: 80px;
    width: 40px;
    border: 1px solid var(--main-color);
    /* border-top: 1px solid var(--main-color); */
    border-radius: 50%;
    animation: rotateClockWise 8s linear infinite;
}

@keyframes rotateClockWise {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

@keyframes rotateAntiClockWise {
    from {transform: rotate(0deg);}
    to {transform: rotate(-360deg);}
}

@media (max-width: 900px){

    nav {
        display: flex;
        gap: 2px;
    }

    #hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap:2px;
        width: auto;
    }

    #hero .hero-sub-container-1 {
        width: 100%;
    }

    #hero .image-container img{
    object-fit: cover;
    height: 400px;
    width: 100%;
    border-radius: 8px 8px;
}
}

/* About section */
#about {
    min-height: 40vh;
    margin: var(--primary-horinzontal-margin);
    font-family: var(--font-family-others);
}

#about .about-title {
    font-family: var(--font-family-title);
    font-size: 4rem;
    width: fit-content;
    border-top: 1px solid var(--main-color);
    border-bottom: 1px solid var(--main-color);
    animation: slide-x 1s linear;
}

#about .about-container {
    display: flex;
    margin-top: 20px;
    align-items: center;
    gap: 100px;
}

.about-container-1 {
    display: flex;
    flex-direction: column;
    gap: 60px;
    justify-content: space-between;
}

#about .about-container-1 {
    font-size: 20px;
    font-weight: 300;
    animation: slide-x 1s linear;
}

@keyframes slide-x {
    from {transform: translateX(-100px);}
    to {transform: translateX(0);}
}

#about .about-container-2 {
    display: flex;
    flex-direction: column;
    animation: slide-x-opp 1s linear 
}

@keyframes slide-x-opp {
    from {transform: translateX(100px);}
}

#about .about-container-2 .grid-container {
    display: grid;
    grid-template-columns: repeat(3,auto);
    gap:10px;
}

#about .about-container .about-container-2 .grid-box {
    height: 150px;
    width: 200px;
    background-color: var(--sub-alt-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20%;
    box-shadow: 0px 0px 2px 0px var(--main-color);
    transition: all 1s;
}

#about .about-container .about-container-2 .grid-box:hover {
    box-shadow: 0px 0px 50px var(--main-color);
    transform: scale(1.10);
}

.skill-bar {
    height:2px;
    width: 100%;
    background-color: var(--sub-color);
}

.s1 .skills-inner-bar {
    height: 100%;
    width: 90%;
    background-color: var(--main-color);
    animation: slideIn 1.5s ease-out forwards;
}
.s2 .skills-inner-bar {
    height: 100%;
    width: 85%;
    background-color: var(--main-color);
    animation: slideIn 1.5s ease-out forwards;
}
.s3 .skills-inner-bar {
    height: 100%;
    width: 90%;
    background-color: var(--main-color);
    animation: slideIn 1.5s ease-out forwards;
}
.s4 .skills-inner-bar {
    height: 100%;
    width: 95%;
    background-color: var(--main-color);
    animation: slideIn 1.5s ease-out forwards;
}
.s5 .skills-inner-bar {
    height: 100%;
    width: 92%;
    background-color: var(--main-color);
    animation: slideIn 1.5s ease-out forwards;
}
.s6 .skills-inner-bar {
    height: 100%;
    width: 87%;
    background-color: var(--main-color);
    animation: slideIn 1.5s ease-out forwards;
}

@keyframes slideIn {
    from {width: 0%;}
}

@media (max-width: 900px) {
    #about {
        margin: var(--secondary-horizontal-margin);
        min-height: auto;
    }
    
    #about .about-container {
        flex-direction: column;
        gap: 40px; /* Add space between text and grid */
    }

    #about .about-container-2 .grid-container {
        display: grid; /* Stay as grid */
        grid-template-columns: repeat(2, 1fr); /* Single column that fills width */
        gap: 15px;
        width: 100%; /* Ensure container spans the screen */
    }

    #about .about-container .about-container-2 .grid-box {
        width: 100%; /* Box now stretches to fill the column */
        height: auto; /* Optional: let content define height */
        min-height: 120px;
    }
}

/* Projects section */
#projects {
    margin: var(--primary-horinzontal-margin);
    min-height: 100vh;
    margin-top: 4rem;
}

.Projects-title-holder {
    display: flex;
    align-items: center;
    font-family: var(--font-family-title);
    font-size: 4rem;
    width: fit-content;
    border-top: 1px solid var(--main-color);
    border-bottom: 1px solid var(--main-color);
    animation: slide-x 1s linear;
}

.Projects-title-holder .fa-diagram-project {
    color: var(--main-color);
}

.projects-grid-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
}

.project-grid-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: 300px;
    width: auto;
    padding: 5px 20px;
    background-color: var(--sub-alt-color);
    box-shadow: 0px 0px 2px 0px var(--main-color);
    transition: all 1s;
}

.project-grid-box a {
    text-decoration: none;
    color: var(--text-color);
}

.project-grid-box a:hover {
    text-decoration: underline;
}

.projects-grid-container .project-grid-box:hover {
    box-shadow: 0px 0px 50px var(--main-color);
    transform: scale(1.05);
}

.project-grid-box .fa-solid {
    font-size: 4rem;
    color: var(--main-color);
}

.project-grid-box .fa-regular {
    font-size: 4rem;
    color: var(--main-color);
}

.project-grid-box .project-grid-box-title {
    font-size: 2rem;
    font-family: var(--font-family-title);
}

.project-grid-box .project-grid-box-desc {
    font-family: var(--font-family-others);
    font-weight: 300;
}

@media (max-width: 900px){
    #projects {
        display: flex;
        flex-direction: column;
        margin: var(--secondary-horizontal-margin);
        margin-top: 50px;
    }

    .projects-grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid: 2px;
    }
    .project-grid-box {
        height: 200px;
        width: auto;
    }
    .project-grid-box .project-grid-box-title {
        font-size: 1rem;
        font-family: var(--font-family-title);
    }

    .project-grid-box .project-grid-box-desc {
        font-family: var(--font-family-others);
        font-weight: 300;
        font-size: 0.7rem;
    }
    .project-grid-box .fa-solid {
        font-size: 2rem;
        color: var(--main-color);
    }

    .project-grid-box .fa-regular {
        font-size: 2rem;
        color: var(--main-color);
    }

}