* {
    font-family: "Raleway", sans-serif; 
}

body{
    background-color: #FFFFFF;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    position: relative;
    z-index: 1;
    height: 3rem;
}

.nav {
    background-color: white;
    color: crimson;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem;
    position: fixed;
    width: 100%;
    height: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}

.nav div:nth-child(2){
    display: flex;
    align-items: center;
    padding-right: 1rem;
    font-weight: bolder;
}

.nav div:nth-child(2)a:nth-child(-n+3){
    color: rgb(226, 43, 43);
    text-decoration: none;
    padding: 0 .5rem;
}
.nav div:nth-child(1) img{
    align-self: center;
    margin: 0 .5rem;
    padding: .5rem rem;
    background-color: rgb(226, 43, 43);
    color: #FFFFFF;
}
.projects-nav{
    align-self: center;
    margin: 0 .5rem;
    padding: .5rem 2rem;
    background-color: rgb(226, 43, 43);
    color:#FFFFFF;
    border: none;
    border-radius: 1.5rem;
    font-size: 1rem;
}

@media (min-width: 800px){
    .mobile-nav {
        display: none;
    }
}

@media (max-width: 801px){
    .full-nav {
        display: none;
    }
    .mobile-nav{
        padding: 0;
        transition: opacity 0.3s ease-in-out;
    }
    .mobile-nav .fa-bars{
        padding: .5rem;
    }
}

/* overlay */
/* mobile overlay */
#overlay {
    display: none; /* Hide overlay by default */
    position: fixed; /* Fix overlay position */
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    top: 0; /* Align to top */
    left: 0; /* Align to left */
    background-color: rgba(0, 0, 0, 0.6); /* Less transparent background */
    z-index: 1000; /* Ensure overlay is on top */
}

/* Mobile overlay specific links */
#overlay a {
    display: block; /* Stack links vertically in the overlay */
    text-align: center; /* Centers text */
    margin: 15px 0; /* Adds vertical spacing */
    color: #FFFFFF; /* Ensure text color is white */
    font-weight: 600; /* Bold text */
    text-decoration: none; /* Removes underline */
    font-size: 1.5rem; /* Adjust font size */
    padding: .5rem 2rem; /* Adds padding inside links */
    transition: all 200ms ease-in-out; /* Smooth hover animation */
}

/* Center overlay text */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* Close button hover effect */
.fa-times:hover {
    animation: rotateAnimation 200ms ease-in-out;
}

/* Animation */
@keyframes rotateAnimation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(90deg); /* Fixed typo: 'trasnform' to 'transform' */
    }
}

/* General navigation link styling */
nav.full-nav a, #overlay a {
    text-decoration: none; /* Removes underline */
    color: black; /* Set your preferred color */
    font-size: 18px; /* Adjust font size */
    margin: 0 15px; /* Adds horizontal spacing between links */
    padding: 10px 15px; /* Adds padding inside links */
    display: inline-block; /* Ensures padding applies cleanly */
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth hover animation */
}

/* Hover effect */
nav.full-nav a:hover, #overlay a:hover {
    color: #007BFF; /* Change to your desired hover color */
    transform: scale(1.1); /* Slightly enlarges the link on hover */
}

/* Style for headers */
h1, h2 {
    margin: 20px 0; /* Adds vertical spacing */
    text-align: center; /* Centers the text */
}

/* Additional styling for specific headers (optional) */
h1 {
    font-size: 36px; /* Adjust main header size */
    margin-top: 40px; /* Extra spacing at the top */
}

h2 {
    font-size: 28px; /* Adjust subheader size */
    margin-top: 30px; /* Extra spacing above */
}

/* Style for body paragraphs */
p {
    margin: 20px auto; /* Adds vertical spacing */
    line-height: 1.6; /* Improves readability */
    max-width: 800px; /* Restricts the width for better legibility */
    text-align: justify; /* Aligns text neatly */
}

/* Optional: Add a container for all main content */
body {
    margin: 0; /* Removes default browser margin */
    padding: 20px; /* Adds spacing around content */
    font-family: 'Raleway', sans-serif; /* Matches your chosen font */
}
/* General styling for all images */
img {
    max-width: 100%; /* Ensures images don't exceed their container's width */
    height: auto; /* Maintains aspect ratio */
    display: block; /* Removes unwanted gaps around images */
    margin: 10px auto; /* Adds consistent spacing and centers the images */
}

/* Optional: Set a maximum size */
.responsive-image {
    max-width: 400px; /* Adjust to your desired width */
    max-height: 300px; /* Adjust to your desired height */
}
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.image-gallery img {
    max-width: 100%;
    height: auto;
    object-fit: cover; /* Ensures images fill their grid cell neatly */
}
/* Gallery Layout */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-width: 1200px;
    margin: 20px auto;
}

.image-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Lightbox Overlay */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox .close:hover {
    color: #ff4444; /* Optional hover color for close button */
}

/* Projects page */
.projects-overview {
    max-width: 1100px;
    margin: 5rem auto 2rem;
    padding: 0 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.project-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.project-card h3 {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
}

.project-card p {
    margin: 0 0 .75rem;
    text-align: left;
}

.project-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.project-figure {
    margin: 1rem 0 1.5rem;
    text-align: center;
}

.project-figure figcaption {
    font-size: .9rem;
    color: #555;
    margin-top: .5rem;
}

.photo-placeholder {
    width: 100%;
    max-width: 640px;
    height: 360px;
    margin: 0 auto;
    border-radius: 12px;
    border: 2px dashed rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    background: linear-gradient(135deg, rgba(0,0,0,0.03), rgba(0,0,0,0.06));
}

.btn {
    display: inline-block;
    background-color: rgb(226, 43, 43);
    color: #ffffff;
    text-decoration: none;
    padding: .5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform .15s ease, opacity .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: .95;
}

/* Smooth scroll and fixed-header offset */
html {
    scroll-behavior: smooth;
}

.project-section {
    scroll-margin-top: 5rem; /* offset for fixed nav height */
}

/* Subtle hover elevation for project cards */
.project-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
