/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    letter-spacing: 1.5px;
    word-spacing: 3.0px;
}

/* Navigation headers and titles use Rubik Gemstones */
nav h1,
nav h1 a,
nav ul li a,
.content-container h2,
.about-text h3,
.blog-post h3,
.blog-post h3 a {
    font-family: 'Rubik Gemstones', system-ui;
}

/* Navigation */
nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 a {
    text-decoration: none;
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
    padding-bottom: 0.5rem;
    position: relative;
}

nav ul li a:hover {
    color: #333;
}

nav ul li a.active {
    color: #333;
    font-weight: 600;
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
}

nav ul li a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #999;
    border-radius: 2px;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 120px);
}

/* Photo gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.photo-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: translateY(-5px);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Flash page portrait gallery */
.flash-page .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
}

.flash-page .photo-item {
    width: 280px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: #fff;
    flex: 0 0 auto;
}

.flash-page .photo-item img {
    height: 100%;
    width: auto;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: none;
}

/* Content pages */
.content-container {
    max-width: 800px;
    margin: 0 auto;
}

.content-container h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #333;
}

/* About page */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text h3 {
    margin: 2rem 0 1rem 0;
    color: #333;
}

.about-photo img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Blog page */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-post {
    padding: 2rem;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.0);
}

.blog-post h3 a {
    text-decoration: none;
    color: #333;
    font-size: 1.3rem;
}

.blog-post h3 a:hover {
    color: #666;
}

.post-date {
    color: #666;
    font-size: 0.8rem;
    margin: 0.5rem 0 1rem 0;
}

.blog-post p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.read-more {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #333;
    transition: all 0.3s;
}

.read-more:hover {
    color: #666;
    border-bottom-color: #666;
}

/* Footer */
footer {
    background: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid #eee;
}

footer p {
    color: #666;
}

/* Blog page background image */
.blog-page {
    position: relative;
}

.blog-page::before {
    content: '';
    position: fixed;
    top: 12vh;
    height: 100vh;
    background-image: url('images/b2.png');
    background-size: 50vw 50vw;
    background-repeat: repeat;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* About page background image */
.about-page {
    position: relative;
}

.about-page::before {
    content: '';
    position: fixed;
    top: 0;
    height: 100vh;
    background-image: url('images/b3.png');
    background-size: 25vw 25vw;
    background-repeat: repeat;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-page::before {
        background-size: 35vw 35vw;
    }
    
    main {
        padding: 1rem;
    }
    
    .content-container h2 {
        font-size: 2rem;
    }

    .flash-page .gallery {
        flex-direction: column;
        align-items: center;
    }

    .flash-page .photo-item {
        width: min(80vw, 320px);
        height: auto;
        aspect-ratio: 2 / 3;
    }

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

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.image-modal.show {
    display: flex;
}

.modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.modal-close:hover,
.modal-close:focus {
    color: #ccc;
}

.clickable-image {
    cursor: pointer;
    transition: opacity 0.2s;
}

.clickable-image:hover {
    opacity: 0.8;
}
