/* =========================================
   01. RESET
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f4ef;
    color: #111;
    font-family: 'Noto Serif', serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

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


/* =========================================
   02. LAYOUT
========================================= */

.site-shell {
    display: flex;
}

/* SIDEBAR */

.sidebar {
    width: 240px;
    padding: 60px 36px;
    border-right: 1px solid #e8e2d8;
    position: fixed;
    height: 100vh;
    background: #f6f4ef;
}

/* BRAND */

.brand h1 {
    font-size: 17px;
    letter-spacing: 0.22em;
    margin: 0;
}

.brand p {
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.3em;
    color: #777;
}

/* CONTENT */

.content {
    margin-left: 240px;
    padding: 80px 60px;
    max-width: 980px;
}


/* =========================================
   03. MENU SYSTEM (FINAL STABLE)
========================================= */

.nav {
    margin-top: 50px;
}

.menu-root {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 14px;
}

/* MAIN LINK */

.menu-link {
    display: block;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: #666;
    opacity: 0.8;

    transition: all 0.2s ease;
}

/* HOVER */

.menu-link:hover {
    color: #111;
    opacity: 1;
}

/* ACTIVE */

.menu-link.active {
    color: #111;
    font-weight: 600;
    opacity: 1;
    position: relative;
}

/* ACTIVE INDICATOR */

.menu-link.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: #111;
    transform: translateY(-50%);
    border-radius: 50%;
}

/* CHILD MENU */

.menu-children {
    list-style: none;
    padding-left: 16px;
    margin-top: 6px;
    display: none;
}

/* SHOW ON HOVER */

.menu-item:hover > .menu-children {
    display: block;
}

/* SHOW WHEN ACTIVE (CRITICAL) */

.menu-item.active > .menu-children {
    display: block;
}

/* CHILD LINKS */

.menu-children .menu-link {
    font-size: 10px;
    letter-spacing: 0.14em;
    opacity: 0.7;
}


/* =========================================
   04. HOME PAGE
========================================= */

.home {
    margin: 0 auto;
}

/* INTRO */

.home-intro {
    margin-bottom: 60px;
}

.home-heading {
    font-size: 10px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 16px;
}

.home-title {
    font-size: 44px;
    font-weight: 500;
    margin-bottom: 16px;
}

.home-subtitle {
    font-size: 15px;
    color: #555;
    margin-bottom: 16px;
}

.home-intro-text {
    font-size: 14px;
    color: #444;
}

/* GRID */

.home-flat {
    display: flex;
    flex-direction: column;
    gap: 70px;
}

.home-flat-item img {
    width: 100%;
}

.home-flat-meta {
    margin-top: 12px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #666;
}


/* =========================================
   05. GALLERY
========================================= */

.gallery-header {
    margin-bottom: 20px;
}

.gallery-title {
    font-size: 28px;
    font-weight: 500;
}


/* =========================================
   06. VIEWER
========================================= */

.viewer {
    max-width: 980px;
    margin: 0 auto;
}

.viewer-stage {
    position: relative;
    width: 100%;
    height: 70vh;
    max-height: 680px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* NAV ZONES */

.viewer-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 2;
}

.viewer-zone-left {
    left: 0;
    cursor: w-resize;
}

.viewer-zone-right {
    right: 0;
    cursor: e-resize;
}

/* NAV ROW */

.viewer-nav {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.viewer-arrow {
    font-size: 18px;
    color: #444;
}

.viewer-arrow:hover {
    opacity: 0.6;
}

/* META */

.viewer-meta-line {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #666;
    margin-top: 5px;
}

/* DESCRIPTION */

.viewer-description {
    margin-top: 15px;
    font-size: 13px;
    color: #444;
}


/* =========================================
   07. INTERACTIONS
========================================= */

.hover-enabled img {
    transition: transform 0.4s ease;
}

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


/* =========================================
   08. FOOTER
========================================= */

.site-footer {
    margin-left: 240px;
    padding: 40px 60px;
    font-size: 12px;
    color: #777;
}


/* =========================================
   09. MOBILE
========================================= */

@media (max-width: 768px) {

    .site-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e8e2d8;
    }

    .content {
        margin-left: 0;
        padding: 40px 20px;
    }

    .site-footer {
        margin-left: 0;
    }

    .home-title {
        font-size: 30px;
    }
}
