:root {
    --neon-green: #00FF66;
    --deep-black: #000000;
    --dark-grey: #0a0a0a;
    --grey-accent: #1a1a1a;
    --white: #FFFFFF;
    --off-white: #E0E0E0;
    --purple-glitch: #C000FF;
    --glitch-blue: #00FFFF;
    --dim-green: rgba(0, 255, 102, 0.5);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--deep-black);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* === CRT & Scanline Effects === */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 4px, 3px 100%;
    z-index: 2000;
    pointer-events: none;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1999;
    pointer-events: none;
}

/* === Monospaced accents === */
code, pre, .hero-subtitle, .section-title, .card-icon, .filename,
.item-num, .big-cta, .project-status, .tag {
    font-family: 'Fira Code', monospace;
}

/* === Fade-in Animation === */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Navigation === */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
    transition: padding 0.3s ease, background 0.3s ease;
}

nav.nav-scrolled {
    background: rgba(0, 0, 0, 0.95);
    border-bottom-color: rgba(0, 255, 102, 0.35);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    height: 45px;
    display: block;
    filter: drop-shadow(0 0 8px var(--neon-green));
    image-rendering: pixelated;
    mix-blend-mode: screen;
}

.logo-small {
    height: 32px;
    filter: drop-shadow(0 0 6px var(--neon-green));
    opacity: 0.6;
}

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

.nav-links a {
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--neon-green);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--neon-green);
    color: var(--deep-black) !important;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}

.cta-button::after {
    display: none !important;
}

.cta-button:hover {
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.6);
}

/* === Hamburger Menu === */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neon-green);
    margin: 5px 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 4px var(--neon-green);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

/* === Hero Section === */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.glitch-text {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    text-transform: lowercase;
    color: var(--white);
    letter-spacing: -4px;
    position: relative;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.3);
}

/* Advanced Glitch Effect */
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--purple-glitch);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--glitch-blue);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(62px, 9999px, 4px, 0); }
    40% { clip: rect(16px, 9999px, 82px, 0); }
    60% { clip: rect(88px, 9999px, 21px, 0); }
    80% { clip: rect(5px, 9999px, 66px, 0); }
    100% { clip: rect(44px, 9999px, 56px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(12px, 9999px, 33px, 0); }
    20% { clip: rect(81px, 9999px, 10px, 0); }
    40% { clip: rect(45px, 9999px, 77px, 0); }
    60% { clip: rect(2px, 9999px, 55px, 0); }
    80% { clip: rect(67px, 9999px, 12px, 0); }
    100% { clip: rect(34px, 9999px, 91px, 0); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--neon-green);
    margin-bottom: 3rem;
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
    min-height: 2rem;
}

/* Blinking cursor */
.cursor {
    animation: blink-cursor 0.8s step-end infinite;
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
}

@keyframes blink-cursor {
    50% { opacity: 0; }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--neon-green), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: inline-block;
}

.primary-btn {
    background: var(--neon-green);
    color: var(--deep-black);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.primary-btn:hover {
    background: var(--white);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

.secondary-btn {
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    background: transparent;
}

.secondary-btn:hover {
    background: rgba(0, 255, 102, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.2);
}

.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 102, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 102, 0.07) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    animation: grid-move 20s linear infinite;
    transition: background-color 0.3s ease;
}

.hero:hover .hero-bg-grid {
    background-color: rgba(0, 255, 102, 0.05);
}

@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* === Sections === */
.section {
    padding: 120px 2rem;
    position: relative;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 4rem;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.bg-dark {
    background-color: var(--dark-grey);
}

.highlight {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--neon-green);
}

/* === About Section === */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.about-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--off-white);
}

.about-code {
    background: #050505;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 102, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.code-header {
    background: #111;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.filename {
    margin-left: 10px;
    font-size: 0.75rem;
    color: #888;
}

.about-code pre {
    padding: 2rem;
    font-size: 0.85rem;
    overflow-x: auto;
    line-height: 1.7;
}

/* Syntax highlighting */
.syn-kw { color: #ff79c6; }
.syn-comment { color: #6272a4; font-style: italic; }
.syn-fn { color: #50fa7b; }
.syn-var { color: #8be9fd; }
.syn-str { color: #f1fa8c; }
.syn-builtin { color: #ffb86c; }

/* === Projects Section === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--deep-black);
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    border-color: rgba(0, 255, 102, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 255, 102, 0.08);
}

.project-card:hover::before {
    opacity: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon {
    font-size: 2rem;
}

.project-status {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    letter-spacing: 1px;
    font-weight: bold;
}

.status-active {
    background: rgba(0, 255, 102, 0.15);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 102, 0.3);
}

.status-building {
    background: rgba(255, 189, 46, 0.15);
    color: #ffbd2e;
    border: 1px solid rgba(255, 189, 46, 0.3);
}

.status-live {
    background: rgba(0, 255, 255, 0.15);
    color: var(--glitch-blue);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-desc {
    color: var(--off-white);
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid rgba(0, 255, 102, 0.2);
    color: var(--dim-green);
    border-radius: 2px;
    letter-spacing: 0.5px;
}

/* === Manifesto Section === */
.manifesto-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.manifesto-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    border-left: 2px solid var(--neon-green);
    background: rgba(0, 255, 102, 0.02);
    transition: all 0.3s ease;
}

.manifesto-item:hover {
    background: rgba(0, 255, 102, 0.05);
    transform: translateX(10px);
}

.item-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--neon-green);
    opacity: 0.5;
    flex-shrink: 0;
}

.manifesto-item p {
    font-size: 1.15rem;
    color: var(--off-white);
}

/* === Contact Section === */
.text-center {
    text-align: center;
}

.contact-lead {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: var(--off-white);
}

.contact-box {
    display: inline-block;
    padding: 2.5rem 4rem;
    background: rgba(0, 255, 102, 0.05);
    border: 1px solid var(--neon-green);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.1);
}

.big-cta {
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    color: var(--neon-green);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.big-cta:hover {
    color: var(--white);
    text-shadow: 0 0 20px var(--neon-green);
    transform: scale(1.02);
}

.contact-sub {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

/* === Footer === */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--deep-black);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--neon-green);
}

/* === Mouse Glow === */
.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 102, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 2;
    mix-blend-mode: screen;
}

/* === Selection === */
::selection {
    background: rgba(0, 255, 102, 0.3);
    color: var(--white);
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--deep-black);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 102, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 102, 0.5);
}

/* === Coming Soon Page === */
.soon-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.soon-logo {
    height: 80px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 12px var(--neon-green));
    image-rendering: pixelated;
    mix-blend-mode: screen;
}

.soon-subtitle {
    font-family: 'Fira Code', monospace;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--neon-green);
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
    min-height: 2rem;
    margin-bottom: 2.5rem;
}

.soon-status {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: rgba(0, 255, 102, 0.6);
    margin-bottom: 3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse-dot 2s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-green); }
    50% { opacity: 0.4; box-shadow: 0 0 4px var(--neon-green); }
}

.status-sep {
    margin: 0 0.8rem;
    opacity: 0.3;
}

.soon-code {
    background: #050505;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 102, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin-bottom: 3rem;
}

.soon-code pre {
    padding: 1.5rem;
    font-size: 0.8rem;
    overflow-x: auto;
    line-height: 1.7;
    text-align: left;
}

.soon-contact {
    text-align: center;
}

/* === Responsive === */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        gap: 2.5rem;
        transition: right 0.3s ease;
        border-left: 1px solid rgba(0, 255, 102, 0.2);
        z-index: 999;
    }

    .nav-links.mobile-open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .hero-subtitle {
        min-height: 3rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .section-title {
        margin-bottom: 3rem;
    }

    .manifesto-container {
        grid-template-columns: 1fr;
    }

    .contact-box {
        padding: 2rem;
    }

    .section {
        padding: 80px 1.5rem;
    }

    .about-text p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo {
        height: 35px;
    }

    .project-card {
        padding: 2rem 1.5rem;
    }
}