:root {
    --blue: #0000FF;
    --black: #000000;
    --white: #FFFFFF;
    --gray-tech: #e5e5e5;
    --font-sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
    --font-mono: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

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

body {
    background-color: var(--white);
    color: var(--blue);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

/* UI FRAME */
.ui-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    border: 1px solid var(--gray-tech);
}

.ui-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #999;
    padding: 15px;
    text-transform: uppercase;
}

.top-left { top: 0; left: 0; }
.top-right { top: 0; right: 0; }
.bottom-left { bottom: 0; left: 0; }
.bottom-right { bottom: 0; right: 0; }

/* GRID LAYOUT */
.post-natural-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    padding: 80px 40px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* LOGO SECTION */
.logo-block {
    grid-column: 1 / 5;
    grid-row: 1;
    margin-bottom: 30px;
}

.logo-text {
    display: inline-flex;
    flex-direction: column; /* Vertical on all screens */
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 0.85;
    font-weight: 600;
    text-transform: uppercase;
    font-style: italic;
}

.logo-group {
    display: flex;
    justify-content: space-between;
    width: 1.65em; /* Signature 2-char width */
}

.logo-group span {
    display: inline-block;
    width: 0.8em;
    text-align: center;
    letter-spacing: -0.05em;
}

/* IMAGE TREATMENT */
.image-section {
    grid-column: 7 / 13;
    grid-row: 1 / 4;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.img-wrapper {
    position: relative;
    border: 1px solid var(--gray-tech);
    padding: 10px;
    max-width: 100%;
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: saturate(0.9) contrast(1.1);
}

.img-caption {
    font-family: var(--font-mono);
    font-size: 9px;
    margin-top: 10px;
    color: #888;
}

/* RESEARCH BLOCKS (TEXT) */
.research-block {
    grid-column: 1 / 6;
    width: fit-content;
    max-width: 540px;
    border: 1px solid var(--gray-tech);
    margin-top: 15px;
}

.es {
    grid-row: 2 / 4;
}

.en {
    grid-column: 7 / 13;
    grid-row: 4;
    margin-top: 30px;
}

.block-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--gray-tech);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #888;
}

.research-block .content {
    padding: 20px;
}

.mono-italic {
    font-family: var(--font-mono);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
    font-weight: 400;
}

p {
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
    font-weight: 300;
}

/* MAPPING SECTION */
.mapping-section {
    grid-column: 1 / 6;
    grid-row: 4 / 6;
    align-self: start;
    margin-top: 40px;
}

.map-container {
    position: relative;
    border: 1px solid var(--gray-tech);
    overflow: hidden;
    max-width: 100%;
}

.map-data {
    width: 100%;
    height: auto;
    opacity: 0.8;
    mix-blend-mode: multiply;
}

.scan-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 34, 255, 0.05), transparent);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* TERMINAL / CONTACT */
.terminal-contact {
    grid-column: 1 / 13;
    margin-top: 150px;
    padding-bottom: 60px;
    border-top: 1px solid var(--gray-tech);
    padding-top: 40px;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
}

.email-link {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.email-link:hover {
    background-color: var(--blue);
    color: var(--white);
}

/* BG GRID */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(var(--gray-tech) 1px, transparent 1px), linear-gradient(90deg, var(--gray-tech) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
}

/* MOBILE ADAPTATION */
@media (max-width: 900px) {
    * { cursor: auto; }
    
    .ui-frame {
        border: none;
    }

    .ui-label {
        font-size: 8px;
        padding: 10px;
    }

    .top-right, .bottom-left { display: none; }

    .post-natural-grid {
        display: flex;
        flex-direction: column;
        padding: 40px 15px;
        gap: 30px;
        overflow-x: hidden;
    }
    
    .logo-block {
        margin-bottom: 20px;
        width: 100%;
    }

    .logo-text {
        flex-direction: column; /* Vertical on Mobile */
        font-size: 2.5rem;
        line-height: 0.85;
    }

    .logo-group {
        display: flex;
        justify-content: space-between;
        width: 1.65em; /* Signature 2-char width */
    }

    .logo-group span {
        width: 0.8em;
        text-align: center;
    }
    
    .image-section {
        width: 100%;
        max-width: 100%;
        align-self: center;
        order: 2;
    }

    .img-wrapper {
        padding: 5px;
        max-width: 100%;
    }

    .research-block {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0;
        order: 3;
    }

    .es { order: 3; }
    .en { order: 5; margin-top: 20px; }

    .mapping-section {
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
        order: 4;
        opacity: 0.6;
    }
    
    .mapping-section .map-container {
        border: none;
        max-width: 100%;
    }

    .mapping-section .map-data {
        width: 100%;
        height: auto;
    }

    .research-block .content {
        padding: 15px;
    }

    .mono-italic {
        font-size: 0.9rem;
    }

    p {
        font-size: 0.85rem;
    }

    .terminal-contact {
        margin-top: 60px;
        width: 100%;
        order: 6;
    }

    .email-link {
        font-size: 0.9rem;
        word-break: break-all;
    }

    .bg-grid {
        background-size: 30px 30px;
        opacity: 0.05;
    }
}
