* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    scrollbar-color: var(--color-primary) var(--color-surface-container-low);
    scrollbar-width: thin;
}

html {
    overflow-x: hidden;
    font-size: 16px;
    /* standard 1rem */
}

body {
    background-color: var(--color-background);
    color: var(--color-on-background);
    font-family: var(--font-family);
    /* Forces fallback to monospace if --font-body is monospace */
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* CRT Screen Flicker & Vignette */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center,
            transparent 70%,
            rgba(0, 0, 0, 0.25) 100%);
    z-index: 9998;
    pointer-events: none;
    animation: crt-flicker 0.15s infinite;
}

/*!* CRT Scanlines *!*/
/*body::after {*/
/*    content: "";*/
/*    position: fixed;*/
/*    inset: 0;*/
/*    background: repeating-linear-gradient(0deg,*/
/*            rgba(0, 0, 0, 0.3),*/
/*            rgba(0, 0, 0, 0.3) 1px,*/
/*            transparent 1px,*/
/*            transparent 3px);*/
/*    z-index: 9999;*/
/*    pointer-events: none;*/
/*    opacity: 0.6;*/
/*}*/

@keyframes crt-flicker {
    0% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.98;
    }
}

/* Typographic Hierarchy (Brutalist Variant) */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    user-select: none;
    text-transform: uppercase;
    font-weight: 900;
        line-height: 1;
}

h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    user-select: none;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(4rem, 12vw, 8rem);
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    padding: var(--spacing-lg) 0 var(--spacing-sm) 0;
    border-bottom: var(--border-thickness) solid var(--color-border);
    margin-bottom: var(--spacing-md);
    position: relative;
}


h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    padding: var(--spacing-md) 0 var(--spacing-xs) 0;
}

h4 {
    font-size: 1.25rem;
    padding: var(--spacing-sm) 0;
}

p {
    color: var(--color-on-surface);
    margin-bottom: var(--spacing-md);
}

/* Sections Grid structure */
section {
    align-items: start;
    text-align: left;
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 90vh;
    /* changed from border logic */
}

section:last-of-type {
    min-height: auto;
    /* Footer doesnt need to be 90vh */
}

a {
    text-decoration: none;
    color: var(--color-on-surface);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-primary);
}

video {
    width: 100%;
    height: auto;
    border: var(--border-thickness) solid var(--color-border);
}

img {
    width: 100%;
    height: auto;
}

.iconify {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    display: inline-block;
}

/* Scrollbar (Sharp & Mechanical) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface-container-lowest);
    border-left: 1px solid var(--color-border);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 0;
    /* Strict brutalist */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}