/* ==========================================
   CSS VARIABLES & DESIGN TOKENS
   ========================================== */
:root {
    /* Premium Color Palette */
    --primary-main: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;

    --secondary-main: #0f172a;
    --secondary-light: #334155;

    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;

    --surface-light: #ffffff;
    --surface-off-white: #f8fafc;
    --surface-dark: #0f172a;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* Modern Gradients */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    /* Spacing & Sizes */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);

    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--surface-off-white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

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

/* ==========================================
   NAVIGATION - Glassmorphism
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    height: 70px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-main);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-main);
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-main);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-main);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--secondary-main);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ==========================================
   HERO SECTION - Modern & Dynamic
   ========================================== */
.hero {
    position: relative;
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--secondary-main);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    width: 120%;
    height: 120%;
    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 40%, rgba(15, 23, 42, 0.8) 100%);
    animation: gradientMove 15s ease infinite alternate;
}

@keyframes gradientMove {
    0% {
        transform: translate(-5%, -5%);
    }

    100% {
        transform: translate(5%, 5%);
    }
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    margin-top: -60px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-gold-light);
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease-out;
}


/* Hero Typography Fixes */
.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
    /* Fallback */
    background: linear-gradient(to bottom right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.gradient-text {
    /* Changed to bright Gold/Amber for contrast against dark blue */
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.3));
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-tertiary);
    /* Ensure this is light enough */
    color: rgba(255, 255, 255, 0.85);
    /* Direct override for better contrast */
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-cta {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-main);
    color: white;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Stats Polish */
.hero-stats {
    display: flex;
    gap: 24px;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center align */
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    /* Glass effect */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 32px;
    border-radius: 16px;
    min-width: 180px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* ==========================================
   SECTIONS GENERAL
   ========================================== */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-main);
    letter-spacing: 2px;
    margin-bottom: 16px;
    background: rgba(37, 99, 235, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-main);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   ABOUT SECTION - Bento Grid Style
   ========================================== */
.about {
    background: white;
}

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

.about-card {
    background: var(--surface-off-white);
    padding: 32px;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: white;
    border-color: rgba(37, 99, 235, 0.1);
}

.main-card {
    grid-column: span 2;
    grid-row: span 2;
    background: var(--primary-main);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.main-card:hover {
    background: var(--primary-dark);
    transform: none;
}

.main-card h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 16px;
}

.main-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

.main-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-main);
    font-size: 24px;
    box-shadow: var(--shadow-sm);
}

.main-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

/* ==========================================
   SERVICES SECTION - Hover Cards
   ========================================== */
.services {
    background: var(--surface-off-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.service-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-main);
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::after {
    transform: scaleY(1);
}

.service-card:hover h3,
.service-card:hover p,
.service-card:hover .service-icon {
    color: white;
}

.service-card:hover .service-features li {
    color: rgba(255, 255, 255, 0.9);
}

.service-card:hover .service-features li::before {
    background: white;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--surface-off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-main);
}

.service-card:hover .service-icon {
    background: rgba(255, 255, 255, 0.2);
}

.service-card:hover .service-icon svg {
    stroke: white;
}

.service-features li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--primary-main);
    border-radius: 50%;
}

/* ==========================================
   PROJECTS SECTION - Masonry Feel
   ========================================== */
.projects {
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 240px;
    background-color: var(--primary-light);
    position: relative;
    /* Placeholder gradient for image */
    background: linear-gradient(45deg, #1e40af, #60a5fa);
}

.project-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
}

.project-status {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.project-content {
    padding: 32px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--secondary-main);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--surface-off-white);
}

/* ==========================================
   CONTACT SECTION - Polished Form
   ========================================== */
.contact {
    background: linear-gradient(180deg, var(--surface-off-white) 0%, white 100%);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateX(10px);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: var(--surface-off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-main);
}

.contact-form-wrapper {
    background: white;
    padding: 48px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-main);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--surface-off-white);
    border-radius: var(--border-radius-sm);
    background: var(--surface-off-white);
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: white;
    border-color: var(--primary-main);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-block {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
}

/* ==========================================
   FOOTER - Dark Theme
   ========================================== */
.footer {
    background: var(--secondary-main);
    color: var(--text-tertiary);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo h3 {
    color: white;
}

.footer h4 {
    color: white;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
/* ==========================================
   RESPONSIVE DESIGN SYSTEM
   ========================================== */

/* Tablet & Smaller Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

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

    .main-card {
        grid-column: span 2;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

/* Mobile Devices */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* Navigation */
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        padding: 20px;
    }

    .nav-menu.active {
        transform: translateY(0);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--secondary-main);
    }

    /* Hero Section */
    .hero {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 60px;
        text-align: center;
    }

    .hero-content {
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .btn {
        width: 100%;
        padding: 14px 24px;
    }

    .hero-stats {
        flex-direction: column;
        width: 100%;
        gap: 16px;
        margin-top: 40px;
        border-top: none;
        padding-top: 0;
    }

    .stat-item {
        width: 100%;
        min-width: auto;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Grids to Stack */
    .about-grid,
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .main-card {
        grid-column: span 1;
        grid-row: auto;
        padding: 24px;
        /* Smaller padding */
    }

    .main-card::before {
        width: 200px;
        height: 200px;
        top: -20%;
        right: -20%;
    }

    /* Cards */
    .about-card,
    .service-card,
    .project-content,
    .info-card,
    .contact-form-wrapper {
        padding: 24px;
    }

    .project-image {
        height: 200px;
    }

    /* Contact */
    .contact-form-wrapper {
        padding: 24px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 24px;
        padding-top: 24px;
        text-align: center;
    }
}

/* Small Mobiles */
@media (max-width: 380px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Animations Keyframes moved to base for cleanliness */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}