/* Reset and base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #121212;
    --color-surface: #1e1e1e;
    --color-text: #e5e5e5;
    --color-text-muted: #999;
    --color-accent: #60a5fa;
    --color-border: #333;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

header .subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 38rem;
    margin: 0 auto;
}

header .back {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.95rem;
}

header .back:hover {
    text-decoration: underline;
}

header .date {
    display: block;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Button */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: #0b1220;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s, transform 0.2s;
}

.button:hover {
    background: #93c5fd;
    transform: translateY(-2px);
}

header .cta {
    margin-top: 1.25rem;
}

/* Featured banner (index page) */
.featured {
    max-width: var(--max-width);
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.featured-image {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.featured-image:hover img {
    transform: scale(1.03);
}

.featured-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.featured-info h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.featured-info p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.featured-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.featured-more {
    color: var(--color-text);
    text-decoration: none;
}

.featured-more:hover {
    text-decoration: underline;
}

.featured-press {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-text-muted);
}

.featured-press:hover {
    color: var(--color-text);
}

/* Section title above the grid */
.section-title {
    max-width: var(--max-width);
    margin: 0 auto 1rem;
    padding: 0 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

/* Main grid (index page) */
main.grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem;
}

.empty code {
    background: var(--color-border);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Card */
.card {
    display: block;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-border);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-info {
    padding: 1rem 1.25rem;
}

.card-info h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-info time {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Project detail page */
main.project {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.hero {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
}

.content {
    margin-bottom: 2rem;
}

.content p {
    margin-bottom: 1rem;
}

.content h2, .content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content a {
    color: var(--color-accent);
}

/* Video */
.videos {
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video iframe,
.video video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    background: #000;
}

/* Links */
.links {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.links h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.links a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

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

/* Gallery */
.gallery {
    margin-top: 2rem;
}

.gallery h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    padding: 2rem;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox .close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Footer */
footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--color-border);
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 800px) {
    .featured {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 2rem 1rem 1.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main.grid {
        padding: 0 1rem 2rem;
        grid-template-columns: 1fr;
    }

    .featured {
        padding: 0 1rem;
    }

    .featured-info h2 {
        font-size: 1.6rem;
    }
    
    main.project {
        padding: 0 1rem 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
