:root {
    /* Colors - Premium Dark Theme (Default) */
    --bg-primary: #050505;
    /* Darker, deeper black */
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(5, 5, 5, 0.8);
    --card-bg: rgba(255, 255, 255, 0.03);

    /* Hero Specific */
    --hero-bg: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #050505 100%);
    --hero-title-gradient: linear-gradient(to right, #fff, #888);

    /* Typography */
    --font-main: 'Montserrat', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
    --section-spacing: 120px;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(0, 0, 0, 0.02);

    /* Hero Specific Light */
    --hero-bg: radial-gradient(circle at 50% 50%, #f8f9fa 0%, #e9ecef 100%);
    --hero-title-gradient: linear-gradient(to right, #111, #666);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
    margin-top: 2px;
}

.theme-toggle:hover {
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    /* Pill shape for modern look */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    margin-left: 16px;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
}

.logo img {
    height: 28px;
    width: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-bg);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    /* Responsive typography */
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 32px;
    letter-spacing: -0.04em;
    background: var(--hero-title-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin: 0 auto 48px auto;
    max-width: 600px;
    font-weight: 400;
    text-align: center;
}

/* Sections General */
.section {
    padding: var(--section-spacing) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 80px;
    max-width: 600px;
    line-height: 1.8;
}

/* Photography Grid - Classy Static */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 350px;
    gap: 20px;
    width: 100%;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Bento Grid Layout */
/* First 2 items span 3 columns (50% width) */
.gallery-item:nth-child(1),
.gallery-item:nth-child(2) {
    grid-column: span 3;
}

/* Last 3 items span 2 columns (33.3% width) */
.gallery-item:nth-child(3),
.gallery-item:nth-child(4),
.gallery-item:nth-child(5) {
    grid-column: span 2;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.category-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 1.2rem;
    font-weight: 300;
    color: #ffffff;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.gallery-item:hover .category-title {
    transform: scale(1.05);
    /* Subtle pulse */
    transition: transform 0.4s ease;
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: brightness(0.85);
    /* Slightly dimmed for text contrast */
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
    filter: brightness(1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 40%);
    z-index: 1;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 0.8;
}

/* Development Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.service-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 48px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.service-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.contact-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Footer */
.site-footer {
    padding: 100px 0 60px;
    border-top: 1px solid var(--border-color);
    margin-top: 120px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 32px;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.gallery-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.modal-gallery-grid {
    column-count: 2;
    column-gap: 20px;
    padding-right: 10px;
    /* Space for scrollbar */
    flex: 1;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .modal-gallery-grid {
        column-count: 1;
    }
}

.modal-gallery-grid::-webkit-scrollbar {
    width: 8px;
}

.modal-gallery-grid::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.modal-gallery-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-gallery-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modal-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
    break-inside: avoid;
}

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

/* Projects Section (Blog Style) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-color);
}

.project-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.project-excerpt {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
    flex-grow: 1;
}

.project-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-link:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-modal {
        padding: 0;
    }

    .modal-content {
        height: 100%;
        border-radius: 0;
        padding: 20px;
    }

    .modal-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .main-nav {
        display: none;
        /* Hidden by default on mobile, toggled via JS */
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-primary);
        padding: 40px;
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-item:nth-child(n) {
        grid-column: span 1;
    }
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 80px 20px 40px;
}

.gallery-modal.active {
    display: block;
}

.close-gallery {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10000;
}

.close-gallery:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-images {
    max-width: 1200px;
    margin: 0 auto;
    column-count: 2;
    column-gap: 20px;
}

@media (max-width: 480px) {
    .gallery-images {
        column-count: 1;
    }
}

.gallery-modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: block;
    margin-bottom: 20px;
    break-inside: avoid;
}

.gallery-modal-img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .gallery-images {
        grid-template-columns: 1fr;
    }

    .gallery-modal {
        padding: 70px 15px 30px;
    }
}