/* --- Cyber Goth Punk Design Tokens --- */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: #0f0f0f;
    --text-primary: #e0e0e0;
    --text-secondary: #666666;
    --accent: #ffffff;
    --accent-alt: #cc0000;
    --border: #1a1a1a;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Subtle distressed grain overlay for punk texture. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.03;
    z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.5em;
    color: var(--text-primary);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1,
h2 {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.03);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.65rem, 3vw, 2.4rem);
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-alt);
}

a:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.social-link:focus-visible,
.card:focus-visible {
    outline: 1px solid var(--accent-alt);
    outline-offset: 2px;
}

::selection {
    background: rgba(204, 0, 0, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* --- Layout --- */
.section {
    padding-block: clamp(5rem, 10vw, 6rem);
}

.container {
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    position: relative;
    z-index: 2;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 3vw, 1.5rem);
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Cards --- */
.card {
    position: relative;
    z-index: 2;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: clamp(1.2rem, 3vw, 1.8rem);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: #333333;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.03);
}

.card-accent-left {
    border-left: 1px solid rgba(204, 0, 0, 0.45);
}

.card-accent-top {
    border-top: 1px solid rgba(204, 0, 0, 0.45);
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.78rem 1.45rem;
    border-radius: 0;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.btn-primary {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.btn-primary:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* --- Fade In --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Optional glitch heading treatment for standout moments. */
@keyframes glitchShift {
    0%,
    100% {
        transform: translate(0);
        text-shadow:
            0 0 40px rgba(255, 255, 255, 0.03),
            0 0 0 transparent;
    }
    20% {
        transform: translate(-1px, 0);
        text-shadow:
            0 0 40px rgba(255, 255, 255, 0.03),
            1px 0 0 rgba(204, 0, 0, 0.35);
    }
    40% {
        transform: translate(1px, 0);
        text-shadow:
            0 0 40px rgba(255, 255, 255, 0.03),
            -1px 0 0 rgba(255, 255, 255, 0.15);
    }
    60% {
        transform: translate(0, -1px);
    }
    80% {
        transform: translate(0, 1px);
    }
}

.glitch-text {
    animation: glitchShift 2.8s infinite steps(1, end);
    will-change: transform, text-shadow;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
    padding-inline: clamp(1rem, 4vw, 2rem);
    background-color: rgba(5, 5, 5, 0.92);
    border-bottom: 1px solid #1a1a1a;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5rem 0.35rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background: var(--accent-alt);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 2;
    background-color: #050505;
    border-top: 1px solid #1a1a1a;
    padding-block: clamp(2rem, 5vw, 3rem);
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}
