@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');

:root{
    --main-color:#c85600; /* I call it orange McLaren :) */
    --black:rgb(5, 8, 22);
    --bg:#010103;
    --border:.1rem solid rgba(255,255,255,.3);

    --white: #fff;
    --light-white: #fafafa;
    --dark-text: #18181b;
    --off-white: #eee;
    --light-gray: #ccc;
    --transparent-white-20: rgba(255, 255, 255, 0.20);
    --transparent-white-90: rgba(255, 255, 255, 0.9);
    --transparent-white-fill: #fafafad5;

    /* New light mode variables */
    --light-bg: #ffffff;
    --light-text: #18181b;
    --light-main: #c85600;
    --light-purple: #6039ba;
    --glass-bg: rgba(243, 244, 246, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: rgba(0, 0, 0, 0.1);

    /* Update the dark blue tints to be darker */
    --dark-blue-glass: rgba(25, 25, 45, 0.7);  /* Darker blue for glass effects */
    --dark-blue-glass-mobile: rgba(25, 25, 45, 0.95);  /* More opaque version for mobile */
    --dark-blue-badge: rgba(25, 25, 45, 0.4);  /* Lighter version for badges */
}

*{
    font-family: 'Roboto', sans-serif;
    margin:0; padding:0;
    box-sizing: border-box;
    outline: none; border:none;
    text-decoration: none;

    transition: .2s linear;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 9rem;
    scroll-behavior: smooth;
}

html::-webkit-scrollbar{
    width: .8rem;
}

html::-webkit-scrollbar-track{
    background: transparent;
}

html::-webkit-scrollbar-thumb{
    background: var(--white);
    border-radius: 5rem;
}

body{
    background: var(--bg);
    font-family: Arial, sans-serif;
    margin: 0;
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 1;
}

section{
    padding:2rem 7%;
}

.heading{
    text-align: center;
    color: var(--white);
    text-transform: uppercase;
    padding-bottom: 3.5rem;
    font-size: 4rem;
}

.heading span{
    color:var(--main-color);
    text-transform: uppercase;
}

.btn{
    margin-top: 1rem;
    display: inline-block;
    padding:.9rem 3rem;
    font-size: 1.7rem;
    color: var(--white);
    background: var(--main-color);
    cursor: pointer;
    border-radius: 5px;
}

.btn:hover{
    /* letter-spacing: .2rem; */
    /* opacity: 0.9; */
    background-color: var(--light-white);
    color: var(--dark-text);
}

.header{
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:1.5rem 7%;
    border-bottom: var(--border);
    position: fixed;
    top:0; left: 0; right: 0;
    z-index: 1000;
}

#about p{
    font-size: 1.8rem;
}

.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../img/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.home::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%; /* Adjust height as needed */
    background: linear-gradient(rgba(0,0,0,0), rgba(0, 0, 0, 0.3),rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)); /* Gradient to add opacity */
    pointer-events: none;
}


.home .content{
    max-width: 60rem;
}

.home .content h1{
    font-size: 6rem;
    text-transform: uppercase;
    color: var(--white);
}

.home .content p{
    font-size: 2rem;
    font-weight: lighter;
    line-height: 1.8;
    padding:1rem 0;
    color: var(--off-white);
}

.about {
    min-height: 100vh;
    align-items: center;
    position: relative;
    margin-top: -100px; 
    padding-top: 100px;
    padding-bottom: 50px; /* Add padding at bottom */
    /* Remove height: 100vh to allow content to flow naturally */
}

.about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(
        rgba(0, 0, 0, 0.6), 
        rgba(0, 0, 0, 0), 
    );
    pointer-events: none;
    z-index: 1;
}

.about .row {
    display: flex;
    align-items: center;
    background: var(--dark-blue-glass);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    width: 95%;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 17px;
    position: relative;
    z-index: 2;
}



.about .row .content{
    flex: 1 1 45rem;
    padding: 1.5rem; /* Reduced from 2rem */
    max-width: 700px; /* Reduced from 800px */
}

.about .row .content h3{
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem; /* Added to reduce space */
}

.about .row .content p {
    font-size: 1.6rem;
    color: var(--light-gray);
    padding: 0.5rem 0; /* Reduced from 1rem */
    line-height: 1.6; /* Slightly reduced */
    max-width: 65ch; /* Reduced from 70ch */
    text-align: justify; /* Added to justify text */
    letter-spacing: -0.02em; /* Reduced letter spacing */
}


.about .row .content .btn{
    margin-top: 1rem; /* Added to reduce space between text and buttons */
    margin-right: 0.15rem; /* Added to reduce space between buttons */
}

.skills .row {
    display: flex;
    align-items: center;
    background: var(--dark-blue-glass);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    width: 95%;
    margin: 0 auto;
    padding: 10px 20px;
    border-radius: 17px;
    position: relative;
    margin-bottom: 20px; /* Adds space between blocks */
}

.skills .row .content {
    flex: 1 1 45rem;
    padding: 1.5rem;
    max-width: 700px;
}



.skills .row .content h3{
    font-size: 3rem;
    color:#fff;
    margin-bottom: 1rem; /* Added to reduce space */
}


.DevBadge_badge-lg, 
.DevBadge_badge-md, 
.DevBadge_badge-sm {
    font-size: 16px;
    gap: 10px;
    width: fit-content;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    margin-top: 5px;
    border-radius: 7px;
    padding: 4px 8px;
    font-family: rainyhearts, sans-serif;
    display: inline-flex;
    background: var(--transparent-white-20);
    color: var(--transparent-white-90);
}

.DevBadge_badge-lg {
    background: var(--dark-blue-badge);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dev-badge svg {
    width: 24px;
    height: 24px;
    fill: var(--transparent-white-fill); 
}

/* Add theme toggle button styles */
.theme-toggle {
    position: fixed;
    top: 15px;
    left: 15px; /* Position on the left */
    background: var(--dark-blue-glass);
    backdrop-filter: blur(8px);
    padding: 10px;
    border-radius: 20px;
    color: var(--white);
    cursor: pointer;
    font-size: 1.8rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    transform: rotate(15deg);
    background: rgba(51, 51, 51, 0.9);
}

/* Light mode styles */
body.light-mode {
    background: var(--light-bg);
}

body.light-mode .home {
    filter: invert(1) hue-rotate(180deg);
}

body.light-mode .home .content {
    filter: invert(1) hue-rotate(180deg); /* This will counter the parent filter */
}

body.light-mode .heading,
body.light-mode .home .content h1,
body.light-mode .home .content p,
body.light-mode .about .row .content h3,
body.light-mode .about .row .content p,
body.light-mode .skills .row .content h3 {
    color: var(--light-text);
}

body.light-mode .home .content h1,
body.light-mode .home .content p {
    color: var(--black); /* Makes home section text black */
}

body.light-mode .navbar-content a {
    color: var(--light-text);
}

body.light-mode .navbar-content a:hover {
    color: var(--light-main);
}

body.light-mode .btn {
    background: var(--light-main);
    color: var(--white);
}

body.light-mode .btn:hover {
    background: var(--light-purple);
    color: var(--white);
}

body.light-mode .about .row,
body.light-mode .skills .row {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px var(--glass-shadow);
}

body.light-mode .DevBadge_badge-lg {
    background: rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

body.light-mode .dev-badge svg {
    fill: var(--light-text);
}

/* Mobile Menu Light Mode */
body.light-mode .mobile-menu {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .mobile-menu a {
    color: var(--light-text);
}

body.light-mode .mobile-menu a:hover {
    color: var(--light-main);
}

body.light-mode .menu-icon {
    color: var(--light-text);
}

body.light-mode .close-btn {
    color: var(--light-text);
}

/* Footer Light Mode */
body.light-mode .footer {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
}

body.light-mode .footer .share a,
body.light-mode .footer .links a {
    color: var(--light-text);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .footer .share a:hover,
body.light-mode .footer .links a:hover {
    background: var(--light-main);
    color: var(--white);
}

/* Blogs/Posts Light Mode */
body.light-mode .blogs .box {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px var(--glass-shadow);
}

body.light-mode .blogs .box .content h3 {
    color: var(--light-text);
}

body.light-mode .blogs .box .content p {
    color: var(--light-text);
}

body.light-mode .blogs .box .content .date {
    color: var(--light-main);
}

/* Contact Form Light Mode */
body.light-mode .contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px var(--glass-shadow);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

body.light-mode .form-group input::placeholder,
body.light-mode .form-group textarea::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Scrollbar Light Mode */
body.light-mode html::-webkit-scrollbar-thumb {
    background: var(--light-text);
}

/* Loading Bar Light Mode */
body.light-mode #loadingBar {
    background: var(--light-main);
}

/* Media Queries Adjustments */
@media (max-width: 768px) {
    body.light-mode .mobile-menu {
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    body.light-mode .theme-toggle {
        background: rgba(255, 255, 255, 0.9);
        color: var(--light-text);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    body.light-mode .theme-toggle:hover {
        background: rgba(255, 255, 255, 1);
    }
}

@media (max-width: 450px) {
    .about .row,
    .skills .row {
        background: var(--dark-blue-glass-mobile);
    }

    body.light-mode .about .row,
    body.light-mode .skills .row {
        background: rgba(255, 255, 255, 0.8);
    }

    .about .row,
    .skills .row {
        background: rgba(41, 41, 82, 0.8); /* Slightly more opaque on mobile */
    }
}

.footer{
    background:var(--black);
    text-align: center;
}

.footer .share{
    padding:1rem 0;
}

.footer .share a{
    height: 5rem;
    width: 5rem;
    line-height: 5rem;
    font-size: 2rem;
    color: var(--white);
    border:var(--border);
    margin:.3rem;
    border-radius: 50%;
}

.footer .share a:hover{
    background-color: var(--main-color);
}

.footer .links{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding:2rem 0;
    gap:1rem;
}

.footer .links a{
    padding:.7rem 2rem;
    color: var(--white);
    border:var(--border);
    font-size: 2rem;
}

.footer .links a:hover{
    background:var(--main-color);
}




/* media queries  */

@media (max-width: 991px){
    html{
        font-size: 55%;
    }
    section{
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        display: none;
    }
    
    .menu-icon {
        display: block;
    }

    .home{
        background-position: left;
        justify-content: center;
        text-align: center;
    }

    .home .content h3{
        font-size: 4.5rem;
    }

    .home .content p{
        font-size: 1.5rem;
    }

    .about {
        min-height: auto; /* Remove min-height requirement */
        margin-top: 0; /* Reset negative margin */
        padding-top: 80px; /* Add padding for spacing from top */
        padding-bottom: 80px; /* Add padding for spacing at bottom */
    }

    .skills {
        padding-top: 30px;
        padding-bottom: 30px;
        margin-top: 0; /* Ensure no negative margin */
    }

    .about .row,
    .skills .row {
        width: 90%; /* Slightly reduce width on mobile */
        padding: 1.5rem; /* Reduce padding */
        margin-bottom: 1rem; /* Add space between rows */
    }

    .about .row .content,
    .skills .row .content {
        padding: 1rem;
    }

    .DevBadge_badge-lg {
        font-size: 14px; /* Slightly smaller badges on mobile */
        padding: 3px 6px;
    }

    .dev-badge svg {
        width: 20px;
        height: 20px;
    }

    .theme-toggle {
        top: 15px;
        left: 15px;
    }
}

@media (max-width: 450px){
    html{
        font-size: 50%;
    }

    .about {
        margin-top: -30px;
        padding-top: 30px;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .skills {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .about .row,
    .skills .row {
        width: 95%;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    section {
        padding: 2rem 4%; /* Reduce horizontal padding on very small screens */
    }
}

.mobile-menu {
    background: var(--dark-blue-glass-mobile);
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}
