/* ==========================================================================
   Shan Ali — Portfolio Design System
   Clean & premium · light-first with dark mode ([data-theme="dark"])
   ========================================================================== */

:root {
    /* Brand */
    --accent: #4f46e5;
    --accent-strong: #4338ca;
    --accent-soft: #eef2ff;
    --accent-2: #7c3aed;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    /* Surfaces & text (light) */
    --bg: #fafaf9;
    --bg-subtle: #f4f4f5;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --border: #e7e5e4;
    --border-strong: #d6d3d1;
    --text: #18181b;
    --text-secondary: #3f3f46;
    --text-muted: #71717a;
    --success: #16a34a;
    --success-soft: #f0fdf4;

    --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
    --shadow-md: 0 4px 16px rgba(24, 24, 27, 0.07);
    --shadow-lg: 0 12px 40px rgba(24, 24, 27, 0.12);
    --shadow-accent: 0 8px 24px rgba(79, 70, 229, 0.25);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 999px;

    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --container: 1160px;
    --nav-height: 72px;
}

[data-theme="dark"] {
    --accent: #818cf8;
    --accent-strong: #a5b4fc;
    --accent-soft: rgba(99, 102, 241, 0.14);
    --accent-2: #a78bfa;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --bg: #0c0c10;
    --bg-subtle: #131318;
    --surface: #17171d;
    --surface-raised: #1c1c24;
    --border: #26262e;
    --border-strong: #34343e;
    --text: #f4f4f5;
    --text-secondary: #d4d4d8;
    --text-muted: #9d9da8;
    --success: #4ade80;
    --success-soft: rgba(34, 197, 94, 0.12);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
    --shadow-accent: 0 8px 24px rgba(99, 102, 241, 0.2);
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 16px); }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--text);
}

::selection { background: var(--accent); color: #fff; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation: none !important; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}
.btn i { font-size: 0.95em; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79, 70, 229, 0.35); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-whatsapp {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.28);
}
.btn-whatsapp:hover { background: #16a34a; transform: translateY(-2px); }

.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- Navbar ---------- */

.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}
.site-nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 21px;
    letter-spacing: -0.02em;
}
.brand .dot { color: var(--accent); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-menu a.nav-item {
    padding: 9px 14px;
    border-radius: var(--radius-full);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-menu a.nav-item:hover { color: var(--text); background: var(--bg-subtle); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface);
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(12deg); }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .fa-sun { display: none; }

.nav-burger {
    display: none;
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.nav-burger .bar {
    width: 18px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-burger.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open .bar:nth-child(2) { opacity: 0; }
.nav-burger.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
    .nav-burger { display: flex; }
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px 24px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease;
    }
    .nav-menu.open { transform: none; opacity: 1; pointer-events: auto; }
    .nav-menu a.nav-item { padding: 13px 14px; font-size: 16px; }
    .nav-cta-desktop { display: none; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    padding: calc(var(--nav-height) + 72px) 0 88px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -340px; right: -240px;
    width: 720px; height: 720px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.13) 0%, transparent 65%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -300px; left: -280px;
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.09) 0%, transparent 65%);
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 820px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--success-soft);
    border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
    color: var(--success);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 28px;
}
.hero-badge .pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

.hero h1 {
    font-size: clamp(38px, 6vw, 62px);
    font-weight: 700;
    margin-bottom: 22px;
}
.hero h1 .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: clamp(17px, 2.2vw, 19.5px);
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 20px;
}

.hero-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}
.stack-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.stack-chip i { color: var(--accent); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 780px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}
.stat-card .num {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.stat-card .label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

@media (max-width: 720px) {
    .hero { padding-top: calc(var(--nav-height) + 44px); padding-bottom: 64px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-ctas .btn { flex: 1; justify-content: center; }
}

/* ---------- Trust strip ---------- */

.trust-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
    padding: 22px 0;
}
.trust-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 38px;
}
.trust-label {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 600;
    color: var(--text-muted);
}
.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
}
.trust-item i { color: var(--accent); font-size: 17px; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-subtle); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.eyebrow::before {
    content: '';
    width: 24px; height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}
.section-head.center .eyebrow::after {
    content: '';
    width: 24px; height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 16px;
}
.section-desc { color: var(--text-secondary); font-size: 17px; }

/* ---------- Services ---------- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.service-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-bottom: 20px;
}

.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--text-secondary); font-size: 15px; flex: 1; }

.service-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.service-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-full);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* ---------- Featured project ---------- */

.featured-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 64px;
}
@media (max-width: 880px) { .featured-card { grid-template-columns: 1fr; } }

.featured-body { padding: 44px 42px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 880px) { .featured-body { padding: 30px 26px; order: 2; } }

.featured-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.featured-body h3 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.featured-body p { color: var(--text-secondary); margin-bottom: 24px; }
.featured-body .btn { align-self: flex-start; }

.featured-media {
    position: relative;
    min-height: 320px;
    background: var(--bg-subtle);
}
.featured-media img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* ---------- Filters ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 34px;
}
.filter-group { display: flex; flex-direction: column; gap: 7px; }
.filter-group label {
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}
.filter-select {
    -webkit-appearance: none;
    appearance: none;
    padding: 11px 42px 11px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 500;
    min-width: 190px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.filter-count {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    padding-bottom: 11px;
}
@media (max-width: 720px) {
    .filter-group, .filter-select { width: 100%; }
    .filter-count { margin-left: 0; }
}

/* ---------- Project grid ---------- */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 980px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.project-thumb {
    position: relative;
    aspect-ratio: 16 / 9.4;
    overflow: hidden;
    background: var(--bg-subtle);
}
.project-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.045); }

.featured-flag {
    position: absolute;
    top: 14px; left: 14px;
    padding: 6px 13px;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.project-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.project-body h3 { font-size: 18.5px; }
.project-body p { color: var(--text-secondary); font-size: 14.5px; flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.project-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent);
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}
.project-cta i { transition: transform 0.18s ease; font-size: 12.5px; }
.project-card:hover .project-cta i { transform: translateX(4px); }

.projects-more { text-align: center; margin-top: 44px; }

/* ---------- Process ---------- */

.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}
@media (max-width: 1060px) { .process-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .process-grid { grid-template-columns: 1fr; } }

.process-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 26px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.process-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.process-step h3 { font-size: 16.5px; margin-bottom: 8px; }
.process-step p { font-size: 14px; color: var(--text-secondary); }

/* ---------- Why me ---------- */

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 980px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; } }

.why-item {
    display: flex;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
}
.why-item i {
    color: var(--accent);
    font-size: 19px;
    margin-top: 3px;
    flex-shrink: 0;
}
.why-item h3 { font-size: 16px; margin-bottom: 5px; }
.why-item p { font-size: 14px; color: var(--text-secondary); }

/* ---------- Experience timeline ---------- */

.timeline { position: relative; max-width: 760px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--border-strong);
}
.timeline-item { position: relative; padding: 0 0 44px 42px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0; top: 6px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    margin-bottom: 10px;
}
.timeline-meta h3 { font-size: 19px; }
.timeline-company { color: var(--accent); font-weight: 600; font-size: 15px; }
.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}
.timeline-item p { color: var(--text-secondary); font-size: 15px; }
.timeline-item ul { margin-top: 10px; display: grid; gap: 7px; }
.timeline-item ul li {
    position: relative;
    padding-left: 22px;
    color: var(--text-secondary);
    font-size: 14.5px;
}
.timeline-item ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- CTA section ---------- */

.cta-section { padding: 96px 0; }
.cta-card {
    position: relative;
    background: var(--gradient);
    border-radius: calc(var(--radius-lg) + 6px);
    padding: 72px 48px;
    text-align: center;
    overflow: hidden;
    box-shadow: var(--shadow-accent);
}
.cta-card::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}
.cta-card::after {
    content: '';
    position: absolute;
    bottom: -140px; left: -60px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 {
    color: #fff;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    margin-bottom: 14px;
}
.cta-card p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto 34px;
}
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta-card .btn-light {
    background: #fff;
    color: var(--accent-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .cta-card .btn-light { color: #4338ca; }
.cta-card .btn-light:hover { transform: translateY(-2px); }
.cta-card .btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    color: #fff;
}
.cta-card .btn-outline:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

.cta-direct {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.85);
}
.cta-direct a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.cta-direct a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 640px) {
    .cta-card { padding: 52px 26px; }
    .cta-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    padding: 52px 0 36px;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 36px;
}
.footer-brand { max-width: 340px; }
.footer-brand .brand { font-size: 22px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; margin-top: 10px; }

.footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.footer-col ul { display: grid; gap: 9px; }
.footer-col a {
    color: var(--text-secondary);
    font-size: 14.5px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-col a i { width: 16px; text-align: center; color: var(--text-muted); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    color: var(--text-muted);
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Floating contact buttons ---------- */

.floating-contact {
    position: fixed;
    right: 22px; bottom: 22px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 56px; height: 56px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-btn:hover { transform: scale(1.08); }

.floating-wa {
    background: #22c55e;
    box-shadow: 0 10px 28px rgba(34, 197, 94, 0.4);
}
.floating-wa:hover { box-shadow: 0 14px 34px rgba(34, 197, 94, 0.5); }

.floating-li {
    background: #0a66c2;
    box-shadow: 0 10px 28px rgba(10, 102, 194, 0.4);
    font-size: 23px;
}
.floating-li:hover { box-shadow: 0 14px 34px rgba(10, 102, 194, 0.5); }

/* ==========================================================================
   Project detail & listing pages
   ========================================================================== */

.page-hero {
    padding: calc(var(--nav-height) + 56px) 0 56px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -300px; right: -200px;
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.11) 0%, transparent 65%);
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 26px;
    transition: color 0.15s ease;
}
.back-link:hover { color: var(--accent); }
.back-link i { font-size: 12px; }

.page-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 700; margin-bottom: 14px; }
.page-hero .lede { font-size: 18px; color: var(--text-secondary); max-width: 620px; }
.page-hero .project-tags { margin-top: 20px; }

.detail-hero-media {
    margin-top: 44px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    background: var(--bg-subtle);
}
.detail-hero-media img { width: 100%; object-fit: cover; }

.detail-section { padding: 44px 0; }
.detail-section + .detail-section { border-top: 1px solid var(--border); }

.detail-title {
    font-size: 24px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 13px;
}
.detail-title::before {
    content: '';
    width: 5px; height: 26px;
    border-radius: 3px;
    background: var(--gradient);
}

.detail-prose { max-width: 820px; color: var(--text-secondary); font-size: 16px; }
.detail-prose p + p { margin-top: 14px; }

.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 17px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.meta-pill i { color: var(--accent); }
.meta-pill strong { color: var(--text); font-weight: 600; }

.role-list, .results-list { max-width: 820px; display: grid; gap: 12px; }
.role-list li, .results-list li {
    position: relative;
    padding: 15px 18px 15px 46px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 15px;
}
.role-list li::before, .results-list li::before {
    content: '\2713';
    position: absolute;
    left: 17px; top: 14px;
    color: var(--accent);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 980px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .feature-icon {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 16px;
}
.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }

.challenges-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 900px; }
@media (max-width: 720px) { .challenges-grid { grid-template-columns: 1fr; } }
.challenge-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 22px 24px;
}
.challenge-card h3 { font-size: 16px; margin-bottom: 8px; }
.challenge-card p { font-size: 14.5px; color: var(--text-secondary); }

.tech-stack { display: flex; flex-wrap: wrap; gap: 12px; }
.tech-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.tech-item i { color: var(--accent); font-size: 16px; }

.attribution-card {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 900px;
}
@media (max-width: 640px) { .attribution-card { flex-direction: column; } }
.attribution-card img { width: 84px; flex-shrink: 0; }
.attribution-card h3 { font-size: 18px; margin-bottom: 10px; }
.attribution-card p { font-size: 14.5px; color: var(--text-secondary); }
.attribution-card p + p { margin-top: 10px; }
.attribution-card a { color: var(--accent); font-weight: 600; display: inline-block; margin-top: 12px; }
.attribution-card a:hover { text-decoration: underline; }

/* Live link button */
.live-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    box-shadow: var(--shadow-accent);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.live-link:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79, 70, 229, 0.35); }

/* Listing page category pills */
.category-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 600;
    transition: all 0.18s ease;
}
.filter-btn .count {
    font-size: 12px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    padding: 2px 9px;
    color: var(--text-muted);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-accent);
}
.filter-btn.active .count { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* ---------- Testimonials ---------- */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 980px) { .testimonials-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.testimonial-stars { color: #f59e0b; font-size: 14px; display: flex; gap: 3px; margin-bottom: 16px; }

.testimonial-card blockquote {
    color: var(--text-secondary);
    font-size: 15px;
    flex: 1;
    margin-bottom: 20px;
}

.testimonial-card figcaption { display: flex; flex-direction: column; gap: 2px; }
.testimonial-author { font-weight: 600; font-size: 14.5px; color: var(--text); }
.testimonial-meta { font-size: 13px; color: var(--text-muted); }
.testimonial-meta i { font-size: 12px; }

/* ---------- Platform band ---------- */

.platform-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 4px);
    padding: 40px 44px;
    box-shadow: var(--shadow-md);
}
@media (max-width: 720px) { .platform-band { padding: 30px 26px; } }

.platform-band-text h2 { font-size: clamp(21px, 3vw, 26px); margin-bottom: 8px; }
.platform-band-text p { color: var(--text-secondary); font-size: 15px; max-width: 420px; }

.platform-band-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 14px 26px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.platform-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

.platform-fiverr { background: #1dbf73; box-shadow: 0 8px 24px rgba(29, 191, 115, 0.3); }
.platform-upwork { background: #14a800; box-shadow: 0 8px 24px rgba(20, 168, 0, 0.3); }
.platform-btn i { font-size: 18px; }

.platform-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    .platform-band-actions { width: 100%; }
    .platform-btn { flex: 1; justify-content: center; }
}
