/* Global Styles */
:root {
    --bg-color: #fcfcfc;
    --text-color: #333333;
    --accent-color: #b2b296; /* Olive from logo */
    --primary-color: #a66b92; /* Purple from logo */
    --white: #ffffff;
    --gray-light: #eeeeee;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    --transition: all 0.3s ease;
}

/* Dark Theme Variables */
body.dark-theme {
    --bg-color: #121212;
    --text-color: #e8e8e8; /* Slightly darker than before, but still lighter than original */
    --white: #1e1e1e;
    --gray-light: #333333;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll on Android */
}

/* Theme Toggle Button */
.theme-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-btn:hover {
    transform: rotate(30deg);
}

/* Logo Styling */
.logo-link svg {
    display: block;
    height: 60px;
    width: auto;
    max-width: 100%;
}

@media (max-width: 480px) {
    .logo-link svg {
        height: 50px;
        max-width: 180px; /* Force a smaller width on very small screens */
    }
}

/* Logo Dark Mode Styling */
body.dark-theme .logo-link text[fill="#a66b92"] {
    fill: var(--primary-color);
}

body.dark-theme .logo-link text[fill="#b2b296"] {
    fill: var(--accent-color);
}

body.dark-theme .logo-link text {
    filter: brightness(1.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* Header */
header {
    background-color: rgba(252, 252, 252, 0.98);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

body.dark-theme header {
    background-color: rgba(18, 18, 18, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    color: var(--text-color);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Sections Global */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 1px;
    background-color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #fcfcfc;
    position: relative;
    overflow: hidden;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    border-radius: 4px;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #a66b92;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero.dark-text-overlay .hero-content {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    color: #ffffff;
    border-radius: 8px;
}

.hero.dark-text-overlay h2 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero.dark-text-overlay p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* About Section */
.about {
    padding-top: 150px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Portfolio Section */
.portfolio-category {
    margin-bottom: 80px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}

.category-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.view-more {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    font-weight: 700;
}

.view-more:hover {
    color: var(--text-color);
    transform: translateX(5px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    cursor: pointer;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

/* Portfolio & Gallery Items */
.portfolio-item, .gallery-item {
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    cursor: pointer;
}

.portfolio-item img, .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item:hover, .gallery-item:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.portfolio-item:hover img, .gallery-item:hover img {
    transform: scale(1.08);
}

/* Contact Section */
.contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gray-light);
    background-color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--gray-light);
    font-size: 0.9rem;
    color: #888;
}

.footer-contact {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
}

.footer-contact .icon {
    font-size: 1.2rem;
}

/* Portfolio Detail Pages */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.gallery-item {
    overflow: hidden;
    aspect-ratio: 3/2;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.back-link {
    text-align: center;
    margin-bottom: 80px;
}

.portfolio-header {
    padding-top: 120px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        height: 100vh;
        justify-content: center;
        text-align: center;
        z-index: 1000;
        visibility: hidden;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.4s;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-contact {
        flex-direction: column;
        gap: 15px;
    }
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}
