/* ---------------------------------------------------------
   holos.dev — generative + bauhaus
   Palette:
     #f8f4f0 canvas (off-white warm)
     #1a1816 ink   (near-black warm)
     #4a3aff node primary (electric indigo)
     #2ec4b6 node secondary (soft teal)
     #b4aea4 edge line (light graphite)
     #1a1e24 terminal bg
     #a8e6cf terminal text
     #e07a5f accent warm (muted coral)
   Fonts: Space Grotesk, IBM Plex Sans, IBM Plex Mono
--------------------------------------------------------- */

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f8f4f0;
    color: #1a1816;
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
    min-height: 100vh;
    background-image:
        repeating-linear-gradient(0deg,
            rgba(26, 24, 22, 0.03) 0px,
            rgba(26, 24, 22, 0.03) 1px,
            transparent 1px,
            transparent 60px),
        repeating-linear-gradient(90deg,
            rgba(26, 24, 22, 0.03) 0px,
            rgba(26, 24, 22, 0.03) 1px,
            transparent 1px,
            transparent 60px);
}

.grid-ghost {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ---------------- Navigation ---------------- */
.nav-mark {
    position: fixed;
    top: 28px;
    left: 36px;
    z-index: 100;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.42em;
    color: #1a1816;
    text-decoration: none;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, letter-spacing 0.4s ease;
}

.nav-mark::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 12px;
    background: #4a3aff;
    border-radius: 50%;
    vertical-align: middle;
    transform: translateY(-1px);
    animation: pulse 3.4s ease-in-out infinite;
}

.nav-mark:hover {
    border-bottom-color: #1a1816;
    letter-spacing: 0.5em;
}

@keyframes pulse {
    0%, 100% { opacity: 0.85; transform: translateY(-1px) scale(1); }
    50%      { opacity: 0.35; transform: translateY(-1px) scale(0.85); }
}

/* ---------------- Hero (65/35 split) ---------------- */
main {
    position: relative;
    z-index: 1;
}

.hero {
    display: grid;
    grid-template-columns: 65fr 35fr;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.hero-negative {
    position: relative;
    padding: 12vh 6vw 8vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: end;
    border-right: 1px solid rgba(26, 24, 22, 0.08);
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #b4aea4;
    text-transform: uppercase;
    align-self: start;
    margin-top: 4vh;
}

.meta-line {
    display: block;
}

.hero-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #1a1816;
    margin-top: auto;
    margin-bottom: 0.4em;
    align-self: end;
}

.hero-tag {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1a1816;
    max-width: 28em;
    opacity: 0.75;
    padding-left: 4px;
    border-left: 1px solid #1a1816;
    padding-left: 14px;
}

.hero-canvas-wrap {
    position: relative;
    overflow: hidden;
    background: #f8f4f0;
}

.node-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.node-network circle {
    will-change: transform;
}

.node-network line {
    transition: opacity 0.5s ease;
}

/* Bauhaus geometric markers */
.bauhaus-marker {
    position: absolute;
    pointer-events: none;
}

.marker-circle {
    width: 18px;
    height: 18px;
    border: 1px solid #4a3aff;
    border-radius: 50%;
    bottom: 14vh;
    left: 6vw;
}

.marker-triangle {
    width: 18px;
    height: 16px;
    background: transparent;
    border: none;
    position: absolute;
    top: 28vh;
    right: 7vw;
}
.marker-triangle::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top right, transparent calc(50% - 0.5px), #2ec4b6 calc(50% - 0.5px), #2ec4b6 calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        linear-gradient(to top left, transparent calc(50% - 0.5px), #2ec4b6 calc(50% - 0.5px), #2ec4b6 calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        linear-gradient(#2ec4b6, #2ec4b6);
    background-size: 50% 100%, 50% 100%, 100% 1px;
    background-position: 0 0, 100% 0, 0 100%;
    background-repeat: no-repeat;
}

.marker-square {
    width: 16px;
    height: 16px;
    border: 1px solid #1a1816;
    top: 8vh;
    left: 8%;
}

.marker-diamond {
    width: 14px;
    height: 14px;
    border: 1px solid #e07a5f;
    transform: rotate(45deg);
    bottom: 14vh;
    right: 12%;
}

/* ---------------- Breathing Zones ---------------- */
.breathing-zone {
    height: 30vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 6vw;
    position: relative;
}

.breathing-line {
    display: block;
    height: 1px;
    width: 0;
    background: rgba(26, 24, 22, 0.2);
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.breathing-zone.is-visible .breathing-line {
    width: 100%;
}

/* ---------------- Content Sections (broken-grid) ---------------- */
.content-section {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(60px, auto);
    column-gap: 24px;
    row-gap: 32px;
    padding: 15vh 6vw;
    min-height: 80vh;
    position: relative;
}

.section-index {
    grid-column: 1 / 3;
    grid-row: 1;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: #b4aea4;
    text-transform: uppercase;
    padding-top: 4px;
    border-top: 1px solid #b4aea4;
    width: fit-content;
    min-width: 60px;
}

.content-block {
    position: relative;
}

.block-heading {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 3.4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #1a1816;
    margin-bottom: 0.8em;
}

.block-body {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1816;
    max-width: 28em;
}

.block-body + .block-body {
    margin-top: 1.4em;
}

.block-body-meta {
    color: #b4aea4;
    font-size: 0.92rem;
}

.kicker {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #4a3aff;
}

.link-inline {
    color: #1a1816;
    text-decoration: none;
    border-bottom: 1px solid #4a3aff;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.link-inline:hover {
    color: #4a3aff;
    border-color: #1a1816;
}

/* Section 01 broken-grid placement */
#what .block-a {
    grid-column: 2 / 7;
    grid-row: 2;
}
#what .block-b {
    grid-column: 8 / 12;
    grid-row: 3;
    align-self: start;
    padding-top: 4vh;
}

/* Section 02 */
#principles .block-c {
    grid-column: 3 / 7;
    grid-row: 2;
}
#principles .block-d {
    grid-column: 6 / 11;
    grid-row: 3;
}
#principles .block-e {
    grid-column: 11 / 13;
    grid-row: 2 / 4;
    position: relative;
}

.principle-list {
    list-style: none;
    counter-reset: principle;
}

.principle-list li {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: start;
    padding: 1.4em 0;
    border-bottom: 1px solid rgba(26, 24, 22, 0.08);
}

.principle-list li:last-child {
    border-bottom: none;
}

.p-num {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    color: #4a3aff;
    letter-spacing: 0.06em;
    padding-top: 2px;
}

.p-text {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #1a1816;
    max-width: 32em;
}

.p-text strong {
    font-weight: 500;
    color: #1a1816;
}

.static-circle {
    width: 22px;
    height: 22px;
    border: 1px solid #4a3aff;
    border-radius: 50%;
    position: absolute;
    top: 0;
    right: 0;
}

.static-diamond {
    width: 14px;
    height: 14px;
    border: 1px solid #e07a5f;
    transform: rotate(45deg);
    position: absolute;
    bottom: 8vh;
    right: 8px;
}

/* Section 03 */
#topology .block-f {
    grid-column: 6 / 11;
    grid-row: 2;
}
#topology .block-g {
    grid-column: 2 / 6;
    grid-row: 3;
    padding-top: 6vh;
}

/* Section 04 */
#notes .block-h {
    grid-column: 2 / 7;
    grid-row: 2;
}
#notes .block-i {
    grid-column: 8 / 12;
    grid-row: 3;
}

/* Diagrams */
.diagram {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3 / 2;
}
.diagram svg {
    width: 100%;
    height: 100%;
    display: block;
}

.data-list {
    border-top: 1px solid #1a1816;
    border-bottom: 1px solid #1a1816;
    padding: 4px 0;
}

.data-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(26, 24, 22, 0.08);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
}

.data-row:last-child {
    border-bottom: none;
}

.data-key {
    color: #b4aea4;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.data-val {
    color: #1a1816;
}

/* ---------------- Terminal ---------------- */
.terminal {
    width: 100%;
    padding: 10vh 6vw 14vh;
    background: transparent;
    display: flex;
    justify-content: center;
}

.terminal-window {
    width: 100%;
    max-width: 760px;
    background: #1a1e24;
    color: #a8e6cf;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(26, 24, 22, 0.35);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b4aea4;
    opacity: 0.4;
}

.terminal-dot:nth-child(1) { background: #e07a5f; }
.terminal-dot:nth-child(2) { background: #b4aea4; }
.terminal-dot:nth-child(3) { background: #2ec4b6; }

.terminal-title {
    margin-left: auto;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.06em;
}

.terminal-body {
    padding: 28px 28px 36px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    line-height: 1.8;
}

.terminal-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: #2ec4b6;
}

.terminal-code {
    color: #a8e6cf;
    white-space: pre;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #a8e6cf;
    margin-left: 4px;
    transform: translateY(2px);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50%   { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* ---------------- Footer ---------------- */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4vh 6vw 6vh;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: #b4aea4;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-top: 1px solid rgba(26, 24, 22, 0.08);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: 35vh 1fr;
    }
    .hero-negative {
        order: 2;
        padding: 8vh 6vw;
        border-right: none;
        border-top: 1px solid rgba(26, 24, 22, 0.08);
    }
    .hero-canvas-wrap {
        order: 1;
        min-height: 35vh;
    }

    .content-section {
        padding: 10vh 6vw;
    }

    .section-index {
        grid-column: 1 / 4;
    }
    #what .block-a,
    #what .block-b,
    #principles .block-c,
    #principles .block-d,
    #principles .block-e,
    #topology .block-f,
    #topology .block-g,
    #notes .block-h,
    #notes .block-i {
        grid-column: 1 / 13;
        grid-row: auto;
    }
}
