/* CSS Variables for light and dark themes */
/* These are the default values for the dark theme */
:root {
    --bg-color: #121212;
    --text-color: #E0E0E0;
    --primary-color: #4A90E2;
    --secondary-text-color: #B0B0B0;
    --card-bg-color: #181818;
    --border-color: #2e2e2e;
    --link-hover-color: #E0E0E0;
    --btn-bg-color: #4A90E2;
    --btn-hover-bg-color: #3a7acf;
}

/* Override variables for the light theme */
    @media (prefers-color-scheme: light) {
:root {
    --bg-color: #F5F5F5;
        --text-color: #121212;
        --primary-color: #0060d0;
        --secondary-text-color: #666;
        --card-bg-color: #FFFFFF;
        --border-color: #E0E0E0;
        --link-hover-color: #121212;
        --btn-bg-color: #0060d0;
    --btn-hover-bg-color: #004da0;
     }
}
        
/* General page styles now use the variables */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Utility classes for layout, spacing, and typography */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.grid-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.section-padding {
    padding: 4rem 0;
}

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

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-text-color);
}

.bg-dark {
    background-color: var(--card-bg-color);
}

.bg-card {
    background-color: var(--card-bg-color);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Specific Component Styles */

/* Header */
header {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
        
header .nav-links a {
    color: var(--secondary-text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

header .nav-links a:hover {
    color: var(--link-hover-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1f1f1f 0%, #0a0a0a 100%);
    padding: 6rem 1rem;
    border-radius: 1rem;
    margin: 2rem 0;
    text-align: center;
}

/* Adjusted Hero background for light mode */
@media (prefers-color-scheme: light) {
    .hero {
    background: linear-gradient(135deg, #E0E0E0 0%, #F5F5F5 100%);
    }
}

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 0.5rem;
            font-weight: 800;
        }

        .hero h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--secondary-text-color);
            margin-bottom: 1.5rem;
        }

        .hero p {
            max-width: 600px;
            margin: 0 auto 2rem;
            color: var(--secondary-text-color);
        }

        .hero .profile-img {
            width: 150px;
            height: 150px;
            border: 4px solid var(--primary-color);
            border-radius: 50%;
            margin-bottom: 1.5rem;
            box-shadow: 0 0 15px var(--primary-color);
            animation: pulse-border 2s infinite;
        }
        
        @keyframes pulse-border {
            0% { box-shadow: 0 0 5px var(--primary-color); }
            50% { box-shadow: 0 0 20px var(--primary-color); }
            100% { box-shadow: 0 0 5px var(--primary-color); }
        }

        /* Buttons */
        .btn {
            display: inline-block;
            padding: 0.75rem 2rem;
            background-color: var(--btn-bg-color);
            color: white;
            text-decoration: none;
            border-radius: 9999px;
            font-weight: 700;
            transition: background-color 0.3s, transform 0.3s;
        }

        .btn:hover {
            background-color: var(--btn-hover-bg-color);
            transform: scale(1.05);
        }

        /* Card styles for sections */
        .card {
            background-color: var(--card-bg-color);
            border: 1px solid var(--border-color);
            padding: 2rem;
            border-radius: 0.75rem;
            transition: transform 0.3s, box-shadow 0.3s;
        }

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

        .card h3 {
            color: var(--primary-color);
            margin-top: 0;
            margin-bottom: 1rem;
        }

        .card ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .card li {
            padding: 0.5rem 0;
        }

        .project-card {
            background-color: var(--card-bg-color);
            border: 1px solid var(--border-color);
            border-radius: 0.75rem;
            overflow: hidden;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .project-card:hover {
            transform: scale(1.01);
            box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
        }

        .project-card img {
            width: 100%;
            height: 350px;
            object-fit: cover;
            border-bottom: 1px solid var(--border-color);
        }

        .project-card-content {
            padding: 1.5rem;
        }

        .tag {
            display: inline-block;
            background-color: var(--border-color);
            color: var(--secondary-text-color);
            font-size: 0.8rem;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            margin: 0.25rem;
        }

        .contact-section .btn {
            margin-top: 1rem;
        }
        
        .social-icons a {
            color: var(--secondary-text-color);
            transition: color 0.3s;
            display: inline-block;
        }

        .social-icons a:hover {
            color: var(--primary-color);
            transform: scale(1.1);
        }
        
        .social-icons svg {
            width: 32px;
            height: 32px;
            fill: var(--secondary-text-color);
            transition: fill 0.3s;
        }
        .social-icons a:hover svg {
            fill: var(--primary-color);
        }

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text-color);
    margin-top: 2rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

/* Smooth scroll effect */
html {
    scroll-behavior: smooth;
}

/* Styles for hero section staggered animation */
.stagger-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}
        
/* Specific blur effect for subtitle */
.stagger-in.blur {
    filter: blur(5px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, filter 0.6s ease-out;
    will-change: opacity, transform, filter;
}

.stagger-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
        
.stagger-in.is-visible.blur {
    filter: blur(0);
}

/* Styles for general fade-in sections */
.fade-section {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, filter 0.6s ease-out;
}

.fade-section.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero h2 { font-size: 1.25rem; }
}
