:root {
    --bg: #030712;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --text-dim: #94a3b8;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: white;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* 1. Floating Glass Nav */
.side-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 60px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--glass-border);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

.side-nav.expanded {
    width: 200px;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-dim);
    transition: 0.2s;
    white-space: nowrap;
}

.nav-item a:hover {
    background: var(--glass);
    color: white;
}

.icon {
    min-width: 30px;
    font-size: 1.2rem;
}

.nav-text {
    margin-left: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.side-nav.expanded .nav-text {
    opacity: 1;
}

/* 2. Main Content & Animations */
main, footer {
    margin-left: 60px; 
    transition: margin-left 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

main {
    animation: fadeIn 0.8s ease-out;
}

/* 3. Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

/* 4. Universal Glass Card Styling */
.content-section {
    padding: 100px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.book-card, .project-card, .card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.book-card:hover, .project-card:hover, .card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* 5. Grids */
.project-grid, .book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* 6. Photos Page Specifics */
.photo-gallery {
    column-count: 3;
    column-gap: 20px;
}

.photo-item {
    margin-bottom: 20px;
    break-inside: avoid;
}

.photo-item img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.photo-item img:hover {
    transform: scale(1.03);
    border-color: rgba(99, 102, 241, 0.5);
}

/* 7. Typography & Small Elements */
.author { color: var(--text-dim); margin-bottom: 15px; }

.status-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.finished { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.reading { background: rgba(99, 102, 241, 0.1); color: #818cf8; }

footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-dim);
}

@media (max-width: 768px) {
    /* Turn the sidebar into a bottom bar */
    .side-nav {
        width: 100% !important;
        height: 60px !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        flex-direction: row !important;
        justify-content: space-around;
        padding-top: 0;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        backdrop-filter: blur(20px);
    }

    /* Hide the text so only icons show (cleaner for mobile) */
    .nav-text {
        display: none;
    }

    .nav-item a {
        padding: 10px;
    }

    /* Remove the margin from the main content so it fills the screen */
    main, footer {
        margin-left: 0 !important;
        padding-bottom: 80px; /* Space so content isn't hidden by the bar */
    }

    /* Keep sidebar from expanding on mobile touch */
    .side-nav.expanded {
        width: 100% !important;
    }
}

/* Lightbox Overlay */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000; /* Higher than the nav */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox.active img {
    transform: scale(1);
}