/* ========================================
   ARCHITECTURAL SYSTEM UI - STYLE SHEET
   Technological Minimalism // Galerie-Style
   VERSION: 2.1.0 [STRICT_GRID_CENTURY]
   ======================================== */

/* === RESET & BASE === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #FFFFFF;
    --color-text: #000000;
    --color-accent: #000000;
    --color-dim: #CCCCCC;
    --grid-unit: 1fr;
    --font-primary: 'Century Gothic', sans-serif;
    --font-mono: 'Century Gothic', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-snap-type: y mandatory;
    -webkit-text-size-adjust: 100%;
    /* Prevent font boosting */
    text-size-adjust: 100%;
}


body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-weight: 400;
    margin: 0;
}

h2 {
    font-family: var(--font-primary);
    font-size: 4rem;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

h3 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 60ch;
    margin-bottom: 1.5rem;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* === NAVIGATION === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-text);
    z-index: 1000;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    header {
        height: 80px;
        /* Force desktop height */
        padding: 0;
    }
}


nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 40px;
    /* Extremity padding */
}

@media (max-width: 768px) {
    nav {
        flex-direction: row;
        /* Force desktop row */
        align-items: center;
        gap: normal;
        padding: 0 40px;
    }
}


.nav-center {
    display: flex;
    gap: 4rem;
}

@media (max-width: 768px) {
    .nav-center {
        gap: 4rem;
        /* Force desktop gap */
        flex-wrap: nowrap;
        justify-content: space-between;
    }
}


nav a {
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
    transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
    opacity: 1;
}

nav a.active::before {
    content: '[ ';
}

nav a.active::after {
    content: ' ]';
}

/* Reusable System Selector Aesthetic */
.system-selector {
    display: flex;
    gap: 30px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 8px;
}

.system-selector a,
.system-selector .view-toggle {
    text-decoration: none;
    color: var(--color-text);
    opacity: 0.4;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.system-selector a:hover,
.system-selector .view-toggle:hover,
.system-selector a.active,
.system-selector .view-toggle.active {
    opacity: 1;
}

.system-selector a.active::before,
.system-selector .view-toggle.active::before {
    content: "[ ";
}

.system-selector a.active::after,
.system-selector .view-toggle.active::after {
    content: " ]";
}

/* === GRID SYSTEM === */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 20px;
    padding: 0 40px;
    max-width: 1920px;
    margin: 0 auto;
}

.module {
    scroll-snap-align: start;
    min-height: 100vh;
    padding-top: 120px;
    /* Space for header */
    padding-bottom: 80px;
    position: relative;
    border-bottom: 1px solid var(--color-text);
}

.module:last-child {
    border-bottom: none;
}

.system-coords {
    position: absolute;
    top: 100px;
    right: 40px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-text);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 1;
}

/* === BUTTONS === */
.btn-primary {
    display: inline-block;
    background: var(--color-text);
    color: var(--color-bg);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: 1rem 2rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--color-text);
}

.btn-primary:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

/* === LANDING / HERO (DEVELOPMENT) === */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: start;
}

.hero-content {
    grid-column: 1 / 6;
    padding-right: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.big-title {
    font-family: var(--font-primary);
    font-size: 6rem;
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-visual {
    grid-column: 7 / 13;
    aspect-ratio: 16/9;
    background: #f0f0f0;
    position: relative;
    border: 1px solid var(--color-text);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Anchors */
.anchor {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--color-text);
    background: var(--color-bg);
}

.tl {
    top: -5px;
    left: -5px;
}

.tr {
    top: -5px;
    right: -5px;
}

.bl {
    bottom: -5px;
    left: -5px;
}

.br {
    bottom: -5px;
    right: -5px;
}


/* === TECH CONSOLE === */
.console-wrapper {
    grid-column: 1 / 13;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
    margin-top: 4rem;
}

.code-view {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 2rem;
    border-right: 1px solid var(--color-text);
    background: #FAFAFA;
    color: #333;
}

.visual-view {
    padding: 0;
    background: #FAFAFA;
    position: relative;
}

.visual-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

/* === ARCHITECTURE GALLERY (GRID) === */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--color-text);
    border-left: 1px solid var(--color-text);
}

.arch-item {
    border-right: 1px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
    padding: 2rem;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    height: auto;
    aspect-ratio: 0.75;
    /* Equivalent to 3:4 portrait ratio approx */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.arch-item:hover {
    background: #000000;
}

.arch-item:hover * {
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
}

.arch-visual {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Force square ratio to prevent squashing */
    flex-grow: 0;
    /* Prevent shrinking when text expands */
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}


.arch-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* STRICT UNIFORMITY */
    aspect-ratio: 1 / 1;
}

/* Suture Double Border */
.suture-border {
    outline: 1px solid currentColor;
    outline-offset: -4px;
}

/* === DESIGN MASONRY === */
.design-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Strict aspect ratio row sizing */
    grid-auto-rows: auto;
    border-top: 1px solid var(--color-text);
    border-left: 1px solid var(--color-text);
}

.design-item {
    border-right: 1px solid var(--color-text);
    border-bottom: 1px solid var(--color-text);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    aspect-ratio: 1 / 1;
}

.design-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* STRICT UNIFORMITY */
    aspect-ratio: 1 / 1;
    transition: transform 0.5s ease;
    display: block;
}

/* Forcing specific sub-grid images to also respect this if not in .design-item */
.grid-container img {
    object-fit: cover;
}

/* Helper for sub-grids like Textyle */
.uniform-thumb {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--color-text);
    display: block;
}

.uniform-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--color-text);
}

.design-item:hover img {
    transform: scale(1.05);
}

.col-2 {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.row-2 {
    grid-row: span 2;
    aspect-ratio: 1 / 2;
}

.col-2.row-2 {
    aspect-ratio: 1 / 1;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    h2 {
        font-size: 3rem;
    }

    .hero-content {
        grid-column: 1 / 13;
        margin-bottom: 2rem;
    }

    .hero-visual {
        grid-column: 1 / 13;
    }

    .arch-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Force desktop 3-col */
    }

    .design-grid {
        grid-template-columns: repeat(4, 1fr);
        /* Force desktop 4-col */
    }

}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(12, 1fr);
        /* Force desktop 12-col */
    }


    nav {
        gap: 1rem;
        font-size: 0.75rem;
    }

    .console-wrapper {
        grid-template-columns: repeat(2, 1fr);
        /* Force desktop 2-col */
    }


    .visual-view {
        position: static;
        height: auto;
    }

    .visual-view img {
        position: static;
        height: auto;
    }
}

/* === SCHEMATIC DIAGRAMS (MINIMALIST) === */
.schematic-flow {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    border-left: 1px solid var(--color-text);
    padding-left: 20px;
    margin-left: 10px;
}

.flow-section-title {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 1.5rem 0 0.5rem 0;
    position: relative;
}

.flow-section-title::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    width: 10px;
    height: 1px;
    background: var(--color-text);
}

.flow-node {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    padding: 4px 0;
    margin-bottom: 4px;
    position: relative;
    display: flex;
    align-items: center;
}

.flow-node::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    width: 20px;
    height: 1px;
    background: var(--color-text);
}

/* Connectors not needed in tree layout */
.flow-connector,
.flow-arrow {
    display: none;
}

.schematic-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--color-text);
}

.stack-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    border-bottom: 1px solid var(--color-text);
    padding: 8px 0;
    align-items: baseline;
}

.stack-key {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.stack-value {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text);
}

/* === LAYOUT 001: SPLIT GRID (ARCHITECTURE) === */
.layout-split {
    max-width: 1400px;
    /* Wider canvas for visual impact */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* Generous spacing */
    padding: 60px 40px;
}

.layout-split .project-visual {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f5f5f5;
    /* Subtle placeholder bg */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.layout-split .project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-split .project-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.layout-split h1 {
    font-size: 3.5rem;
    font-weight: 300;
    /* Lighter weight for architecture */
    margin-bottom: 2rem;
    letter-spacing: -1px;
    line-height: 1.1;
    text-transform: uppercase;
}

.layout-split .meta-block {
    margin-bottom: 3rem;
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.layout-split p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 480px;
    text-align: justify;
    font-weight: 300;
}

@media (max-width: 900px) {
    .layout-split {
        grid-template-columns: 1fr 1fr;
        /* Force desktop 2-col */
        gap: 80px;
        /* Force desktop gap */
    }


    .layout-split h1 {
        font-size: 2.5rem;
    }
}

/* === LAYOUT 001: REFERENCE IMPLEMENTATION === */

/* The Intro Section (Visual Left, Text Right) */
.l001-intro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6%;
    padding: 0 8%;
    width: 100%;
    min-height: 85vh;
    /* Mimic the full-screen feel */
    box-sizing: border-box;
}

.l001-visual {
    height: 72%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    background: #eee;
    /* Optional: Ensure it doesn't overflow on small screens */
    max-width: 50%;
}

.l001-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.l001-text {
    flex: 1;
    max-width: 500px;
}

.l001-text h1 {
    font-size: 2.5vw;
    /* Using vw as per reference */
    margin: 0 0 20px 0;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.l001-text .meta {
    font-size: 0.9vw;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.l001-text p {
    font-size: 1vw;
    line-height: 1.5;
    text-align: justify;
    color: #444;
    margin: 0;
}

/* The Tech Grid (Images) */
.l001-tech {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2%;
    padding: 5% 8%;
    /* Matched padding side */
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4rem;
}

.l001-col {
    display: grid;
    gap: 2%;
    align-content: start;
}

.l001-col.mixed {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    /* Allow auto height */
}

/* Helper for grid spans */
.span-2 {
    grid-column: span 2;
}

.span-row-2 {
    grid-row: span 2;
}

.l001-img {
    width: 100%;
    height: 100%;
    /* Changed from auto to fill aspect ratio box */
    aspect-ratio: 4/3;
    /* Enforce uniformity */
    object-fit: cover;
    background: #ddd;
    display: block;
}

/* Mobile Responsiveness for Layout 001 */
@media (max-width: 768px) {
    .l001-intro {
        flex-direction: row;
        /* Force desktop row */
        padding: 0 8%;
        height: 85vh;
        gap: 6%;
    }


    .l001-visual {
        max-width: 50%;
        height: 72%;
        aspect-ratio: 1/1;
    }


    .l001-text h1 {
        font-size: 2rem;
    }

    .l001-text .meta {
        font-size: 0.8rem;
    }

    .l001-text p {
        font-size: 1rem;
    }

    .l001-tech {
        grid-template-columns: 1fr 1fr;
        /* Force desktop 2-col */
        gap: 2%;
        padding: 5% 8%;
    }
}


/* === CV / TEXT LAYOUT (ABOUT & CONTACT) === */
/* === MANUAL INSTALL DROPDOWN === */
.install-options-box {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-text);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 240px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.install-options-box.hidden-view {
    display: none;
}

.install-option {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    padding: 8px;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}

.install-option:hover {
    background: #f5f5f5;
    border-color: #eee;
}


.cv-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
}

.cv-content {
    flex: 1;
}

.cv-bold {
    font-weight: 700;
    color: #222;
}

.cv-regular {
    font-weight: 400;
    color: #444;
}

.cv-date {
    text-align: right;
    min-width: 80px;
}