/* ===== 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;
}

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 {
    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 */

.logo .callsign {
    font-weight: 600;
    font-size: 1.5rem;
}

.logo .subtitle {
    font-weight: 300;
    opacity: 0.8;
}

/* ===== PROFILE BUTTON (FIXED) ===== */

.profile-btn {
    background: linear-gradient(90deg,#2e4da6,#4068c8);
    padding: 10px 20px;
    border-radius: 8px;
    color: white !important;
    text-decoration: none;
    border: none;
    box-shadow: 0 0 20px rgba(90,130,255,0.4);
    transition: 0.3s ease;
    display: inline-block;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(120,170,255,0.6);
}

/* ===== CONTAINER ===== */

.container {
    width: 1200px;
    margin: 80px auto;
}

/* ===== CARD SYSTEM ===== */

.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;
    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);
}

.card h1,
.card h2 {
    font-weight: 400;
    position: relative;
}

.card h2::after,
.card h1::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);
}

/* ===== TEXT ===== */

p.big, li.big {
    line-height: 1.9;
}

a {
    color: #8fb8ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(120,170,255,0.4);
    padding-bottom: 2px;
}

a:hover {
    color: #c6ddff;
}

/* ===== TABLES ===== */

.software-table {
    width: 100%;
    border-collapse: collapse;
}

.software-table th,
.software-table td {
    border: 1px solid rgba(120,160,255,0.3);
    padding: 14px;
    vertical-align: top;
}

.software-table th {
    background: rgba(50,80,160,0.3);
}

/* ===== MOBILE TABLE (STACKED CARDS) ===== */

@media (max-width: 768px) {

    .software-table,
    .software-table thead,
    .software-table tbody,
    .software-table th,
    .software-table td,
    .software-table tr {
        display: block;
        width: 100%;
    }

    .software-table thead {
        display: none;
    }

    .software-table tr {
        margin-bottom: 25px;
        border: 1px solid rgba(120,160,255,0.3);
        border-radius: 12px;
        padding: 15px;
        background: rgba(30,40,80,0.4);
    }

    .software-table td {
        border: none;
        padding: 8px 0;
    }

    .software-table td:first-child {
        font-weight: 600;
        margin-bottom: 10px;
        color: #9cc3ff;
    }
}

/* ===== CODE STYLE ===== */

tt {
    font-family: monospace;
    background-color: rgba(0,0,0,0.4);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ===== ABOUT GRID ===== */

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    transition: 0.4s ease;
    box-shadow:
        0 0 30px rgba(90,140,255,0.45),
        0 0 80px rgba(90,140,255,0.25);
}

.about-image img:hover {
    transform: scale(1.05);
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== IMAGE GRIDS ===== */

.gallery-grid,
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-grid img,
.tech-grid img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 14px;
    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,
.tech-grid img:hover {
    transform: scale(1.05);
}

/* ===== FOOTER ===== */

footer {
    text-align: center;
    padding: 40px;
    opacity: 0.6;
}

/* ===== LIGHTBOX ===== */

#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,10,25,0.96);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 14px;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 42px;
    color: white;
    cursor: pointer;
}

/* ===== EXPANDABLE ===== */

.expand-wrapper {
    margin-top: 40px;
}

.expand-btn {
    background: linear-gradient(90deg,#2e4da6,#4068c8);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 0 20px rgba(90,130,255,0.4);
    transition: 0.3s ease;
}

.expand-btn:hover {
    transform: translateY(-2px);
}

.expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.expand-content.active {
    max-height: 2000px;
    opacity: 1;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .container,
    .header-inner {
        width: 90%;
    }
}

@media (max-width: 768px) {

    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .header-btn {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .profile-btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    .gallery-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

/* Center Installation Stage title */
.install-stage h1 {
    text-align: center;
}

.install-stage h1::after {
    left: 44%;
    transform: translateX(-50%);
}