*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', -apple-system, sans-serif;
}

:root {
    /* Dark and dim color scheme */
    --bg-color: #121212;           /* Near-black background */
    --snd-bg-color: #1e1e24;       /* Slightly lighter background for sections */
    --card-bg-color: #2a2a35;      /* Dark card/box background */
    --text-color: #e0e0e0;         /* Light gray text for readability */
    --dim-text-color: #a0a0a0;     /* Dimmer text for secondary content */
    --main-color: #6d5dfc;         /* Muted purple as main accent */
    --main-color-dim: #574db3;     /* Dimmer version of main color */
    --accent-color: #2c2c3a;       /* Subtle accent for borders */
    --hover-color: #7d6dff;        /* Brighter accent for hover states */
    --success-color: #4a8072;      /* Muted teal for success indicators */
    --error-color: #a05b5b;        /* Muted red for errors */
    --shadow-color: rgba(0, 0, 0, 0.5); /* Shadow color for depth */
    
    /* Spacing variables */
    --section-padding: 10rem 9% 2rem;
    --container-gap: 2rem;
    --border-radius-sm: 0.8rem;
    --border-radius-md: 2rem;
    --border-radius-lg: 4rem;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
}

body{
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: padding 0.4s ease-in-out;
}

section{
    min-height: 100vh;
    padding: var(--section-padding);
}

/* Header section */
.header{
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 5%;
    background: var(--snd-bg-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 0.5rem 1rem var(--shadow-color);
    transition: all 0.5s ease;
}

.logo{
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.logo:hover{
    transform: scale(1.05);
    color: var(--hover-color);
    text-shadow: 0 0 8px var(--main-color-dim);
}

.navbar a{
    font-size: 1.9rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
    transition: 0.3s ease;
}

.navbar a:hover,
.navbar a.active{
    color: var(--hover-color);
    text-shadow: 0 0 5px var(--main-color-dim);
}

/* Menu Icon */
#menu-icon {
    font-size: 3rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

/* Home section */
.home{
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img{
    width: 35vh;
    height: 35vh;
    border-radius: 50%;
    object-fit: cover; 
    box-shadow: 0 0 25px var(--main-color-dim);
    cursor: pointer;
    animation: floatImage 4s ease-in-out infinite;
    transition: 0.4s ease;
}

.home-img img:hover{
    box-shadow: 0 0 25px var(--main-color),
                0 0 35px var(--main-color-dim),
                0 0 45px var(--main-color);
}

@keyframes floatImage{
    0%{
        transform: translateY(0);
    }
    50%{
       transform: translateY(-2.4rem); 
    }
    100%{
        transform: translateY(0);
    }
}

.home-content{
    margin-left: 5rem;
}

.home-content h3{
    font-size: 3.7rem;
    font-weight: 700;
}

.home-content h2:nth-of-type(2){
    margin-bottom: 2rem;
}

span{
    color: var(--main-color);
}

.home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p{
    font-size: 1.6rem;
    color: var(--dim-text-color);
}

.social-media a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.2rem;
    height: 4.2rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
}

.social-media a:hover{
    transform: scale(1.2) translateY(-10px);
    background-color: var(--main-color);
    color: var(--text-color);
    box-shadow: 0 0 25px var(--main-color-dim);
}

.btn{
    display: inline-flex;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: var(--border-radius-lg);
    box-shadow: none;
    font-size: 1.6rem;
    color: var(--text-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease;
}

.btn:hover{
    background: var(--hover-color);
    box-shadow: 0 0 1.6rem var(--main-color-dim);
    transform: translateY(-2px);
}

/* About section */
.about{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background-color: var(--snd-bg-color);
}

.about-img img{
    width: 35vh;
    height: 35vh;
    border-radius: 50%;
    object-fit: cover; 
    box-shadow: 0 0 25px var(--main-color-dim);
    cursor: pointer;
    transition: 0.4s ease;
}

.about-img img:hover{
    box-shadow: 0 0 25px var(--main-color),
                0 0 35px var(--main-color-dim),
                0 0 45px var(--main-color);
}

.heading{
    font-size: 6rem;
    text-align: center;
    color: var(--main-color);
    margin-bottom: 3rem;
    text-shadow: 0 0 10px var(--main-color-dim);
}

.about-content{
    padding: 0.4rem;
    font-size: 1.6rem;
}

.about-content h2{
    text-align: left;
    line-height: 1.2;
}

.about-content h3{
    font-size: 3rem;
    margin: 2rem 0 3rem;
    color: var(--main-color);
}

/*SKILL*/
.skills {
    padding: 100px 0;
    background: var(--snd-bg-color);
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(109, 93, 252, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(125, 109, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(74, 128, 114, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.skills h2 {
    text-align: center;
    font-size: 5rem;
    margin-bottom: 70px;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.skills h2 span {
    background: linear-gradient(45deg, var(--main-color), var(--hover-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-box {
    background: var(--card-bg-color);
    border: 1px solid var(--accent-color);
    padding: 45px 35px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(109, 93, 252, 0.3) 90deg,
        rgba(125, 109, 255, 0.3) 180deg,
        rgba(74, 128, 114, 0.3) 270deg,
        transparent 360deg
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skill-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--card-bg-color);
    border-radius: 22px;
    z-index: -1;
}

.skill-box:hover::before {
    opacity: 1;
}

.skill-box:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--hover-color);
    box-shadow: 0 25px 50px var(--shadow-color),
                0 0 50px rgba(125, 109, 255, 0.2);
}

.skill-box i {
    font-size: 7rem;
    margin-bottom: 25px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 20px rgba(109, 93, 252, 0.3));
}

.skill-box:nth-child(1) i {
    color: var(--main-color);
}

.skill-box:nth-child(2) i {
    color: var(--hover-color);
}

.skill-box:nth-child(3) i {
    color: var(--success-color);
}

.skill-box:nth-child(4) i {
    color: var(--error-color);
}

.skill-box:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 30px currentColor);
}

.skill-box h3 {
    font-size: 2.6rem;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.skill-box p {
    font-size: 1.6rem;
    color: var(--dim-text-color);
    margin-bottom: 30px;
    line-height: 1.7;
    font-weight: 400;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.skill-tag {
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 1.4rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-box:nth-child(1) .skill-tag {
    color: var(--main-color);
    box-shadow: 0 0 15px rgba(109, 93, 252, 0.2);
}

.skill-box:nth-child(2) .skill-tag {
    color: var(--hover-color);
    box-shadow: 0 0 15px rgba(125, 109, 255, 0.2);
}

.skill-box:nth-child(3) .skill-tag {
    color: var(--success-color);
    box-shadow: 0 0 15px rgba(74, 128, 114, 0.2);
}

.skill-box:nth-child(4) .skill-tag {
    color: var(--error-color);
    box-shadow: 0 0 15px rgba(160, 91, 91, 0.2);
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--main-color-dim);
    color: var(--text-color);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.proficiency-bar {
    width: 100%;
    height: 8px;
    background: var(--accent-color);
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.proficiency-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-box:nth-child(1) .proficiency-fill {
    background: linear-gradient(90deg, var(--main-color), var(--main-color-dim));
}

.skill-box:nth-child(2) .proficiency-fill {
    background: linear-gradient(90deg, var(--hover-color), var(--main-color));
}

.skill-box:nth-child(3) .proficiency-fill {
    background: linear-gradient(90deg, var(--success-color), #5a9683);
}

.skill-box:nth-child(4) .proficiency-fill {
    background: linear-gradient(90deg, var(--error-color), #b56b6b);
}

@media (max-width: 768px) {
    .skills-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skill-box {
        padding: 30px 20px;
    }
}

/*project*/
.project {
    padding: 100px 0;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(109, 93, 252, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(125, 109, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(74, 128, 114, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.heading {
    text-align: center;
    font-size: 5rem;
    margin-bottom: 70px;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.heading span {
    background: linear-gradient(45deg, var(--main-color), var(--hover-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-box {
    background: var(--card-bg-color);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(109, 93, 252, 0.2) 90deg,
        rgba(125, 109, 255, 0.2) 180deg,
        rgba(74, 128, 114, 0.2) 270deg,
        transparent 360deg
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    animation: rotate 15s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.project-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--card-bg-color);
    border-radius: 18px;
    z-index: -1;
}

.project-box:hover::before {
    opacity: 1;
}

.project-box:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--hover-color);
    box-shadow: 0 20px 40px var(--shadow-color),
                0 0 30px rgba(125, 109, 255, 0.15);
}

.project-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
    filter: brightness(0.9);
}

.project-box:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

.project-box h3 {
    font-size: 2.6rem;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.project-box p {
    font-size: 1.6rem;
    color: var(--dim-text-color);
    margin-bottom: 30px;
    line-height: 1.7;
    font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(45deg, var(--main-color), var(--hover-color));
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(109, 93, 252, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(109, 93, 252, 0.4);
    background: linear-gradient(45deg, var(--hover-color), var(--success-color));
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

@media (max-width: 768px) {
    .project-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    .project-box {
        padding: 25px;
    }
    
    .project-box img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .project-box {
        padding: 20px;
    }
}

/* Contact section */
.contact{
    background-color: var(--bg-color);
}

.contact .heading{
    text-align: center;
}

.contact h2{
    margin-bottom: 3rem;
    color: var(--main-color);
}

.contact form{
    max-width: 88rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact form .input-box input,
.contact form textarea{
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--card-bg-color);
    border-radius: var(--border-radius-sm);
    border: 0.25rem solid var(--accent-color);
    margin: 0.7rem 0;
    resize: none;
    transition: 0.3s ease;
}

.contact form .input-box input:focus,
.contact form textarea:focus{
    border-color: var(--main-color);
    box-shadow: 0 0 5px var(--main-color-dim);
}

.contact form .input-box input{
    width: calc(50% - 0.5rem);
}

.contact form .btn{
    margin-top: 2rem;
    cursor: pointer;
}

/* Footer */
.footer{
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: var(--snd-bg-color);
}

.footer .social{
    text-align: center;
    padding-bottom: 2.5rem;
    color: var(--main-color);
}

.footer .social a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.2rem;
    height: 4.2rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
}

.footer .social a:hover{
    transform: scale(1.2) translateY(-10px);
    background-color: var(--main-color);
    color: var(--text-color);
    box-shadow: 0 0 25px var(--main-color-dim);
}

.footer .copyright{
    margin-top: 2rem;
    text-align: center;
    font-size: 1.6rem;
    color: var(--dim-text-color);
}

/* Responsive design */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }
    
    section {
        padding: 8rem 5%;
    }
    
    .services {
        padding: 7rem 5%;
    }
    
    .project {
        padding: 8rem 5% 5rem;
    }
}

/* Tablet & Small Laptop Screens */
@media (max-width: 768px) {
    .home {
        flex-direction: column;
        text-align: center;
    }
    
    .home-img img {
        width: 30vh;
        height: 30vh;
    }
    
    .home-content {
        margin-left: 0;
        padding-top: 3rem;
    }
    
    .home-content h1 {
        font-size: 5rem;
    }
    
    #menu-icon {
        display: block;
    }
    
    .navbar {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 100%;
        background: var(--snd-bg-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: all 0.4s ease-in-out;
        z-index: 999;
        box-shadow: 0 0.5rem 1rem var(--shadow-color);
    }
    
    .navbar a {
        font-size: 2rem;
        margin: 1rem 0;
    }
    
    .navbar.active {
        right: 0;
    }
    
    /* Add padding to body when menu is active to prevent overlap */
    body.menu-open {
        padding-top: 22rem; /* Adjust this value based on your menu height */
        transition: padding 0.4s ease-in-out;
    }
    
    .about {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content h2 {
        text-align: center;
    }
    
    .contact form .input-box input {
        width: 100%;
        margin: 0.7rem 0;
    }
}

/* Mobile Screens */
@media (max-width: 480px) {
    html {
        font-size: 50%;
    }
    
    .header {
        padding: 1.5rem 3%;
    }
    
    .home-content h1 {
        font-size: 4rem;
    }
    
    .home-content h3 {
        font-size: 2.5rem;
    }
    
    .heading {
        font-size: 5rem;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 1.4rem;
    }
    
    .services-container {
        gap: 1rem;
    }
    
    .services-box h3 {
        font-size: 2rem;
    }
    
    .project-box {
        width: 100%;
    }
    
    .footer .social a {
        width: 3.6rem;
        height: 3.6rem;
        font-size: 1.6rem;
    }
}