:root {
    --color-pure-white: #FFFFFF;
    --color-off-white: #F4F4F4;
    --color-runner-red: #E60000;
    --color-deep-black: #111111;
    --color-catalyst-blue: #00A3E0;
    --color-city-gray: #888888;
    --color-glass-dark: rgba(17, 17, 17, 0.9);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode {
    --color-pure-white: #111111;
    --color-off-white: #1a1a1a;
    --color-deep-black: #F4F4F4;
    --color-city-gray: #AAAAAA;
    --color-glass-dark: rgba(0, 0, 0, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-pure-white);
    color: var(--color-deep-black);
    line-height: 1.6;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    min-height: 100vh;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-deep-black);
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 50%;
    transition: background-color var(--transition-fast), transform var(--transition-smooth);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

body.dark-mode .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--color-off-white) 0%, var(--color-pure-white) 100%);
    border-bottom: 4px solid var(--color-runner-red);
    position: relative;
    overflow: hidden;
    padding: 60px 20px;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 10px;
    color: var(--color-deep-black);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--color-city-gray);
    max-width: 600px;
    margin: 0 auto;
}

.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.category-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    background: var(--color-pure-white);
    border: 2px solid var(--color-off-white);
    text-decoration: none;
    color: var(--color-deep-black);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    border-radius: 8px;
}

.category-card:hover {
    border-color: var(--color-runner-red);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.category-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.category-card.dev h2 {
    color: var(--color-catalyst-blue);
}

.category-card.steelbook h2 {
    color: var(--color-runner-red);
}

.category-card.paintings h2 {
    color: var(--color-deep-black);
}

.category-card p {
    color: var(--color-city-gray);
    font-size: 0.95rem;
    flex-grow: 1;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: var(--color-pure-white);
    border: 1px solid var(--color-off-white);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    position: relative;
    border-radius: 8px;
}

.gallery-item:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.gallery-item:hover .image-placeholder {
    transform: scale(1.03);
}

.gallery-item:focus {
    outline: 2px solid var(--color-catalyst-blue);
    outline-offset: 2px;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-smooth);
    background-color: var(--color-off-white);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-catalyst {
    background-color: rgba(0, 163, 224, 0.08);
}

.bg-red {
    background-color: rgba(230, 0, 0, 0.08);
}

.bg-pure {
    background-color: var(--color-off-white);
}

.item-info {
    padding: 16px;
    background: var(--color-pure-white);
}

.item-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.item-info p {
    font-size: 0.85rem;
    color: var(--color-city-gray);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--color-city-gray);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-runner-red);
}

.lightbox {
    position: fixed;
    inset: 0;
    background-color: var(--color-glass-dark);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
}

.lightbox[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: scale(0.95);
    transition: transform var(--transition-smooth);
}

.lightbox[aria-hidden="false"] .lightbox-content {
    transform: scale(1);
}

.lightbox-image-container {
    display: flex;
    justify-content: center;
    max-height: 80vh;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    margin-top: 16px;
    color: #fff;
    text-align: center;
}

.lightbox-caption h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.lightbox-caption p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-runner-red);
}

.site-footer {
    background-color: var(--color-pure-white);
    padding: 30px 20px;
    border-top: 1px solid var(--color-off-white);
    margin-top: 60px;
}

.site-footer .footer-content {
    text-align: center;
}

.site-footer .footer-content p {
    color: var(--color-city-gray);
    font-size: 0.95rem;
    max-width: 800px;
    margin: 0 auto;
}

.site-footer a {
    color: var(--color-runner-red);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--color-deep-black);
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .hero {
        min-height: 30vh;
        padding: 40px 16px;
    }

    .archive-container {
        padding: 24px 16px;
    }

    .category-menu,
    .gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-content {
        max-width: 95%;
    }

    .lightbox-image-container img {
        max-height: 70vh;
    }
}

.videos-section {
    margin-bottom: 48px;
}

.videos-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--color-deep-black);
}

.section-intro {
    color: var(--color-city-gray);
    margin-bottom: 24px;
}

.section-intro a {
    color: var(--color-runner-red);
    text-decoration: none;
    font-weight: 600;
}

.section-intro a:hover {
    text-decoration: underline;
}

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

.video-card {
    display: flex;
    flex-direction: column;
    background: var(--color-off-white);
    border-radius: 8px;
    overflow: hidden;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 20px;
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-deep-black);
}

.video-info p {
    color: var(--color-city-gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.external-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-runner-red);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color var(--transition-fast);
}

.external-link:hover {
    background: var(--color-deep-black);
}

.external-links-list {
    list-style: none;
    padding: 0;
    margin-top: 16px;
}

.external-links-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-off-white);
}

.external-links-list li:last-child {
    border-bottom: none;
}

.external-links-list a {
    color: var(--color-catalyst-blue);
    text-decoration: none;
    font-weight: 600;
}

.external-links-list a:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
