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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #ecf0f1;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

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

/* Navbar */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 2rem;
}

.navbar-logo {
    flex-shrink: 0;
    white-space: nowrap;
}

.navbar-logo a {
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-logo a:hover {
    color: var(--secondary-color);
}

.navbar-menu {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.navbar-menu a:hover {
    color: var(--secondary-color);
}

.language-toggle {
    flex-shrink: 0;
}

.lang-btn {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.85;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Sections */
.section {
    padding: 60px 20px;
}

.section-alt {
    background: var(--light-bg);
}

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

.section-text {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    line-height: 1.8;
}

/* Experience List */
.experience-list,
.education-list {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.experience-item,
.education-item {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-item:hover,
.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.job-title,
.degree {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.job-company,
.institution {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.job-period,
.year {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.job-description,
.details {
    color: var(--text-light);
    line-height: 1.7;
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skills-category {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.category-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.skills-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.skill-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInScale 0.6s ease-out forwards;
    min-width: 100px;
}

.skill-icon-wrapper:hover {
    transform: translateY(-10px) scale(1.1);
}

.skill-icon-wrapper:hover .skill-icon {
    filter: drop-shadow(0 8px 16px rgba(52, 152, 219, 0.4));
}

.skill-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.skill-icon.loaded {
    animation: iconBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.skill-name {
    font-size: 0.85rem;
    color: var(--text-color);
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 120px;
}

.skill-icon-wrapper:hover .skill-name {
    opacity: 1;
    font-weight: 600;
}

/* Contact Section */
.contact-cta {
    text-align: center;
    margin-top: 2rem;
}

.contact-cta a {
    font-size: 1.2rem;
}

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

/* Hamburger Menu */
.menu-icon {
    display: none;
    cursor: pointer;
    z-index: 101; /* Ensure it's on top */
    flex-shrink: 0; /* Prevent squishing */
}

.menu-icon .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        position: relative; /* Changed from sticky */
    }

    .navbar-container {
        justify-content: space-between;
        flex-wrap: nowrap; /* Ensure items stay on one line */
    }

    .navbar-menu {
        display: none; /* Hide by default */
        flex-direction: column;
        width: 100%;
        background-color: var(--primary-color);
        position: absolute;
        top: 100%; /* Position below the navbar */
        left: 0;
        z-index: 100;
        gap: 0;
    }

    .navbar-menu.active {
        display: flex; /* Show when active */
    }

    .navbar-menu a {
        padding: 1rem;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-icon {
        display: block; /* Show the hamburger icon */
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
        min-height: auto;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .section {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes iconBounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Animate sections on load */
.section {
    animation: fadeInUp 0.8s ease-out;
}

.experience-card,
.education-item {
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Staggered animations for cards */
.experience-card:nth-child(1) {
    animation-delay: 0.1s;
}

.experience-card:nth-child(2) {
    animation-delay: 0.2s;
}

.experience-card:nth-child(3) {
    animation-delay: 0.3s;
}

.experience-card:nth-child(4) {
    animation-delay: 0.4s;
}

.experience-card:nth-child(5) {
    animation-delay: 0.5s;
}

.education-item:nth-child(1) {
    animation-delay: 0.1s;
}

.education-item:nth-child(2) {
    animation-delay: 0.2s;
}

.education-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* Enhanced hover effects for cards */
.experience-card:hover,
.education-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}