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

html {
    scroll-behavior: smooth;
}

/* Loading Spinner */
.spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.spinner.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner-circle {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    background-color: #2c3e50;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* Language Switcher */
.language-switcher {
    margin-left: 20px;
}

.language-switcher select {
    padding: 8px 12px;
    background-color: #34495e;
    color: #fff;
    border: 1px solid #3498db;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.language-switcher select:hover {
    background-color: #2c3e50;
}

.language-switcher select option {
    background-color: #2c3e50;
    color: #fff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 28px;
    margin-bottom: 15px;
    color: #ecf0f1;
}

.hero .tagline {
    font-size: 18px;
    color: #ecf0f1;
    font-style: italic;
}

/* About Section */
.about {
    padding: 60px 20px;
    background-color: #fff;
}

.about h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 30px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.about p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* Skills Section */
.skills {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.skills h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 40px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

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

.skill-category {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 15px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: 8px 0;
    color: #555;
}

.skill-category li:before {
    content: "✓ ";
    color: #3498db;
    font-weight: bold;
    margin-right: 8px;
}

/* Education Section */
.education {
    padding: 60px 20px;
    background-color: #fff;
}

.education h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 40px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

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

.certification-item {
    position: relative;
    padding: 20px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-radius: 8px;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
    padding-left: 50px;
}

.certification-item:hover {
    border-color: #3498db;
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.15);
    transform: translateX(5px);
}

.cert-timeline-dot {
    position: absolute;
    left: 10px;
    top: 28px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3498db, #667eea);
    border: 3px solid #fff;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 3px #3498db;
    transition: all 0.3s ease;
}

.certification-item:hover .cert-timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.3);
}

.cert-content {
    color: #2c3e50;
}

.cert-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.cert-school {
    color: #667eea;
    font-weight: 600;
    margin: 5px 0;
    font-size: 14px;
    display: inline-block;
    background-color: rgba(102, 126, 234, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.cert-period {
    color: #e74c3c;
    font-weight: 700;
    font-size: 13px;
    margin: 8px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.education li p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Experience Section */
.experience {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.experience h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 40px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

#experiences-list {
    display: grid;
    gap: 25px;
}

.experience-item {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.experience-item h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.exp-company {
    color: #667eea;
    font-weight: 600;
    margin: 5px 0 10px 0;
}

.exp-period {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 14px;
}

.experience-item p {
    color: #555;
    line-height: 1.6;
}

/* Projects Section */
.projects {
    padding: 60px 20px;
    background-color: #fff;
}

.projects h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 40px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

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

.project-card {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-card h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.project-tech {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.project-card p {
    color: #555;
    line-height: 1.6;
}

/* Blog Section */
.blog {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

/* Utility: visually hide a section but keep it in the DOM for accessibility/SEO */
.hidden-section {
    display: none !important;
}

.blog h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 40px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.blog-posts {
    display: grid;
    gap: 30px;
}

.blog-post {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.blog-post:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.blog-post h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.blog-date {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-post p {
    color: #555;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 60px 20px 20px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin-bottom: -60px;
}

.contact h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 30px;
    border-bottom: 3px solid #fff;
    padding-bottom: 15px;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content > p {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-info {
    margin-bottom: 30px;
    font-size: 16px;
}

.contact-info p {
    margin-bottom: 12px;
}

.contact-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.contact-link {
    display: inline-block;
    background-color: #fff;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.contact-link:hover {
    background-color: #ecf0f1;
}

.contact-link.cv-download {
    background-color: #27ae60;
    color: #fff;
}

.contact-link.cv-download:hover {
    background-color: #229954;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    font-size: 14px;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
}

.footer.hidden-footer {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-content p {
    margin: 0;
}

.footer-contact {
    display: flex;
    gap: 15px;
}

.footer-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #ecf0f1;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 5px;
        padding: 5px 10px;
    }

    .logo {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        font-size: 10px;
        padding: 0;
        width: 100%;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        padding: 3px 6px;
    }

    .language-switcher {
        margin-left: 0;
        margin-top: 0;
        align-self: center;
    }

    .language-switcher select {
        padding: 3px 6px;
        font-size: 10px;
    }

    .hero {
        padding: 50px 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero .subtitle {
        font-size: 18px;
    }

    .hero .tagline {
        font-size: 14px;
    }

    .hero-photo {
        width: 120px;
        height: 120px;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 15px !important;
    }

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

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

    .certification-item {
        padding: 15px;
        padding-left: 40px;
    }

    .cert-timeline-dot {
        left: 8px;
        width: 16px;
        height: 16px;
        top: 20px;
    }

    .experience-item {
        padding: 15px;
    }

    .contact-links {
        flex-direction: column;
        gap: 10px;
    }

    .contact-link {
        width: 100%;
        text-align: center;
        padding: 10px 20px;
        font-size: 14px;
    }

    .footer {
        padding: 10px 8px;
        font-size: 10px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .footer-content p {
        font-size: 10px;
    }

    .footer-contact {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .footer-link {
        font-size: 11px;
        padding: 4px 8px;
    }
}
/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .logo {
        font-size: 14px;
    }

    .nav-menu {
        gap: 5px;
        font-size: 9px;
    }

    .nav-menu a {
        padding: 3px 5px;
    }

    .language-switcher select {
        padding: 3px 6px;
        font-size: 9px;
    }

    .footer {
        padding: 8px 5px;
        font-size: 9px;
    }

    .footer-content p {
        font-size: 9px;
    }

    .footer-link {
        font-size: 9px;
        padding: 3px 6px;
    }
}
