/* ============================================================
   monopole.studio - Brutalist Portfolio
   Colors: #E0DCD8, #C8C4C0, #4A4A4A, #2A2A2A, #3A5070, #A06040
   Fonts: Oswald, IBM Plex Sans, IBM Plex Mono
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    font-size: 16px;
}

body {
    background-color: #E0DCD8;
    color: #4A4A4A;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 0.9vw, 16px);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Grid Coordinates --- */
.grid-coords {
    position: fixed;
    z-index: 100;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: rgba(74, 74, 74, 0.3);
    pointer-events: none;
    letter-spacing: 0.05em;
}

.grid-coords--cols {
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 60px;
}

.grid-coords--rows {
    top: 0;
    left: 8px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 60px 0;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}

.grid-coords--rows span {
    writing-mode: horizontal-tb;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #E0DCD8;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero__blueprint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
}

.hero__blueprint line,
.hero__blueprint rect,
.hero__blueprint circle,
.hero__blueprint path,
.hero__blueprint ellipse,
.hero__blueprint polygon,
.hero__blueprint polyline {
    stroke: #3A5070;
    fill: none;
    stroke-width: 0.75;
}

.hero__blueprint text.blueprint-text {
    fill: #3A5070;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    stroke: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    padding: 0 60px 80px 60px;
    width: 100%;
}

.hero__logotype {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 120px);
    text-transform: uppercase;
    color: #2A2A2A;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero__tagline {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 20px);
    color: #4A4A4A;
    margin-bottom: 24px;
    max-width: 500px;
}

.hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(74, 74, 74, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.meta-divider {
    color: rgba(74, 74, 74, 0.25);
}

/* --- Machinery Dividers --- */
.machinery-divider {
    position: relative;
    width: 100%;
    padding: 40px 60px;
    background-color: #E0DCD8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border-top: 3px solid #4A4A4A;
    border-bottom: 3px solid #4A4A4A;
}

.machinery-svg {
    width: 100%;
    max-width: 800px;
    height: 120px;
}

.machinery-svg line,
.machinery-svg rect,
.machinery-svg circle,
.machinery-svg ellipse,
.machinery-svg polygon,
.machinery-svg polyline,
.machinery-svg path {
    stroke: #4A4A4A;
    fill: none;
    stroke-width: 1.5;
}

.machinery-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(74, 74, 74, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* --- Portfolio Sections --- */
.portfolio-section {
    width: 100%;
    padding: 0;
    background-color: #E0DCD8;
}

.section-header {
    padding: 40px 60px 24px 60px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(74, 74, 74, 0.15);
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 56px);
    text-transform: uppercase;
    color: #2A2A2A;
    letter-spacing: -0.01em;
}

.section-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(74, 74, 74, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Portfolio Grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 3px solid #4A4A4A;
    margin: 0;
}

/* --- Portfolio Cells --- */
.portfolio-cell {
    border: 3px solid #4A4A4A;
    padding: 0;
    background-color: #E0DCD8;
    opacity: 0;
    transition: opacity 0.15s step-end;
}

.portfolio-cell.visible {
    opacity: 1;
}

.portfolio-cell:nth-child(even) {
    background-color: #C8C4C0;
}

.cell-content {
    padding: 24px;
}

.cell-visual {
    width: 100%;
    aspect-ratio: 3 / 2;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(74, 74, 74, 0.2);
}

.cell-visual--alt1 {
    background-color: rgba(58, 80, 112, 0.06);
}

.cell-visual--alt2 {
    background-color: rgba(74, 74, 74, 0.04);
}

.cell-visual svg {
    width: 80%;
    height: 80%;
}

.cell-visual svg line,
.cell-visual svg rect,
.cell-visual svg circle,
.cell-visual svg polygon,
.cell-visual svg polyline,
.cell-visual svg ellipse,
.cell-visual svg path {
    stroke: #3A5070;
    fill: none;
    stroke-width: 0.75;
}

.cell-visual svg text.cell-svg-text {
    fill: #3A5070;
    font-family: 'Oswald', sans-serif;
    font-size: 48px;
    font-weight: 700;
    stroke: none;
}

.cell-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 1.5vw, 24px);
    text-transform: uppercase;
    color: #2A2A2A;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.cell-description {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 0.9vw, 16px);
    color: #4A4A4A;
    line-height: 1.6;
    margin-bottom: 12px;
}

.cell-meta {
    display: flex;
    gap: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(74, 74, 74, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 12px;
    border-top: 1px solid rgba(74, 74, 74, 0.15);
}

/* --- Footer --- */
.site-footer {
    width: 100%;
    background-color: #2A2A2A;
    color: #C8C4C0;
    padding: 60px;
    border-top: 3px solid #4A4A4A;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(200, 196, 192, 0.15);
}

.footer-heading {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    color: #E0DCD8;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.footer-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: rgba(200, 196, 192, 0.7);
    line-height: 1.8;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(200, 196, 192, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* --- Structural Grid Lines (subtle background) --- */
.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* --- Thick Structural Borders and Shadows --- */
.portfolio-cell {
    box-shadow: 4px 4px 0 rgba(74, 74, 74, 0.2);
}

/* --- Blueprint Background for Sections --- */
.portfolio-section:nth-child(odd) {
    position: relative;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__content {
        padding: 0 30px 60px 30px;
    }

    .section-header {
        padding: 30px 30px 20px 30px;
        flex-direction: column;
        gap: 8px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .site-footer {
        padding: 40px 30px;
    }

    .machinery-divider {
        padding: 30px 30px;
    }

    .grid-coords--cols {
        padding: 0 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .hero__logotype {
        font-size: clamp(36px, 12vw, 64px);
    }

    .hero__content {
        padding: 0 20px 40px 20px;
    }

    .section-header {
        padding: 24px 20px 16px 20px;
    }

    .cell-content {
        padding: 20px;
    }

    .cell-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .site-footer {
        padding: 30px 20px;
    }

    .grid-coords {
        display: none;
    }
}

/* --- Selection color --- */
::selection {
    background-color: #A06040;
    color: #E0DCD8;
}

/* --- Scrollbar (Webkit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #E0DCD8;
}

::-webkit-scrollbar-thumb {
    background: #4A4A4A;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #2A2A2A;
}
