/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    will-change: opacity, visibility;
    aria-live: polite;
    aria-busy: true;
}

/* Loading Screen Accessibility */
.loading-screen[aria-hidden="true"] {
    display: none;
}

.loading-screen[aria-busy="true"] {
    cursor: wait;
}

/* Focus Management */
.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content */
.skip-link:focus {
    top: 6px;
    z-index: 1001;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .btn,
    .nav-link,
    .social-link {
        border: 2px solid currentColor;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 2px solid currentColor;
    }
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-top-color: var(--secondary-color);
    animation-delay: 0.5s;
}

.spinner-ring:nth-child(3) {
    border-top-color: var(--accent-color);
    animation-delay: 1s;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes textFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 10001;
    transition: width 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-trail.active {
    opacity: 1;
}

/* CSS Variables for Theme Switching */
:root {
    /* Light Theme Colors */
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --accent-color: #ff6b6b;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    /* Performance Optimizations */
--transition-fast: 0.2s ease;
--transition-medium: 0.3s ease;
--transition-slow: 0.5s ease;
--border-radius: 8px;
--box-shadow: 0 2px 10px var(--shadow-color);
--box-shadow-hover: 0 4px 20px var(--shadow-color);

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --primary-color: #64b5f6;
    --secondary-color: #81c784;
    --accent-color: #ff8a80;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3d3d3d;
    --border-color: #404040;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #008000;
        --accent-color: #ff0000;
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --bg-secondary: #f0f0f0;
        --border-color: #000000;
    }
    
    [data-theme="dark"] {
        --primary-color: #ffff00;
        --secondary-color: #00ff00;
        --accent-color: #ff8080;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --border-color: #ffffff;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    font-size: clamp(16px, 1vw, 18px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    min-font-size: 16px;
}

h1 {
    font-size: clamp(32px, 5vw, 56px);
}

h2 {
    font-size: clamp(24px, 4vw, 40px);
}

h3 {
    font-size: clamp(20px, 3vw, 32px);
}

h4 {
    font-size: clamp(18px, 2.5vw, 24px);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    min-font-size: 16px;
}

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

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content */
main {
    outline: none;
}

main:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: clamp(0.875rem, 2vw, 1rem);
    text-decoration: none;
    min-height: 44px;
    min-width: 44px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline:hover::before {
    width: 100%;
}

.btn-outline:hover {
    color: white;
}

.btn-icon {
    margin-left: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.btn:hover .btn-icon {
    opacity: 1;
    transform: translateX(0);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.95);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu[aria-expanded="false"] {
    display: none;
}

.nav-menu[aria-expanded="true"] {
    display: flex;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle button:hover {
    background: var(--bg-secondary);
    transform: rotate(180deg);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Particles Background */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    animation: badgeFloat 3s ease-in-out infinite;
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.9;
}

.typing-text {
    border-right: 3px solid var(--primary-color);
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.hero-stats .stat-item {
    text-align: center;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    min-width: 80px;
}

.hero-stats .stat-number {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero-stats .stat-label {
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    color: var(--text-secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-secondary);
    z-index: 2;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--primary-color);
    margin: 0 auto 10px;
    position: relative;
    animation: scrollBounce 2s infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.element:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-hover);
}

.element-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.3) 0%, transparent 70%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.element:hover .element-glow {
    opacity: 1;
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    animation: shapeFloat 8s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    left: 5%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 30%;
    animation-delay: 4s;
}

@keyframes shapeFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.element-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.element-2 {
    top: 60%;
    right: 20%;
    animation-delay: 1.5s;
}

.element-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 3s;
}

.element-4 {
    top: 40%;
    right: 40%;
    animation-delay: 4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--bg-primary);
}

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

.service-card {
    background: var(--bg-secondary);
    padding: 0;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.service-card-inner {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    position: relative;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .icon-glow {
    opacity: 1;
}

.service-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hover-line {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transition: left 0.6s ease;
}

.service-card:hover .hover-line {
    left: 0;
}

.hover-circle {
    position: absolute;
    top: 50%;
    right: -50px;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.6s ease;
}

.service-card:hover .hover-circle {
    right: -25px;
    opacity: 0.1;
}

.service-card h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-card ul {
    text-align: left;
}

.service-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.service-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature i {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--primary-color);
    margin-top: 0.2rem;
}

.feature h3,
.feature h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.stat-item:hover::before {
    opacity: 0.05;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 2vw, 0.9rem);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.stat-description {
    color: var(--text-secondary);
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

.stat-number {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    width: 0;
    transition: width 2s ease;
}



/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: var(--bg-primary);
}

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

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.portfolio-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.portfolio-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tech span {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Portfolio Cards (New Design) */
.portfolio-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.portfolio-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow);
}

.portfolio-card h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
}

.portfolio-card p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    font-size: clamp(0.875rem, 2.2vw, 1rem);
}

.portfolio-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.portfolio-features span {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.portfolio-features span:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.portfolio-card .portfolio-tech {
    margin-top: auto;
}

.portfolio-card .portfolio-tech span {
    background: var(--secondary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-details h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: clamp(1.125rem, 2.8vw, 1.25rem);
}

.contact-details p {
    margin-bottom: 0.5rem;
    font-size: clamp(0.875rem, 2.2vw, 1rem);
}

.contact-link {
    color: var(--primary-color);
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    overflow: hidden;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 2;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.input-wrapper:focus-within .input-line {
    width: 100%;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: clamp(0.875rem, 2vw, 1rem);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: var(--accent-color);
}

.form-group input:required,
.form-group select:required,
.form-group textarea:required {
    border-left: 3px solid var(--primary-color);
}

.form-group textarea {
    padding-left: 3rem;
    padding-top: 1rem;
}

.form-group select {
    padding-left: 3rem;
    cursor: pointer;
}

.error-message {
    color: var(--accent-color);
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.btn-submit {
    position: relative;
    overflow: hidden;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loading {
    display: flex;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: clamp(1.125rem, 2.8vw, 1.25rem);
}

.footer-section p {
    margin-bottom: 1rem;
    font-size: clamp(0.875rem, 2.2vw, 1rem);
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    font-size: clamp(0.875rem, 2.2vw, 1rem);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.social-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 2.2vw, 1rem);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-btn {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    min-width: 44px;
    min-height: 44px;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.whatsapp-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.whatsapp-btn {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 44px;
    min-height: 44px;
}

.back-to-top:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .header,
    .whatsapp-float,
    .back-to-top,
    .loading-screen,
    .cursor-trail,
    .scroll-progress {
        display: none !important;
    }
    
    .hero {
        padding: 20px 0 !important;
    }
    
    .section-title {
        color: black !important;
        background: none !important;
        -webkit-text-fill-color: black !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .btn {
        border: 1px solid black !important;
        color: black !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-card {
        min-height: auto;
    }
    
    .portfolio-card-content {
        padding: 1.5rem;
    }
    
    .portfolio-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

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

    .social-links {
        justify-content: center;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .back-to-top {
        bottom: 90px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: calc(100% - 40px);
        left: 40px !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: -30px !important;
        right: auto !important;
    }
    
    .milestone-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .milestone-item {
        padding: 1.5rem 1rem;
    }
    
    .milestone-number {
        font-size: 2rem;
    }
    
    .timeline-title {
        font-size: 2rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-achievements {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .milestone-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .milestone-item {
        padding: 1rem;
    }
    
    .milestone-number {
        font-size: 1.8rem;
    }
    
    .timeline-title {
        font-size: 1.8rem;
    }
    
    .timeline-subtitle {
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .timeline-year {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .achievement {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow: 0 4px 6px rgba(0, 0, 0, 0.8);
    }
}

/* Enhanced Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    border-left: 4px solid var(--primary-color);
    min-width: 300px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--secondary-color);
}

.toast.error {
    border-left-color: var(--accent-color);
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.toast.show::before {
    transform: translateX(100%);
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Print styles */
@media print {
    .header,
    .whatsapp-float,
    .back-to-top,
    .loading-screen,
    .cursor-trail {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
