@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=Space+Grotesk:wght@400;500;600&family=Share+Tech+Mono&display=swap');

:root {
    --bg-main: radial-gradient(circle at 20% 20%, #07130d 0%, #030305 55%, #000000 100%);
    --primary: #0ee46d;
    --primary-soft: #7cffc9;
    --accent: #64b5f6;
    --card-bg: rgba(4, 15, 11, 0.82);
    --grid: rgba(255, 255, 255, 0.02);
    --hero-opacity: 1;
    --scatter-progress: 0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', Arial, sans-serif;
    background: var(--bg-main);
    color: #e4e4e4;
    min-height: 100vh;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(transparent 95%, rgba(255, 255, 255, 0.06) 100%),
        linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.03) 100%);
    background-size: 120px 120px;
    pointer-events: none;
    opacity: 0.25;
    z-index: 0;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 60% 10%, rgba(25, 255, 185, 0.12), transparent 40%),
        radial-gradient(circle at 10% 80%, rgba(100, 181, 246, 0.08), transparent 50%);
    filter: blur(50px);
    z-index: 0;
    pointer-events: none;
}

#matrix-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.25;
    transition: opacity 0.4s ease;
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 100px;
    z-index: 2;
    opacity: var(--hero-opacity, 1);
    transition: opacity 0.8s ease;
}

.hero-inner {
    max-width: 900px;
    width: 100%;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(14, 228, 109, 0.2);
    padding: 50px 30px;
    border-radius: 32px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 80px rgba(5, 255, 130, 0.08);
    transition: padding 0.5s ease, border-radius 0.4s ease, background 0.4s ease;
}

#hero-title {
    font-family: 'Chakra Petch', 'Share Tech Mono', 'Courier New', monospace;
    font-size: clamp(3.5rem, 10vw, 8rem);
    letter-spacing: clamp(0.4rem, 1.2vw, 1rem);
    margin: 0;
    color: var(--primary);
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(14, 228, 109, 0.8), 0 0 48px rgba(14, 228, 109, 0.55);
    opacity: calc(1 - var(--scatter-progress, 0) * 0.85);
    filter: blur(calc(var(--scatter-progress, 0) * 8px));
    transform: perspective(900px)
        rotateX(calc(var(--scroll-progress, 0) * 18deg))
        translateY(calc(var(--scroll-progress, 0) * 90px));
    transition: letter-spacing 0.4s ease,
        color 0.4s ease,
        font-size 0.4s ease,
        opacity 0.85s ease,
        filter 0.85s ease;
    position: relative;
}

#hero-title::after,
#hero-title::before {
    content: attr(aria-label);
    position: absolute;
    inset: 0;
    z-index: -1;
    color: var(--primary);
    opacity: 0.08;
    transform-origin: top;
}

#hero-title::before {
    transform: translateZ(-20px) rotateY(-8deg);
}

#hero-title::after {
    transform: translateZ(-35px) rotateY(12deg);
    opacity: 0.04;
}

#hero-title .glyph {
    display: inline-block;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1),
        opacity 1s ease,
        text-shadow 0.6s ease;
    transform: translate3d(
            calc(var(--scatter-progress, 0) * var(--drift-x, 0px)),
            calc(var(--scatter-progress, 0) * var(--drift-y, 0px)),
            0)
        rotate(calc(var(--scatter-progress, 0) * var(--spin, 0deg)));
    opacity: calc(1 - var(--scatter-progress, 0));
    text-shadow: 0 0 12px rgba(14, 228, 109, 0.5);
}

.subtitle {
    margin: 18px 0 6px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
}

.hero-scroll {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 30px;
    position: relative;
}

.hero-scroll::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 180%;
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--primary));
    transform: translateX(-50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, 10px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 25px);
    }
}

.hero.locked {
    position: sticky;
    top: 0;
    min-height: auto;
    padding: 10px 0 0;
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    align-items: flex-start;
    justify-content: center;
}

.hero.locked .hero-inner {
    margin: 0 auto;
    max-width: 900px;
    padding: 14px 25px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.75);
}

.hero.locked #hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.3rem;
    color: var(--primary-soft);
    transform: translateY(0) rotateX(0deg);
    text-shadow: 0 0 20px rgba(173, 255, 197, 0.4);
    opacity: 1;
    filter: blur(0px);
}

.hero.vanished {
    opacity: 0;
    transform: translateY(-35vh);
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
    padding: 60px 20px 120px;
}

section {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(14, 228, 109, 0.08), transparent 40%, rgba(100, 181, 246, 0.12));
    mix-blend-mode: screen;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

section > * {
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

p {
    line-height: 1.8;
    font-size: 1.05rem;
    color: rgba(228, 228, 228, 0.98);
}

.links ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.links li {
    margin: 12px 0;
    position: relative;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-soft);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.05rem;
    position: relative;
    transition: color 0.25s ease, transform 0.25s ease;
}

.links a::after {
    content: '↗';
    font-size: 0.9rem;
    opacity: 0.6;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.links a:hover {
    color: #ffffff;
    transform: translateX(6px);
}

.links a:hover::after {
    transform: translate(3px, -3px);
    opacity: 1;
}

footer {
    text-align: center;
    padding: 30px 15px 60px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.08rem;
}

@media (max-width: 600px) {
    .hero-inner {
        padding: 40px 20px;
    }

    section {
        padding: 30px 24px;
    }

    h2 {
        font-size: 1.4rem;
    }
}
