/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: rgb(249, 247, 247);
    color: #222;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: #252525;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease-in;
    padding: 10px 15px;
    
}

a:hover {
    background-color: rgb(14, 13, 13);
    color: rgb(251, 251, 251);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content:space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgb(237, 237, 237,.1);
    backdrop-filter: blur(10px); 
    color: rgb(39, 37, 37);
    border: 2px solid;
    border-color: rgba(0, 0, 0, 0.055);
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(147, 145, 145, 0.1);
}

.logo {
    font-family: 'Righteous', cursive;
    font-size: 1.8rem;
    color: #000000;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    font-weight: 600;
    font-size: 1rem;
}

/* Theme toggle button */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #000000;
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 100%;
}

#theme-toggle .fa-moon {
    position: absolute;
    top: 6px;
    left: 6px;
    opacity: 1;
    transition: opacity 0.3s;
    border-radius: 50%;
    border: #555;
}

#theme-toggle .fa-sun {
    position: absolute;
    top: 6px;
    left: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
    border: #555;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background: radial-gradient(#e5edf7e6,#f7eaea84,#f9ddf186,#f9dfdf77);
    color: rgb(31, 31, 31);
    text-align: center;
    padding: 6rem 2rem;
    height: 800px;
}

#starry-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    background: transparent;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Stars animation */
@keyframes twinkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.hero-content h1 {
    font-family: 'Righteous', cursive;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 200;
    margin-top: 60px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    margin-bottom: 200px;
}

@media (max-width: 600px) {
    .hero-content p {
        margin-bottom: 1rem;
    }
    .hero-section {
        height: 900px;
        overflow: visible;
    }
}

.btn {
    background-color: white;
    color: #000000;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s, color 0.3s;
    margin-top: 20px;
}

.btn-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .btn-container {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 300px;
        margin-top: 0;
    }
}

.btn:hover {
    background-color: #2c2c2c;
    color: white;
}

/* Projects Section */
.projects-section {
    padding: 4rem 2rem;
    width: 100%;
    margin: 0 auto;
    margin-top: 40px;
    background: rgb(237, 237, 237,.1);
    backdrop-filter: blur(10px);
    border: 2px solid;
    border-color: rgba(0, 0, 0, 0.055);
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(147, 145, 145, 0.1);
    margin-bottom: 20px;
   
}

/* Wrapper for projects grid and arrows */
.projects-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

/* Projects grid with horizontal scroll */
.projects-grid {
    display: flex !important;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
}

/* Hide scrollbar for Webkit browsers */
.projects-grid::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for Firefox */
.projects-grid {
    scrollbar-width: none;
}

/* Project card fixed width */
.project-card {
    flex: 0 0 280px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
    scroll-snap-align: start;
}

.project-card:hover {
    transform: translateY(-10px);
}

/* Scroll arrow buttons */
.scroll-arrow {
    background-color: black;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 100;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.81;
}

.scroll-arrow:hover {
    background-color: #555555;
}

/* Position left and right arrows */
.left-arrow {
    left: 0;
}

.right-arrow {
    right: 0;
}

/* Dark mode scroll arrow overrides */
body.dark-mode .scroll-arrow {
    background-color: white;
    color: black;
}

body.dark-mode .scroll-arrow:hover {
    background-color: #ddd;
}

/* Contact links black in light and dark mode */
.contact-list a {
    color: black !important;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: white !important;
}

/* Dark mode overrides for contact links */
body.dark-mode .contact-list a {
    color: black !important;
}

body.dark-mode .contact-list a:hover {
    color: #64b5f6 !important;
}

/* Responsive navbar hover color in dark mode for laptop and desktop */
@media (min-width: 1024px) {
    body.dark-mode .nav-links li a:hover {
        background: radial-gradient(#2196f3 0%, #21cbf3 100%, #000000, #000000);
        color: black !important;
        border-radius: 30px;
        padding: 0.75rem 1rem;
    }
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.tab-button {
    background-color: rgb(249, 247, 247);
    border: 2px solid #000000;
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    color: #000000;
}

.tab-button:hover {
    background-color: #2c2c2c;
    color: white;
}

.tab-button.active {
    background-color: #000000;
    color: white;
}

/* View button inside project cards */
.project-card .view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.75rem 1rem 0.75rem;
    background-color: white;
    color: #000000;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none;
    vertical-align: middle;
    height: 40px;
    box-sizing: border-box;
}

.project-card .view-btn:hover {
    background-color: #2c2c2c;
    color: white;
}

/* See More button container */
.see-more-container {
    text-align: center;
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .project-card .view-btn {
        margin: 0.5rem 0.5rem 0.5rem 0.5rem;
        width: calc(100% - 1rem);
        box-sizing: border-box;
    }
}

.see-more-btn {
    background-color: white;
    color: #000000;
    padding: 1rem 3rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, color 0.3s;
}

.see-more-btn:hover {
    background-color: #2c2c2c;
    color: white;
}

.projects-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #000000;
}

.projects-grid {
    display: flex !important;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    align-items: stretch; /* ensure children stretch to same height */
}

.project-card {
    flex: 0 0 280px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 440px; /* min-height to ensure equal height */
    box-sizing: border-box;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
    width: 280px;
    height: 440px; /* increased height to accommodate content */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.project-card p {
    margin: 0 1rem 1rem 1rem;
    flex-grow: 1;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-card h3 {
    margin: 1rem;
    color: #000000;
}

.project-card p {
    margin: 0 1rem 1rem 1rem;
    color: #555;
}

/* About Section */
.about-section {
    background-color: #0077ff;
    color: rgb(43, 43, 43);
    padding: 4rem 2rem;
    background: rgb(237, 237, 237,.1);
    backdrop-filter: blur(10px);
    border: 2px solid;
    border-color: rgba(0, 0, 0, 0.055);
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(147, 145, 145, 0.1);
    text-align: center;
    margin-top: 20px;
}

.about-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* Mobile (phone) layout for about section */
@media (max-width: 600px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .about-image {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 80%;
        max-width: 300px;
        height: auto;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    .about-text {
        max-width: 100%;
        padding-left: 0;
        margin-top: 1rem;
    }
}

/* Project card layout for consistent button spacing */
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-card p {
    margin-bottom: 0;
}

.project-card .view-btn {
    margin-top: 1rem;
}

.about-section h2 {
    text-align: center;
}

.about-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-section li {
    max-width: 100%;
    margin: 0 auto;
    font-size: 1.2rem;
    align-items: normal;
    line-height: 40px;

}

img {
    border-radius: 12px;
   
}

.about-image {
    margin-right: 2rem;
    flex-shrink: 0;
}

.about-text {
    list-style-type: disc;
    padding-left: 1.5rem;
    max-width: 600px;
    text-align: left;
}

/* Contact Section */
.contact-section {
    padding: 4rem 2rem;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background: rgb(237, 237, 237,.1);
    backdrop-filter: blur(10px);
    border: 2px solid;
    border-color: rgba(0, 0, 0, 0.055);
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(147, 145, 145, 0.1);
    margin-top: 20px;
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #232323;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.contact-list li {
    margin: 1rem 0;
}

.contact-list a {
    font-size: 1.1rem;
    color: #dbecff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-list a:hover {
    text-decoration: none;
}

/* Footer */
footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
}

/* Dark Mode */
body.dark-mode {
    background: radial-gradient(#000000,#000000);
    color: #e0e0e0;
}

/* Astronaut floating image */
.astronaut {
    position: absolute;
    top: 20%;
    left: -150px;
    width: 150px;
    height: auto;
    z-index: 1;
    opacity: 0;
    /* Disabled CSS animation to use JS animation instead */
    /* animation: floatAcross 15s linear infinite; */
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

/* Show astronaut only in dark mode */
body.dark-mode .astronaut {
    opacity: 1;
}

/* Floating animation keyframes */
@keyframes floatAcross {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    50% {
        transform: translateX(110vw) translateY(-20px) rotate(15deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .astronaut {
        width: 100px;
        top: 25%;
        animation-duration: 20s;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .astronaut {
        width: 120px;
        top: 22%;
        animation-duration: 18s;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .astronaut {
        width: 140px;
        top: 20%;
        animation-duration: 15s;
    }
}

body.dark-mode .navbar {
    background: radial-gradient(#030a3448 0%, #2e165e81 100%,#000000,#000000);
    
    box-shadow: none;
}

body.dark-mode .Menu-bar .bar {
    background-color:linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
    box-shadow: none;
}






body.dark-mode .nav-links li a,
body.dark-mode .logo,
body.dark-mode #theme-toggle {
    color: rgb(223, 218, 207);
}

body.dark-mode .hero-section {
    background: radial-gradient(#170334 0%, #04000a 100%,#000000,#000000);
    color: rgb(223, 218, 207);
}

body.dark-mode .btn {
    background-color: #90caf9;
    color: #121212;
}

body.dark-mode .btn:hover {
    background-color: #64b5f6;
    color: #121212;
}

body.dark-mode .projects-section {
    background: radial-gradient(#160026 0%, #00000056 100%,#000000,#000000);
    color: rgb(223, 218, 207);
}

body.dark-mode .project-card {
    color: white;
}

body.dark-mode .project-card h3,
body.dark-mode .project-card p {
    color: white;
}

body.dark-mode .contact-section,
body.dark-mode .contact-section h2,
body.dark-mode .contact-section p,
body.dark-mode .contact-list a {
    color: white !important;
}



body.dark-mode .projects-section h2,
body.dark-mode .contact-section h2 {
    color: rgb(223, 218, 207);
    
}




body.dark-mode .project-card {
    background-color: #141414;
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    color: #fff;
}

body.dark-mode .about-section {
    background: radial-gradient(#160026 0%, #00000056 100%,#000000,#000000);
    color: #fff;
}


body.dark-mode .contact-section {
    background: radial-gradient(#160026 0%, #00000056 100%,#000000,#000000);
    color: #fff;
}




body.dark-mode footer {
    background-color: #040404;
    color: #bcbcbc;
}

/* Responsive */
@media (max-width: 1200px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: rgba(237, 237, 237, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 0 0 30px 30px;
        box-shadow: 0 4px 8px rgba(147, 145, 145, 0.1);
        padding: 1rem 2rem;
        transition: transform 0.3s ease-in-out;
        transform: translateY(-100%);
        z-index: 999;
    }

    .nav-links.nav-active {
        transform: translateY(0);
        display: flex;
    }

    .navbar {
        justify-content: space-between;
    }

    /* Show hamburger menu icon on mobile and tablet */
    #Menu-bar {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        color: #0ff3eb;
        background: transparent;
        border: none;
        padding: 0;
        box-sizing: border-box;
        
    }

#Menu-bar .bar {
    width: 100%;
    height: 3px;
    background-color: rgba(237, 237, 237, 0.8); /* Changed to match navbar background color */
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Dark mode styles for nav-links dropdown background */
body.dark-mode .nav-links {
    background: radial-gradient(#030a3448 0%, #2e165e81 100%, #000000, #000000);
    box-shadow: none;
}

/* Dark mode styles for menu bar color */
body.dark-mode #Menu-bar .bar {
    background-color: rgb(223, 218, 207); /* Match dark mode nav links color */
}

/* Light mode styles for menu bar color */
#Menu-bar .bar {
    background-color: rgb(39, 37, 37); /* Match light mode nav links color */
}

/* Hamburger menu animation for cross icon */
#Menu-bar.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#Menu-bar.open .bar:nth-child(2) {
    opacity: 0;
}

#Menu-bar.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
}

.hero-section .btn.view-btn {
    background-color: white;
    color: #000000;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s, color 0.3s;
    margin-top: 20px;
    cursor: pointer;
    border: none;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.hero-section .btn.view-btn:hover {
    background-color: #2c2c2c;
    color: white;
}

/* Hide hamburger menu icon on desktop */
#Menu-bar {
    display:flex;
}
