/* ============================================
   123 Labs — Futuristic Portfolio
   ============================================ */

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

:root {
    --bg-primary: #06060f;
    --bg-secondary: #0c0c1d;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-tertiary: rgba(255, 255, 255, 0.3);
    --accent-cyan: #00d4ff;
    --accent-violet: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    --accent-blue: #3b82f6;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Background Effects
   ============================================ */

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.aurora {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: aurora-drift 25s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    0% {
        transform: translate(0%, 0%) rotate(0deg);
    }
    25% {
        transform: translate(2%, -3%) rotate(1deg);
    }
    50% {
        transform: translate(-3%, 2%) rotate(-1deg);
    }
    75% {
        transform: translate(1%, 3%) rotate(0.5deg);
    }
    100% {
        transform: translate(-2%, -1%) rotate(-0.5deg);
    }
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.045;
    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");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: linear-gradient(to bottom, rgba(6, 6, 15, 0.9), transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s ease;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 1px;
}

.bracket {
    color: var(--accent-cyan);
    font-weight: 400;
    opacity: 0.7;
}

.brand-text {
    color: var(--text-primary);
}

.brand-dot {
    color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

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

.nav-x {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-x:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 32px 80px;
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--accent-cyan);
    padding: 8px 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    margin-bottom: 40px;
    background: rgba(0, 212, 255, 0.05);
    animation: badge-glow 4s ease-in-out infinite alternate;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes badge-glow {
    0% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.05); }
    100% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.1); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.title-line {
    display: block;
}

.title-gradient {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 50%, var(--accent-rose) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-desc {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--bg-primary);
    background: var(--accent-cyan);
    padding: 12px 28px;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.hero-cta:hover {
    background: #33dfff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.hero-cta svg {
    transition: transform 0.3s ease;
}

.hero-cta:hover svg {
    transform: translate(2px, -2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent-cyan), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(0.6); transform-origin: top; }
}

/* ============================================
   Projects Section
   ============================================ */

.projects {
    position: relative;
    z-index: 2;
    padding: 80px 0 120px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-cyan);
    opacity: 0.7;
}

.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================
   Project Cards
   ============================================ */

.project-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    isolation: isolate;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.gradient-1 {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #0ea5e9 60%, #06b6d4 100%);
    background-size: 300% 300%;
    animation: card-gradient 12s ease-in-out infinite;
}

.gradient-2 {
    background: linear-gradient(135deg, #1a0533 0%, #4c1d95 30%, #7c3aed 60%, #a78bfa 100%);
    background-size: 300% 300%;
    animation: card-gradient 14s ease-in-out infinite;
    animation-delay: -2s;
}

.gradient-3 {
    background: linear-gradient(135deg, #042f2e 0%, #065f46 30%, #10b981 60%, #34d399 100%);
    background-size: 300% 300%;
    animation: card-gradient 16s ease-in-out infinite;
    animation-delay: -4s;
}

.gradient-4 {
    background: linear-gradient(135deg, #1c1917 0%, #78350f 30%, #f59e0b 60%, #fbbf24 100%);
    background-size: 300% 300%;
    animation: card-gradient 13s ease-in-out infinite;
    animation-delay: -6s;
}

.gradient-5 {
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 30%, #6366f1 60%, #818cf8 100%);
    background-size: 300% 300%;
    animation: card-gradient 15s ease-in-out infinite;
    animation-delay: -3s;
}

.gradient-6 {
    background: linear-gradient(135deg, #2d0a1e 0%, #9f1239 30%, #f43f5e 60%, #fb7185 100%);
    background-size: 300% 300%;
    animation: card-gradient 11s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes card-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 6, 15, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card-visit {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 212, 255, 0.1);
}

.card-overlay-private {
    opacity: 1;
    background: rgba(6, 6, 15, 0.15);
}

.card-private-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

.project-private {
    cursor: default;
}

.project-private:hover {
    transform: translateY(-4px);
}

.project-private:hover .card-title {
    color: var(--text-primary);
}

.card-content {
    padding: 20px;
}

.card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.card-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--accent-cyan);
    padding: 3px 10px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

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

.card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
}

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

.footer-brand {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal
   ============================================ */

.reveal {
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-link:not(.nav-x) {
        display: none;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: clamp(40px, 10vw, 64px);
    }

    .hero-desc {
        font-size: 16px;
    }

    .projects {
        padding: 60px 0 80px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 22px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        font-size: 10px;
        padding: 6px 14px;
    }

    .hero-cta {
        width: 100%;
        justify-content: center;
    }

    .card-content {
        padding: 16px;
    }
}

/* ============================================
   Selection & Scrollbar
   ============================================ */

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
