/* Color Palette - Custom CSS Variables */
:root {
    /* Primary Color - Main brand color */
    --primary-color: #1F363D;
    --primary-hover: #152a30;
    --primary-light: #2d4c56;
    --primary-dark: #0f1b1f;
    
    /* Secondary Color - Supporting color */
    --secondary-color: #40798C;
    --secondary-hover: #336270;
    --secondary-light: #5591a0;
    --secondary-dark: #2a5661;
    
    /* Accent Color - Highlight/emphasis color */
    --accent-color: #70A9A1;
    --accent-hover: #5d8f88;
    --accent-light: #8bbab3;
    --accent-dark: #4d7670;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e1e8ed;
    --dark-gray: #666666;
    --text-color: #333333;
    --text-light: #555555;
    --text-muted: #7f8c8d;
    
    /* Status Colors */
    --success-color: #27ae60;
    --success-bg: #d4edda;
    --success-text: #155724;
    
    /* Shadow and Effects */
    --shadow-light: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 0.25rem;
    padding-left: 2rem;
}

.lang-toggle-btn:hover {
    transform: scale(1.2);
}

/* Mobile positioning - language toggle stays visible */
@media (max-width: 768px) {
    .nav-right {
        gap: 0.5rem;
    }
}

/* Prevent flash of untranslated content */
/* body.loading {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.loaded {
    opacity: 1;
} */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    border: 3px solid var(--medium-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

body.loaded .loading-overlay {
    display: none;
}

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

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

/* Header and Navigation */
header {
    background: var(--white);
    box-shadow: var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo img {
    height: 60px;
    max-height: 60px;
    width: auto;
}

/* Use a right-side wrapper for nav items */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language toggle (flag) stays far right */
#language-toggle {
    font-size: 1.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Nav links come before flag on desktop */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    justify-content: flex-end;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

/* Hamburger hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding-left: 10px; /* ← Extra padding for mobile */
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Main content */
main {
    margin-top: 80px;
}

/* Hero section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--light-gray) 0%, #c3cfe2 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 50%;
    box-shadow: var(--shadow-heavy);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--secondary-hover);
    border-color: var(--secondary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border-color: var(--text-color);
}

.btn-outline:hover {
    background: var(--text-color);
    color: var(--white);
}

.btn-accent {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

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

/* Featured Projects */
.featured-projects {
    padding: 4rem 0;
}

.featured-projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s;
}

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

.project-image {
    height: 200px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
    font-size: 3rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-content p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.project-links a:hover {
    text-decoration: underline;
}

.project-tech {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    background: var(--light-gray);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* About Page Styles */
.about-hero {
    padding: 4rem 0;
    background: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text .lead {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    line-height: 1.8;
}

.about-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    box-shadow: var(--shadow-heavy);
}

/* Skills Section */
.skills-section {
    padding: 4rem 0;
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Accent variant for skill tags */
.skill-tag.accent {
    background: var(--accent-color);
}

/* Timeline Section */
.timeline-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.timeline-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 1rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-date {
    width: 45%;
    text-align: right;
    padding-right: 2rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.timeline-content {
    width: 45%;
    padding-left: 2rem;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.timeline-content p {
    color: var(--dark-gray);
    line-height: 1.6;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-date {
    text-align: left;
    padding-left: 2rem;
    padding-right: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-right: 2rem;
    padding-left: 0;
}

/* Fun Facts Section */
.fun-facts-section {
    padding: 4rem 0;
}

.fun-facts-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.fact-item {
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
}

.fact-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.fact-label {
    color: var(--dark-gray);
    font-weight: 500;
}

/* Projects Page Styles */
.projects-hero {
    padding: 4rem 0;
    background: var(--light-gray);
    text-align: center;
}

.projects-hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.filter-section {
    padding: 2rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--medium-gray);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--medium-gray);
    background: var(--white);
    color: var(--dark-gray);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

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

.tech-stack-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.tech-stack-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    text-align: center;
}

.tech-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s;
}

.tech-item:hover {
    transform: translateY(-5px);
}

.tech-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tech-item span {
    display: block;
    font-weight: 500;
    color: var(--primary-color);
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-section .btn {
    padding: 1rem 2rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        padding-left: 16px;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-light);
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* About page responsive */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-text h1 {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Timeline responsive */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column;
        margin-left: 40px;
    }
    
    .timeline-item::before {
        left: -34px;
        top: 0.5rem;
    }
    
    .timeline-item:nth-child(even) {
        flex-direction: column;
    }
    
    .timeline-date,
    .timeline-content {
        width: 100%;
        padding: 0;
        text-align: left;
    }
    
    .timeline-date {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .timeline-item:nth-child(even) .timeline-date,
    .timeline-item:nth-child(even) .timeline-content {
        padding: 0;
        text-align: left;
    }
    
    /* Facts grid responsive */
    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fact-number {
        font-size: 2.5rem;
    }
    
    /* Tech icons responsive */
    .tech-icons {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1rem;
    }
    
    /* Filter buttons responsive */
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* CTA buttons responsive */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-section .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .about-text h1 {
        font-size: 1.8rem;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-icons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 80px;
    }
}