/* Modern Portfolio Website Styles */
:root {
    /* Light theme colors - directly defined for better compatibility */
    --primary: #3b82f6;
    --secondary: #4f46e5;
    --text: #1f2937;
    --background: #f3f4f6;
    --card: #ffffff;
    --accent: #2563eb;
    --muted: #6b7280;
    
    /* Light theme fallbacks */
    --primary-light: #3b82f6;
    --secondary-light: #4f46e5;
    --text-light: #1f2937;
    --background-light: #f3f4f6;
    --card-light: #ffffff;
    --accent-light: #2563eb;
    --muted-light: #6b7280;
    
    /* Dark theme colors */
    --primary-dark: #60a5fa;
    --secondary-dark: #818cf8;
    --text-dark: #f9fafb;
    --background-dark: #111827;
    --card-dark: #1f2937;
    --accent-dark: #60a5fa;
    --muted-dark: #9ca3af;
}

/* Dark Theme */
body.dark-theme {
    --primary: var(--primary-dark);
    --secondary: var(--secondary-dark);
    --text: var(--text-dark);
    --background: var(--background-dark);
    --card: var(--card-dark);
    --accent: var(--accent-dark);
    --muted: var(--muted-dark);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

nav {
    background-color: var(--card);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
}

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

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

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

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: var(--card);
        flex-direction: column;
        align-items: center;
        padding: 0;
        transition: height 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        height: auto;
        padding: 1rem 0;
    }
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #4f46e5);  /* Hardcoded colors as backup */
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    padding-top: 60px;
}

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

.avatar {
    width: 12rem;
    height: 12rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero p {
        font-size: 1.5rem;
    }
}

.social-bar {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    color: white;
    font-size: 1rem;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
}

.social-icon:hover {
    transform: scale(1.2);
    background-color: rgba(255, 255, 255, 0.2);
}

.cta-button {
    display: inline-block;
    background-color: #ffffff;
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 36rem;
    margin: 0 auto;
}

.about-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.avatar-small {
    width: 8rem;
    height: 8rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-content p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

/* Make skills responsive */
@media (max-width: 992px) {
    .skills-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skills-container {
        grid-template-columns: 1fr;
    }
}

.skill-card {
    background-color: #ffffff;  /* Hardcoded fallback */
    background-color: var(--card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);  /* Light blue border on hover */
    border-color: rgba(var(--primary), 0.3);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: inline-block;
}

.skill-name {
    font-weight: 600;
}

#projects {
    background-color: var(--background);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background-color: var(--card);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.project-description {
    color: var(--muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.project-tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

/* Testimonials */
.testimonials-container {
    max-width: 64rem;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--card);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.testimonial-content::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    margin-right: 1rem;
    object-fit: cover;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.testimonial-role {
    color: var(--muted);
    font-size: 0.875rem;
}

.contact-content {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: var(--card);
    color: var(--primary);
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    transform: translateY(-3px);
    background-color: var(--primary);
    color: #ffffff;
}

.social-link i {
    font-size: 1.5rem;
    line-height: 1;
}

.contact-form {
    background-color: var(--card);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: var(--background);
    color: var(--text);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    display: inline-block;
    background-color: var(--primary);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

footer {
    background-color: var(--card);
    color: var(--text);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--text);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--primary);
}

.copyright {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 90;
}

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

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