/* ============================================
   Zoddiacc Portfolio — Stylesheet
   ============================================
   Table of Contents:
   1. Reset & Variables
   2. Base & Typography
   3. Ambient Background & Effects
   4. Navigation
   5. Sections (shared)
   6. Hero
   7. About
   8. Apps
   9. Skills
   10. Contact
   11. Footer
   12. Animations & Keyframes
   13. Responsive
   ============================================ */

/* ── 1. Reset & Variables ── */

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

:root {
    --bg: #0f0f0f;
    --bg-elevated: #161625;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f3a;
    --text: #e8e8e8;
    --text-muted: #888;
    --accent-1: #7c3aed;
    --accent-2: #3b82f6;
    --accent-3: #a855f7;
    --gradient: linear-gradient(135deg, #7c3aed, #3b82f6, #a855f7);
    --gradient-text: linear-gradient(135deg, #a78bfa, #60a5fa, #c084fc);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 2. Base & Typography ── */

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-1) var(--bg);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 3px; }

/* ── 3. Ambient Background & Effects ── */

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
}

.ambient-orb:nth-child(1) {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -200px;
    left: -200px;
    animation-duration: 25s;
}

.ambient-orb:nth-child(2) {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    top: 40%;
    right: -150px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.ambient-orb:nth-child(3) {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    bottom: -100px;
    left: 30%;
    animation-duration: 22s;
    animation-delay: -10s;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: var(--accent-1);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    animation: particleFade 4s ease-in-out infinite;
}

/* ── 4. Navigation ── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: all var(--transition-slow);
}

.navbar.scrolled {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.3rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(124, 58, 237, 0.1);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
    display: block;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ── 5. Sections (shared) ── */

section {
    padding: 100px 24px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-3);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -1px;
}

/* Reveal animation classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Shared button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

/* ── 6. Hero ── */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 72px;
    position: relative;
}

.hero-content {
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-3);
    margin-bottom: 32px;
    animation: badgePulse 3s ease-in-out infinite;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

.hero-name {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 20px;
    background: var(--gradient-text);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-muted);
    font-weight: 400;
    max-width: 550px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2.5s ease-in-out infinite;
}

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

/* ── 7. About ── */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all var(--transition-slow);
}

.stat-card:hover {
    border-color: rgba(124, 58, 237, 0.35);
    background: rgba(124, 58, 237, 0.1);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 4px;
}

/* ── 8. Apps ── */

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: var(--radius);
    padding: 36px;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.app-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.1);
}

.app-card:hover::before {
    opacity: 1;
}

.app-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(59, 130, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.app-meta h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.app-platform {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--accent-3);
    font-weight: 500;
    background: rgba(168, 85, 247, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
}

.app-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.7;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.app-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent-2);
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-store:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.btn-store svg {
    width: 20px;
    height: 20px;
}

/* ── 9. Skills ── */

.skills-section {
    text-align: center;
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.skill-pill {
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.15);
    background: rgba(124, 58, 237, 0.05);
    color: var(--text);
    transition: all var(--transition-slow);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.skill-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity var(--transition-slow);
    border-radius: inherit;
}

.skill-pill:hover {
    border-color: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.skill-pill:hover::before {
    opacity: 1;
}

.skill-pill span {
    position: relative;
    z-index: 1;
}

/* ── 10. Contact ── */

.contact-section {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 36px;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all var(--transition-slow);
}

.contact-link:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.contact-link svg {
    width: 24px;
    height: 24px;
}

/* ── 11. Footer ── */

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.footer a:hover {
    color: var(--accent-2);
}

/* ── 12. Animations & Keyframes ── */

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.1); }
    50% { transform: translate(-30px, 60px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes badgePulse {
    0%, 100% { border-color: rgba(124, 58, 237, 0.25); }
    50% { border-color: rgba(124, 58, 237, 0.5); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scrollLine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes particleFade {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(-30px); }
}

/* ── 13. Responsive ── */

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 4px;
        transition: right var(--transition-slow);
        border-left: 1px solid rgba(124, 58, 237, 0.15);
    }

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

    .nav-links a {
        font-size: 1.1rem;
        padding: 14px 16px;
    }

    .nav-hamburger {
        display: flex;
    }

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

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

    .hero-name {
        letter-spacing: -1.5px;
    }

    section {
        padding: 70px 20px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}
