@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #0e0e0e;
    --section-bg: #161616;
    --border-color: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --grid-gap: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    overflow-x: hidden;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    margin-bottom: 2rem;
}

.specs-section {
    background-color: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 0;
}

.specs-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
    color: var(--text-primary);
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid var(--border-color);

    position: static;
    top: auto;

    background-color: var(--section-bg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
    z-index: 10;

    border-radius: 8px 8px 0 0;
    margin: -1.5rem -1.5rem 1.25rem -1.5rem;
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    padding-bottom: 1.5rem;
}

.middle-column {
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.spec-value {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.6;
}

.spec-value a {
    color: var(--text-primary);
    text-decoration: none;
}

.spec-value a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Direct link as spec-value */
a.spec-value {
    color: var(--text-primary);
    text-decoration: none;

    /* Prevent anchors from stretching as flex items;
       keep their width to the text content only. */
    align-self: flex-start;
    display: inline-block;
    width: auto;
}

a.spec-value:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.separator {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

.note {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.storage-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1.5rem;
}

.storage-list div {
    line-height: 1.6;
    text-indent: -2rem;
    padding-left: 2rem;
}

.storage-list strong {
    color: var(--text-primary);
    font-weight: 800;
}

.storage-list a {
    color: var(--text-primary);
    text-decoration: none;
}

/* place the gallery card at the bottom of the .middle-column */
.gallery-section {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

/* blurred, darkened background */
.gallery-section::before {
    content: "";
    position: absolute;
    inset: 0;
    /* ensure a solid black fallback color is shown immediately,
       with the image layered on top of it as it loads */
    background: #000 url("../assets/gallery/1.png") center/cover no-repeat;
    transform: scale(2.5);
    filter: blur(6px) brightness(0.7);
    pointer-events: none;
    z-index: -1;
    border-radius: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .specs-section {
        padding: 1rem;
    }

    .specs-section h2 {
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem 1rem 1rem 1rem;
    }

    .main-grid {
        display: flex;
        flex-direction: column;
    }

    /* Reorder sections for single column view */
    .main-grid > section:nth-child(1) {
        order: 1; /* PC section first */
    }

    .main-grid > .middle-column {
        order: 2; /* Middle column (Peripherals + Desk/Chair) */
        display: contents; /* Break out of wrapper */
    }

    .main-grid > .middle-column > section:nth-child(1) {
        order: 2; /* Peripherals section second */
    }

    .main-grid > .middle-column > section:nth-child(2) {
        order: 4; /* Desk/Chair section last */
    }

    .main-grid > section:nth-child(3) {
        order: 3; /* Audio section third */
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}