/* CSS Variables */
:root {
    --text-main: #222;
    --text-muted: #777;
    --bg-color: #ffffff;
    --accent: #888;
    --font-heading: 'Prata', serif;
    --font-body: 'Lato', sans-serif;
    --radius: 0px;
    --spacing-small: 0.5rem;
    --spacing-medium: 1rem;
    --spacing-large: 2rem;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    font-weight: 300;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-main);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav a {
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 6rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

.project-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.image-wrapper {
    overflow: hidden;
    background-color: #f5f5f5;
    margin-bottom: 1.5rem;
    aspect-ratio: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .image-wrapper img {
    transform: scale(1.05);
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Responsive (consolidated) */
/* All responsive rules moved into one section for clarity */

@media (max-width: 1024px) {
    /* medium screens: two columns in gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* small screens: single column layout and stacked header */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    header {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 1.5rem 0;
    }

    .logo {
        font-size: 1.2rem;
    }

    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.85rem;
    }

    .hero {
        padding: 2rem 0 4rem;
    }

    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Let image wrappers size naturally on mobile (fallback for some Safari)
       and make images scale by width and use natural height so they stack cleanly */
    .image-wrapper {
        aspect-ratio: auto;
        height: auto;
    }

    .image-wrapper img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }

    /* Stack about page grid on mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    /* extra small: tweak modal image and caption sizes */
    .image-modal img {
        max-width: 98%;
        max-height: 86%;
    }

    .image-modal .caption {
        font-size: 0.9rem;
    }
}

/* Add to bottom of style.css */

/* Form Styles */
form {
    max-width: 600px;
    margin: 2rem auto 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

input, textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #333; /* Industrial look */
    color: var(--text-main);
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-bottom-color: var(--accent); /* Soft accent on focus */
}

button {
    background-color: var(--text-main);
    color: var(--bg-color);
    border: none;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    border-radius: 4px; /* Slight soft edge */
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--accent);
}

/* Journal/Text Page Styles */
.text-page {
    max-width: 700px;
    padding-bottom: 4rem;
    margin: 0 auto;
}

.entry-date {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
}

.journal-entry {
    margin-bottom: 4rem;
    border-left: 1px solid #333; /* Thin manly line */
    padding-left: 2rem;
}

/* --- Add to bottom of style.css --- */

/* About Page Split Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Image takes less space than text */
    gap: 60px;
    align-items: start; /* Aligns text to top */
    margin-top: 40px;
    margin-bottom: 80px;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius);
    filter: grayscale(100%); /* Starts black & white */
    transition: filter 0.5s ease, transform 0.5s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.about-image img:hover {
    filter: grayscale(0%); /* Color returns on hover */
    transform: scale(1.02);
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 300;
}

.signature {
    margin-top: 2rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent);
    font-style: italic;
}


/* Image enlargement modal styles */
.enlargeable {
    cursor: pointer;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    z-index: 9999;
    padding: 1rem;
}

.image-modal.open {
    opacity: 1;
    visibility: visible;
}

.image-modal img {
    max-width: 92%;
    max-height: 92%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    border-radius: 4px;
    cursor: pointer;
    display: block;
}

/* Close button inside modal */
.image-modal .image-modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    padding: 0.1rem 0.4rem;
    cursor: pointer;
    border-radius: 4px;
}

.image-modal .image-modal-close:hover,
.image-modal .image-modal-close:focus {
    background: rgba(255,255,255,0.06);
    outline: none;
}

/* Make modal inner content positioned so the close button sits on top */
.image-modal-inner { position: relative; max-width: 100%; }

/* Focus-visible for keyboard users */
.enlargeable:focus-visible, .image-modal .image-modal-close:focus-visible {
    outline: 3px solid rgba(255,255,255,0.9);
    outline-offset: 3px;
}

.image-modal .caption {
    margin-top: 0.6rem;
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.95;
}

@media (max-width: 480px) {
    .image-modal img {
        max-width: 98%;
        max-height: 86%;
    }
    .image-modal .caption {
        font-size: 0.9rem;
    }
}