/* Color Variables for Light and Dark Mode */
:root {
    --bg-color: #fcfcfc;
    --text-color: #333333;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-text: #555555;
    --nav-text-hover: #000000;
    --footer-bg: #111111;
    --footer-text: #ffffff;
    --particle-color: 0, 0, 0; /* RGB values for particles */
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --nav-bg: rgba(18, 18, 18, 0.95);
    --nav-text: #aaaaaa;
    --nav-text-hover: #ffffff;
    --footer-bg: #0a0a0a;
    --footer-text: #ffffff;
    --particle-color: 255, 255, 255; /* RGB values for particles */
}

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

body {
    font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Prevents side-scrolling */
}

/* ==============================
   PARTICLE CANVAS (BACKGROUND)
============================== */
#particle-canvas {
    position: fixed;      /* Pins it to the screen */
    top: 0;               
    left: 0;              
    width: 100vw;         /* Stretches it across the screen */
    height: 100vh;        /* Stretches it top to bottom */
    z-index: -1;          /* Forces it BEHIND everything else */
    pointer-events: none; /* Lets you click through it to your photos */
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: background-color 0.3s;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--nav-text-hover);
    border-bottom: 2px solid var(--nav-text-hover);
    padding-bottom: 3px;
}

/* Theme Toggle Button */
#theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Profile Header */
.hero-profile {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 20px 4rem 20px; 
}

.header-content {
    display: flex;
    align-items: center;
    gap: 3rem; /* Creates the space between the picture and the text */
    max-width: 900px; /* Keeps the row from stretching too far apart */
    position: relative;
    z-index: 1; 
    pointer-events: none; 
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    pointer-events: auto; 
    flex-shrink: 0; /* Prevents the image from being squished by long text */
}

.profile-text {
    text-align: left; /* Aligns text to the left cleanly */
}

.profile-text h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.profile-text p {
    font-size: 1.2rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* Mobile adjustments (Snaps back to stacked on phones) */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column; /* Stacks image and text vertically */
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-text {
        text-align: center;
    }
    
    .profile-pic {
        width: 160px;
        height: 160px;
    }
    
    .profile-text h1 {
        font-size: 2.5rem;
    }
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 2rem 5% 4rem 5%;
}

.gallery-item {
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

/* Lightbox (Modal) */
.lightbox {
    display: none; /* Will be changed to flex by JS */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center; 
    justify-content: center; 
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #bbb;
}

/* Lightbox Navigation Arrows */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none; /* Prevents accidental highlighting */
    z-index: 101;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Mobile adjustments for Lightbox */
@media (max-width: 768px) {
    .prev-btn, .next-btn {
        font-size: 24px;
        padding: 10px 15px;
    }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

/* ==============================
   FOOTER STYLES
============================== */
footer {
    display: flex;
    flex-direction: column;
    align-items: center; /* This is the magic rule that forces EVERYTHING to the center */
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--footer-bg);
    color: var(--footer-text);
}

footer h2 {
    font-weight: 300;
    margin-bottom: 1.5rem;
}

/* Container for Email and Instagram */
.footer-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Space between email, divider, and Instagram */
    margin-bottom: 2rem;
}

.email-text {
    opacity: 0.8;
}

.divider {
    opacity: 0.4;
}

/* Instagram Link */
.ig-link, .ig-link:visited {
    display: flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.ig-link:hover {
    opacity: 1;
}

.copyright {
    opacity: 0.5;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column; /* Stacks Email and IG on top of each other on phones */
        gap: 10px;
    }
    .divider {
        display: none; /* Hides the straight line "|" on mobile */
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    header h1 { font-size: 2.2rem; }
    nav { flex-direction: column; gap: 1rem; }
    .nav-links { justify-content: center; }
    .profile-pic { width: 160px; height: 160px; }
    .hero-profile h1 { font-size: 2.5rem; }
}
