@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-dark: #050505;
    --bg-glass: rgba(20, 20, 20, 0.6);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);

    --primary: #FF9F1C;
    /* Vibrant Orange */
    --primary-glow: rgba(255, 159, 28, 0.5);
    --secondary: #CB5EEE;
    /* Electric Purple */
    --accent: #2EC4B6;
    /* Cyan */

    --text-main: #ffffff;
    --text-muted: #a0a0a0;

    --font-heading: 'Outfit', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    --glass-blur: blur(12px);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255, 159, 28, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(203, 94, 238, 0.08) 0%, transparent 25%);
    color: var(--text-main);
    font-family: var(--font-heading);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header & Nav */
header {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    position: relative;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #ffffff, #aaaaaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    animation: fadeInUp 0.8s ease-out;
}

.hero .highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Cards & Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card h2 {
    margin-top: 0;
    color: var(--primary);
}

/* Code Blocks */
pre {
    background: #0d0d10;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--card-border);
    margin-top: auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

code {
    font-family: var(--font-code);
    color: #e0e0e0;
    font-size: 0.95rem;
}

/* Playground Specifics */
.editor-layout {
    display: flex;
    gap: 1.5rem;
    height: 75vh;
    min-height: 600px;
    margin-top: 2rem;
}

.panel {
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    flex: 1;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.panel-head {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

textarea {
    background: transparent;
    border: none;
    color: #f0f0f0;
    padding: 1.5rem;
    font-family: var(--font-code);
    font-size: 1.1rem;
    line-height: 1.6;
    height: 100%;
    resize: none;
    width: 100%;
}

textarea:focus {
    outline: none;
}

#output {
    padding: 1.5rem;
    font-family: var(--font-code);
    color: var(--accent);
    font-size: 1.1rem;
    overflow-y: auto;
    white-space: pre-wrap;
}

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

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

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--card-border);
    margin-top: 6rem;
    background: rgba(5, 5, 5, 0.5);
}

/* Category Title */
.category-title {
    font-size: 2rem;
    margin-top: 5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.category-title::before {
    content: '#';
    color: var(--primary);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: 1rem;
}

.copy-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================
   Mobile Responsiveness & UI Polish
   ============================ */

/* Menu Toggle Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Active Menu Toggle Animation */
.nav-open .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-open .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Developer Section */
.dev-section {
    margin-top: 8rem;
    margin-bottom: 4rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.dev-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dev-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    text-align: left;
}

.dev-avatar-container {
    flex-shrink: 0;
    position: relative;
}

.dev-avatar-container::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    z-index: 0;
    opacity: 0.7;
    filter: blur(10px);
}

.dev-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    background: #1a1a1a;
}

.dev-details h3 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 159, 28, 0.15);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 159, 28, 0.3);
}

.bio {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile Media Query */
@media (max-width: 1024px) {
    .dev-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .social-links {
        justify-content: center;
    }


    /* Increased breakpoint to cover tablets/large phones */
    :root {
        --glass-blur: blur(12px);
        /* Keep decent blur */
    }

    /* Container adjustments */
    .container {
        padding: 1rem 1rem;
        /* Further reduced side padding */
        width: 100%;
        overflow-x: hidden;
        /* Prevent horizontal scroll on body */
    }

    .hero {
        padding: 3rem 0;
    }

    /* Typography scaling */
    .hero h1 {
        font-size: 2.2rem;
        /* Reduced to fit better */
        line-height: 1.2;
        word-wrap: break-word;
        /* Wrap long words */
    }

    .tagline {
        font-size: 1rem;
    }

    /* Grid improvements */
    .grid {
        display: flex;
        /* Flexbox is safer than Grid for preventing blowout */
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    .card {
        padding: 1.25rem;
        /* Compact padding */
        width: 100%;
        min-width: 0;
        /* Allow flex item to shrink */
        word-wrap: break-word;
        /* Ensure text wraps */
    }

    /* Code block safety */
    pre {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre;
    }

    /* Responsive Table for Docs */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        /* Less transparent for readability */
        backdrop-filter: blur(25px);
        display: flex;
        /* Ensure flex is applied */
        flex-direction: column !important;
        /* FORCE Vertical Stack */
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        /* More spacing between links */
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 9999;
        /* High z-index */
        margin: 0;
        padding: 0;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.8rem;
        /* Larger font for menu items */
        margin: 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        display: block;
        /* Ensure block behavior */
    }

    /* Staggered animation for links */
    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

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

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

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

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

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

    /* Button adjustments */
    .btn {
        width: 100%;
        /* Full width buttons on mobile */
        justify-content: center;
    }

    .hero div {
        flex-direction: column;
        width: 100%;
    }

    /* Code block scrolling */
    pre {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Playground Mobile Overhaul */
    .editor-layout {
        flex-direction: column !important;
        height: auto !important;
        gap: 2rem;
    }

    .panel {
        height: 60vh !important;
        min-height: 400px;
        flex: none;
    }
}