:root {
    --bg-deep: #030712;
    --bg-surface: rgba(17, 24, 39, 0.7);
    --primary: #8b5cf6;
    --primary-bright: #a78bfa;
    --secondary: #ec4899;
    --accent: #22d3ee;
    --success: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Custom cursor implementation */
}

::-webkit-scrollbar {
    width: 6px;
}

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

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Advanced Background */
.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(34, 211, 238, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Header & Nav */
nav {
    height: 100px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.scrolled {
    height: 70px;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-claw {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--neon-glow);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 99px;
    color: var(--primary-bright);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s backwards;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -3px;
    animation: fadeInUp 1s 0.2s backwards;
}

.text-gradient {
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-neon {
    color: var(--primary-bright);
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 3rem;
    animation: fadeInUp 1s 0.4s backwards;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeInUp 1s 0.6s backwards;
}

.btn-premium {
    position: relative;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 16px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.btn-filled {
    background: var(--primary);
    color: white;
    box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.5);
}

.btn-filled:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 30px 60px -10px rgba(139, 92, 246, 0.6);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Phase Navigation */
.phase-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 5rem 0;
    flex-wrap: wrap;
}

.phase-pill {
    padding: 12px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.phase-pill:hover,
.phase-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

/* Steps Grid */
.doc-section {
    padding: 100px 0;
}

.section-head {
    margin-bottom: 5rem;
    text-align: center;
}

.section-head h2 {
    font-size: 3rem;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.step-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 1.5rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card:hover {
    transform: translateY(-20px) rotateX(5deg) rotateY(-5deg);
    border-color: var(--primary-bright);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
}

.step-visual {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
    margin-bottom: 2rem;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.8s ease;
}

.step-card:hover .step-visual img {
    transform: scale(1.1);
}

.step-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.step-id {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--primary-bright);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 12px;
    border-radius: 8px;
}

.step-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.terminal-box {
    background: #000;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

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

.dot-r {
    background: #ff5f56;
}

.dot-y {
    background: #ffbd2e;
}

.dot-g {
    background: #27c93f;
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--accent);
    font-size: 0.9rem;
    word-break: break-all;
}

/* Gallery - Masonry Look */
.gallery-section {
    padding: 100px 0;
    background: rgba(139, 92, 246, 0.02);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    aspect-ratio: 1;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.5) contrast(1.1);
    transition: all 0.5s ease;
}

.gallery-card:hover {
    transform: scale(1.05) translateY(-10px);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.gallery-card:hover img {
    filter: grayscale(0) contrast(1);
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--primary-bright);
}

/* Footer */
footer {
    padding: 100px 0 50px;
    text-align: center;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 2rem;
}

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

.link-group h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 0.8rem;
}

.link-group a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: var(--primary-bright);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Attribution Header */
.attribution-header {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.attribution-header a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.attribution-header a:hover {
    color: var(--primary-bright);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Scroll Reveal Tweaks */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Floating Shapes */
.shape {
    position: absolute;
    z-index: -1;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.3;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -300px;
    left: -300px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: 20%;
    right: -200px;
}

/* Detailed Steps Layout */
.steps-detailed {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-item {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s ease;
}

.step-item:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.step-visual-mini {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-visual-mini img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.step-item:hover .step-visual-mini img {
    transform: scale(1.05);
}

.step-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-bright);
}

.step-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .step-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    nav {
        height: 80px;
    }

    .nav-links {
        display: none;
    }

    .footer-main {
        flex-direction: column;
        gap: 40px;
    }
}

/* Lightbox Premium Styling */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    width: 90%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.lightbox-content:active {
    cursor: grabbing;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    z-index: 2001;
}

.lightbox-close:hover {
    color: var(--secondary);
    transform: rotate(90deg);
}

.lightbox-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    z-index: 2001;
}

.lightbox-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: bold;
}

.lightbox-controls button:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 100px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    pointer-events: none;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2100;
}

.lightbox-arrow svg {
    width: 30px;
    height: 30px;
}

.lightbox-arrow:hover {
    background: var(--primary);
    border-color: var(--primary-bright);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.lightbox-arrow.prev {
    left: 40px;
}

.lightbox-arrow.next {
    right: 40px;
}

@media (max-width: 768px) {
    .lightbox-arrow {
        width: 45px;
        height: 45px;
    }

    .lightbox-arrow.prev {
        left: 15px;
    }

    .lightbox-arrow.next {
        right: 15px;
    }
}

/* Copyable Command Styles */
.copyable-command {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 12px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.copyable-command code {
    color: var(--accent);
    font-size: 0.95rem;
}

.copy-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.copyable-command:hover .copy-badge {
    color: var(--primary-bright);
    background: rgba(139, 92, 246, 0.1);
}

.copyable-command.copied {
    border-color: var(--success);
}

.copyable-command.copied .copy-badge {
    color: var(--success);
}

/* Command Links */
.command-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed var(--secondary);
    transition: all 0.3s ease;
}

.command-link:hover {
    color: var(--primary-bright);
    border-bottom-color: var(--primary-bright);
}