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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.blog-title a {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.blog-title a:hover {
    color: #666;
    transition: color 0.2s ease;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s ease;
    letter-spacing: -0.01em;
}

.main-nav a:hover {
    color: #111;
}

.main-nav a.active {
    color: #667eea;
    font-weight: 500;
}

.main-nav a.active:hover {
    color: #5a67d8;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;
    background-color: #fff;
}

/* Page system */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* About Me Page Styles */
.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.about-photo {
    flex-shrink: 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.about-intro h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.job-title {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.location {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tech-category h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.tech-category ul {
    list-style: none;
}

.tech-category li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.tech-category li:before {
    content: "▸";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 1rem;
}

.service-item p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Blog Page */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 0;
}

.blog-container h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 2rem;
}

.blog-container p {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gallery container */
.gallery {
    margin-top: 2rem;
}

/* Category headers */
.category-header {
    display: flex;
    align-items: center;
    margin: 3rem 0 1.5rem 0;
    position: relative;
}

.category-header:first-child {
    margin-top: 1rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #555;
    margin: 0;
    padding-right: 1.5rem;
    background-color: #fff;
    z-index: 2;
    position: relative;
    white-space: nowrap;
}

.category-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #ddd, #fff);
    position: relative;
}

/* Category photos grid */
.category-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: start;
    grid-auto-rows: auto;
}

/* Photo items */
.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.photo-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
    display: block;
}

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

/* No photos message */
.no-photos {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}

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

.lightbox .close:hover {
    color: #667eea;
}

.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    pointer-events: auto;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #e5e5e5;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.footer-container p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .main-nav {
        gap: 1.5rem;
        align-self: flex-end;
    }
    
    .about-header {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .about-intro h1 {
        font-size: 2rem;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-photos {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 0.75rem;
    }
    
    .category-title {
        font-size: 1.3rem;
        padding-right: 1rem;
    }
    
    .photo-item img {
        height: 240px;
    }
    
    main {
        padding: 1rem;
    }
    
    .footer-container {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .blog-title a {
        font-size: 1.1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .main-nav a {
        font-size: 0.9rem;
    }
    
    .about-intro h1 {
        font-size: 1.8rem;
    }
    
    .job-title {
        font-size: 1.1rem;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .service-item {
        padding: 1.5rem;
    }
    
    .category-photos {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .category-title {
        font-size: 1.2rem;
        padding-right: 0.75rem;
    }
    
    .category-header {
        margin: 2rem 0 1rem 0;
    }
    
    .photo-item img {
        height: 200px;
    }
    
    .lightbox .close {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }
    
    .nav-btn {
        font-size: 1.5rem;
        padding: 8px 12px;
    }
    
    .footer-container {
        padding: 1rem;
    }
    
    .footer-container p {
        font-size: 0.85rem;
    }
} 