/* ========================================
   CSS Variables & Theme System
   ======================================== */
:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fc;
    --bg-tertiary: #f0f2f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --accent: #4f46e5;
    --accent-light: #818cf8;
    --accent-dark: #3730a3;
    --accent-bg: rgba(79, 70, 229, 0.08);
    --accent-bg-hover: rgba(79, 70, 229, 0.15);
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.15);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
    --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    --gradient-accent: linear-gradient(135deg, #4f46e5, #7c3aed);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --header-bg: rgba(255, 255, 255, 0.85);
    --hero-text: #ffffff;
    --service-card-bg: #ffffff;
    --project-overlay: rgba(15, 23, 42, 0.6);
    --footer-bg: #0f172a;
    --footer-text: #cbd5e1;
    --footer-heading: #ffffff;
    --input-bg: #f8f9fc;
    --input-border: #e2e8f0;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-text: #16a34a;
}

[data-theme="dark"] {
    --bg-primary: #0b0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #263348;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --accent: #818cf8;
    --accent-light: #a5b4fc;
    --accent-dark: #6366f1;
    --accent-bg: rgba(129, 140, 248, 0.1);
    --accent-bg-hover: rgba(129, 140, 248, 0.2);
    --border: rgba(241, 245, 249, 0.08);
    --border-strong: rgba(241, 245, 249, 0.15);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
    --gradient-hero: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #581c87 100%);
    --gradient-accent: linear-gradient(135deg, #818cf8, #a78bfa);
    --glass-bg: rgba(17, 24, 39, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(11, 15, 26, 0.9);
    --service-card-bg: #1e293b;
    --project-overlay: rgba(11, 15, 26, 0.7);
    --footer-bg: #060a13;
    --footer-text: #64748b;
    --footer-heading: #f1f5f9;
    --input-bg: #1e293b;
    --input-border: #334155;
    --success-bg: rgba(34, 197, 94, 0.15);
    --success-text: #4ade80;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Preloader
   ======================================== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-inner {
    text-align: center;
}

.preloader-logo-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    animation: preloaderSpin 2s ease-in-out infinite;
}

.preloader-logo-img {
    width: 100%;
    height: 100%;
}

.preloader-text {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderSpin {
    0%, 100% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(0.9); }
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.97); }
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.preloader-bar-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    animation: preloaderFill 1.5s ease-in-out forwards;
}

@keyframes preloaderFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-svg {
    width: 42px;
    height: 42px;
    transition: transform 0.4s ease;
}

.logo:hover .logo-svg {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    color: var(--text-primary);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: var(--accent-bg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle, .lang-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover, .lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
    transform: translateY(-1px);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

.lang-toggle {
    font-size: 0.8rem;
    font-weight: 700;
    width: auto;
    padding: 0 12px;
}

.lang-label {
    pointer-events: none;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
}

.hero-content {
    color: var(--hero-text);
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-title span {
    display: block;
}

.hero-title-accent {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.15rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 36px;
    max-width: 500px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before { opacity: 1; }

.btn-primary {
    background: #fff;
    color: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    background: var(--gradient-accent);
    color: #fff;
}

.btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

/* Hero Visual */
.hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    perspective: 800px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
    transition: all 0.4s ease;
    cursor: default;
}

.hero-card:hover {
    transform: translateY(-8px) rotateX(5deg);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
}

.hero-card-icon svg {
    width: 100%;
    height: 100%;
}

.hero-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-card-1 { animation: heroCardIn 0.6s ease 0.4s both; }
.hero-card-2 { animation: heroCardIn 0.6s ease 0.5s both; }
.hero-card-3 { animation: heroCardIn 0.6s ease 0.6s both; }
.hero-card-4 { animation: heroCardIn 0.6s ease 0.7s both; }

@keyframes heroCardIn {
    from { opacity: 0; transform: translateY(30px) rotateX(-10deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    background: #fff;
    border-radius: 50%;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(18px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ========================================
   Sections Base
   ======================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   About Section
   ======================================== */
.about { background: var(--bg-secondary); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-image-accent {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 120px;
    height: 120px;
    background: var(--gradient-accent);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.6;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.stat {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    display: inline;
}

.stat-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========================================
   Services Section
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    background: var(--service-card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
    transition: all 0.4s ease;
    overflow: hidden;
    cursor: default;
}

.service-card-bg {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50%;
    transform: scale(0);
}

.service-card:hover .service-card-bg {
    opacity: 0.05;
    transform: scale(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient-accent);
    transform: scale(1.1) rotate(-5deg);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
    transition: color 0.3s ease;
}

.service-card:hover .service-icon svg {
    color: #fff;
}

.service-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.service-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.service-badge {
    display: inline-block;
    margin-top: 16px;
    padding: 4px 14px;
    background: var(--gradient-accent);
    color: #fff;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   Blueprint Parallax Section
   ======================================== */
.parallax-blueprint {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0a1628;
}

[data-theme="dark"] .parallax-blueprint {
    background: #060d1a;
}

.blueprint-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.blueprint-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Blueprint drawing animation */
.bp-building, .bp-crane, .bp-dims, .bp-compass {
    transition: opacity 0.8s ease;
}

.bp-building rect,
.bp-building line,
.bp-building polygon,
.bp-building path,
.bp-crane line,
.bp-crane rect,
.bp-crane path,
.bp-dims line,
.bp-dims text,
.bp-compass circle,
.bp-compass line,
.bp-compass text,
.bp-compass polygon {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease;
}

.bp-building.drawn,
.bp-crane.drawn,
.bp-dims.drawn,
.bp-compass.drawn {
    opacity: 1 !important;
}

.bp-building.drawn rect,
.bp-building.drawn line,
.bp-building.drawn polygon,
.bp-building.drawn path,
.bp-crane.drawn line,
.bp-crane.drawn rect,
.bp-crane.drawn path,
.bp-dims.drawn line,
.bp-dims.drawn text,
.bp-compass.drawn circle,
.bp-compass.drawn line,
.bp-compass.drawn text,
.bp-compass.drawn polygon {
    stroke-dashoffset: 0;
}

.bp-building-1.drawn rect,
.bp-building-1.drawn line,
.bp-building-1.drawn polygon {
    transition-delay: 0.1s;
}

.bp-building-2.drawn rect,
.bp-building-2.drawn line {
    transition-delay: 0.6s;
}

.bp-building-3.drawn rect,
.bp-building-3.drawn line,
.bp-building-3.drawn circle {
    transition-delay: 1.1s;
}

.bp-crane.drawn line,
.bp-crane.drawn rect,
.bp-crane.drawn path {
    transition-delay: 1.6s;
}

.bp-dims.drawn line,
.bp-dims.drawn text {
    transition-delay: 2s;
}

.bp-compass.drawn circle,
.bp-compass.drawn line,
.bp-compass.drawn text,
.bp-compass.drawn polygon {
    transition-delay: 2.3s;
}

/* Crane cable animation */
.crane-cable {
    animation: cableSway 4s ease-in-out infinite;
    transform-origin: top;
}

@keyframes cableSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(1deg); }
}

/* Scanning line */
.blueprint-scanline {
    position: absolute;
    top: 0;
    left: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(79, 70, 229, 0.6), rgba(129, 140, 248, 0.8), rgba(79, 70, 229, 0.6), transparent);
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 30px 10px rgba(79, 70, 229, 0.15);
}

.blueprint-scanline.active {
    animation: scanline 4s ease-in-out forwards;
}

@keyframes scanline {
    0% { left: -2%; }
    100% { left: 102%; }
}

/* Content */
.blueprint-content {
    position: relative;
    z-index: 3;
    padding: 80px 24px;
}

.blueprint-text {
    max-width: 550px;
}

.blueprint-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(79, 70, 229, 0.2);
    color: #818cf8;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.blueprint-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 20px;
}

.blueprint-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 36px;
}

.blueprint-stats-row {
    display: flex;
    gap: 40px;
}

.blueprint-stat {
    text-align: center;
}

.blueprint-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #818cf8;
    display: inline;
}

.blueprint-stat-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: #818cf8;
}

.blueprint-stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

/* Blueprint parallax layers */
.bp-building-1 { transform: translateY(0); transition: transform 0.1s linear; }
.bp-building-2 { transform: translateY(0); transition: transform 0.1s linear; }
.bp-building-3 { transform: translateY(0); transition: transform 0.1s linear; }
.bp-crane { transform: translateY(0); transition: transform 0.1s linear; }

@media (max-width: 768px) {
    .parallax-blueprint {
        min-height: 500px;
    }
    .blueprint-stats-row {
        flex-direction: column;
        gap: 20px;
    }
    .blueprint-text {
        max-width: 100%;
        text-align: center;
    }
    .blueprint-stats-row {
        flex-direction: row;
        justify-content: center;
    }
}

/* ========================================
   Projects Section
   ======================================== */
.projects { background: var(--bg-secondary); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: var(--project-overlay);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-info {
    padding: 24px;
}

.project-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.project-info p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--accent-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.contact-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-map {
    margin-top: 8px;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-bg);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    margin-top: 16px;
    padding: 14px 20px;
    background: var(--success-bg);
    color: var(--success-text);
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
}

.form-success.show {
    display: block;
    animation: fadeInUp 0.4s ease;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--footer-bg);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: var(--footer-heading);
}

.footer-desc {
    color: var(--footer-text);
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--footer-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: var(--footer-text);
    font-size: 0.9rem;
    padding: 6px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-light);
    transform: translateX(4px);
}

.footer-company {
    color: var(--footer-text);
    font-size: 0.9rem;
    margin-top: 8px;
}

.footer-address {
    color: var(--footer-text);
    font-size: 0.85rem;
    margin-top: 4px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    color: var(--footer-text);
    font-size: 0.85rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

[data-animate] {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate="fade-up"] { transform: translateY(40px); }
[data-animate="fade-left"] { transform: translateX(40px); }
[data-animate="fade-right"] { transform: translateX(-40px); }

[data-animate].animated {
    opacity: 1;
    transform: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav.open {
        right: 0;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .burger {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 120px 24px 60px;
    }

    .hero-desc {
        margin: 0 auto 36px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        max-width: 350px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-scroll {
        display: none;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        grid-template-columns: 1fr 1fr;
    }

    .hero-card {
        padding: 24px 16px;
    }

    .contact-form {
        padding: 24px;
    }
}

/* ========================================
   Global Background Canvas
   ======================================== */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   Hero Aurora & Grid Effects
   ======================================== */
.hero-aurora {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 50% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    animation: auroraShift 8s ease-in-out infinite alternate;
    opacity: 0.7;
}

@keyframes auroraShift {
    0% { 
        filter: hue-rotate(0deg); 
        transform: scale(1) translateX(0);
    }
    33% { 
        filter: hue-rotate(15deg); 
        transform: scale(1.05) translateX(2%);
    }
    66% { 
        filter: hue-rotate(-10deg); 
        transform: scale(0.98) translateX(-2%);
    }
    100% { 
        filter: hue-rotate(20deg); 
        transform: scale(1.02) translateX(1%);
    }
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    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: 60px 60px;
    animation: gridMove 20s linear infinite;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* ========================================
   Floating Geometric Shapes
   ======================================== */
.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.section {
    position: relative;
}

.shape {
    position: absolute;
    opacity: 0.12;
}

[data-theme="dark"] .shape {
    opacity: 0.08;
}

.shape-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient-accent);
    top: -80px;
    right: -100px;
    animation: shapeFloat1 12s ease-in-out infinite;
    filter: blur(40px);
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    bottom: 10%;
    left: -60px;
    animation: shapeFloat2 15s ease-in-out infinite;
    filter: blur(50px);
}

.shape-ring {
    width: 180px;
    height: 180px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation: shapeRotate 25s linear infinite;
    opacity: 0.08;
}

.shape-ring-2 {
    width: 120px;
    height: 120px;
    border: 2px solid var(--accent-light);
    border-radius: 50%;
    top: 15%;
    right: 10%;
    animation: shapeRotate 18s linear infinite reverse;
    opacity: 0.06;
}

.shape-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    top: 20%;
    left: 15%;
    animation: shapePulse 4s ease-in-out infinite;
    box-shadow: 0 0 20px var(--accent);
}

.shape-dot-2 {
    width: 6px;
    height: 6px;
    background: var(--accent-light);
    border-radius: 50%;
    bottom: 30%;
    right: 20%;
    animation: shapePulse 3s ease-in-out infinite 1s;
    box-shadow: 0 0 15px var(--accent-light);
}

.shape-dot-3 {
    width: 10px;
    height: 10px;
    background: #f59e0b;
    border-radius: 50%;
    top: 30%;
    right: 8%;
    animation: shapePulse 5s ease-in-out infinite 0.5s;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
}

.shape-square {
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent);
    border-radius: 12px;
    top: 15%;
    right: 15%;
    animation: shapeFloat1 10s ease-in-out infinite;
    transform-origin: center;
    opacity: 0.06;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--accent);
    top: 8%;
    left: 8%;
    animation: shapeFloat2 14s ease-in-out infinite;
    opacity: 0.05;
    filter: blur(1px);
}

.shape-cross {
    width: 40px;
    height: 40px;
    position: absolute;
    bottom: 20%;
    right: 12%;
    animation: shapeRotate 20s linear infinite;
    opacity: 0.08;
}

.shape-cross::before, .shape-cross::after {
    content: '';
    position: absolute;
    background: var(--accent);
    border-radius: 2px;
}

.shape-cross::before {
    width: 100%;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.shape-cross::after {
    width: 4px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.shape-hexagon {
    width: 100px;
    height: 100px;
    background: var(--accent);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    top: 12%;
    right: 5%;
    animation: shapeFloat1 16s ease-in-out infinite;
    opacity: 0.04;
    filter: blur(2px);
}

@keyframes shapeFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(5deg); }
    50% { transform: translate(-10px, 20px) rotate(-3deg); }
    75% { transform: translate(15px, 10px) rotate(2deg); }
}

@keyframes shapeFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-25px, -20px) rotate(-8deg); }
    66% { transform: translate(15px, 25px) rotate(5deg); }
}

@keyframes shapeRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shapePulse {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(2.5); opacity: 0.4; }
}

/* ========================================
   Section Glow Effects
   ======================================== */
.section-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

.services-glow {
    background: var(--gradient-accent);
    top: -200px;
    left: -200px;
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.1; transform: scale(1.1); }
}

/* ========================================
   Enhanced Service Card Glow on Hover
   ======================================== */
.service-card::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-bg-hover) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

.service-card:hover::before {
    opacity: 1;
}

/* ========================================
   Project Card Shine Effect
   ======================================== */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover::after {
    left: 150%;
}

/* ========================================
   Text Gradient Animation
   ======================================== */
.section-title {
    background-size: 200% 200%;
}

/* ========================================
   Noise Texture Overlay
   ======================================== */
.about::before,
.services::before,
.projects::before,
.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

.about, .services, .projects, .contact {
    position: relative;
    overflow: hidden;
}

/* ========================================
   Smooth transitions for theme change
   ======================================== */
body,
.header,
.service-card,
.project-card,
.contact-card,
.contact-form,
.stat,
.footer,
.nav,
input,
textarea {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
