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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #f0f0f0;
    line-height: 1.7;
    overflow-x: hidden;
}

main {
    position: relative;
    width: 100%;
}

/* Grid Overlay Background */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, #0066ff 0, #0066ff 1px, transparent 1px, transparent 50px),
        repeating-linear-gradient(90deg, #0066ff 0, #0066ff 1px, transparent 1px, transparent 50px);
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

/* Node Styling */
.node {
    position: relative;
    width: 100%;
    padding: 4rem 2rem;
    margin: 3rem auto;
    border: 1px solid #ffffff;
    background-color: #000000;
    z-index: 10;
    animation: nodeSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.node:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
    width: 95vw;
}

.node:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
    width: 92vw;
}

.node.node-1 {
    width: 98vw;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #ffffff;
    animation-delay: 0.2s;
}

.node.node-2 {
    animation-delay: 0.4s;
}

.node.node-3 {
    animation-delay: 0.6s;
    width: 88vw;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid #0066ff;
    background: linear-gradient(180deg, #0a1428 0%, #000000 100%);
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.3);
}

.node.node-4 {
    animation-delay: 0.8s;
}

.node.node-5 {
    animation-delay: 1s;
}

@keyframes nodeSlideIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Connector Lines Between Nodes */
.connector-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 80px;
    background: linear-gradient(180deg, #0066ff, #0052cc);
    bottom: -80px;
    animation: linePulse 2s ease-in-out infinite;
}

.node-3 .connector-line {
    background: linear-gradient(180deg, #0066ff, #0066ff);
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.6);
}

@keyframes linePulse {
    0%, 100% {
        opacity: 0.4;
        box-shadow: none;
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(0, 102, 255, 0.8);
    }
}

/* Node Label (Roman Numerals) */
.node-label {
    position: absolute;
    left: -80px;
    top: 2rem;
    opacity: 0.4;
    transition: opacity 0.6s ease;
}

.node-label.active {
    opacity: 1;
}

.node-roman {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #0066ff;
    letter-spacing: 0.1em;
}

/* Node Content */
.node-content {
    max-width: 65ch;
    margin: 0 auto;
    padding: 1.5rem;
}

.node-content.center-emphasis {
    text-align: center;
}

/* Nexus Hero Section */
.nexus-hero {
    position: relative;
    width: 100%;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.nexus-border-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    animation: borderPulse 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.border-line {
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
    animation: borderColorShift 0.8s ease forwards;
}

@keyframes borderColorShift {
    0% {
        stroke: #ffffff;
    }
    100% {
        stroke: #0066ff;
    }
}

@keyframes borderPulse {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.site-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-align: center;
    line-height: 1.1;
    margin: 2rem 0;
    animation: titleReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.divider-line {
    width: 200px;
    height: 2px;
    background: #0066ff;
    margin: 2rem auto;
    animation: lineDraw 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards 0.6s;
    opacity: 0;
}

@keyframes lineDraw {
    0% {
        opacity: 0;
        width: 0;
    }
    100% {
        opacity: 1;
        width: 200px;
    }
}

.nexus-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.6rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #ffffff;
    text-transform: uppercase;
    animation: subtitleFade 0.6s ease forwards 0.8s;
    opacity: 0;
}

@keyframes subtitleFade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.nexus-connector {
    width: 100%;
    max-width: 300px;
    height: 60px;
    margin: 1.5rem auto;
    animation: connectorFade 0.8s ease forwards 1s;
    opacity: 0;
}

.connector-path {
    stroke: #0066ff;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: pathDraw 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards 1.2s;
}

@keyframes pathDraw {
    0% {
        stroke-dashoffset: 200;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.connection-point {
    fill: #0066ff;
    animation: pointPulse 2s ease-in-out infinite 1.2s;
}

@keyframes pointPulse {
    0%, 100% {
        r: 3;
        opacity: 0.6;
    }
    50% {
        r: 6;
        opacity: 1;
    }
}

@keyframes connectorFade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Node Description */
.node-description {
    margin-top: 2rem;
    padding: 2rem;
    background-color: rgba(0, 102, 255, 0.05);
    border-left: 3px solid #0066ff;
    line-height: 1.8;
}

/* Node Headings */
.node-heading {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.015em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.apex-heading {
    margin-bottom: 2rem;
    color: #0066ff;
    text-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
}

/* Node Body Content */
.node-body {
    max-width: 65ch;
}

.node-body p {
    margin-bottom: 1.6em;
    font-size: clamp(0.95rem, 1.02vw, 1.1rem);
    line-height: 1.8;
}

/* Highlight Text in Electric Blue */
.highlight {
    color: #0066ff;
    font-weight: 600;
}

/* Central Hub Container */
.hub-container {
    position: relative;
    max-width: 70ch;
    margin: 0 auto;
}

.hub-graphic {
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 2rem auto;
    animation: hubRotate 20s linear infinite;
}

.hub-ring {
    stroke: #0066ff;
    stroke-width: 1;
    fill: none;
    opacity: 0.7;
}

.hub-ring.inner {
    stroke: #0066ff;
    opacity: 0.4;
}

.hub-ring.inner-most {
    stroke: #0066ff;
    opacity: 0.2;
}

.hub-core {
    fill: #0066ff;
}

.hub-spoke {
    stroke: #0066ff;
    stroke-width: 0.5;
    opacity: 0.5;
}

@keyframes hubRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Apex Text */
.apex-text {
    margin-top: 2rem;
    font-size: 1.05rem;
    line-height: 1.9;
}

.apex-text p {
    margin-bottom: 1.8em;
    color: #f0f0f0;
}

.apex-text blockquote {
    font-size: 1.3rem;
    font-style: italic;
    color: #0066ff;
    border-left: 4px solid #0066ff;
    padding-left: 1.5rem;
    margin: 2rem 0;
    line-height: 1.8;
}

/* Closing Elements */
.closing-line {
    width: 80px;
    height: 2px;
    background: #0066ff;
    margin: 2rem auto;
}

.closing-statement {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: #0066ff;
    text-align: center;
    margin-top: 2rem;
    font-weight: 700;
}

/* Fixed UI Elements */
.network-depth {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: rgba(0, 102, 255, 0.1);
    border: 1px solid #0066ff;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0066ff;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    z-index: 100;
}

.network-depth:hover {
    background-color: rgba(0, 102, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
}

.depth-value {
    display: block;
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

/* Side Annotations */
.side-annotation {
    position: fixed;
    max-width: 120px;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 50;
    pointer-events: none;
}

.side-annotation.visible {
    opacity: 1;
    pointer-events: auto;
}

.left-annotation {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.right-annotation {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.annotation-box {
    background-color: rgba(0, 102, 255, 0.1);
    border: 1px solid #0066ff;
    padding: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    animation: annotationSlide 0.6s ease;
}

@keyframes annotationSlide {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.annotation-label {
    color: #b3b3b3;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.annotation-data {
    color: #0066ff;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Chrome Accent Usage */
.chrome-accent {
    color: #c0c0c0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .node-label {
        left: -60px;
    }

    .node-roman {
        font-size: 1.8rem;
    }

    .side-annotation {
        display: none;
    }
}

@media (max-width: 768px) {
    .node {
        width: 96vw;
        margin: 2rem auto;
        padding: 2rem 1.5rem;
    }

    .node:nth-child(odd),
    .node:nth-child(even) {
        width: 96vw;
        margin-left: auto;
        margin-right: auto;
    }

    .node-label {
        position: static;
        display: inline-block;
        margin-right: 1rem;
        opacity: 0.7;
    }

    .node-heading {
        font-size: 1.6rem;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .nexus-hero {
        min-height: 40vh;
        margin-bottom: 2rem;
    }

    .hub-graphic {
        max-width: 200px;
        height: 200px;
    }

    .network-depth {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1rem;
        font-size: 0.75rem;
    }

    .apex-text blockquote {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .node {
        width: 100vw;
        margin: 1.5rem 0;
        padding: 1.5rem 1rem;
        border-width: 1px;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .nexus-subtitle {
        font-size: 0.95rem;
    }

    .node-heading {
        font-size: 1.3rem;
    }

    .node-body p {
        font-size: 0.95rem;
    }

    .apex-text blockquote {
        font-size: 1rem;
        padding-left: 1rem;
    }

    .divider-line {
        width: 100px;
    }

    .network-depth {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
        bottom: 1rem;
        right: 1rem;
    }

    .connector-line {
        height: 60px;
        bottom: -60px;
    }
}

/* Print Styles */
@media print {
    .grid-overlay,
    .network-depth,
    .side-annotation,
    .connector-line {
        display: none;
    }

    .node {
        page-break-inside: avoid;
    }
}
