body {
    background-color: var(--clr-bg-deep);
    color: var(--clr-text-muted);
    font-family: var(--font-body);
    font-size: 16px;
    overflow-x: hidden;
    position: relative;
}

/* Logical Properties utility for text alignment */
.text-start { text-align: start; }
.text-center { text-align: center; }
.text-end { text-align: end; }

/* Responsive Media Constraints */
img, video, canvas {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--clr-text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-block-end: var(--space-2);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-block-end: var(--space-3);
    max-width: 65ch; /* Optimal reading width */
}

/* Base Wrapper */
.app-wrapper {
    position: relative;
    z-index: 10; /* Above the canvas */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--space-4);
}

/* Canvas Background */
#neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none; /* Let clicks pass through */
}

/* Utility spacing */
.section-padding {
    padding-block: var(--space-16);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--clr-bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--clr-surface-border);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--clr-secondary-dark);
}

/* --- Mobile First & Responsive Adjustments --- */
html, body {
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding-inline: 16px; /* Breathing room */
    }
    
    h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
        line-height: 1.3;
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .section-padding {
        padding-block: var(--space-8); /* Reduce huge vertical spacing on mobile */
    }
}
