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

:root {
    /* Dark theme (default) */
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: #1e1e1e;
    --card-border: #2d2d2d;
    --nav-hover: rgba(255, 255, 255, 0.1);
}

/* Light theme variables */
.light-theme {
    --dark-bg: #f5f5f5;
    --darker-bg: #e0e0e0;
    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --text: #333333;
    --text-muted: #666666;
    --card-bg: #ffffff;
    --card-border: #dddddd;
    --nav-hover: rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--dark-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    border: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background-color: var(--accent-hover);
}

.theme-toggle i {
    font-size: 1.2rem;
}

header {
    background-color: var(--darker-bg);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-content {
    margin-bottom: 1.2rem;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding-top: 0.5rem;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--nav-hover);
}

nav ul li a .fa-external-link-alt {
    font-size: 0.7rem;
    margin-left: 4px;
    opacity: 0.7;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

section {
    margin-bottom: 4rem;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h2:after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--accent);
    bottom: 0;
    left: 0;
}

section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.5s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(79, 70, 229, 0.3);
}

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

.project-card h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

.project-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.15);
    color: var(--accent);
    font-size: 1.2rem;
}

.project-card p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
    list-style: none;
}

.tech-list li {
    background-color: rgba(79, 70, 229, 0.1);
    color: #b4b0ff;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.2);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.light-theme .tech-list li {
    color: #4f46e5;
    background-color: rgba(79, 70, 229, 0.05);
}

/* Language Statistics Styles */
.language-stats {
    margin-bottom: 1.5rem;
}

.language-bar {
    height: 8px;
    width: 100%;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    margin-bottom: 10px;
}

.lang-segment {
    height: 100%;
}

.language-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.lang-label {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.project-card a {
    display: inline-flex;
    align-items: center;
    background-color: var(--accent);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-card a i {
    margin-left: 8px;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.project-card a:hover {
    background-color: var(--accent-hover);
}

.project-card a:hover i {
    transform: translateX(3px);
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--darker-bg);
    color: var(--text-muted);
    border-top: 1px solid var(--card-border);
}

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

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}

.social-icons a:hover {
    color: white;
    background-color: var(--accent);
    transform: translateY(-3px);
    border-color: var(--accent);
}

/* Contact styles */
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: white;
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.contact-link .fa-envelope {
    color: var(--accent);
}

.contact-link:hover .fa-envelope {
    color: white;
}

.contact-link i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.view-all-projects {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    background-color: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.view-all-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.view-all-btn:hover {
    background-color: var(--accent-hover);
}

.view-all-btn:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    main {
        padding: 2rem 1.5rem;
    }
    
    .view-all-btn {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
}

/* Add this near the other project-related styles */

.error-message {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
    margin: 2rem auto;
    max-width: 600px;
}

.light-theme header {
    color: var(--text);
}

.light-theme nav ul li a {
    color: var(--text);
}

.light-theme .project-card h3 {
    color: var(--text);
}

.light-theme .social-icons a {
    color: var(--text);
    background-color: var(--card-bg);
}

/* Ensure color contrast is maintained for toggles and buttons */
.light-theme .project-card a,
.light-theme .view-all-btn,
.light-theme .theme-toggle {
    color: white;
} 