/* Critical CSS */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #1E40AF;
    --transition-duration: 0.3s;
}

/* Carousel Styles */
.carousel {
    position: relative;
    height: 100vh;
    overflow: hidden;
    will-change: transform;
}

.carousel-inner {
    position: relative;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity;
    backface-visibility: hidden;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.carousel-content {
    /* position: relative; */
    z-index: 2;
    padding: 0 1rem;
}

/* Hero Text Styles */
.hero-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-buttons a {
    transition: all 0.3s ease;
}

.hero-buttons a:hover {
    transform: translateY(-2px);
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Scroll to Top Button Styles */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #3B82F6;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
}

.scroll-top:hover {
    background: #1E40AF;
    transform: translateY(-3px);
}

/* Skill Card Styles */
.skill-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    transition: transform 0.3s ease;
}

.skill-card:hover i {
    transform: scale(1.1);
}

/* Testimonial Card Styles */
.testimonial-card {
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Blog Card Styles */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Accessibility Styles */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Form Styles */
#contact-form input,
#contact-form textarea {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

#contact-form input:hover,
#contact-form textarea:hover {
    border-color: #cbd5e1;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#contact-form input.error,
#contact-form textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

#contact-form button[type="submit"] {
    transition: all 0.3s ease;
}

#contact-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#contact-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.alert {
    animation: slideIn 0.3s ease-out;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .carousel-content h1 {
        font-size: 2.5rem;
    }
    
    .carousel-content p {
        font-size: 1.2rem;
    }
}

/* Code Block Styles */
pre {
    background-color: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
}

pre code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.dark pre {
    background-color: #1e293b;
}

.dark pre code {
    color: #e2e8f0;
}

/* Project Card Styles */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
} 