:root {
    --bg: #0f172a;
    --fg: #e5e7eb;
    --muted: #94a3b8;
    --accent: #38bdf8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;          /* full width container */
    padding: 2rem 1.5rem;
}

/* Headings centered */
h1, h2, h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Paragraphs left-aligned with max width for readability */
p {
    max-width: auto;
    margin-left: 0;
    margin-right: 0;
}

/* Sections spacing */
section {
    margin-bottom: 3rem;
}

/* Section title underline */
h2 {
    border-bottom: 1px solid #1e293b;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Project styling */
.project {
    margin-bottom: 1.5rem;
}

.project h3 {
    margin: 0 0 0.25rem 0;
    max-width: auto;
    margin-left: 0;
    margin-right: 0;
}

.project p {
    color: var(--muted);
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 4rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}
.media-image {
    display: block;
    max-width: 400px;   /* pick a size */
    height: auto;
    margin: 1.5rem auto;
    border-radius: 8px;
}

.media-video {
    display: block;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem auto;
    border-radius: 8px;
}
.expandable-image {
    max-width: 400px;   /* pick a size */
    width: 100%;
    height: auto;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

/* Overlay */
.image-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.image-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    cursor: zoom-out;
}
/* Optional: constrain media width like text */
.media-constrained {
    max-width: 900px;
}
.lightbox-content {
    text-align: center;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 2rem auto;
}

.gallery img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
    border-radius: 6px;
}

/* Lightbox overlay */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
}

.prev { left: 2rem; }
.next { right: 2rem; }

#lightboxCaption {
    margin-top: 1rem;
    color: #ccc;
    font-size: 0.95rem;
    max-width: 80ch;
    margin-left: auto;
    margin-right: auto;
}
/* Responsive adjustments */
@media (min-width: 900px) {
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1400px) {
    .container {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}
