:root {
    /* Light theme variables */
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --accent-color: #007bff;
    --menu-bg: #f1f3f4;
    --border-color: #dee2e6;
    --link-color: #007bff;
    --link-hover-color: #0056b3;
    --facebook-color: #1877F2;
    --linkedin-color: #0077B5;
    --orcid-color: #a5cd39;
    --pdf-color: #ff6b6b;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --header-bg: #2d2d2d;
    --accent-color: #4dabf7;
    --menu-bg: #343a40;
    --border-color: #495057;
    --link-color: #4dabf7;
    --link-hover-color: #339af0;
    --facebook-color: #3b5998;
    --linkedin-color: #0077B5;
    --orcid-color: #a5cd39;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== ACCESSIBILITY ===== */
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== THEME SWITCHER ===== */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#theme-toggle {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s;
}

#theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--link-hover-color);
}

/* ===== BANNER SECTION ===== */
.banner {
    background: var(--header-bg);
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
}

.photo-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
    transition: transform 0.3s ease, border-color 0.3s;
}

.photo-container:hover {
    transform: scale(1.05);
    border-color: var(--link-hover-color);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-container:hover .profile-photo {
    transform: scale(1.1);
}

.name {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.tagline {
    font-size: 1.2rem;
    color: var(--accent-color);
    opacity: 0.8;
    font-style: italic;
    transition: opacity 0.3s;
}

.tagline:hover {
    opacity: 1;
}

/* ===== NAVIGATION MENU ===== */
.main-menu {
    background: var(--menu-bg);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.menu-list {
    list-style: none;
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.menu-list li {
    margin: 0;
}

.menu-list a {
    display: block;
    padding: 20px 30px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
}

/* Menu Link Hover Effect */
.menu-list a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-list a:hover::before {
    width: 80%;
}

.menu-list a:hover {
    color: var(--accent-color);
}

/* ===== MAIN CONTENT ===== */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section {
    margin-bottom: 60px;
    padding: 40px;
    background: var(--header-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

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

.section h2 {
    margin-bottom: 20px;
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.section:hover h2::after {
    width: 100px;
}

.section h3 {
    margin: 20px 0 10px 0;
    color: var(--text-color);
    font-size: 1.3rem;
}

/* Section Animation Delays */
.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }

/* ===== EMAIL CATEGORIES LAYOUT ===== */
.email-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
}

.email-column {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.email-column:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.email-column h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-column h3::before {
    content: "📧";
    font-size: 1.1rem;
}

.email-column p {
    margin: 12px 0;
    padding: 8px 12px;
    background: var(--header-bg);
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
    transition: all 0.3s ease;
    position: relative;
}

.email-column p:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
}

.email-column p:hover::before {
    content: "✉️";
    position: absolute;
    left: -25px;
    opacity: 0.8;
}

/* ===== LINK STYLES ===== */

/* Base Link Style */
.content a {
    color: var(--link-color);
    text-decoration: none;
    position: relative;
    padding: 2px 4px;
    transition: all 0.3s ease;
    border-radius: 3px;
    font-weight: 500;
}

/* Regular Content Links - Underline Effect */
.content a:not(.menu-list a):not(.social-button):not([href$=".pdf"])::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--link-hover-color);
    transition: width 0.3s ease;
}

.content a:not(.menu-list a):not(.social-button):not([href$=".pdf"]):hover::after {
    width: 100%;
}

/* Email Links */
.content p a:not([target]):not(.social-button) {
    color: var(--text-color);
/*     border-bottom: 1px dashed var(--accent-color); */
    padding-bottom: 1px;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
}

.content p a:not([target]):not(.social-button):hover {
    color: var(--accent-color);
    border-bottom-style: solid;
    background-color: var(--header-bg);
}

/* ===== BUTTON STYLES ===== */

/* Social Media Buttons */
.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    margin: 8px 8px 8px 0;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 140px;
    text-align: center;
    color: white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Facebook Button */
.social-button[href*="facebook.com"] {
    background-color: var(--facebook-color);
    border-color: var(--facebook-color);
}

.social-button[href*="facebook.com"]:hover {
    background-color: transparent;
    color: var(--facebook-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 89, 152, 0.3);
}

/* LinkedIn Button */
.social-button[href*="linkedin.com"] {
    background-color: var(--linkedin-color);
    border-color: var(--linkedin-color);
}

.social-button[href*="linkedin.com"]:hover {
    background-color: transparent;
    color: var(--linkedin-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

/* ORCID Button */
.social-button[href*="orcid.org"] {
    background-color: var(--orcid-color);
    border-color: var(--orcid-color);
}

.social-button[href*="orcid.org"]:hover {
    background-color: transparent;
    color: var(--orcid-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

/* CV Download Button */
.content a[href$=".pdf"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(90deg, var(--pdf-color) 50%, transparent 50%);
    background-size: 200% 100%;
    background-position: left bottom;
    border: 2px solid var(--pdf-color);
    color: white !important;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
}

.content a[href$=".pdf"]:hover {
    background-position: right bottom;
    color: var(--pdf-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* ===== CONTACT SECTION SPECIFIC ===== */
#contact p {
    margin: 5px 0;
    line-height: 1.8;
}

#contact h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

#contact p:has(.social-button) {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 768px) {
    .name {
        font-size: 2rem;
    }

    .menu-list {
        flex-direction: column;
        text-align: center;
    }

    .menu-list a {
        padding: 15px 20px;
    }

    .banner {
        padding: 60px 20px;
    }

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

    .theme-switcher {
        top: 10px;
        right: 10px;
    }

    #theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .section {
        padding: 20px;
    }

    .social-button,
    .content a[href$=".pdf"] {
        min-width: 120px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    #contact p:has(.social-button) {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-button {
        margin: 5px 0;
    }

    .email-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .email-column {
        padding: 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .name {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .section {
        padding: 15px;
    }

    .content {
        padding: 20px 10px;
    }

    .menu-list a::before {
        height: 2px;
    }

    .social-button,
    .content a[href$=".pdf"] {
        min-width: 100%;
        padding: 12px 16px;
    }

    .email-column {
        padding: 15px;
    }

    .email-column p {
        padding: 6px 10px;
        margin: 10px 0;
    }
}
