/* <=================================================================================> */
/*  Modern Dark Theme - Glassmorphism Style */
/* <=================================================================================> */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: rgba(30, 30, 30, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --hover-border: #0072ff;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 114, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 198, 255, 0.08), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    padding: 60px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

h1 {
    font-weight: 800;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 1.1rem;
    margin-bottom: 60px;
    text-align: center;
    max-width: 600px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kernel-section {
    width: 100%;
    margin-bottom: 80px;
}

.kernel-section h2 {
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: var(--glass-border);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: color 0.3s ease;
}

.kernel-section h2:hover {
    color: #00c6ff;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.kernel-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.kernel-section .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Hide items after the 3rd one when collapsed */
/* Assuming minimum screen width gives 3 columns typically */
.kernel-section.collapsed .grid .card:nth-child(n+4) {
    display: none;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--accent-gradient);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 114, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card h3 {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.comparison {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.img-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-container span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.img-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: var(--glass-border);
    background: rgba(0,0,0,0.3);
    cursor: zoom-in;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.img-container img:hover {
    transform: scale(1.03);
    border-color: rgba(0, 114, 255, 0.5);
}

.card .meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
    text-align: center;
}

.footer {
    margin-top: auto;
    padding-top: 60px;
    color: #444;
    font-size: 0.85rem;
    text-align: center;
}

/* Modal (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: var(--glass-border);
    object-fit: contain;
}

#modalCaption {
    margin-top: 15px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #00c6ff;
    text-decoration: none;
}