:root {
    --text-color: #ffffff;
    --text-muted: #94a3b8;
    --link-color: #cbd5e1;
    --link-hover: #ffffff;
}

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

body {
    background-color: #020617;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-weight: 200; /* Ultra-thin */
    line-height: 1.6;
    font-size: 13px; /* Smaller, hip */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow-x: hidden;
}

body.align-start {
    align-items: flex-start;
    justify-content: flex-start;
}

/* Background Image */
.lofi-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120vw;
    height: 120vh;
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -3;
    /* Reduced blur and increased brightness for higher visibility */
    filter: blur(15px) brightness(0.45) contrast(1.1);
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -2;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 6px 100%;
}

.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 1.4rem;
    font-weight: 200;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    letter-spacing: 0.1em;
}

.title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 200;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.email a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.4s ease;
}

.email a:hover {
    color: var(--link-hover);
}

.links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.main-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.main-links a, .sub-link a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: color 0.4s ease, opacity 0.4s ease;
}

.main-links a:hover, .sub-link a:hover {
    color: var(--link-hover);
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.sub-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Photography Gallery */
.gallery-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
    margin-top: 4rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.4s ease;
    letter-spacing: 0.05em;
}

.back-link:hover {
    color: var(--link-hover);
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.gallery-grid {
    column-count: 3;
    column-gap: 2rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    cursor: pointer;
    overflow: hidden;
    border-radius: 2px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    opacity: 0.8;
    transform: scale(1);
    transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
    opacity: 1;
    transform: scale(1.02);
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    body {
        padding: 2rem;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .main-links {
        flex-direction: column;
        gap: 1.5rem;
    }
    .gallery-grid {
        column-count: 1;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.97);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    font-weight: 200;
    transition: color 0.4s ease;
    z-index: 10001;
}

.close-btn:hover {
    color: var(--link-hover);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.4s ease;
    z-index: 10001;
    padding: 1rem;
    user-select: none;
}

.prev-btn {
    left: 2rem;
}

.next-btn {
    right: 2rem;
}

.nav-btn:hover {
    color: var(--link-hover);
    text-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* Photo Gallery Grid */
.photo-index {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}
.photo-index .gallery-item {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    transition: color 0.4s ease;
}
.photo-index .gallery-item:hover {
    color: var(--link-hover);
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* New Events Page Layout */
.events-container-v2 {
    width: 100%;
    max-width: 700px;
    margin: 4rem auto 4rem 10%;
    position: relative;
    z-index: 1;
    text-align: left;
}
.events-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.events-separator {
    width: 40%;
    margin: 1rem 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}
.event-entry {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
    transition: opacity 0.5s ease;
}
.event-entry.past-event {
    opacity: 0.35;
}
.event-entry.past-event:hover {
    opacity: 0.7;
}
.event-bullet {
    flex-shrink: 0;
    width: 90px;
    text-align: right;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 1.5rem;
    padding-top: 0.2rem;
}
.bullet-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
}
.bullet-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    white-space: nowrap;
}
.event-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}
.event-tag {
    font-size: 0.75rem;
    font-weight: 200;
    color: #87C196;
    letter-spacing: 0.05em;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
}
.event-tag.speaking {
    color: #FFB07C;
}
.event-header {
    font-size: 1rem;
    color: var(--text-color);
}
.event-header strong {
    font-weight: 700;
}
.event-location-full {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.event-desc {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.3rem;
    opacity: 0.9;
    max-width: 500px;
}
.event-link {
    font-size: 0.85rem;
    color: var(--link-color);
    text-decoration: none;
    margin-top: 0.3rem;
    transition: color 0.4s ease;
}
.event-link:hover {
    color: var(--link-hover);
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}
