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

:root {
    --bg: #FBF7F2;
    --bg-light: #F5EDE4;
    --primary: #8B7355;
    --primary-light: #C4A882;
    --accent: #6B7F5E;
    --text: #3D3228;
    --text-light: #7A6E62;
    --white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Noto Serif SC', serif;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(251, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 0.8rem 3rem;
}

.nav-brand {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.navbar.scrolled .nav-brand {
    color: var(--text);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.navbar.scrolled .nav-links a {
    color: var(--text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s;
}

.navbar.scrolled .nav-toggle span {
    background: var(--text);
}

/* ===== Hero ===== */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #8B7355 0%, #5A4A3A 50%, #3D3228 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: 4px;
}

.hero-content p {
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    letter-spacing: 2px;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--primary-light);
    color: var(--white);
    text-decoration: none;
    border: none;
    font-size: 0.95rem;
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.3);
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 0.8rem;
    letter-spacing: 3px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* ===== Projects ===== */
.projects {
    padding: 6rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--primary-light);
    background: transparent;
    color: var(--text-light);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.project-image {
    height: 350px;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-tag {
    font-size: 0.75rem;
    background: var(--primary-light);
    padding: 0.25rem 0.8rem;
    display: inline-block;
    width: fit-content;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.project-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.project-overlay p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ===== About ===== */
.about {
    padding: 6rem 3rem;
    background: var(--bg-light);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-photo {
    height: 500px;
    border-radius: 4px;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
}

.about-intro {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.about-text p {
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* ===== Contact ===== */
.contact {
    padding: 6rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.contact-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 600;
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #E0D8CF;
    background: var(--white);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.3s;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-light);
}

.contact-form textarea {
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--text);
    color: var(--bg-light);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background: var(--bg);
    max-width: 900px;
    width: 100%;
    border-radius: 8px;
    position: relative;
    margin: 2rem auto;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

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

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-tag {
    font-size: 0.8rem;
    background: var(--primary-light);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.modal-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    max-height: 500px;
}

.modal-panorama {
    margin-top: 1rem;
}

.panorama-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.panorama-btn:hover {
    background: #5A6E4E;
}

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

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: var(--text) !important;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .projects,
    .about,
    .contact {
        padding: 4rem 1.5rem;
    }

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

    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-photo {
        height: 300px;
    }

    .stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
