/* ============================================
   Linguistic Journey - Professional Styles
   ============================================ */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --success: #198754;
    --secondary: #7c3aed;
    --accent: #ec4899;
    --cyan: #06b6d4;
    --warm: #f59e0b;
    --dark: #1a1d29;
    --dark-lighter: #2d3142;
    --bg-radial-a: rgba(124, 58, 237, 0.06);
    --bg-radial-b: rgba(6, 182, 212, 0.06);
    --hero-from: #111827;
    --hero-mid: #312e81;
    --hero-to: #0f172a;
    --hero-overlay-a: rgba(13, 110, 253, 0.2);
    --hero-overlay-b: rgba(236, 72, 153, 0.15);
    --hero-overlay-c: rgba(6, 182, 212, 0.16);
    --accent-grad-1: #60a5fa;
    --accent-grad-2: #22d3ee;
    --accent-grad-3: #c084fc;
    --primary-btn-1: #2563eb;
    --primary-btn-2: #06b6d4;
    --primary-btn-3: #7c3aed;
    --stats-1: #2563eb;
    --stats-2: #06b6d4;
    --stats-3: #7c3aed;
    --soft-surface-1: #f8fbff;
    --soft-surface-2: #f5f3ff;
    --contact-1: #0f172a;
    --contact-2: #312e81;
    --contact-3: #0b1120;
}

html[data-theme='corporate'] {
    --bg-radial-a: rgba(37, 99, 235, 0.06);
    --bg-radial-b: rgba(14, 116, 144, 0.05);
    --hero-from: #0f172a;
    --hero-mid: #1e293b;
    --hero-to: #020617;
    --hero-overlay-a: rgba(37, 99, 235, 0.2);
    --hero-overlay-b: rgba(20, 184, 166, 0.12);
    --hero-overlay-c: rgba(14, 165, 233, 0.12);
    --accent-grad-1: #93c5fd;
    --accent-grad-2: #67e8f9;
    --accent-grad-3: #86efac;
    --primary-btn-1: #1d4ed8;
    --primary-btn-2: #0ea5e9;
    --primary-btn-3: #0f766e;
    --stats-1: #1d4ed8;
    --stats-2: #0ea5e9;
    --stats-3: #0f766e;
    --soft-surface-1: #f8fafc;
    --soft-surface-2: #eef2ff;
    --contact-1: #0f172a;
    --contact-2: #1e293b;
    --contact-3: #020617;
}

html[data-theme='luxury'] {
    --bg-radial-a: rgba(245, 158, 11, 0.06);
    --bg-radial-b: rgba(217, 119, 6, 0.05);
    --hero-from: #1c1917;
    --hero-mid: #451a03;
    --hero-to: #111827;
    --hero-overlay-a: rgba(245, 158, 11, 0.2);
    --hero-overlay-b: rgba(217, 119, 6, 0.16);
    --hero-overlay-c: rgba(120, 53, 15, 0.12);
    --accent-grad-1: #fcd34d;
    --accent-grad-2: #fb923c;
    --accent-grad-3: #fbbf24;
    --primary-btn-1: #b45309;
    --primary-btn-2: #d97706;
    --primary-btn-3: #92400e;
    --stats-1: #b45309;
    --stats-2: #f59e0b;
    --stats-3: #92400e;
    --soft-surface-1: #fffbeb;
    --soft-surface-2: #fef3c7;
    --contact-1: #1c1917;
    --contact-2: #451a03;
    --contact-3: #0f172a;
}

html[data-theme='dark-glass'] {
    --bg-radial-a: rgba(99, 102, 241, 0.12);
    --bg-radial-b: rgba(236, 72, 153, 0.1);
    --hero-from: #020617;
    --hero-mid: #111827;
    --hero-to: #030712;
    --hero-overlay-a: rgba(99, 102, 241, 0.25);
    --hero-overlay-b: rgba(236, 72, 153, 0.2);
    --hero-overlay-c: rgba(34, 211, 238, 0.16);
    --accent-grad-1: #a5b4fc;
    --accent-grad-2: #67e8f9;
    --accent-grad-3: #f9a8d4;
    --primary-btn-1: #4f46e5;
    --primary-btn-2: #0ea5e9;
    --primary-btn-3: #ec4899;
    --stats-1: #4f46e5;
    --stats-2: #0ea5e9;
    --stats-3: #ec4899;
    --soft-surface-1: #0f172a;
    --soft-surface-2: #111827;
    --contact-1: #020617;
    --contact-2: #111827;
    --contact-3: #030712;
}

* {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    overflow-x: hidden;
    color: #1f2937;
    background:
        radial-gradient(circle at 0% 0%, var(--bg-radial-a), transparent 35%),
        radial-gradient(circle at 100% 15%, var(--bg-radial-b), transparent 35%),
        #ffffff;
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    background: transparent !important;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: linear-gradient(90deg, rgba(26, 29, 41, 0.98), rgba(30, 41, 59, 0.96)) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #93c5fd, #22d3ee, #86efac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}

.navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link.active {
    color: #ffffff !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.25rem;
    height: 2px;
    border-radius: 10px;
    background: linear-gradient(90deg, #60a5fa, #22c55e);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 45%, var(--hero-to) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, var(--hero-overlay-a) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, var(--hero-overlay-b) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 20%, var(--hero-overlay-c) 0%, transparent 45%);
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.35;
    animation: floatUp 12s infinite ease-in-out;
}

.hero-particles span:nth-child(1) {
    width: 140px;
    height: 140px;
    left: 10%;
    top: 65%;
    background: rgba(96, 165, 250, 0.35);
}

.hero-particles span:nth-child(2) {
    width: 100px;
    height: 100px;
    left: 78%;
    top: 18%;
    animation-delay: 1.2s;
    background: rgba(34, 197, 94, 0.28);
}

.hero-particles span:nth-child(3) {
    width: 68px;
    height: 68px;
    left: 55%;
    top: 74%;
    animation-delay: 2.1s;
    background: rgba(129, 140, 248, 0.3);
}

.hero-section h1 {
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.text-accent {
    background: linear-gradient(90deg, var(--accent-grad-1) 0%, var(--accent-grad-2) 45%, var(--accent-grad-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-hero {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(147, 197, 253, 0.5);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.btn-outline-light:hover {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.25), rgba(34, 211, 238, 0.25));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.9);
}

.btn-primary {
    border: 0;
    background: linear-gradient(90deg, var(--primary-btn-1) 0%, var(--primary-btn-2) 55%, var(--primary-btn-3) 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary-btn-1) 85%, #000) 0%, color-mix(in srgb, var(--primary-btn-2) 85%, #000) 55%, color-mix(in srgb, var(--primary-btn-3) 85%, #000) 100%);
    transform: translateY(-1px);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes floatUp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-18px);
    }
}

/* Stats Bar */
.stats-bar {
    background: linear-gradient(90deg, var(--stats-1) 0%, var(--stats-2) 45%, var(--stats-3) 100%);
    color: #fff;
    margin-top: -1px;
    box-shadow: 0 10px 34px rgba(37, 99, 235, 0.3);
}

.stat-number {
    font-size: 1.75rem;
    color: #fff;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Section badges & titles */
.section-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.section-badge-light {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.section-title {
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.bg-light {
    background: linear-gradient(180deg, var(--soft-surface-1) 0%, var(--soft-surface-2) 100%) !important;
}

/* About cards */
.about-cards {
    position: relative;
    min-height: 320px;
}

.about-card {
    position: absolute;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.16);
    background: #fff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.16);
}

.about-card-1 {
    top: 0;
    left: 0;
    width: 70%;
}

.about-card-2 {
    bottom: 0;
    right: 0;
    width: 70%;
}

.about-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.about-card h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.about-card p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* Service cards */
.service-card {
    background: #fff;
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #2563eb, #06b6d4, #7c3aed) 1;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.14);
    transform: translateY(-4px);
}

.service-card-software:hover {
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.16);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.bg-primary-subtle {
    background: rgba(13, 110, 253, 0.1);
}

.bg-success-subtle {
    background: rgba(25, 135, 84, 0.1);
}

.service-card h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* Why cards */
.why-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    transition: all 0.3s ease;
}

.why-card:hover {
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.14);
    transform: translateY(-4px);
}

/* Tech cards */
.tech-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.12);
    transition: all 0.3s ease;
}

.tech-card:hover {
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.15);
    transform: translateY(-3px);
}

.tech-card span {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Portfolio cards */
.portfolio-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.12);
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.16);
}

.portfolio-img {
    height: 180px;
}

.portfolio-body {
    padding: 1.25rem;
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1d4ed8;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.portfolio-body h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.portfolio-body p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.result-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    color: #1d4ed8;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), rgba(6, 182, 212, 0.14));
}

/* Testimonial cards */
.testimonial-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(236, 72, 153, 0.12);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.15);
}

.avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
}

/* Accordion */
.accordion-item {
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    background: #fff !important;
}

.accordion-button:not(.collapsed) {
    color: #1d4ed8;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08)) !important;
    box-shadow: none;
}

/* Contact section */
#contact {
    background: linear-gradient(135deg, var(--contact-1) 0%, var(--contact-2) 45%, var(--contact-3) 100%) !important;
}

.contact-form .form-control,
.contact-form .form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.2);
}

.contact-form .form-select option {
    background: var(--dark);
    color: #fff;
}

/* Footer */
footer {
    background: #0f1117;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

footer a:hover {
    color: #fff !important;
}

/* Reveal animations */
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary-btn-1), var(--primary-btn-2), var(--primary-btn-3));
    color: #fff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.34);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1050;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    filter: brightness(1.06);
}

/* Theme switcher */
.theme-switcher {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 1060;
}

.theme-toggle-btn {
    border: 0;
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary-btn-1), var(--primary-btn-2), var(--primary-btn-3));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.theme-options {
    position: absolute;
    left: 0;
    bottom: 115%;
    min-width: 185px;
    display: grid;
    gap: 0.4rem;
    padding: 0.55rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-switcher.open .theme-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.theme-option {
    border: 1px solid transparent;
    background: #fff;
    color: #1e293b;
    text-align: left;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    font-weight: 600;
}

.theme-option.active {
    color: #0f172a;
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
}

html[data-theme='dark-glass'] body {
    background:
        radial-gradient(circle at 8% 4%, rgba(129, 140, 248, 0.18), transparent 34%),
        radial-gradient(circle at 95% 16%, rgba(236, 72, 153, 0.14), transparent 34%),
        linear-gradient(180deg, #030712 0%, #020617 100%);
    color: #e5e7eb;
}

html[data-theme='dark-glass'] .section-title,
html[data-theme='dark-glass'] .tech-card span,
html[data-theme='dark-glass'] .service-card h5,
html[data-theme='dark-glass'] .portfolio-body h5,
html[data-theme='dark-glass'] .why-card h5,
html[data-theme='dark-glass'] .accordion-button {
    color: #f8fafc;
}

html[data-theme='dark-glass'] .text-muted,
html[data-theme='dark-glass'] .portfolio-body p,
html[data-theme='dark-glass'] .service-card p,
html[data-theme='dark-glass'] .about-card p {
    color: #cbd5e1 !important;
}

html[data-theme='dark-glass'] .about-card,
html[data-theme='dark-glass'] .service-card,
html[data-theme='dark-glass'] .why-card,
html[data-theme='dark-glass'] .tech-card,
html[data-theme='dark-glass'] .portfolio-card,
html[data-theme='dark-glass'] .testimonial-card,
html[data-theme='dark-glass'] .accordion-item {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 34px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(10px);
}

html[data-theme='dark-glass'] .section-badge {
    color: #bfdbfe;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.2), rgba(236, 72, 153, 0.18));
}

html[data-theme='dark-glass'] .theme-options {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme='dark-glass'] .theme-option {
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

html[data-theme='dark-glass'] .theme-option.active {
    color: #fff;
    border-color: rgba(148, 163, 184, 0.5);
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.3), rgba(236, 72, 153, 0.3));
}

/* Responsive */
@media (max-width: 991px) {
    .about-card-1,
    .about-card-2 {
        position: relative;
        width: 100%;
        margin-bottom: 1rem;
    }

    .about-cards {
        min-height: auto;
    }

    .hero-section h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section .lead {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .hero-section .d-flex.gap-3 .btn {
        width: 100%;
    }

    .back-to-top {
        right: 1rem;
        bottom: 1rem;
    }

    .theme-switcher {
        left: 1rem;
        bottom: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
