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

body {
    font-family: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

header {
    margin-bottom: 2rem;
}

.name {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.bio {
    font-size: 1.25rem;
    font-weight: 400;
    color: #4a4a4a;
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.contact {
    margin-top: 1rem;
}

.email {
    font-size: 1.1rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
}

.email:hover {
    color: #1a1a1a;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    justify-content: center;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    padding: 1rem;
    border-radius: 8px;
    min-width: 80px;
    text-decoration: none;
    color: inherit;
}

.nav-item:hover {
    transform: translateY(-4px);
    opacity: 0.8;
}

.folder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a4a4a;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Page-specific styles - removed duplicate .back-link definition */

/* List page styles (Blog & Projects) */
.content-list {
    width: 100%;
    max-width: 700px;
    margin-top: 2rem;
}

.list-item {
    margin-bottom: 2rem;
    text-align: left;
}

.item-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.item-subtitle {
    font-size: 0.95rem;
    color: #4a4a4a;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.item-date {
    font-size: 0.8rem;
    color: #888;
    font-weight: 500;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Individual post page styles */
.back-link {
    position: static;
    color: #666;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    font-weight: 400;
    z-index: 10;
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem; /* Reduced from 1rem to 0.5rem */
}

.back-link:hover {
    color: #1a1a1a;
}

.post-meta {
    font-size: 1.2rem;
    color: #4a4a4a;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.post-date {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Blog post content styles */
.post-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: left;
}

.post-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1.2rem;
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 2rem 0 1rem 0;
    line-height: 1.4;
}

.post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 1.5rem 0 0.8rem 0;
    line-height: 1.4;
}

.post-content ul, .post-content ol {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.6;
}

.post-content li {
    margin-bottom: 0.5rem;
    color: #333;
}

.post-content blockquote {
    border-left: 3px solid #e0e0e0;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    text-align: center;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Blog post links */
.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.post-link:hover {
    transform: translateX(4px);
}

.post-link:hover .item-title {
    color: #000;
}



/* Photography gallery styles - Masonry layout */
.photo-gallery {
    width: 100%;
    max-width: 100%;
    margin-top: 0; /* Removed 2rem top margin */
    padding: 0 0.5rem;
    position: relative;
    min-height: 100vh;
}

/* Photography page specific container override */
.container.photography-container {
    max-width: 100%;
    padding: 4rem 0.5rem 1rem 0.5rem; /* Increased top padding to 4rem to move header down more */
}

.container.photography-container header {
    margin-bottom: 0.5rem;
    margin-top: 2rem; /* Increased top margin to push header down more */
    position: relative;
    z-index: 20;
    padding-top: 1rem;
    text-align: center;
}

.container.photography-container .name {
    text-align: center;
    margin-bottom: 0.5rem; /* Reduced from 1rem to 0.5rem */
}

.photo-item {
    position: absolute;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.photo-item:hover img {
    transform: scale(1.02);
}

.gallery-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    /* Image optimization for faster loading */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: pixelated;
    /* Reduce memory usage */
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Optimize for performance */
    will-change: auto;
}

/* Photo gallery messages */
.no-photos, .error-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    grid-column: 1 / -1;
}

.no-photos p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.no-photos code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.error-message {
    color: #d32f2f;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 3rem 1.5rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .bio {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    
    .email {
        font-size: 1rem;
    }
    
    .desktop-nav {
        gap: 2rem;
        margin-top: 3rem;
    }
    
    .folder-icon {
        font-size: 2.5rem;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .bio {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .desktop-nav {
        gap: 1.5rem;
        margin-top: 2.5rem;
        flex-direction: column;
    }
    
    .folder-icon {
        font-size: 2rem;
    }
    
    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    .item-title {
        font-size: 1.1rem;
    }
    
    .item-subtitle {
        font-size: 0.9rem;
    }
}
