/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #fdfd96;
    color: #003049;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(2, 2, 2, 0.785),
            rgba(2, 2, 2, 0.785));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    background: linear-gradient(135deg,
            rgba(96, 234, 255, 0.632),
            rgba(96, 234, 255, 0.749));
    color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease-in-out;
    gap: 1rem;
    flex-direction: row;
}

nav.hide {
    transform: translateY(-100%);
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg,
            rgba(100, 255, 218, 0.1) 0%,
            rgba(100, 255, 218, 0.2) 50%,
            rgba(100, 255, 218, 0.1) 100%);
    border: 1px solid #90e0ef;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 32px rgba(0, 180, 216, 0.15);
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(100, 255, 218, 0.3),
            transparent);
    transition: 0.5s;
}

.logo:hover::before {
    left: 100%;
}

.logo:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(100, 255, 218, 0.3);
    background: linear-gradient(135deg,
            rgba(100, 255, 218, 0.15) 0%,
            rgba(100, 255, 218, 0.25) 50%,
            rgba(100, 255, 218, 0.15) 100%);
    border: 1px solid rgba(100, 255, 218, 0.4);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fdffb6;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.logo-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0190b8;
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: 0.5px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            #00b4d8,
            #0077b6,
            transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .logo-highlight::after {
    transform: scaleX(1);
    transform-origin: left;
}

.logo:active {
    transform: translateY(-1px) scale(0.98);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 23px;
}

nav ul li a {
    text-decoration: none;
    color: #003049;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg,
            #fffd88,
            #fffa65);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: #f6ff76;
}

/* Main Content */
main {
    margin-top: 90px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #0077b6;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Common Components */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-btn {
    padding: 0.8rem 1.5rem;
    background-color: #ade8f4;
    color: #003049;
    text-decoration: none;
    border: 1px solid #90e0ef;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 32px rgba(0, 180, 216, 0.15);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0077b6, #00b4d8);
    transition: width 0.3s ease;
    z-index: -1;
}

.social-btn:hover {
    color: #003049;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 180, 216, 0.3);
    border-color: #0077b6;
}

.social-btn:hover::before {
    width: 100%;
}


.btn {
    padding: 0.8rem 1.5rem;
    background-color: #ade8f4;
    color: #003049;
    border: 1px solid #90e0ef;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 32px rgba(0, 180, 216, 0.15);
    display: inline-block;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0077b6, #00b4d8);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover,
.btn:focus {
    background: linear-gradient(90deg, #0077b6, #00b4d8);
    color: #fdffb6;
    border-color: #0077b6;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 180, 216, 0.3);
    outline: none;
}

.btn:hover::before,
.btn:focus::before {
    width: 100%;
}

.right {
    font-size: 18px;
    font-weight: bold;
    order: 2;
}

/* Project Card Modal Styles */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.modal-content {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 2rem auto;
    padding: 2rem;
    max-width: 1000px;
    border-radius: 15px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #90e0ef;
    background: none;
    border: none;
    padding: 0.5rem;
    transition: color 0.3s ease;
    z-index: 1001;
}

.modal-close:hover {
    color: #00b4d8;
}

.modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-header h2 {
    color: #00b4d8;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-body img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #90e0ef;
}

.modal-body p {
    color: #ade8f4;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.modal-footer .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Make project cards clickable */
.project-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* Image Gallery Styles */
.gallery-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.gallery-slider {
    display: flex;
    transition: transform 0.3s ease;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.gallery-slider::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.gallery-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #90e0ef;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.gallery-nav button {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.gallery-nav button:hover {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    opacity: 1;
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Ensure content stays above the overlay */
.container,
.project-container,
.modal-content {
    position: relative;
    z-index: 1;
}

/* Glassmorphism container styles */
.container,
.project-container,
.modal-content,
.project-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* Hover effect for glassmorphism containers */
.container:hover,
.project-container:hover,
.modal-content:hover,
.project-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

/* Update buttons for glassmorphism */
.btn,
.social-btn {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.37);
}

.btn:hover,
.social-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

/* Update modal for glassmorphism */
.project-modal {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Update gallery navigation for glassmorphism */
.gallery-nav button {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-nav button:hover {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Update gallery dots for glassmorphism */
.gallery-dot {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-dot.active {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.rightSection img {
    width: 80%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.rightSection img:hover {
    transform: translateY(-10px) scale(1.05);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
}

/* Add a subtle floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.rightSection img {
    animation: float 10s ease-in-out infinite;
}

.rightSection img:hover {
    animation: none;
    transform: translateY(-10px) scale(1.05);
}

/* First Section Layout */
.firstSection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: calc(100vh - 90px);
    /* Subtract nav height */
    padding: 2rem;
    margin-top: 90px;
    /* Match nav height */
}

.leftSection {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 50%;
    padding: 2rem;
}

.leftSection h1,
.leftSection div,
#element {
    text-align: left;
    width: 100%;
}

.button {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-start;
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

/* Media Queries */
@media screen and (max-width: 1200px) {
    .firstSection {
        flex-direction: column;
        text-align: left;
        padding: 1rem;
        min-height: calc(100vh - 90px);
    }

    .leftSection {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        padding: 1rem 0;
    }

    .rightSection {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        justify-items: center;
    }
}

@media screen and (max-width: 768px) {
    main {
        margin-top: 100px !important;
        padding-top: 0 !important;
    }

    .firstSection {
        margin-top: 0 !important;
        padding-top: 0 !important;
        flex-direction: column-reverse !important;
    }

    .rightSection {
        margin-top: 15px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    .projects-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .project-card {
        width: 100%;
        max-width: 350px;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
}

@media screen and (max-width: 480px) {
    main {
        margin-top: 80px !important;
        padding-top: 0 !important;
    }

    .firstSection {
        margin-top: 0 !important;
        padding-top: 0 !important;
        flex-direction: column-reverse !important;
    }

    .rightSection {
        margin-top: 15px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
    .firstSection {
        min-height: calc(-webkit-fill-available - 90px);
    }

    @media screen and (max-width: 768px) {
        .firstSection {
            min-height: calc(-webkit-fill-available - 180px);
        }
    }

    @media screen and (max-width: 480px) {
        .firstSection {
            min-height: calc(-webkit-fill-available - 200px);
        }
    }
}

/* Ensure smooth scrolling on all devices */
html {
    scroll-behavior: smooth;
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Add JavaScript for scroll behavior */
@media screen and (min-width: 769px) {
    .firstSection {
        margin-top: 90px;
    }
}

@media screen and (max-width: 768px) {
    nav {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0;
        height: auto;
        padding: 1rem 0.5rem;
    }

    .mobile-menu-btn {
        display: block;
        margin-right: 1rem;
        margin-left: 0;
        order: 0;
    }

    .center-logo {
        flex: 1 1 auto;
        justify-content: center;
        order: 1;
    }

    .right {
        order: 2;
    }

    nav ul {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100%;
        padding: 2rem 0;
    }

    nav ul li {
        margin: 0 !important;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem 0;
        width: 100%;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    nav {
        padding: 0.5rem;
    }

    .right {
        top: 70px;
        height: calc(100vh - 70px);
    }
}

/* Mobile Navigation Toggle Button */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: transparent;
    border: none;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #003049;
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .right {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background: linear-gradient(135deg,
                rgba(96, 234, 255, 0.95),
                rgba(96, 234, 255, 0.98));
        transition: 0.3s ease;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
    }

    .right.active {
        left: 0;
        opacity: 1;
        visibility: visible;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

.center-logo {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}