* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', Courier, monospace; 
    background-color: #FDFCF3;
    color: #111;
    line-height: 1.6;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.25rem;
    border-bottom: none;
    padding-bottom: 1rem;
    position: sticky; /* Keeps header at top when scrolling */
    top: 0;
    background-color: #FDFCF3;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: -1px;
}

nav a {
    color: #111;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #999;
    text-decoration: line-through; 
}

/* Portrait Section */
.portrait-img {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;

}

/* Add this to control the image size */
.profile-img {
    max-width: 800px; /* Adjust this value up or down to find the perfect size */
    width: 100%;      /* Ensures it scales down on smaller mobile screens */
    height: auto;     /* Keeps the aspect ratio intact */
}

/* Section Spacing & Titles */
.page-section {
    margin-bottom: 2rem;
    padding-top: 2rem; 
}

.section-title {
    font-size: 1.2rem;
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    border-bottom: 1px groove #ccc;
    padding-bottom: 0.5rem;
    color: #666;
}

/* Photo Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-img:hover {
    opacity: 0.7; 
}

/* About Section */
.about-content {
    justify-self: center;
    text-align: justify;
    max-width: 800px;
    font-size: 1.1rem;
    padding-bottom: 0;
}

.about-content p {
    margin-bottom: 1rem;
}

/* Contact Section */
.email-link {
    display: inline-block;
    font-size: 1rem;
    color: #058dfd;
    text-decoration: none;
    margin: 0.5rem 0;
    transition: opacity 0.3s ease;
    word-break: break-all;
}

.email-link:hover {
    opacity: 0.5;
}

.social-links a {
    color: #058dfd;
    text-decoration: none;
    margin-right: 2rem;
    font-size: 1rem;
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: #999;
    border-bottom-color: #999;
}

/* Lightbox Modal */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(250, 250, 250, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#lightbox.hidden {
    display: none;
}

#lightbox-img {
    max-width: 70%;
    max-height: 90vh; 
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

#close-btn {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 3rem;
    cursor: pointer;
    color: #111;
}

/* Lightbox Navigation Buttons (Updated for size and look) */
/* Lightbox Navigation Buttons (Massive Invisible Hit Areas) */
.nav-btn {
    position: absolute;
    /* Stretch the button from the very top to the very bottom */
    top: 50%;
    bottom: 50%; 
    /* Create a wide column on the sides (15% of the screen width) */
    width: 15%; 
    min-width: 100px; 
    
    /* Keep the giant button background invisible */
    background: transparent; 
    border: none;
    
    /* Flexbox keeps the text arrow centered vertically and horizontally inside the giant column */
    display: flex;
    align-items: center; 
    justify-content: center;
    
    font-size: 5rem;
    color: #111;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

/* Fades the arrow when the user's mouse enters the invisible column */
.nav-btn:hover {
    opacity: 0.3; 
}

/* Position buttons significantly further from the screen edges (creating space from image) */
#prev-btn {
    left: 0;
}

#next-btn {
    right: 0;
}

/* Ensure buttons don't overlap image on smaller screens even with increased space */
/* On mobile screens, shrink the font but keep the giant hit area */
@media (max-width: 900px) {
    .nav-btn {
        font-size: 3.5rem;
    }
} 
/* Footer */
footer {
    padding-top: 2rem;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 0.85rem;
    color: #999;
}