:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* ========== Top Header ========== */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0.9rem 1.5rem;
    transition: all 0.3s ease;
}

.top-header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-logo {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.desktop-nav-inline {
    flex: 1;
    display: flex;
}

.desktop-nav-inline .nav-links {
    display: flex;
    gap: 0.8rem;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
}

.desktop-nav-inline .nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    white-space: nowrap;
    padding: 0.65rem 1.1rem;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.desktop-nav-inline .nav-links a:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.desktop-nav-inline .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateX(-50%);
}

.desktop-nav-inline .nav-links a:hover::after {
    width: 80%;
}

.profile-menu {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0.35rem;
    border-radius: 50%;
    pointer-events: auto;
    z-index: 50;
}

.profile-btn:hover {
    transform: scale(1.1);
}

.profile-btn:active {
    transform: scale(0.95);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
    pointer-events: auto;
    cursor: pointer;
}

.profile-avatar svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
    pointer-events: none;
}

.profile-btn:hover .profile-avatar {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.08);
    min-width: 250px;
    z-index: 9999;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1.3rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
    color: var(--primary);
    padding-left: 1.6rem;
    transform: translateX(2px);
}

.dropdown-item svg {
    min-width: 18px;
    width: 18px;
    height: 18px;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.dropdown-item:hover svg {
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.4));
}

.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--gray-100);
}

.logout-btn {
    color: var(--danger);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

/* ========== Navigation ========== */
nav.desktop-nav {
    display: none !important;
}

/* ========== Main Content ========== */
main {
    padding-top: 5rem;
    padding-bottom: 6rem;
}

section {
    padding: 4rem 1.5rem;
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: white;
    padding: 6rem 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-weight: 400;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* ========== Section Titles ========== */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gray-900);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ========== Freelancers Grid ========== */
.freelancers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.freelancer-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.freelancer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.freelancer-header {
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
}

.freelancer-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.freelancer-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.freelancer-title {
    font-size: 0.9rem;
    opacity: 0.9;
}

.freelancer-body {
    padding: 1.5rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.freelancer-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--warning);
    font-size: 0.9rem;
}

.freelancer-rating span {
    color: var(--gray-600);
}

.freelancer-description {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.freelancer-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.skill-tag {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.freelancer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.freelancer-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.contact-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== Mobile Navigation ========== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.1);
    display: none;
}

.mobile-nav-items {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0.6rem 1rem 0.6rem;
    gap: 1rem;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex: 0 1 auto;
    padding: 0.5rem;
    min-height: 60px;
    border-radius: 0.75rem;
    position: relative;
}

.mobile-nav-item:hover {
    transform: translateY(-4px);
}

.mobile-nav-item:nth-child(1) svg {
    color: #f59e0b;
    stroke: #f59e0b;
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.mobile-nav-item:nth-child(1):hover svg {
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.7));
    width: 32px;
    height: 32px;
}

.mobile-nav-item:nth-child(2) svg {
    color: #10b981;
    stroke: #10b981;
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.mobile-nav-item:nth-child(2):hover svg {
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.7));
    width: 32px;
    height: 32px;
}

.mobile-nav-item:nth-child(4) svg {
    color: #6366f1;
    stroke: #6366f1;
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.mobile-nav-item:nth-child(4):hover svg {
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.7));
    width: 32px;
    height: 32px;
}

.mobile-nav-item:nth-child(5) svg {
    color: #8b5cf6;
    stroke: #8b5cf6;
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.mobile-nav-item:nth-child(5):hover svg {
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.7));
    width: 32px;
    height: 32px;
}

.mobile-nav-item.mobile-nav-center {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 50%;
    width: 72px;
    height: 72px;
    padding: 0;
    margin: 0 auto;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    backdrop-filter: blur(15px);
    flex: 0 0 auto;
    position: relative;
    z-index: 10;
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.mobile-nav-item.mobile-nav-center svg {
    stroke: white;
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
}

.mobile-nav-item.mobile-nav-center:hover {
    color: white;
    transform: scale(1.15) translateY(-6px);
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.6);
}

.mobile-nav-item.mobile-nav-center:hover svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.mobile-nav-item svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.8;
    fill: none;
    transition: all 0.3s ease;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .desktop-nav-inline .nav-links {
        gap: 0.3rem;
    }

    .desktop-nav-inline .nav-links a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .desktop-nav-inline .nav-links a::before {
        margin-right: 0.3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0.2rem 1.5rem;
    }

    .desktop-nav-inline {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    main {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .top-header-container {
        justify-content: space-between;
        gap: 1rem;
    }

    .header-logo {
        font-size: 1.1rem;
    }

    .profile-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 1rem;
        margin-top: 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .services-grid,
    .freelancers-grid {
        gap: 1.5rem;
    }

    .service-card,
    .freelancer-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .freelancers-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .desktop-nav-inline {
        display: flex !important;
    }

    .mobile-nav {
        display: none !important;
    }
}
