/* ============================================================
   HUGO WEBSITE - CORE STYLES (CLEAN & CONSOLIDATED)
   ============================================================ */

:root {
    --bg-white: #ffffff;
    --bg-dark: #121212;
    --text-dark: #1a1a1a;
    --text-light: #f0f0f0;
    --text-gray: #888888;
    --accent: #000000;
    --font-main: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-serif); }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* --- DESKTOP LAYOUT (DEFAULT) --- */
.container {
    display: grid;
    grid-template-columns: 35% 30% 35%;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* --- COMPONENTS --- */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 80px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo { cursor: pointer; display: flex; align-items: center; gap: 15px; }
.logo-icon .diamond { width: 16px; height: 16px; border: 2px solid #000; transform: rotate(45deg); }
.logo-text { font-weight: 700; font-size: 1rem; letter-spacing: 2px; }

.nav-right { display: flex; align-items: center; gap: 25px; }
.lang-switch { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.menu-icon { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.menu-icon .line { width: 30px; height: 2px; background: #000; transition: var(--transition); }
.menu-icon .line.short { width: 20px; align-self: flex-end; }

/* Menu Overlay */




/* Carousel Sections */
.left-section { 
    background: #f9f9f9; 
    padding: 120px 60px 80px; /* Increased top padding to push content down from fixed nav */
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    position: relative; 
    height: 100vh;
}
.hero-text { text-align: left !important; width: 100% !important; }
    .main-content { 
        display: flex; 
        align-items: flex-start; 
        gap: 40px; 
        background: #fff; 
        padding: 70px 80px; 
        margin-right: -120px; 
        z-index: 10; 
        box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    }
.hero-text h1 {
        padding-left: 0 !important; 
        font-size: 2.2rem; 
        line-height: 1.2;
        margin-bottom: 25px; 
    }
.hero-description { 
        font-size: 1.05rem; 
        line-height: 1.7;
        color: #555; 
        max-width: 550px; 
    }

/* --- TABLET & SMALL LAPTOP OPTIMIZATION (768px - 1100px) --- */
@media only screen and (min-width: 768px) and (max-width: 1100px) {
    .container {
        grid-template-columns: 35% 30% 35%; /* Restore desktop proportions to fix photo width */
    }

    .left-section {
        padding: 100px 30px 60px; /* Reduced side padding */
    }

    .main-content {
        padding: 90px 40px; /* Significantly increased top/bottom padding for more height */
        margin-right: -40px; /* Smaller negative margin extension */
        gap: 25px; /* Tighter gap between dots and text */
        min-height: 380px; /* Ensure a taller text area */
    }

    .hero-text h1 {
        font-size: 1.7rem; /* Significantly reduced for tablet width */
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .pagination {
        left: 30px !important; /* Align with new left-section padding */
        bottom: 40px !important;
    }

    .side-dots {
        gap: 10px;
    }
}

.side-dots { display: flex; flex-direction: column; gap: 12px; }
.side-dots span { width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer; border: 1.5px solid #fff; box-shadow: 0 0 3px rgba(0,0,0,0.2); }
.side-dots span.active { background: #000; transform: scale(1.3); }

    .pagination {
        position: absolute !important;
        bottom: 60px !important; /* Fixed at bottom with padding */
        left: 60px !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        width: fit-content !important;
        background: transparent;
        padding: 0 !important; gap: 15px !important;
        border-radius: 20px !important;
        box-shadow: none !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        z-index: 100 !important;
    }

    .project-link {
        background: transparent !important;
        border: none !important;
        outline: none !important;
        padding: 0 !important; gap: 15px !important;
        margin: 0 !important;
        cursor: pointer !important;
        color: inherit !important;
        font-family: inherit !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

.center-section { 
    position: relative; 
    overflow: hidden; 
    height: 100vh; 
    width: 100%;
}
.image-wrapper { 
    width: 100%; 
    height: 100%; 
}
.center-section img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

/* Second Screen (Insights) */
.right-section { 
    background: #1a1a1a; 
    color: #fff; 
    padding: 140px 60px 80px; /* Increased top padding from 80px to 140px to clear fixed nav */
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; /* Better control of top spacing */
    height: 100vh;
    overflow-y: auto; /* Allow scrolling if content is long */
}
.project-list { display: flex; flex-direction: column; gap: 40px; margin-top: 40px; }
.project-item { cursor: pointer; border-bottom: 1px solid #333; padding-bottom: 20px; }
.item-meta { font-size: 0.8rem; color: #888; margin-bottom: 10px; }
.item-title { font-size: 1.2rem; font-family: var(--font-serif); }

.site-footer { margin-top: auto; padding-top: 40px; border-top: 1px solid #333; font-size: 0.8rem; color: #666; text-align: center; }
.beian-link { color: #666; margin-top: 5px; display: block; text-align: center; }

/* ============================================================
   MOBILE PORTRAIT STYLES (THE GOLDEN VERSION)
   ============================================================ */


#heroSubtitle { display: none !important; }

/* ============================================================
   REFINED MOBILE PORTRAIT UI STANDARDS
   ============================================================ */
@media only screen and (max-width: 767px) and (orientation: portrait) {
    html, body {
        height: 100% !important;
        scroll-snap-type: y mandatory;
    }
    
    .container {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        width: 100% !important;
    }

    /* Navigation Refinement */
    .top-nav {
        height: 65px !important;
        padding: 0 20px !important;
        background: transparent;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    }

    .logo-text { font-size: 0.9rem !important; letter-spacing: 1px !important; }

    /* First Screen - Text Area (32vh) */
    .left-section {
        width: 100% !important;
        height: 42vh !important;
        min-height: 42vh !important;
        padding: 95px 0 0 !important; /* Increased top padding to push content down */
        background: #fff !important;
        order: 1 !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important; align-items: flex-start !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .hero-text { text-align: left !important; width: 100% !important; }
    .main-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 0 25px !important; /* Apply padding here */
        margin: auto 0 !important; /* Keep auto centering within the new pushed space */
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .hero-text h1 {
        padding-left: 0 !important;
        font-family: var(--font-serif);
        font-size: 1.6rem !important;
        line-height: 1.1 !important;
        margin-bottom: 12px !important;
        color: #222!important;
    }

    .hero-description {
        font-family: var(--font-main);
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
        color: #666!important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important; /* Limit to 3 lines on mobile to avoid overflow */
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin-bottom: 20px !important;
    }

    .side-dots { gap: 15px !important; margin-top: 10px !important; }
    .side-dots span {
        width: 7px !important;
        height: 7px !important;
        background-color: #eee !important;
        border: 1px solid #ddd !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
    .side-dots span.active { background-color: #000 !important; transform: scale(1.3) !important; }

    /* Floating Pagination */
        .pagination {
        position: relative !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 20px !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        background: transparent !important;
        padding: 0 25px !important; /* Match horizontal padding of main-content */
        gap: 15px !important;
        border-radius: 20px !important;
        box-shadow: none !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        z-index: 100 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .project-link {
        background: transparent !important;
        border: none !important;
        outline: none !important;
        padding: 0 !important; gap: 15px !important;
        margin: 0 !important;
        cursor: pointer !important;
        color: inherit !important;
        font-family: inherit !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }


    /* First Screen - Image Area (58vh) */
    .center-section {
        width: 100% !important;
        height: 58vh !important;
        min-height: 58vh !important;
        order: 2 !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        overflow: hidden !important;
    }

    /* Second Screen - Insights (100vh) */
    .right-section {
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
        padding: 90px 0 0 !important; /* Horizontal padding removed here */
        background: #1a1a1a!important;
        color: #fff !important;
        order: 3 !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .right-content-wrapper {
        padding: 0 25px !important; /* Apply padding to content instead */
    }

    .abstract-content h2 { font-size: 1.3rem !important; letter-spacing: 3px !important; margin-bottom: 10px !important; }
    .abstract-content .description { font-size: 0.9rem !important; color: #888 !important; margin-bottom: 25px !important; }

    .project-list { gap: 15px !important; margin-top: 0 !important; }
    .project-item { border-bottom: 1px solid rgba(255,255,255,0.1) !important; padding-bottom: 15px !important; }
    
    .item-meta {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 6px !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #888!important;
    }
    
    .item-title { font-size: 1.1rem !important; font-weight: 400 !important; color: #fff !important; line-height: 1.3 !important; }

    /* Footer Integration */
    .site-footer {
        width: 100% !important;
        margin: 0 !important;
        padding: 40px 20px !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 5px !important;
        background: #1a1a1a !important;
        box-sizing: border-box !important;
    }

    .site-footer span, .beian-link { font-size: 0.7rem !important; color: rgba(255,255,255,0.4) !important; text-align: center !important; }

    /* Cleanup */
    .vertical-text, #heroSubtitle, .subtitle { display: none !important; }
}


/* SANS-SERIF FOR CHINESE TITLES */

body.lang-cn .hero-text h1, 
body.lang-cn h1, 
body.lang-cn h2 {
    font-family: var(--font-main) !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    font-size: 2.2rem !important;
}



@media only screen and (max-width: 767px) and (orientation: portrait) {
    /* ... (rest of mobile block) ... */
    
    /* Navigation Visibility Fix on Scroll */
    .top-nav.scrolled {
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }

    /* Spacing between Insights description and list */
    .abstract-content .description {
        margin-bottom: 65px !important; /* Increased from 25px */
    }
}

/* NAV COLORS ON SCROLL */
.top-nav.scrolled .logo-text,
.top-nav.scrolled .lang-switch {
    color: #888!important;
    background-color: transparent !important;
}
.top-nav.scrolled .menu-icon .line {
    background: #1a1a1a !important;
}

/* ENGLISH ONLY MOBILE TITLE SIZE */
body.lang-en .hero-text h1 {
        padding-left: 0 !important; font-size: 2rem !important; }







.menu-link:hover {
    letter-spacing: 2px !important;
    color: #000 !important;
}

/* Close Button Styling */


#menuCloseBtn:hover {
    background: #000 !important;
    color: #fff !important;
}


@media only screen and (max-width: 767px) {
    
}


/* MENU OVERLAY RECONSTRUCTION - FINAL FIX */
.menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.85)!important;
    backdrop-filter: blur(10px)!important;
    -webkit-backdrop-filter: blur(10px)!important;
    z-index: 2000000 !important;
    display: none !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

.menu-overlay.active {
    display: flex !important;
}

.menu-links-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
    width: 100% !important;
}

.menu-link {
    font-family: var(--font-main) !important;
    font-size: 2.2rem !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: transform 0.3s ease, color 0.3s ease !important;
    text-align: center !important;
    display: block !important;
    width: fit-content !important;
}

.menu-link:hover {
    color: #000 !important;
    transform: scale(1.1) !important;
}





#menuCloseBtn:hover {
    background: #000 !important;
    border-color: #000 !important;
}

#menuCloseBtn:hover i {
    color: #fff !important;
}

@media only screen and (max-width: 767px) {
    .menu-link {
        font-size: 1.8rem !important;
        gap: 20px !important;
    }
    
}

body.lang-cn .hero-description { font-size: 0.9rem !important; }

/* PREVENT RIGHT EDGE GLITCH ON MOBILE */
@media only screen and (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }
    .container, section, div {
        max-width: 100% !important;
    }
}


/* VERTICAL BRAND TEXT IN INSIGHTS SECTION */
.vertical-brand-text {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    font-size: 0.75rem !important;
    color: rgba(0, 0, 0, 0.05) !important; /* DEFAULT DARK TEXT FOR LIGHT BG */
    letter-spacing: 4px !important;
    font-weight: 300 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

/* Override for right section (dark bg) */
.right-section .vertical-brand-text {
    color: rgba(255, 255, 255, 0.3) !important;
}

@media only screen and (max-width: 767px) {
    .vertical-brand-text {
        right: 10px !important;
        font-size: 0.65rem !important;
        letter-spacing: 3px !important;
    }
}


#menuCloseBtn {
    position: absolute !important;
    top: 30px !important;
    right: 30px !important;
    background: transparent !important;
    border: none !important; /* REMOVED CIRCLE BORDER */
    cursor: pointer !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    z-index: 2000001 !important;
}

#menuCloseBtn i {
    font-size: 1.8rem !important;
    color: #1a1a1a !important;
}

#menuCloseBtn:hover {
    background: transparent !important;
    transform: rotate(90deg) !important;
}


/* FORCED VISIBILITY ON SCROLL */
.top-nav.scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}
.top-nav.scrolled .logo-text,
.top-nav.scrolled .lang-switch {
    color: #1a1a1a !important;
}
.top-nav.scrolled .menu-icon .line {
    background: #1a1a1a !important;
}


/* FINAL NAV SCROLLED FIX */
.top-nav.scrolled {
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 999999 !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1) !important;
}
.top-nav.scrolled .logo-text,
.top-nav.scrolled .lang-switch,
.top-nav.scrolled .logo-icon .diamond {
    color: #1a1a1a !important;
    border-color: #1a1a1a !important;
}
.top-nav.scrolled .menu-icon .line {
    background: #1a1a1a !important;
}

/* MOBILE LANDSCAPE OPTIMIZATION */
@media only screen and (max-height: 500px) and (max-width: 950px) {
    .container {
        display: flex !important;
        flex-direction: row !important;
        height: auto !important;
        overflow: visible !important;
    }
    .left-section, .center-section, .right-section {
        width: 100vw !important;
        height: 100vh !important;
        flex-shrink: 0 !important;
    }
    .top-nav { height: 60px !important; }
    .hero-text h1 {
        padding-left: 0 !important; font-size: 1.2rem !important; }
    .hero-description { font-size: 0.75rem !important; -webkit-line-clamp: 2 !important; }
    .vertical-brand-text { display: none !important; }
}
/* View More Insights Link */
.view-more-container {
    margin-top: 30px;
    padding: 0 20px;
    text-align: right;
}

.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.view-more-link:hover {
    color: #fff;
    transform: translateX(5px);
}

.view-more-link i {
    font-size: 0.8rem;
}

@media (max-width: 767px) {
    .view-more-container {
        text-align: center;
        margin-top: 20px;
        margin-bottom: 40px;
    }
    .view-more-link {
        width: 100%;
        justify-content: center;
    }
}

/* Sub-pages Footer Layout Sync (Mobile) */
@media only screen and (max-width: 767px) and (orientation: portrait) {
    .page-container, .article-container, .about-container, .contact-container {
        display: flex !important;
        flex-direction: column !important;
        min-height: 100vh !important;
        height: auto !important;
    }
    
    .site-footer {
        margin-top: auto !important;
        padding: 40px 20px !important;
        background: #1a1a1a !important; /* Dark background for footer on sub-pages mobile */
        color: rgba(255,255,255,0.6) !important;
    }
    
    .site-footer .beian-link {
        color: rgba(255,255,255,0.4) !important;
    }
}
