

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Nunito', sans-serif;
}

:root{
     --bg-color: #191f36;
     --snd-bg-color: #262840;
     --text-color: #fff;
     --main-color: #5982F4;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
}

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

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

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 5rem;
    height: 5rem;
    border: 0.3rem solid #7B9FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: #7B9FFF;
    letter-spacing: -0.15rem;
    position: relative;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 0 2rem rgba(89, 130, 244, 0.6),inset 0 0 1rem rgba(89, 130, 244, 0.2);
}

.logo-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0.3rem solid #7B9FFF;
    border-radius: 50%;
    top: 0.4rem;
    left: 0.4rem;
    opacity: 0.5;
}

.navbar a{
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

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

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

.home-content {
    flex: 1;
    max-width: 50%;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 4rem;
}

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

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-img {
    flex: 0 0 auto;
}

.home-img img {
    width: 25vw;
    border-radius: 90%;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2.4rem);
    }
    100% {
        transform: translateY(0);
    }
}

.home-content p {
    font-size: 1.6rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--snd-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}

.about {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--snd-bg-color);
    padding: 10rem 9% 5rem;
}

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

.about-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1200px;
    width: 100%;
}

.about-box {
    background: rgba(89, 130, 244, 0.05);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 2px solid rgba(89, 130, 244, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.about-box:hover {
    border-color: var(--main-color);
    box-shadow: 0 0 2rem rgba(89, 130, 244, 0.3);
    transform: translateY(-5px);
}

.box-title {
    font-size: 2.6rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.about-text p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(89, 130, 244, 0.1);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: rgba(89, 130, 244, 0.2);
    transform: scale(1.05);
}

.skill-item .tech-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    margin-bottom: 1rem;
}

.skill-item p {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
}

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

.projects-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    margin-top: 2rem;
}

.projects-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
    width: 100%;
    padding: 0 1rem;
}

.projects-container .projects-box {
    flex: 0 0 calc(33.333% - 1.4rem); 
    min-width: calc(33.333% - 1.4rem);
    max-width: calc(33.333% - 1.4rem);
    background: var(--snd-bg-color);
    padding: 3rem 2rem 3rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.projects-container .projects-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.projects-box .project-img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.projects-box h3 {
    font-size: 2.3rem;
    margin-bottom: 1rem;
}

.projects-box p {
    font-size: 1.6rem;
    margin: 0 0 1.5rem 0;
    flex-grow: 1; 
    display: flex;
    align-items: flex-start;
}

.projects-box .btn {
    margin-top: auto; 
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: auto;
  margin-bottom: 1.5rem;
}

.badge {
  background-color: transparent;
  color: var(--text-color);
  padding: 0.5rem 1.2rem;
  font-size: 1.3rem;
  border: 0.2rem solid var(--main-color);
  border-radius: 2rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 1rem var(--main-color);
}

.projects-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 2rem;
    border: none;
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
    transition: 0.2s;
}

.projects-arrow:hover {
    background: var(--main-color);
    color: #fff;
}

.left-arrow {
    left: -5px;
}

.right-arrow {
    right: -5px;
}

.contact h2{
    margin-bottom: 2rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    gap: .9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--snd-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.popup-content {
  background: #fff;
  color: #333;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  font-size: 1.1rem;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--snd-bg-color);
}

.footer-text {
    font-size: 1.3rem;
}

.footer-iconTop {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem 1rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem --main-color;
}

.footer-iconTop a i {
    font-size: 2rem;
    color: var(--snd-bg-color);
}

/*BREAKPOINT*/

@media (max-width: 1200px) {
    html {
        font-size: 55%,
    }
}

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

    section {
        padding: 10rem 3%;
    }

    .projects {
        padding: 7rem;
    }

    .contact {
        min-height: auto;
    }

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

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

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

    section {
        min-height: 100vh;
        min-height: 100dvh; 
        padding: 8rem 5% 5rem;
    }

    .home {
        min-height: 100vh;
        min-height: 100dvh;
        flex-direction: column;
        gap: 3rem;
        padding: 10rem 5% 8rem;
    }

    .home-content {
        order: 2;
        max-width: 100%;
        text-align: center;
    }

    .home-content h1 {
        font-size: 4rem;
        margin: 3rem 0;
    }

    .home-content h3 {
        font-size: 2.5rem;
        margin: 3rem 0;
    }

    .home-content h3:nth-of-type(2) {
        margin-bottom: 2rem;
    }

    .home-img {
        order: 1;
    }

    .home-img img {
        width: 50vw;
        max-width: 300px;
        margin-top: 10rem;
        animation: none;
    }

    .social-media {
        display: flex;
        justify-content: center;
        gap: 3rem;
        margin: 5rem 0;
    }

    .social-media a {
        margin: 0;
        width: 5rem;
        height: 5rem;
    }

    .btn {
        display: inline-block;
        margin: 3rem auto;
    }

    .about {
        padding: 10rem 5% 5rem;
    }

    .about .heading {
        font-size: 3.5rem;
        margin-bottom: 3rem;
    }

    .about-columns {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-box {
        padding: 2.5rem 2rem;
    }

    .box-title {
        font-size: 2.4rem;
    }

    .about-text p {
        font-size: 1.6rem;
        text-align: left;
    }

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

    .skill-item {
        padding: 1rem;
        width: 100%;
        max-width: 9rem;
    }

    .skill-item .tech-icon {
        width: 3rem;
        height: 3rem;
    }

    .skill-item p {
        font-size: 1.1rem;
        margin-top: 0.5rem;
    }

    .about-box:last-child {
        padding: 2rem 1.5rem;
    }

    .projects {
        padding: 7rem 5% 5rem;
    }

    .projects h2 {
        font-size: 3.5rem;
        margin-bottom: 3rem;
    }

    .projects-container {
        display: flex;
        transition: transform 0.3s ease-in-out;
        gap: 0;
        width: 100%;
    }

    .projects-container .projects-box {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        padding: 2.5rem 2rem 2.5rem;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        min-height: 500px;
    }

    .projects-box h3 {
        font-size: 2.2rem;
    }

    .projects-box p {
        flex-grow: 1;
        margin: 0 0 1.5rem 0;
    }

    .project-img {
        width: 100%;
        height: 180px;
        object-fit: contain;
        margin-bottom: 2rem;
    }

    .projects-slider-wrapper {
        overflow: hidden;
        position: relative;
        width: 100%;
        padding: 0 4.5rem; 
    }

    .tech-stack {
        margin-top: auto;
        margin-bottom: 1.5rem;
    }

    .projects-box .btn {
        margin-top: auto;
    }

    .badge {
        font-size: 1.2rem;
        padding: 0.4rem 1rem;
    }

    .projects-arrow {
        top: 50%;
        transform: translateY(-50%);
        font-size: 2rem;
        padding: 0.8rem 1rem;
    }

    .left-arrow {
        left: 0.5rem;
    }

    .right-arrow {
        right: 0.5rem;
    }

    .contact {
        padding: 2rem 5% 5rem;
        min-height: auto;
    }

    .contact h2 {
        font-size: 3.5rem;
    }

    .contact form {
        max-width: 100%;
        padding: 0 1rem;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .footer {
        padding: 2rem 5%;
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-text p {
        font-size: 1.4rem;
    }

/*mob animations*/
    .home-img,
    .home-content h3,
    .home-content h1,
    .home-content .social-media,
    .home-content .btn {
        opacity: 0;
    }

    .home-img {
        animation: fadeSlideUp 0.8s ease-out 0.2s forwards;
    }

    @keyframes fadeSlideUp {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .home-content h3:nth-of-type(1) {
        animation: fadeSlideUp 0.8s ease-out 0.5s forwards;
    }

    .home-content h1 {
        animation: fadeIn 0.3s ease-out 1.2s forwards,
                   typing 1.5s steps(13) 1.2s forwards;
        border-right: 0.15em solid var(--main-color);
        white-space: nowrap;
        overflow: hidden;
        width: 0;
        display: inline-block;
    }

    @keyframes fadeIn {
        to {
            opacity: 1;
        }
    }

    @keyframes typing {
        0% {
            width: 0;
        }
        100% {
            width: 100%;
            border-right-color: transparent;
        }
    }

    .home-content h3:nth-of-type(2) {
        animation: fadeSlideUp 0.6s ease-out 2.8s forwards;
    }

    .home-content .social-media {
        animation: slideInLeft 0.6s ease-out 3.2s forwards;
    }

    @keyframes slideInLeft {
        0% {
            opacity: 0;
            transform: translateX(-30px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .home-content .btn {
        animation: slideInLeft 0.6s ease-out 3.6s forwards;
    }

    .home-content h1.typed-complete {
        border-right: none;
    }
}

@media (max-width: 617px) {
    .home-img img {
        width: 70vw;
        max-width: 280px;
    }

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

    .home-content h3 {
        font-size: 2.2rem;
    }

    .about .heading,
    .projects h2,
    .contact h2 {
        font-size: 3rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .skill-item {
        padding: 0.8rem 0.5rem;
        max-width: 8rem;
    }

    .skill-item .tech-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .skill-item p {
        font-size: 1rem;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .home {
        padding: 7rem 4% 4rem;
    }

    .home-img img {
        width: 65vw;
        max-width: 250px;
    }

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

    .home-content h3 {
        font-size: 2rem;
    }

    .social-media a {
        width: 4rem;
        height: 4rem;
        font-size: 1.8rem;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .projects-slider-wrapper {
        padding: 0 3.5rem;
    }

    .projects-arrow {
        font-size: 1.8rem;
        padding: 0.6rem 0.8rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 0.6rem;
    }

    .skill-item {
        padding: 0.8rem 0.3rem;
        max-width: 7rem;
    }

    .skill-item .tech-icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    .skill-item p {
        font-size: 0.9rem;
    }
}