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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    min-height: 100vh;
    transition: background 0.35s ease, color 0.35s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation Styles */
.navigation {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    z-index: 100;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    transform: translateY(-2px);
}

.header {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

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

.contact-info {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info h2,
.contact-form h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(45deg, #6366f1, #8b5cf6) 1;
    padding-bottom: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.contact-details h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: #555;
    margin: 0;
}

.contact-details a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #8b5cf6;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366f1;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.submit-btn {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.availability {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.availability h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.availability p {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.availability-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d4edda;
    color: #155724;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    border: 2px solid #c3e6cb;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(30px);
    transition: all 0.3s ease;
}

.popup-overlay.show .popup {
    transform: scale(1) translateY(0);
}

.popup-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.popup-icon.success {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.popup-icon.error {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
}

.popup-icon.warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
}

.popup h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.popup p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.popup-btn {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* Form interaction animations */
.form-group {
    transition: transform 0.2s ease;
}

.form-group.focused {
    transform: scale(1.02);
}

/* ================================================
   ENHANCED RESPONSIVE DESIGN FOR CONTACT PAGE
   ================================================ */

/* Mobile First Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .header {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Hero Image Responsive */
    .contact-hero {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    /* Contact Content Grid - Stack on Mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Contact Info Responsive */
    .contact-info {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .contact-info h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    /* Tech Stats Grid - 2 Columns on Mobile */
    .tech-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Contact Items Responsive */
    .contact-content .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .contact-details h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .contact-details p {
        font-size: 0.9rem;
    }
    
    /* Contact Form Responsive */
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-form h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.8rem 1rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        margin-top: 1rem;
    }
    
    /* Gallery Container Responsive */
    .gallery-container {
        margin: 1.5rem 0;
        gap: 0.5rem;
    }
    
    .scrollable-gallery {
        padding: 1rem 0.5rem;
        gap: 1rem;
    }
    
    .gallery-item {
        flex: 0 0 250px;
        height: 200px;
    }
    
    .gallery-overlay h3 {
        font-size: 1.2rem;
    }
    
    .gallery-overlay p {
        font-size: 0.9rem;
    }
    
    /* Scroll Buttons Responsive */
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .scroll-left {
        left: -20px;
    }
    
    .scroll-right {
        right: -20px;
    }
    
    /* Availability Section */
    .availability {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .availability h2 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .availability p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .availability-status {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    /* Navigation Responsive */
    .nav-links {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .nav-links a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 200px;
        text-align: center;
    }
    
    .navigation {
        padding: 1rem;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }
}

/* Tablet Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 1.5rem;
    }
    
    .contact-content {
        gap: 2.5rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 2rem;
    }
    
    .gallery-item {
        flex: 0 0 280px;
        height: 220px;
    }
    
    .tech-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .header {
        padding: 1.5rem 1rem;
        margin-top: 100px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .contact-hero {
        height: 150px;
        margin-bottom: 1rem;
    }
    
    /* Single Column Stats */
    .tech-stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .stat-item {
        padding: 1rem 0.6rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Contact Form Ultra Mobile */
    .contact-form {
        padding: 1rem;
    }
    
    .contact-form h2 {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Gallery Ultra Mobile */
    .gallery-item {
        flex: 0 0 200px;
        height: 160px;
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.8rem;
    }
    
    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .scroll-left {
        left: -17px;
    }
    
    .scroll-right {
        right: -17px;
    }
    
    /* Ultra Mobile Contact Items */
    .contact-content .contact-item {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .contact-details h3 {
        font-size: 0.9rem;
    }
    
    .contact-details p {
        font-size: 0.8rem;
    }
    
    /* Availability Ultra Mobile */
    .availability {
        padding: 1.5rem 1rem;
    }
    
    .availability h2 {
        font-size: 1.3rem;
    }
    
    .availability p {
        font-size: 0.9rem;
    }
    
    .availability-status {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Gallery Subtitle */
    .gallery-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    /* Scroll Indicators */
    .scroll-hint {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

/* Large Desktop Optimization */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 3rem;
    }
    
    .contact-content {
        gap: 4rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 3rem;
    }
    
    .gallery-item {
        flex: 0 0 350px;
        height: 280px;
    }
    
    .tech-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        max-width: 900px;
    }
}

/* Contact Hero Image Responsive */
.contact-hero {
    width: 100%;
    max-width: 800px;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.contact-hero:hover {
    transform: scale(1.02);
}

/* Enhanced Gallery Responsiveness */
@media (max-width: 768px) {
    .gallery-container {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
    }
    
    .scrollable-gallery {
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .scrollable-gallery::-webkit-scrollbar {
        display: none;
    }
    
    .gallery-item {
        scroll-snap-align: center;
        border-radius: 12px;
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    .contact-content .contact-item {
        min-height: 80px;
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        padding: 0.8rem 1rem;
    }
    
    .submit-btn {
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .gallery-item {
        min-height: 200px;
    }
    
    .scroll-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Print Styles */
@media print {
    .navigation,
    .scroll-btn,
    .back-to-top,
    .gallery-container {
        display: none !important;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form,
    .availability {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* Focus and Accessibility Improvements */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 3px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

.submit-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

.contact-content .contact-item:focus-within {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .contact-content .contact-item,
    .gallery-item,
    .submit-btn,
    .scroll-btn {
        transition: none;
        animation: none;
    }
    
    .scrollable-gallery {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .contact-info,
    .contact-form,
    .availability {
        background: #2d3748;
        color: white;
    }
    
    .contact-info h2,
    .contact-form h2,
    .availability h2 {
        color: white;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #4a5568;
        color: white;
        border-color: #6366f1;
    }
    
    .contact-details h3 {
        color: #e2e8f0;
    }
    
    .contact-details p {
        color: #cbd5e1;
    }
}

/* ============================================================
   DARK THEME – Contact page overrides
   ============================================================ */
:root.dark-theme body {
    background: linear-gradient(135deg, #1e1b4b 0%, #2d1657 35%, #0c3d5c 70%, #0a3344 100%);
    color: #e2e8f0;
}
:root.dark-theme .contact-info,
:root.dark-theme .contact-form,
:root.dark-theme .availability {
    background: #1e293b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: #e2e8f0;
}
:root.dark-theme .contact-info h2,
:root.dark-theme .contact-form h2,
:root.dark-theme .availability h2 { color: #e2e8f0; }
:root.dark-theme .contact-details h3 { color: #e2e8f0; }
:root.dark-theme .contact-details p  { color: #94a3b8; }
:root.dark-theme .contact-details a  { color: #818cf8; }
:root.dark-theme .contact-item {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.06);
}
:root.dark-theme .form-group label { color: #cbd5e1; }
:root.dark-theme .form-group input,
:root.dark-theme .form-group textarea,
:root.dark-theme .form-group select {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}
:root.dark-theme .form-group input:focus,
:root.dark-theme .form-group textarea:focus,
:root.dark-theme .form-group select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
:root.dark-theme .form-group input::placeholder,
:root.dark-theme .form-group textarea::placeholder { color: #475569; }
:root.dark-theme .form-group select option {
    background: #0f172a;
    color: #e2e8f0;
}
:root.dark-theme .availability p { color: #94a3b8; }
:root.dark-theme .nav-links a     { color: #cbd5e1; }
:root.dark-theme .navigation {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}
