/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Light Mode (Default) */
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --secondary: #64748B;
    --background: #FFFFFF;
    --surface: #FFFFFF;
    --surface-alt: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #475569;
    --border: #E2E8F0;
    --accent: #38BDF8;
    /* Sky Blue for highlights */

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --primary: #3B82F6;
    --primary-dark: #60A5FA;
    --secondary: #94A3B8;
    --background: #0F172A;
    /* Slate 900 */
    --surface: #1E293B;
    /* Slate 800 */
    --surface-alt: #334155;
    /* Slate 700 */
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --border: #334155;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.3);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
.btn {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.05);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(var(--background), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(var(--surface), 0.9);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-start {
    display: none;
}

@media (min-width: 769px) {
    .btn-start {
        display: inline-flex;
    }
}

/* Theme Toggle */
.theme-toggle {
    padding: 8px;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--border);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
    background: var(--background);
    /* Ensure background is set */
}

/* Hero Background Effects */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
    animation: floatBlob 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent);
    animation-delay: 5s;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
}

@media (max-width: 768px) {
    .hero-blob {
        opacity: 0.05;
        /* Much lower opacity on mobile */
        filter: blur(60px);
        /* Slightly less blur to contain it */
    }
}

@keyframes floatBlob {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* Why Me Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* How It Works - New Design */
.steps-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.step-item {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-icon-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.step-icon-box {
    width: 80px;
    height: 80px;
    background-color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.step-item:hover .step-icon-box {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.5);
    background: var(--primary-dark);
}

.step-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--primary-dark);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

.step-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.step-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 280px;
}

/* Services - New Design */
.service-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    /* overflow: hidden; Removed to allow any popouts if needed, but flex layout is safe */
}

/* Service Header */
.service-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.service-title-box h3 {
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
}

.service-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Service Details */
.service-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-group strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    /* Changed to darker text for label */
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.detail-group strong i {
    color: var(--primary);
}

.detail-group p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    padding-left: 0;
    /* Aligned left */
}

/* Check List */
ul.check-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    margin-top: 0.5rem;
}

ul.check-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.7rem;
    display: flex;
    align-items: center;
}

ul.check-list li::before {
    content: '\f00c';
    /* FontAwesome Check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #10B981;
    /* Green */
    position: absolute;
    left: 0;
    font-size: 1rem;
}

.popular-tag {
    margin-top: 1.5rem;
    display: block;
    background: rgba(37, 99, 235, 0.08);
    /* Lighter background */
    color: var(--primary-dark);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.about-img img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.about-img:hover img {
    transform: scale(1.05);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.skill-tag {
    background: var(--surface-alt);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    font-weight: 500;
    border: 1px solid transparent;
    transition: var(--transition);
    display: inline-block;
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.service-card:hover .service-icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.service-icon-box {
    /* Existing styles */
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: var(--transition);
    /* Add transition */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover::before {
    opacity: 1;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    background: var(--surface);
}

.project-img {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 1.5rem;
}

.project-cat {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

/* CTA Footer */
.cta-section {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

footer {
    padding: 4rem 0 2rem;
    background: var(--background);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Mobile Nav */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Typography Sizing */
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p {
        font-size: 1rem;
    }

    /* Layout & Spacing */
    .section {
        padding: 60px 0;
    }

    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: auto;
        /* Unset left */
        right: 0;
        /* Align to right */
        width: 75%;
        /* Partial width */
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        /* Subtract header height */
        background: var(--surface);
        /* Use surface color */
        flex-direction: column;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
        /* Border mainly on left now */
        border-top: 1px solid var(--border);
        gap: 1.5rem;
        align-items: flex-start;
        /* Align items to start */
        justify-content: flex-start;
        /* Top aligned */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        /* Strong shadow on left */
    }

    .nav-links.active {
        transform: translateX(0);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        font-size: 1.25rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Hero */
    .hero {
        text-align: center;
        padding-top: calc(var(--header-height) + 2rem);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Grids to Stacks */
    .features-grid,
    .services-grid,
    .projects-grid,
    .about-grid,
    .steps-container {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 2rem;
    }

    /* Specific Component Adjustments */
    .step-item {
        width: 100%;
        min-width: unset;
        margin-bottom: 2rem;
    }

    .step-item:last-child {
        margin-bottom: 0;
    }

    .service-card {
        padding: 1.5rem;
    }

    .about-img {
        order: -1;
        /* Image first on mobile */
        max-height: 300px;
    }

    .about-img img {
        height: 100%;
        object-fit: cover;
    }

    .contact-form {
        padding: 0;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}