/* =========================================================================
   CORE RESETS & INERTIAL SCROLL ENGINE
   ========================================================================== */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
* { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; box-sizing: border-box; }
body { line-height: 1.5; background-color: #000000; color: #a4adad; font-family: 'Geist', sans-serif; position: relative; }

#scroll-viewport { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh; 
    overflow: hidden; /* Changed from scroll to hidden */
    -webkit-overflow-scrolling: touch; 
}

#scroll-content { 
    width: 100%; 
    will-change: transform; 
}

/* Matrix image styling */
.project-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.matrix-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    margin-bottom: 0.5rem;
    filter: grayscale(0.5);
    transition: filter 0.3s ease;
}
.matrix-item img:hover { filter: grayscale(0); }

section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 3.5rem;
}

.site-wrapper { width: 100%; }
.site-main { max-width: 1100px; margin: 0 auto; }
.inner { padding: 0 2rem; }

.site-main, .description-grid-reverse, .desc-image, .desc-image img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================================================
   TYPOGRAPHY & MASSIVE ARCHITECTURAL SEGMENT HEADINGS
   ========================================================================== */
.instance-massive-title { 
    width: 100%; 
    text-transform: uppercase; 
    margin-bottom: 1.2rem; 
    display: flex; 
    flex-direction: column; 
    gap: 0.6rem; 
}

.instance-massive-title .title-line { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
}

.instance-massive-title .line-1 { 
    font-size: clamp(2rem, 7.5vw, 7.5rem); 
    line-height: 0.9; 
    font-weight: 500;
    color: #D6DCDC;
    width: 100%;
}

.instance-massive-title .special-o {
    font-family: 'Poppins', 'Futura', 'Century Gothic', sans-serif !important;
    color: #819b7a !important;
}

.instance-massive-title .line-2 {
    font-size: clamp(0.7rem, 1.45vw, 1.15rem);
    font-weight: 400;
    color: #aea597; 
    letter-spacing: 0.02em;
    width: 100%;
}

.instance-massive-title span { display: inline-block; }

/* Massive, striking segment titles as requested */
.section-heading {
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #D6DCDC;
    border-bottom: 1px solid #141414;
    padding-bottom: 0.5rem;
    margin-bottom: 1.8rem;
    line-height: 1.1;
}

/* =========================================================================
   MUSHROOMALICE LIVE SCROLLING NUMBERS SYSTEM
   ========================================================================== */
.ticker-terminal-grid {
    display: grid;
    /* Adjusts to 2 columns on mobile, 4 on larger screens */
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem;
    border-bottom: 1px solid #141414;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .ticker-terminal-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ticker-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ticker-label {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.ticker-number {
    font-size: clamp(2rem, 5.5vw, 4.7rem);
    font-weight: 400;
    color: #D6DCDC;
    letter-spacing: -0.02em;
    line-height: 1.0;
    font-family: 'Funnel Display', sans-serif;
}

/* Tight text density configuration to remove blank blocks */
.lead-text {
    font-size: 1.25rem;
    color: #D6DCDC;
    font-weight: 500;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

p {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.sub-muted { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }
.mt-2 { margin-top: 0.6rem; }
.mt-3 { margin-top: 1rem; }

.sub-block { margin-bottom: 1rem; }
.sub-block h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #D6DCDC;
    margin-bottom: 0.3rem;
}

/* Clean framework blocks with no lines or decoration gaps */
.framework-step {
    margin-bottom: 1rem;
    border-left: none;
    padding-left: 0;
}
.framework-step strong {
    font-size: 0.95rem;
    color: #D6DCDC;
    display: block;
    margin-bottom: 0.1rem;
}

.bigger-quote {
    font-size: clamp(1.1rem, 2.3vw, 1.5rem); 
    line-height: 1.35; 
    margin: 2rem 0;
    padding-left: 1.2rem; 
    border-left: 2px solid #819b7a; 
    color: #819b7a;
    font-style: italic;
    font-weight: 400;
}

/* =========================================================================
   PORTFOLIO MATRIX (15 Projects layout)
   ========================================================================== */
.project-matrix {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin-top: 1.2rem;
    border-top: 1px solid #141414;
    padding-top: 1.2rem;
}

@media (min-width: 480px) {
    .project-matrix { grid-template-columns: 1fr 1fr; }
}

.matrix-item {
    font-size: 0.85rem;
    color: #aea597;
    padding: 0.3rem 0;
    border-bottom: 1px solid #080808;
    display: flex;
    gap: 0.75rem;
}
.matrix-item span {
    color: #444;
    font-size: 0.75rem;
}

/* =========================================================================
   HERO BANNER IMAGE FRAME
   ========================================================================== */
.hero-banner-frame {
    width: 100%;
    margin-top: 0.2rem;
    margin-bottom: 1rem;
    background-color: transparent;
    overflow: hidden;
}

.hero-banner-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-banner-frame.visible img { opacity: 1; transform: translateY(0); }

/* =========================================================================
   FLUID ALTERNATING GRID SYSTEM
   ========================================================================== */
.description-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 2rem;
    align-items: start;
    width: 100%;
}

@media (min-width: 768px) {
    .description-grid {
        grid-template-columns: 1.1fr 0.9fr; 
        gap: 3.5rem;
    }
    .description-grid.reverse .desc-text { order: 2; }
    .description-grid.reverse .desc-image { order: 1; }
}

.desc-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.desc-image { width: 100%; }
.image-frame { border: 1px solid #161616; background-color: #040404; width: 100%; padding: 0; }
.image-frame img { width: 100%; height: auto; display: block; object-fit: cover; }

/* =========================================================================
   MINIMAL ARCHITECTURAL FORM
   ========================================================================== */
.architectural-form {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}
.form-group input, 
.form-group textarea {
    width: 100%;
    background-color: #060606;
    border: 1px solid #1a1a1a;
    padding: 0.8rem;
    color: #D6DCDC;
    font-family: 'Geist', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: border-color 0.3s ease;
}
.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #819b7a;
}
.submit-btn {
    background-color: #819b7a;
    color: #000;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.submit-btn:hover { background-color: #9ab493; }

/* =========================================================================
   NAV & FOOTER
   ========================================================================== */
.nav-links { 
    display: flex; 
    flex-wrap: wrap;
    list-style: none; 
    gap: 1.5rem; 
    margin-bottom: 0.8rem;
}
.nav-links a { 
    color: #555; 
    text-decoration: none; 
    font-size: 0.85rem; 
    font-weight: 500;
    letter-spacing: 0.05em; 
    transition: color 0.3s ease;
}
.nav-links a:hover { color: #D6DCDC; }

footer { 
    margin-top: 3.5rem; 
    padding-bottom: 2.5rem;
    font-size: 0.7rem; 
    color: #444; 
    letter-spacing: 0.05em;
}

/* =========================================================================
   TEXT REVEAL ANIMATION ENGINE
   ========================================================================== */
.fade-in-letter { 
    opacity: 0; 
    display: inline-block; 
    transform: translateY(4px);
    will-change: transform, opacity;
}

.scroll-reveal.visible .fade-in-letter { 
    animation: fadeInLetter 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; 
    animation-delay: calc(var(--i) * 0.06s); 
}

.scroll-reveal { opacity: 0; transition: opacity 0.5s ease; }
.scroll-reveal.visible { opacity: 1; }

@keyframes fadeInLetter { to { opacity: 1; transform: translateY(0); } }



/* =========================================================================
   15 Projects Grid Layout (UN-CROPPED LANDSCAPE RATIOS)
   ========================================================================== */
.gallery-grid-15 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    cursor: zoom-in;
    overflow: hidden;
    /* Removed the square aspect-ratio: 1 / 1 rule */
    aspect-ratio: auto !important; 
    width: 100%;
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* Replaced 'cover' with 'contain' to ensure natural landscape view without edge clips */
    object-fit: contain !important; 
    transition: transform 0.5s ease;
    filter: grayscale(50%);
    outline: none !important;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.02);
    filter: grayscale(0%);
}

/* =========================================================================
   Simple Lightbox Overlay
   ========================================================================== */
#lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
}

#lightbox.active { 
    display: flex !important; 
}

#lightbox img { 
    max-width: 90vw !important; 
    max-height: 90vh !important; 
    object-fit: contain !important;
    aspect-ratio: auto !important;
}

.ticker-number {
    font-family: 'Funnel Display', sans-serif !important;
    font-variant-numeric: normal !important;
    font-feature-settings: "zero" 0 !important;
    display: inline-block;
}

/* Reduce top and bottom padding of the entire page */
#scroll-content {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Tighten the vertical space between major sections */
.description-grid-reverse {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Reduce space around quotes */
blockquote {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* 1. Target the section containers causing the gap */
.description-grid-reverse, 
.section-wrapper, 
section {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* 2. Tighten the space inside the project containers */
.project-matrix {
    margin-top: 0.5rem !important;
}

/* 3. Reduce padding on the main page wrapper if it's still too wide */
.site-main {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

