/* RESET & VARIABLES */
:root {
    --bg-color: #0a0a0f;
    --bg-surface: #111118;
    --bg-surface-light: #181922;
    --bg-hover: #1e1e2c;
    --text-main: #f0f0f5;
    --text-muted: #a0a0b0;

    --neon-green: #00ff88;
    --neon-blue: #4da6ff;
    --gold: #ffd700;
    --red: #ff4757;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

footer {
    position: relative;
    z-index: 1;
}

/* AMBIENT VIDEO BACKGROUND */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
}

/* TERMINAL GRID BACKGROUND */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-mono);
    color: var(--neon-green);
    font-size: 2rem;
    margin-bottom: 3rem;
    display: inline-block;
    border-bottom: 2px solid var(--neon-blue);
    padding-bottom: 0.5rem;
}

/* TYPOGRAPHY UTILS */
h1,
h2,
h3 {
    font-family: var(--font-heading);
}

.text-sm {
    font-size: 0.875rem;
}

/* ANIMATION UTILS */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: transparent;
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: inset 0 0 0 0 var(--neon-green);
}

.btn-primary:hover {
    box-shadow: inset 0 4rem 0 0 var(--neon-green);
    color: var(--bg-color);
}

.btn-secondary {
    background: var(--bg-surface-light);
    color: var(--text-main);
    border: 1px solid var(--bg-hover);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--neon-blue);
    border-color: var(--neon-blue);
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand span {
    color: var(--neon-green);
    font-weight: 700;
}

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

.nav-link {
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.nav-link.active {
    color: var(--neon-green);
    border-bottom: 1px solid var(--neon-green);
    padding-bottom: 2px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.hamburger .bar {
    width: 25px;
    height: 2px;
    background-color: var(--neon-green);
    transition: var(--transition);
}

/* HERO / DASHBOARD */
.grid-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding-top: 40px;
}

.terminal-header {
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: var(--red);
}

.dot.gold {
    background-color: var(--gold);
}

.dot.green {
    background-color: var(--neon-green);
}

.terminal-title {
    margin-left: max(0.5rem, auto);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    background: var(--bg-surface-light);
    padding: 2.5rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cmd {
    font-family: var(--font-mono);
    color: var(--neon-blue);
    margin-bottom: 1rem;
}

.cmd::before {
    content: '> ';
    color: var(--neon-green);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--neon-blue);
    margin-bottom: 1.5rem;
}

.cursor-blink {
    display: inline-block;
    color: var(--neon-green);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    font-weight: 400;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* STATS */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.05);
}

.stat-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
}

.stat-value .live-badge {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* TECH STACK */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card:hover {
    border-color: rgba(77, 166, 255, 0.3);
    box-shadow: 0 0 20px rgba(77, 166, 255, 0.08);
    transform: translateY(-2px);
    transition: var(--transition);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.skill-name {
    color: var(--neon-blue);
    font-weight: 700;
}

.skill-pct {
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-green));
    border-radius: 4px;
    width: 0;
    /* Animated via JS */
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(77, 166, 255, 0.3);
    box-shadow: 0 10px 30px rgba(77, 166, 255, 0.05);
}

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

.project-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.project-title {
    font-size: 1.5rem;
    color: var(--text-main);
}

.badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 700;
}

.badge.public {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
}

.badge.private {
    background: rgba(255, 71, 87, 0.1);
    color: var(--red);
}

.badge.in-dev {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }
}

.badge.live {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
    animation: pulseGlow 2s infinite;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-blue);
    background: rgba(77, 166, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.project-links {
    display: flex;
    align-items: center;
}

.repo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: var(--transition);
}

.repo-link:hover {
    color: var(--neon-green);
}

.project-links .repo-link+.repo-link {
    margin-left: 1rem;
}

.repo-link.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    text-decoration: none;
}

.github-cta {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

/* ABOUT */
.grid-about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-text strong {
    color: var(--text-main);
}

.lang-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.about-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.avatar {
    width: 100%;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    filter: grayscale(20%) contrast(1.1);
    transition: var(--transition);
}

.about-image:hover .avatar {
    filter: grayscale(0) contrast(1);
    transform: scale(1.02);
}

/* CONTACT */
.contact-card {
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.contact-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--bg-surface-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    transition: var(--transition);
}

.contact-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-btn:hover svg {
    color: var(--neon-green);
}

.contact-btn.linkedin:hover svg {
    color: var(--neon-blue);
}

.contact-btn.github:hover svg {
    color: var(--text-main);
}

/* FOOTER */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

/* RESPONSIVE */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

@media (max-width: 992px) {
    .grid-hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .grid-about {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

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

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-surface);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transition: 0.4s ease-in-out;
    }

    .nav-links.active {
        left: 0;
    }

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

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    #bg-video {
        display: none;
    }

    .contact-links {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }
}