/* ===== GLOBAL ===== */

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: url("images/SP9ARX_cosmic_background_4K.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #e8eefc;
}

/* Dark overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(4,10,25,0.85),
        rgba(4,10,25,0.95)
    );
    z-index: -1;
}

/* ===== HEADER ===== */

.header {
    position: relative;
    z-index: 10000;
    isolation: isolate;
    backdrop-filter: blur(12px);
    background: rgba(10,18,40,0.6);
    border-bottom: 1px solid rgba(120,160,255,0.2);
    padding: 20px 0;
}

.header-inner {
    width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo .callsign {
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo .subtitle {
    font-weight: 300;
    opacity: 0.8;
}

/* ===== DROPDOWN (PURE CSS CLICK) ===== */

.dropdown {
    position: relative;
    outline: none;
}

.dropbtn {
    background: linear-gradient(90deg,#2e4da6,#4068c8);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(90,130,255,0.4);
}

/* dropdown hidden */
.dropdown-content {
    position: absolute;
    top: 110%;
    right: 0;

    min-width: 220px;
    padding: 10px 0;

    background: rgba(10,20,50,0.75);
    backdrop-filter: blur(16px);

    border-radius: 14px;
    border: 1px solid rgba(120,160,255,0.25);

    box-shadow:
        0 0 25px rgba(90,140,255,0.35),
        0 10px 40px rgba(0,0,0,0.6);

    z-index: 10001;

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.25s ease;
}

/* SHOW on click (focus) */
.dropdown:focus-within .dropdown-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* links */
.dropdown-content a {
    display: block;
    padding: 12px 18px;
    color: #8fb8ff;
    text-decoration: none;
    transition: 0.25s ease;
}

.dropdown-content a:hover {
    background: rgba(100,160,255,0.15);
    color: #cfe3ff;
}

/* ===== LINKS ===== */

a {
    color: #8fb8ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(120,170,255,0.4);
    padding-bottom: 2px;
    transition: 0.25s ease;
}

a:hover {
    color: #c6ddff;
    border-bottom: 1px solid rgba(160,200,255,0.9);
}

/* ===== CONTAINER ===== */

.container {
    width: 1200px;
    margin: 80px auto;
}

/* ===== CARDS ===== */

.card {
    background: rgba(20,30,60,0.45);
    border: 1px solid rgba(100,140,255,0.25);
    backdrop-filter: blur(14px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 60px;

    /* stronger static glow */
    box-shadow:
        0 0 30px rgba(90,140,255,0.35),
        0 0 80px rgba(90,140,255,0.18),
        0 25px 70px rgba(0,0,0,0.75);
}

/* banner images size */
.card.center img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 14px;

    box-shadow:
        0 0 30px rgba(100,160,255,0.5),
        0 0 90px rgba(100,160,255,0.25);
}

/* glowing divider line */
.card h2 {
    font-weight: 400;
    margin-bottom: 30px;
    position: relative;
}

.card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg,#6fa3ff,transparent);
    box-shadow: 0 0 15px rgba(100,160,255,0.6);
}

/* ===== HERO ===== */

.hero {
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    gap: 40px;
    align-items: center;
}
.profile-img {
    width: 220px;
    height: auto;
    border-radius: 8%;
    border: 2px solid rgba(120,160,255,0.3);
    box-shadow: 0 0 40px rgba(100,150,255,0.3);
}

.info-grid span {
    color: #7faeff;
    font-weight: 500;
}

/* ===== BIO ===== */

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* ===== EQUIPMENT ===== */

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
}

.equipment {
    background: rgba(0,0,0,0.35);
    padding: 20px;
    border-radius: 15px;
    transition: 0.3s;
}

.equipment:hover {
    box-shadow: 0 0 25px rgba(100,160,255,0.4);
}

/* ===== GALLERY ===== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 200px;      /* exact same height for all */
    object-fit: cover;  /* prevents distortion */
    display: block;
    border-radius: 12px;
    transition: 0.4s;
    box-shadow:
        0 0 25px rgba(90,140,255,0.45),
        0 0 60px rgba(90,140,255,0.25);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(100,150,255,0.5);
}

/* ===== FOOTER ===== */

footer {
    text-align: center;
    padding: 40px;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .container, .header-inner {
        width: 90%;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .bio-grid,
    .equipment-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== TABLET (2 per row) ===== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

        .profile-img {
        width: 220px;
    }

    .hero {
        grid-template-columns: 160px 1fr 220px;
        gap: 20px;
    }

    .profile-img {
        width: 150px;
    }

    .hero-info {
        padding-right: 10px;
        text-align: left;
    }

    .map img {
        width: 100%;
        height: auto;
    }
}

/* ===== MOBILE (1 per row) ===== */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .profile-img {
        width: 220px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .map {
        margin-top: 20px;
    }
}

/* ===== CSS LIGHTBOX ===== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5,10,25,0.96);

    display: none;              /* <-- THIS FIXES YOUR ISSUE */
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.lightbox:target {
    display: flex;              /* show only when targeted */
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 14px;

    box-shadow:
        0 0 40px rgba(100,160,255,0.6),
        0 0 120px rgba(100,160,255,0.35);
}

/* click anywhere to close */
.lightbox .close {
    position: absolute;
    inset: 0;
}