/* Reset defaults */

:root {
  --primary-bg-color: #FAF8F5;
  --primary-text-color: #1C1C1C;
  --secondary-bg-color: #F1E9E0;
  --accent-color-1: #144D71;
  --accent-color-2: #054D0B;
  --accent-color-3: #967445;
  --primary-text-color-light: #FAF8F5;
  --primary-text-color-light-hover: #ece0cd;
  --callout-bg-color: #f0f0f0;
}

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

/* Make page fill full window height */

html, body {
    height: 100%;
}

/* Use flexbox to control full-page layout */

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--primary-bg-color);
    color: #333;

    display: flex;
    flex-direction: column;
}

/* Header */

/* Sticky Header */

header {
    background-color: var(--accent-color-1);
    color: var(--primary-text-color-light);
    padding: 15px 0;

    position: sticky;
    top: 0;

    z-index: 1000;

    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Header container */

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* Logo */

.logo {
    float: left;
    font-size: 24px;
}

/* Navigation */

nav {
    float: right;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    display: inline-block;
    margin-left: 25px;
}

header a {
    text-decoration: none;
    font-weight: bold;
    color: var(--primary-text-color-light)
}

header a:hover {
    /* color: var(--primary-text-color-light-hover); */
    text-decoration: underline;
    cursor: pointer;
}

.main-container a {
    color: #0052bd;
    text-decoration: none;
}

.main-container a:hover {
    color: #012f6b;
}

/* Clear floats */

header::after {
    content: "";
    display: block;
    clear: both;
}

/* MAIN CONTAINER — fills window */

.main-container {
    flex: 1; /* This makes it fill remaining height */

    width: 90%;
    max-width: 1100px;

    margin: 0 auto;

    display: flex;
    gap: 40px;

    background-color: var(--primary-bg-color);

    padding: 40px;

    font-size: 16px;
}

/* Left Side (2/3 width) */

.content-left {
    flex: 3;
}

/* Right Side (1/3 width) */

.content-right {
    flex: 2;
    text-align: center;
}

/* Profile Image */

.profile-photo {
    width: 100%;
    max-width: fit-content;
    border-radius: 16px;
}

/* Text spacing */

.content-left h1 {
    margin-bottom: 20px;
}

.content-left p {
    margin-bottom: 15px;
}

/* Footer */

footer {
    background-color: var(--accent-color-1);
    color: var(--primary-text-color-light);
    text-align: center;
    padding: 20px 0;
}

/* Contact Box */

.contact-box {
    margin-top: 25px;
    padding: 20px;

    background-color: var(--callout-bg-color);

    border-radius: 16px;

    text-align: left;

    width: inherit;

    font-size: 20px;
}

/* Contact Header */

.contact-box h3 {
    margin-bottom: 15px;
}

/* Contact Paragraphs */

.contact-box p {
    margin-bottom: 15px;
    font-size: 14px;
}

/* Contact Links */

.contact-box a {
    color: #0066cc;
    text-decoration: none;
}

.contact-box a:hover {
    text-decoration: underline;
}


/* Single-column layout */

.single-content {
    width: 100%;
}

/* Section spacing */

.single-content h1 {
    margin-bottom: 10px;
}

.single-content h2 {
    margin-bottom: 20px;
}

.single-content h3 {
    margin-top: 30px;
    margin-bottom: 10px;
}

.single-content p {
    margin-bottom: 15px;
}

.single-content ul {
    margin-left: 20px;
}


/* Project Cards */

.project-card {
    display: flex;

    gap: 16px;

    padding: 16px;

    margin-top: 20px;

    background-color: #f8f8f8;

    border-radius: 8px;

    align-items: flex-start;
}

/* Image container */

.project-image {
    flex: 0 0 120px;
}

/* Project image */

.project-image img {
    width: 100%;
    height: auto;

    border-radius: 6px;
}

/* Text container */

.project-text {
    flex: 1;
}

/* Title styling */

.project-text h3 {
    margin-bottom: 10px;
    margin-top: 0px;
}

/* Description styling */

.project-text p {
    margin-bottom: 0;
}

.intro-text {
    margin-top: 8px;
}

/* Photo Grid */

.photo-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));

    gap: 25px;

    margin-top: 25px;
}

/* Fixed-size grid boxes */

.photo-item {
    width: 100%;

    aspect-ratio: 4 / 3;   /* All boxes same size */

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    background-color: transparent;
}

/* Image styling */

.photo-item img {
    width: 100%;
    height: 100%;

    object-fit: contain;   /* Keep original aspect ratio */

    /* border-radius: 8px;    Rounded corners ALWAYS applied */

    display: block;

    transition: transform 0.3s ease;
}


.photo-caption {
    padding: 10px;
    font-size: 16px;
    text-align: center;
}


/* 404 Page Styling */

.error-content {
    text-align: center;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    height: 100%;
}


.home-button:hover {
    background-color: #444;
}

/* ========================= */
/* Mobile Responsive Styles  */
/* ========================= */

@media (max-width: 768px) {

    /* Reduce padding */

    .main-container {
        padding: 20px;
        gap: 20px;
    }

    /* Stack homepage layout vertically */

    .content-left,
    .content-right {
        flex: none;
        width: 100%;
    }

    .main-container {
        flex-direction: column;
    }

    /* Make profile photo smaller */

    .profile-photo {
        max-width: 180px;
        margin: 0 auto;
    }

    /* Center contact box */

    .contact-box {
        text-align: center;
    }

}

@media (max-width: 768px) {

    nav {
        float: none;
        text-align: center;
        margin-top: 10px;
    }

    .logo {
        float: none;
        text-align: center;
    }

    .nav-links li {
        display: inline-block;
        margin: 8px 12px;
    }

}

@media (max-width: 768px) {

    .project-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-image {
        width: 100%;
        max-width: 300px;
    }

}

@media (max-width: 768px) {

    body {
        font-size: 16px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

}
