:root {
    --matrix-green: #00FF41;
    --matrix-green-glow: rgba(0, 255, 65, 0.6);
    --matrix-green-dark: #008F11;
    --dark-bg: #0a0a0a;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Source Code Pro', monospace;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: #000000;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Fixed backgrounds - increase matrix opacity for better visibility on other sections */
#matrix-background, .web-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

#matrix-background { z-index: 0; }
.web-grid { z-index: -1; }

/* Navigation */
.nav-link {
    position: relative;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.nav-link:hover { color: var(--matrix-green); }

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--matrix-green);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after { width: 80%; }

/* Sections - Fix the gap issue */
section {
    min-height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Home section specific adjustments */
#home {
    padding-top: 100px; /* Account for navbar height */
    padding-bottom: 80px;
    padding-left: 50px;
    padding-right: 50px;
}

/* Other sections */
section:not(#home) {
    padding: 80px 50px;
}

/* Apply the fixed background only to the home section. It will stay visible behind #about. */
nav, #home, #about, #experience, #education, #publications, #certifications,#networking, #awards, #contact {
    background: linear-gradient(rgba(10, 10, 10, 0.5), rgba(10, 10, 10, 0.5)), url('../images/in_downtown.gif') center/cover no-repeat fixed;
}

#footer {
    background-color: rgba(0, 20, 0, 0.8);
    color: var(--matrix-green);
    padding: 20px;
    text-align: center;
    position: relative;
    margin: 0;
}

section:not(#home):not(#about) {
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
}

/* Cards - make borders more visible */
.cyber-card {
    background-color: rgba(0, 20, 0, 0.8);
    border: 2px solid var(--matrix-green-dark);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    backdrop-filter: blur(5px);
}

.cyber-card:hover {
    border-color: var(--matrix-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
    transform: translateY(-5px);
}

/* Buttons */
.cyber-btn {
    background-color: transparent;
    color: var(--matrix-green);
    border: 1px solid var(--matrix-green);
    padding: 10px 25px;
    font-family: 'Source Code Pro', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--matrix-green);
    transition: all 0.4s ease;
    z-index: -1;
}

.cyber-btn:hover { color: var(--dark-bg); }
.cyber-btn:hover::before { left: 0; }

/* Images */
.profile-pic {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 4px solid var(--matrix-green);
    box-shadow: 0 0 25px var(--matrix-green-glow);
    object-fit: cover;
    filter: brightness(0.80)
}

/* Networking Cards */
.network-card {
    background-color: rgba(0, 20, 0, 0.8);
    border: 2px solid var(--matrix-green-dark);
    border-radius: 5px;
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.network-card:hover {
    border-color: var(--matrix-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
    transform: translateY(-5px);
}

.network-info {
    padding: 20px;
}
.network-img, .experience-img, .education-img {
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.network-img { height: 350px; }
.experience-img { max-height: 450px; }
.education-img { max-height: 350px; }
.certification-img { height: 170px; object-fit: contain; }

/* Social Icons */
.social-icons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--matrix-green);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--matrix-green);
    color: var(--dark-bg);
    box-shadow: 0 0 15px var(--matrix-green-glow);
    transform: scale(1.1);
}

/* Language Switcher */
.lang-switcher, .lang-switcher-mobile {
    display: flex;
    background-color: rgba(0, 20, 0, 0.8);
    border: 2px solid var(--matrix-green-dark);
    border-radius: 5px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.lang-btn {
    background: transparent;
    color: var(--matrix-green);
    border: none;
    padding: 8px 12px;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.lang-btn:hover {
    background-color: rgba(0, 255, 65, 0.1);
}

.lang-btn.active {
    background-color: var(--matrix-green);
    color: var(--dark-bg);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.lang-btn:not(:last-child) {
    border-right: 1px solid var(--matrix-green-dark);
}

/* Responsive adjustments for home language switcher */
@media (max-width: 768px) {
    #home .lang-switcher {
        top: 4px;
        right: 4px;
        transform: scale(0.9);
    }
    
    #home {
        padding-top: 80px; /* Smaller top padding on mobile */
    }
}

/* Responsive */
@media (max-width: 992px) {
    .profile-pic { width: 200px; height: 200px; }
    .social-icons { right: 10px; }
}

/* Responsive card and section adjustments for mobile */
@media (max-width: 640px) {
    .cyber-card,
    .network-card {
        padding: 12px !important;
        font-size: 0.98rem;
        max-width: 98vw;
        margin-left: auto;
        margin-right: auto;
        border-width: 1.5px;
    }

    .cyber-card p,
    .cyber-card ul,
    .network-card p,
    .network-card ul {
        font-size: 0.98rem;
        line-height: 1.5;
        word-break: break-word;
    }

    .section-title {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    section,
    #home {
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 60px !important;
        padding-bottom: 30px !important;
    }

    /* Limit card height and enable scrolling for overflow */
    .cyber-card,
    .network-card {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Prevent horizontal overflow on all screens */
.cyber-card,
.network-card {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Make publication and about cards more compact on all screens */
.cyber-card p,
.cyber-card ul {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

/* Dropdown menu for Projects */
.group:hover .group-hover\:opacity-100 {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.group:hover .group-hover\:pointer-events-auto {
    pointer-events: auto !important;
}