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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --status-wip: #ffaa00;
    --status-beta: #00aaff;
    --status-production: #00ff88;
    --border: #2a2a2a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.binary-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--binary-height, 100vh);
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.binary-particle {
    position: absolute;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 600;
    font-size: var(--size, 13px);
    color: rgba(0, 255, 136, 0.34);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.42);
    opacity: 0;
    transform: scale(0.9);
    animation: binary-fade var(--dur, 7s) ease-in-out forwards;
}

@keyframes binary-fade {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    20% {
        opacity: var(--peak, 0.38);
    }
    72% {
        opacity: calc(var(--peak, 0.38) * 0.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.04);
    }
}

/* ASCII Art Section */
.ascii-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
}

.ascii-art {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.45rem;
    line-height: 1.4;
    color: var(--accent);
    text-align: left;
    white-space: pre;
    text-shadow: 0 0 8px var(--accent-dim);
    animation: glow 1.15s ease-in-out infinite alternate;
    letter-spacing: 0;
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    .ascii-art:hover {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M7 9c2-2 5-2 7 0h4c2-2 5-2 7 0s2 5 0 7c2 2 2 5 0 7s-5 2-7 0h-4c-2 2-5 2-7 0s-2-5 0-7c-2-2-2-5 0-7z' fill='%23f5efe0' stroke='%23161616' stroke-width='1.5'/%3E%3C/svg%3E") 4 4, pointer;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 4px var(--accent-dim), 0 0 10px var(--accent-dim), 0 0 16px rgba(0, 255, 136, 0.35);
        filter: brightness(1);
    }
    to {
        text-shadow: 0 0 14px var(--accent), 0 0 30px var(--accent), 0 0 58px rgba(0, 255, 136, 0.9);
        filter: brightness(1.3) saturate(1.15);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0 4rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-dim);
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.hero-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.05);
}

/* Projects Section */
.projects {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-dim);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

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

/* Carousel wrapper */
.projects-carousel {
    position: relative;
    width: 100%;
    padding: 1rem 0;
}

.projects-scroll-wrapper {
    overflow-x: clip;
    overflow-y: visible;
    width: 100%;
    position: relative;
    padding: 1rem 0;
}

.projects-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.4s ease;
}

/* Navigation arrows */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.carousel-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 136, 0.05);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

/* Dots navigation */
.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-dim);
}

.carousel-dot:hover:not(.active) {
    background: var(--text-secondary);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
}

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

.project-card:hover {
    border-color: var(--accent);
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

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

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

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

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.project-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.05);
}

.project-link svg {
    flex-shrink: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .ascii-art {
        font-size: 0.38rem;
        letter-spacing: 0;
    }

    .name {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .project-card {
        padding: 1.25rem;
        width: 260px;
    }

    .projects-track {
        gap: 1rem;
    }
}

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

    .ascii-art {
        font-size: 0.25rem;
        letter-spacing: 0;
    }

    .name {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    .projects-carousel {
        width: 100%;
    }

    .projects-scroll-wrapper {
        padding: 0.5rem 0;
        overflow-x: clip;
        overflow-y: visible;
    }

    .project-card {
        width: calc(100vw - 2rem);
        max-width: 320px;
        flex-shrink: 0;
    }

    .projects-track {
        gap: 1rem;
    }

    .project-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .status {
        align-self: flex-start;
    }
}

/* Selection styles */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

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