:root {
    --bg-color: #0f172a;
    /* slate-900 */
    --text-color: #f8fafc;
    /* slate-50 */
    --accent-red: #dc2626;
    --accent-orange: #ea580c;
    --accent-blue: #2563eb;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-display: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #ff4d4d, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-orange));
    color: white;
    box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 35px -5px rgba(220, 38, 38, 0.6);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    background: rgba(15, 17, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    z-index: 1001;
    /* Should be lower than sidebar (2000) */
}

.logo img {
    height: 40px;
    width: auto;
}

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

.nav-links a:not(.btn):hover {
    color: var(--accent-red);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

.close-menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 6rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0f172a 100%);
}

.hero-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
    pointer-events: none;
}

@keyframes grid-move {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    z-index: 10;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.2);
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

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

/* Features Section */
.features {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-red);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #94a3b8;
}

/* Tech Stack Strip */
.tech-stack {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.tech-icons {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    opacity: 0.7;
}

.tech-item {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Developer / Footer */
footer {
    padding: 4rem 0 2rem;
    background: #0f111a;
    border-top: 1px solid var(--glass-border);
    color: #94a3b8;
    text-align: center;
}

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

.dev-info {
    font-size: 1.1rem;
}

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

.links a:hover {
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        padding: 0.5rem;
        transition: transform 0.2s;
    }

    .mobile-menu-btn:active {
        transform: scale(0.95);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        max-width: 320px;
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 17, 26, 0.99) 100%);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 6rem;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
        /* Sidebar higher than logo/btn (1001) */
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.7);
    }

    .nav-links::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 2px;
        height: 100%;
        background: linear-gradient(to bottom, var(--accent-red), var(--accent-orange), transparent);
        opacity: 0.5;
    }

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

    /* Close Button */
    .close-menu-btn {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .close-menu-btn:hover {
        background: rgba(220, 38, 38, 0.2);
        border-color: var(--accent-red);
        transform: rotate(90deg);
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 800;
        font-family: var(--font-display);
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0.5rem 2rem;
        width: 100%;
        text-align: right;
        border-right: 3px solid transparent;
        transition: all 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a:focus {
        color: white;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03));
        border-right-color: var(--accent-red);
        padding-right: 2.5rem;
    }

    .nav-links .btn {
        width: auto;
        margin: 1rem 2rem 0 auto;
        /* Right align button too */
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .nav-links.active a {
        animation: slideInRight 0.5s ease forwards;
        opacity: 0;
        transform: translateX(20px);
    }

    .nav-links.active a:nth-child(2) {
        animation-delay: 0.1s;
    }

    .nav-links.active a:nth-child(3) {
        animation-delay: 0.2s;
    }

    .nav-links.active a:nth-child(4) {
        animation-delay: 0.3s;
    }

    .nav-links.active a:nth-child(5) {
        animation-delay: 0.4s;
    }

    @keyframes slideInRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Overlay for checking clicks outside */
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }

    body.menu-open .menu-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    /* Adjust page content when menu is open to prevent scrolling */
    body.menu-open {
        overflow: hidden;
    }

    .hero h1 {
        font-size: 2.75rem;
        padding: 0 0.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 2rem;
    }

    .btn {
        width: 100%;
    }

    .features {
        padding: 4rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .tech-icons {
        gap: 1.5rem;
        flex-direction: column;
    }

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