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

:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --card: #111;
    --text: #ffffff;
    --text-dim: #888;
    --accent: #7c3aed;
    --accent-2: #ec4899;
    --ios: #007AFF;
    --android: #3DDC84;
    --gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --font: 'Space Grotesk', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 12px 24px;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
}

.nav-logo span { color: var(--accent); }

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

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--gradient) !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 100px;
    font-weight: 600;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 60px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-text { max-width: 600px; }

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 100px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat { text-align: left; }

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient);
    color: white;
    padding: 16px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.3);
}

.btn-hero span {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Hero Phones */
.hero-phones {
    display: none;
    position: relative;
}

.phone-mockup {
    position: relative;
    width: 280px;
    transform: rotate(3deg);
}

.phone-image {
    width: 100%;
    height: auto;
    display: block;
}

.phone-icons-overlay {
    position: absolute;
    top: 15%;
    left: 12%;
    right: 12%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 6px;
    justify-items: center;
}

.phone-dock {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 6px 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.dock-icon {
    transition: transform 0.2s ease;
}

.dock-icon:hover {
    transform: scale(1.15);
}

.dock-icon img {
    width: 42px;
    height: 42px;
    border-radius: 22%;
    object-fit: cover;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease;
}

.app-icon:hover {
    transform: scale(1.1);
}

.app-icon img {
    width: 48px;
    height: 48px;
    border-radius: 11px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.app-icon span {
    font-size: 8px;
    color: rgba(255,255,255,0.9);
    text-align: center;
    max-width: 55px;
    line-height: 1.2;
}

/* ===== Work Section ===== */
.work {
    padding: 120px 0;
    background: var(--surface);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
}

.project-showcase {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

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

.project-visual {
    display: flex;
    justify-content: center;
}

.phone-frame {
    position: relative;
    width: 200px;
}

.frame-phone {
    width: 100%;
    height: auto;
    display: block;
}

.frame-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35%;
    height: auto;
    border-radius: 22%;
}

/* Each project uses its own colored mockup image */

/* Old phone-frame styles removed */

.eloq-icon svg {
    width: 50px;
    height: 50px;
    color: white;
}

.project-content {
    text-align: center;
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
}

.badge-ios {
    background: rgba(0, 122, 255, 0.15);
    color: var(--ios);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.badge-android {
    background: rgba(61, 220, 132, 0.15);
    color: var(--android);
    border: 1px solid rgba(61, 220, 132, 0.3);
}

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

.project h3 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.project-tagline {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.project-desc {
    color: var(--text-dim);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.project-tech-stack span {
    font-size: 0.8rem;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    color: var(--text-dim);
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #000;
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.project-btn:hover {
    transform: scale(1.05);
}

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

/* ===== Skills ===== */
.skills {
    padding: 120px 0;
    background: var(--bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.skill-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

.skill-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
}

.skill-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.skill-icon svg {
    width: 32px;
    height: 32px;
}

.skill-ios {
    background: rgba(0, 122, 255, 0.15);
    color: var(--ios);
}

.skill-android {
    background: rgba(61, 220, 132, 0.15);
    color: var(--android);
}

.skill-tools {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.skill-card ul {
    list-style: none;
    text-align: left;
}

.skill-card li {
    padding: 10px 0;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-card li::before {
    content: '→';
    color: var(--accent);
}

.skill-card li:last-child {
    border-bottom: none;
}

/* ===== Contact ===== */
.contact {
    padding: 120px 0;
    background: var(--surface);
}

.contact-card {
    background: var(--gradient);
    border-radius: 32px;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.contact-card h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
    position: relative;
}

.contact-card p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
    position: relative;
}

.btn-contact {
    display: inline-block;
    background: white;
    color: var(--accent);
    padding: 16px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    transition: transform 0.2s;
}

.btn-contact:hover {
    transform: scale(1.05);
}

/* ===== Open Source ===== */
.opensource {
    padding: 120px 0;
    background: var(--bg);
}

.oss-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 640px;
    margin: 0 auto;
}

.oss-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 40px;
    transition: border-color 0.3s, transform 0.3s;
}

.oss-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-4px);
}

.oss-card-featured {
    border-color: rgba(124, 58, 237, 0.2);
    background: linear-gradient(145deg, rgba(124,58,237,0.06) 0%, var(--card) 60%);
}

.oss-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.oss-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.oss-spm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
    padding: 6px 12px;
    border-radius: 100px;
}

.oss-card h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.oss-tagline {
    font-size: 1.05rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.oss-desc {
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.7;
}

.oss-desc code {
    background: rgba(255,255,255,0.08);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== About ===== */
.about {
    padding: 100px 0 0;
    background: var(--bg);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dim);
}

.about-content strong {
    color: var(--text);
}

/* ===== Mobile App Strip ===== */
.mobile-app-strip {
    display: none;
}

/* ===== Contact Links ===== */
.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--accent);
    padding: 16px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    transition: transform 0.2s;
}

.btn-contact:hover {
    transform: scale(1.05);
}

.btn-contact-outline {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

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

/* ===== Footer ===== */
.footer {
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-dim);
    transition: color 0.2s;
}

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

/* ===== Fade-in Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .mobile-app-strip {
        display: flex;
        justify-content: center;
        gap: 16px;
        padding-top: 40px;
    }

    .strip-icon img {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.4);
        transition: transform 0.2s;
    }

    .strip-icon img:hover {
        transform: scale(1.1);
    }

    .nav-links {
        gap: 16px;
    }

    .nav-container {
        gap: 20px;
    }

    .nav {
        padding: 10px 16px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr auto;
        align-items: center;
        justify-content: center;
        gap: 80px;
    }
    
    .hero-phones {
        display: block;
    }
    
    .project {
        grid-template-columns: auto auto;
        text-align: left;
        justify-content: center;
        gap: 175px;
    }
    
    .project-content {
        text-align: left;
        max-width: 450px;
    }
    
    .project-badges,
    .project-tech-stack {
        justify-content: flex-start;
    }
    
    .project-desc {
        margin-left: 0;
    }
    
    .project-reverse .project-visual {
        order: 2;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .phone-frame {
        width: 260px;
    }
}

.badge-personal {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-family {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

@media (min-width: 1200px) {
    .phone-mockup {
        width: 320px;
    }
    
    .phone-icons-overlay {
        gap: 16px 8px;
    }
    
    .app-icon img {
        width: 54px;
        height: 54px;
        border-radius: 12px;
    }
    
    .app-icon span {
        font-size: 9px;
    }
}
