:root {
    --bg: #050505;
    --fg: #F0F0F0;
    --accent: #A855F7;
    --accent-bright: #D8B4FE;
    --accent-dim: rgba(168, 85, 247, 0.15);
    --surface: #0F0F0F;
    --border: #1F1F1F;
    --font-main: 'Unbounded', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Overlays */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(168, 85, 247, 0) 0%,
        rgba(168, 85, 247, 0.02) 50%,
        rgba(168, 85, 247, 0) 100%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9998;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

/* Nav */
.nav-container {
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -0.05em;
}

.logo-symbol {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent);
}

.logo-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: var(--fg);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
    letter-spacing: 0.1em;
}

.nav-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-dim);
    transform: scale(1.05);
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 8rem;
    gap: 6rem;
    position: relative;
}

.hero-content {
    flex: 1.3;
    z-index: 2;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.github-link svg {
    opacity: 0.7;
    transition: var(--transition);
}

.github-link:hover svg {
    opacity: 1;
    color: var(--accent);
}

.hero-title {
    font-size: 5.5rem;
    line-height: 0.95;
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
    perspective: 1000px;
    text-transform: uppercase;
}

.reveal-text {
    display: block;
    overflow: hidden;
    margin-bottom: -0.5rem;
}

.reveal-text span {
    display: block;
    transform: translateY(100%);
    animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
    to { transform: translateY(0); }
}

.outline {
    -webkit-text-stroke: 1px var(--fg);
    color: transparent;
    opacity: 0.6;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 580px;
    color: #999;
    margin-bottom: 3.5rem;
    font-weight: 300;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 2rem;
}

.btn-main {
    padding: 1.5rem 3rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.1em;
}

.btn-main:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3);
}

.btn-ghost {
    padding: 1.5rem 3rem;
    border: 1px solid var(--border);
    color: var(--fg);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: var(--transition);
    letter-spacing: 0.1em;
}

.btn-ghost:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
}

.hero-visual {
    flex: 0.7;
    height: 70%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Synapse Grid */
.synapse-grid {
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px solid var(--border);
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 100%);
    overflow: hidden;
}

.synapse-grid::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(rgba(168, 85, 247, 0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(168, 85, 247, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    top: -50%;
    left: -50%;
    transform: rotate(15deg);
    opacity: 0.3;
}

.node {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--border);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 3px;
    z-index: 2;
    transition: background 0.3s ease;
}

.node.n1 { top: 20%; left: 30%; }
.node.n2 { top: 40%; left: 70%; background: var(--accent); box-shadow: 0 0 20px var(--accent); }
.node.n3 { top: 70%; left: 40%; }
.node.n4 { top: 60%; left: 15%; }

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Loops Section */
.section-loops {
    padding: 12rem 8rem;
    background: var(--bg);
}

.section-header {
    margin-bottom: 8rem;
    max-width: 800px;
}

.label {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 1.5rem;
    letter-spacing: 0.3em;
}

.section-header h2 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.loop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    justify-content: center;
}

.loop-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4rem 3rem;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loop-tags {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(168, 85, 247, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.8s;
}

.loop-card:hover::after {
    transform: translateX(100%);
}

.loop-card:hover {
    border-color: var(--accent);
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.loop-card.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--surface) 0%, #151515 100%);
}

.loop-num {
    font-family: var(--font-mono);
    font-size: 5rem;
    font-weight: 900;
    color: rgba(168, 85, 247, 0.03);
    position: absolute;
    top: 1rem;
    right: 2rem;
    z-index: 0;
}

.loop-card h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.loop-card p {
    color: #888;
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.loop-tags {
    display: flex;
    gap: 0.75rem;
}

.loop-tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid var(--border);
    color: var(--accent-bright);
}

/* Security Section */
.section-security {
    padding: 12rem 8rem;
    background: linear-gradient(to bottom, var(--bg), #080808);
}

/* Vault Section */
.section-vault {
    padding: 12rem 8rem;
    background: #080808;
    border-bottom: 1px solid var(--border);
}

.vault-container {
    display: flex;
    align-items: center;
    gap: 8rem;
}

.vault-text {
    flex: 1;
}

.vault-text h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

.vault-text p {
    font-size: 1.25rem;
    color: #999;
    margin-bottom: 3rem;
    font-weight: 300;
}

.vault-features {
    list-style: none;
}

.vault-features li {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #888;
    position: relative;
    padding-left: 2rem;
}

.vault-features li::before {
    content: '◢';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
    top: 0.2rem;
}

.vault-features strong {
    color: var(--fg);
    display: block;
    margin-bottom: 0.25rem;
}

.vault-visual {
    flex: 1;
}

.folder-structure {
    background: #000;
    padding: 3rem;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    box-shadow: 20px 20px 60px rgba(0,0,0,0.5);
}

.f-item {
    margin-bottom: 1rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.f-tag {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    border: 1px solid var(--accent-dim);
    padding: 0.1rem 0.5rem;
}

/* Improve Section */
.section-improve {
    padding: 12rem 8rem;
}

.center {
    text-align: center;
    margin-bottom: 6rem;
}

.center-text {
    max-width: 700px;
    margin-inline: auto;
    font-size: 1.4rem;
    color: #999;
}

.improve-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.improve-item {
    padding: 3rem;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    transition: var(--transition);
}

.improve-item:hover {
    border-bottom-color: var(--accent);
    background: #151515;
}

.improve-item strong {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 1.5rem;
    color: var(--accent-bright);
}

.improve-item p {
    color: #777;
    line-height: 1.6;
}

.security-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.security-content h2 {
    font-size: 5rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.03em;
}

.security-content p {
    font-size: 1.6rem;
    color: #999;
    margin-bottom: 6rem;
    font-weight: 300;
    line-height: 1.5;
}

.security-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6rem;
}

.s-feat strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-bright);
    letter-spacing: -0.01em;
}

.s-feat p {
    font-size: 1.05rem;
    color: #777;
    line-height: 1.6;
}

/* Footer */
.footer {
    padding: 12rem 8rem 4rem;
    background: #080808;
    border-top: 1px solid var(--border);
}

.footer-cta {
    text-align: center;
    margin-bottom: 10rem;
}

.footer-cta h2 {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.terminal-box {
    margin-top: 4rem;
    background: #000;
    padding: 2rem 3rem;
    display: inline-flex;
    align-items: center;
    gap: 3rem;
    border: 1px solid var(--border);
    position: relative;
}

.terminal-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.terminal-box code {
    font-family: var(--font-mono);
    color: var(--accent-bright);
    font-size: 1.1rem;
}

.copy-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-dim);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.logo-small {
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: -0.05em;
}

.attribution {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.attribution a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.attribution a:hover {
    color: var(--accent-bright);
    text-shadow: 0 0 10px var(--accent-dim);
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #444;
}

/* Parallax Effect Classes */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero { padding: 0 4rem; gap: 3rem; }
    .hero-title { font-size: 5.5rem; }
    .section-loops, .section-security, .footer { padding: 10rem 4rem; }
}

@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding-top: 14rem; height: auto; padding-bottom: 10rem; }
    .hero-title { font-size: 4rem; }
    .hero-subtitle { margin-inline: auto; font-size: 1.1rem; }
    .hero-actions { flex-direction: column; gap: 1rem; }
    .hero-visual { width: 100%; height: 350px; }
    .security-features { grid-template-columns: 1fr; gap: 4rem; }
    .footer-cta h2 { font-size: 3.5rem; }
    .nav-container { padding: 1.5rem 2rem; }
    .nav-links { display: none; }
    .section-header h2 { font-size: 3rem; }
}
