:root {
    --bg: #0a0a0a;
    --text: #e8e8e8;
    --text-dim: #666;
    --accent: #00ff88;
    --accent-dim: #00ff8833;
    --card-bg: #111;
    --border: #222;
    --font-main: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

/* NAV */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 100;
    background: var(--bg);
}

.logo-glitch {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
}

.logo-glitch::before,
.logo-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.logo-glitch:hover::before {
    animation: glitch-1 0.3s linear;
    color: var(--accent);
    opacity: 0.8;
}

.logo-glitch:hover::after {
    animation: glitch-2 0.3s linear;
    color: #ff0055;
    opacity: 0.8;
}

@keyframes glitch-1 {
    0% { transform: translate(0); opacity: 0; }
    20% { transform: translate(-2px, 2px); opacity: 0.8; }
    40% { transform: translate(2px, -2px); opacity: 0.8; }
    60% { transform: translate(-1px, 1px); opacity: 0.8; }
    80% { transform: translate(1px, -1px); opacity: 0.8; }
    100% { transform: translate(0); opacity: 0; }
}

@keyframes glitch-2 {
    0% { transform: translate(0); opacity: 0; }
    20% { transform: translate(2px, -2px); opacity: 0.8; }
    40% { transform: translate(-2px, 2px); opacity: 0.8; }
    60% { transform: translate(1px, -1px); opacity: 0.8; }
    80% { transform: translate(-1px, 1px); opacity: 0.8; }
    100% { transform: translate(0); opacity: 0; }
}

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

.nav-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

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

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

/* HERO */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.glitch-slice {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    pointer-events: none;
    transform: translateX(0);
    mix-blend-mode: screen;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
}

.hero-title .line-1 {
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-title .line-2 {
    animation: fadeUp 0.8s ease forwards 0.6s;
    color: var(--accent);
}

.hero-title .line-3 {
    animation: fadeUp 0.8s ease forwards 0.8s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-meta {
    margin-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 1s;
}

.separator {
    margin: 0 0.75rem;
}

/* SECTIONS */
section {
    padding: 4rem 2rem;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ABOUT */
.about-content {
    max-width: 700px;
}

.about-text {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--text-dim);
}

.highlight {
    color: var(--text);
    font-weight: 500;
}

/* PROJECTS */
.project-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    position: relative;
    transition: border-color 0.3s ease;
}

.project-card::before {
    content: attr(data-number);
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
}

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

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

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.project-description {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.project-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 2px;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text);
    transition: color 0.3s;
    margin-top: 0.25rem;
}

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

/* SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.service-item {
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.service-item:hover {
    border-color: var(--accent);
}

.service-number {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent);
    display: block;
    margin-bottom: 0.75rem;
}

.service-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* CONTACT */
.contact {
    text-align: center;
    padding: 5rem 2rem;
}

.contact-title {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.contact-title .word {
    display: inline-block;
    position: relative;
    transition: transform 0.1s;
}

.contact-title .word.glitching {
    animation: wordGlitch 0.15s linear;
}

@keyframes wordGlitch {
    0% { transform: translate(0); opacity: 1; }
    25% { transform: translate(-2px, 1px); opacity: 0.8; }
    50% { transform: translate(2px, -1px); opacity: 0.9; }
    75% { transform: translate(-1px, 0); opacity: 0.85; }
    100% { transform: translate(0); opacity: 1; }
}

.accent {
    color: var(--accent);
}

.contact-email {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.2rem;
    transition: all 0.3s;
    display: inline-block;
    margin-bottom: 2rem;
}

.contact-email:hover {
    color: var(--accent);
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.social-link {
    transition: color 0.3s;
    position: relative;
    display: inline-block;
}

.social-link:hover {
    color: var(--accent);
    animation: glitchText 0.3s linear;
}

@keyframes glitchText {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 0); }
    100% { transform: translate(0); }
}

/* FOOTER */
.footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo-link {
    display: inline-block;
}

.footer-logo {
    height: 42px;
    width: auto;
}

.footer-year {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    cursor: default;
}

.footer-year:hover {
    animation: glitchText 0.3s linear;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
        min-height: 70vh;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .separator {
        display: none;
    }

    .contact {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* SCROLL ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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