/* ========================================
   Technical Experts — Premium Stylesheet
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary: #636AE8;
    --primary-dark: #4E54C8;
    --primary-light: #8B8FEF;
    --primary-bg: rgba(99, 106, 232, 0.08);
    --accent: #7C3AED;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 106, 232, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 106, 232, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 16px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
}

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

.nav-links a {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

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

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

.hero-shape {
    position: absolute;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0.06;
    transform: rotate(45deg);
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 20%;
    animation: float 18s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    25% { transform: rotate(50deg) translate(20px, -20px); }
    50% { transform: rotate(45deg) translate(-10px, 20px); }
    75% { transform: rotate(40deg) translate(15px, 10px); }
}

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

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid rgba(99, 106, 232, 0.15);
}

.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

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

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-suffix {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
}

/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- About Section --- */
.about {
    background: var(--bg-light);
}

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

.about-card {
    background: var(--bg-card);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.about-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    color: var(--primary);
}

.about-card-icon svg {
    width: 24px;
    height: 24px;
}

.about-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
}

.about-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    padding: 36px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

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

.service-number {
    font-size: 48px;
    font-weight: 900;
    color: var(--border-light);
    line-height: 1;
    margin-bottom: 16px;
    transition: var(--transition);
}

.service-card:hover .service-number {
    color: var(--primary-bg);
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    color: white;
}

.service-icon svg {
    width: 24px;
    height: 24px;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-tags li {
    padding: 4px 12px;
    background: var(--bg-light);
    color: var(--text-muted);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

/* --- Tech Stack --- */
.tech-stack {
    background: var(--bg-light);
    padding: 80px 0;
    overflow: hidden;
}

.tech-marquee {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.tech-track {
    display: flex;
    gap: 16px;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.tech-item {
    flex-shrink: 0;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition);
}

.tech-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-info {
    padding: 28px;
}

.portfolio-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0 10px;
}

.portfolio-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- CTA Section --- */
.cta-section {
    padding: 40px 0 100px;
}

.cta-box {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--accent) 100%);
    border-radius: var(--radius-xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -50px;
}

.cta-box::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -60px;
    left: -30px;
}

.cta-box h2 {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-box .gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #d4d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-box p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box .btn-primary {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cta-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.contact-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.contact-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 50%;
    margin: 0 auto 20px;
    color: var(--primary);
}

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

.contact-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.contact-card a:hover {
    color: var(--primary);
}

/* --- Footer --- */
.footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 0;
}

.footer-content {
    text-align: center;
    padding-bottom: 40px;
}

.footer-content .logo {
    color: white;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto 32px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-contact-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.footer-contact-item:hover {
    color: white;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

/* --- Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar.menu-open {
        background: #FFFFFF !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom-color: transparent !important;
        box-shadow: none !important;
        transition: none;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #FFFFFF;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 16px 24px 40px;
        gap: 0;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 1001;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition: opacity 0.15s ease 0.05s, transform 0.15s ease 0.05s;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        font-size: 16px;
        font-weight: 600;
        padding: 18px 20px;
        color: var(--text-primary);
        border-radius: 0;
        transition: var(--transition);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary);
        background: var(--primary-bg);
    }

    .hero {
        padding: 100px 0 50px;
        min-height: auto;
    }

    .hero-bg .hero-shape {
        opacity: 0.03;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 16px;
        margin-bottom: 16px;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.15;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 28px;
    }

    .hero-actions {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 40px;
    }

    .hero-actions .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .hero-stats {
        flex-direction: row;
        gap: 0;
        background: var(--bg-light);
        border-radius: var(--radius-lg);
        padding: 24px 0;
        border: 1px solid var(--border-light);
    }

    .hero-stats .stat {
        flex: 1;
        position: relative;
    }

    .hero-stats .stat:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 20%;
        height: 60%;
        width: 1px;
        background: var(--border);
    }

    .stat-number {
        font-size: 28px;
    }

    .stat-suffix {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .about-grid,
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section {
        padding: 60px 0;
    }

    .cta-box {
        padding: 50px 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .section-header h2 {
        font-size: 26px;
    }
}
