@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600&display=swap');

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

@media (max-width: 1024px) {
    html {
        scroll-padding-bottom: 8rem;
    }
}

body {
    font-family: 'Fira Code', monospace;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    overflow-x: hidden;
    font-weight: 400;
}

@media (max-width: 1024px) {
    body {
        scroll-snap-type: y proximity;
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3.5rem 2rem 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

@media (max-width: 1024px) {
    .container {
        justify-content: flex-start;
        padding-top: 5.5rem;
        padding-bottom: 6rem;
    }
}

/* Background Elements */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.03) 0%, rgba(80, 175, 149, 0.03) 100%);
    animation: float 20s infinite ease-in-out;
}

.shape-1 { width: 300px; height: 300px; top: 10%; right: -10%; animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; bottom: 20%; left: -5%; animation-delay: -10s; }
.shape-3 { width: 150px; height: 150px; top: 60%; right: 20%; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
}

/* Personal Section */
header {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.profile-image {
    margin-top: 3rem;
    width: 150px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(74, 144, 226, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.profile-image:hover {
    transform: scale(1.05);
    border-color: rgba(74, 144, 226, 0.3);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.15);
}

.name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.role {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

main {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.bio {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 3rem;
    color: #333;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Universal Section Styles */
.section {
    margin: 4rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

@media (max-width: 1024px) {
    .section {
        scroll-snap-align: start;
        margin: 3rem 0;
    }
    
    #personal {
        scroll-snap-align: start;
    }
}

.section-title {
    font-size: 1.8rem;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #4a90e2, #50af95);
    border-radius: 1px;
}

.section-title-link {
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.section-title-link:hover {
    color: #4a90e2;
    transform: translateY(-2px);
}

.section-title-link::before {
    content: '🔗';
    position: absolute;
    left: -2rem;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.section-title-link:hover::before {
    opacity: 0.7;
    left: -2.5rem;
}

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

/* Tags Layout */
.tags .section-content {
    margin-bottom: 3rem;
}

/* Timeline Layout */
.timeline .section-content {
    flex-direction: column;
    gap: 2.5rem;
}

/* Links Layout */
.links .section-content {
    gap: 2rem;
}

/* Timeline Items */
.item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.item-link:hover {
    text-decoration: none;
}

.item {
    text-decoration: none; 
    color: inherit;
    display: block;
    padding: 2rem;
    background: rgba(250, 250, 250, 0.8);
    border: 1px solid rgba(224, 224, 224, 0.3);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 26, 114, 0.08);
}

.item-header {
    text-decoration: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.item-title {
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.item-subtitle {
    text-decoration: none;
    color: #4a90e2;
    font-weight: 500;
    font-size: 1rem;
}

.item-location {
    text-decoration: none;
    color: #888;
    font-size: 0.9rem;
}

.item-duration {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 400;
    background: rgba(74, 144, 226, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
}

.item-description {
    text-decoration: none;
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    text-align: justify;
}

.publication {
    padding: 0.8rem 0;
}

.pub-link {
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.85rem;
}

.pub-link:hover {
    text-decoration: underline;
}

.item-details {
    text-decoration: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(224, 224, 224, 0.5);
    list-style: none;
    padding-left: 0;
}

.item-details li {
    text-decoration: none;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.5;
    text-align: justify;
}

.item-details li::before {
    text-decoration: none;
    content: '▸';
    position: absolute;
    left: 0;
    color: #4a90e2;
    font-weight: bold;
}

.item-tags {
    text-decoration: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Generic Tag Styles */
.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(80, 175, 149, 0.1);
    border: 1px solid rgba(80, 175, 149, 0.2);
    border-radius: 1rem;
    font-size: 0.8rem;
    color: #50af95;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.tags .tag {
    padding: 0.6rem 1.2rem;
    background: rgba(74, 144, 226, 0.08);
    border: 1px solid rgba(74, 144, 226, 0.15);
    border-radius: 2rem;
    font-size: 0.9rem;
    color: #4a90e2;
    font-weight: 500;
}

.tag:hover {
    background: rgba(74, 144, 226, 0.12);
    border-color: rgba(74, 144, 226, 0.25);
    transform: translateY(-2px);
}

/* Contact Section */
.contact .section-content {
    gap: 2rem;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fafafa;
}

.contact-link:hover {
    border-color: #4a90e2;
    color: #4a90e2;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.1);
}

.contact-list {
    list-style: none;
    padding: 0.8rem;
    margin: 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.contact-list li {
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-list li:hover {
    transform: translateY(-5px) scale(1.1);
}

.contact-list li:hover ~ li {
    transform: translateX(10px);
}

.contact-list img,
.contact-list i {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

@media (max-width: 480px) {
    .contact-list {
        padding: 0.6rem;
        gap: 0.8rem;
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .contact-list::-webkit-scrollbar {
        display: none;
    }
    
    .contact-list img,
    .contact-list i {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
}

/* Desktop Floating Dock */
@media (min-width: 1025px) {
    .floating-menu {
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%) translateY(100px);
        width: auto;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 0.8rem 1.5rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        opacity: 0;
        pointer-events: none;
    }

    .floating-menu.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .menu-items {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        align-items: center;
    }

    .menu-link {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
        text-align: center;
        border-radius: 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        min-height: 60px;
        min-width: 70px;
        text-decoration: none;
        color: #666;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        position: relative;
    }

    .menu-icon {
        display: block;
        width: 24px;
        height: 24px;
        transition: all 0.3s ease;
    }

    .menu-text {
        display: block;
        font-size: 0.75rem;
        transition: all 0.3s ease;
    }

    .menu-link:hover {
        color: #4a90e2;
        background: rgba(74, 144, 226, 0.1);
        transform: translateY(-8px) scale(1.1);
    }

    .menu-link:hover .menu-icon {
        transform: scale(1.2);
    }

    .menu-link.active {
        color: #4a90e2;
        background: rgba(74, 144, 226, 0.15);
        font-weight: 600;
        transform: translateY(-4px);
    }

    .menu-link.active::before {
        content: '';
        position: absolute;
        bottom: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 6px;
        height: 6px;
        background: linear-gradient(135deg, #4a90e2, #50af95);
        border-radius: 50%;
        box-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
    }

}

/* Mobile Bottom Navigation */
@media (max-width: 1024px) {
    .floating-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        border-radius: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 1rem 1rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }

    .menu-items {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 0.3rem;
        max-width: 100%;
    }

    .menu-link {
        padding: 0.7rem 0.4rem;
        font-size: 0.75rem;
        text-align: center;
        border-radius: 1rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        min-height: 48px;
        text-decoration: none;
        color: #666;
        font-weight: 500;
        transition: all 0.3s ease;
        position: relative;
    }

    .menu-icon {
        display: block;
        width: 20px;
        height: 20px;
    }

    .menu-text {
        display: block;
        font-size: 0.7rem;
    }

    .menu-link:hover {
        color: #4a90e2;
        background: rgba(74, 144, 226, 0.12);
        transform: translateY(-2px);
    }

    .menu-link.active {
        color: #4a90e2;
        background: rgba(74, 144, 226, 0.15);
        font-weight: 600;
    }

    .menu-link.active::before {
        content: '';
        position: absolute;
        top: 0.4rem;
        left: 50%;
        transform: translateX(-50%);
        width: 5px;
        height: 5px;
        background: linear-gradient(135deg, #4a90e2, #50af95);
        border-radius: 50%;
        box-shadow: 0 0 6px rgba(74, 144, 226, 0.4);
    }

}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0.8rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 0.6rem;
    padding: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.lang-button {
    padding: 0.3rem 0.4rem;
    border: none;
    background: transparent;
    color: #888;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-button:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.lang-button.active {
    background: #1a1a1a;
    color: #fff;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 0.6rem;
    padding: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.theme-button {
    padding: 0.3rem 0.5rem;
    border: none;
    background: transparent;
    color: #888;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.theme-button:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.theme-button.active {
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .top-bar {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
    }

    .lang-switcher {
        padding: 0.15rem;
    }

    .lang-button {
        padding: 0.2rem 0.3rem;
        font-size: 0.5rem;
    }

    .theme-switcher {
        gap: 0.15rem;
        padding: 0.2rem;
    }

    .theme-button {
        padding: 0.2rem 0.35rem;
        font-size: 0.55rem;
    }
}

/* Light Theme - already defined above */
body[data-theme="light"] {
    /* Light styles already applied */
}

/* 90s Retro Theme - Windows 95 Style */
body[data-theme="retro"] {
    background: #008080;
    color: #000000;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
}

body[data-theme="retro"]::before {
    display: none;
}

body[data-theme="retro"] .floating-shape {
    display: none;
}

body[data-theme="retro"] .scroll-indicator {
    display: none;
}

body[data-theme="retro"] .container {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 1rem;
    box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #404040;
    border-radius: 0;
}

body[data-theme="retro"] .name {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    color: #000080;
    text-shadow: none;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-weight: bold;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

body[data-theme="retro"] .role {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    color: #000000;
    font-size: 11px;
    text-transform: none;
    font-weight: normal;
}

body[data-theme="retro"] .bio {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 12px;
    color: #000000;
    line-height: 1.4;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 12px;
    margin: 1rem auto;
    box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #404040;
    max-width: 600px;
    text-align: center;
}

/* Windows 95 style navigation bar */
body[data-theme="retro"] .floating-menu {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

body[data-theme="retro"] .menu-link {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    margin: 1px;
    border-radius: 0;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: normal;
    padding: 4px 8px;
}

body[data-theme="retro"] .menu-link:hover {
    background: #c0c0c0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

body[data-theme="retro"] .menu-link.active {
    background: #c0c0c0;
    color: #000000;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    box-shadow: none;
}

/* Square icons for 90s theme */
body[data-theme="retro"] .menu-icon {
    border-radius: 0;
    background: #c0c0c0;
    padding: 2px;
    border: 1px solid #808080;
}

/* Windows 95 style content items */
body[data-theme="retro"] .item {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    border-radius: 0;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    padding: 8px;
    box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #404040;
}

body[data-theme="retro"] .item:hover {
    background: #c0c0c0;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    box-shadow: inset -1px -1px 0px #dfdfdf, inset 1px 1px 0px #404040;
}

body[data-theme="retro"] .item-title {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #000080;
}

body[data-theme="retro"] .item-subtitle {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    color: #000000;
    font-weight: normal;
}

body[data-theme="retro"] .item-location {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    color: #000000;
}

body[data-theme="retro"] .item-duration {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 0;
}

body[data-theme="retro"] .item-description {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    color: #000000;
    line-height: 1.4;
}

body[data-theme="retro"] .item-details li {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    color: #000000;
}

body[data-theme="retro"] .tag {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    border-radius: 0;
    font-weight: normal;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    padding: 2px 6px;
}

body[data-theme="retro"] .tag:hover {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* Windows 95 style lang switcher */
body[data-theme="retro"] .lang-switcher {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    border-radius: 0;
    padding: 2px;
    box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #404040;
    backdrop-filter: none;
}

body[data-theme="retro"] .lang-button {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 9px;
    border-radius: 0;
}

body[data-theme="retro"] .lang-button:hover {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    transform: none;
}

body[data-theme="retro"] .lang-button.active {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    background: #c0c0c0;
    color: #000000;
    box-shadow: none;
}

/* Windows 95 style theme switcher */
body[data-theme="retro"] .theme-switcher {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    border-radius: 0;
    padding: 2px;
    box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #404040;
    backdrop-filter: none;
    gap: 1px;
}

body[data-theme="retro"] .theme-button {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 9px;
    font-weight: normal;
    padding: 2px 4px;
    border-radius: 0;
    min-width: 30px;
}

body[data-theme="retro"] .theme-button:hover {
    background: #c0c0c0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    transform: none;
}

body[data-theme="retro"] .theme-button.active {
    background: #c0c0c0;
    color: #000000;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    box-shadow: none;
}

/* Windows 95 style contact links */
body[data-theme="retro"] .contact-link {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    color: #000000;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    border-radius: 0;
    padding: 4px 8px;
}

body[data-theme="retro"] .contact-link:hover {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    background: #c0c0c0;
    transform: none;
    box-shadow: none;
}

body[data-theme="retro"] .contact-list {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

/* Square contact icons */
body[data-theme="retro"] .contact-list img {
    border-radius: 0;
    border: 1px solid #808080;
    background: #ffffff;
    padding: 2px;
}

/* Section titles */
body[data-theme="retro"] .section-title {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #000080;
}

body[data-theme="retro"] .section-title::after {
    display: none;
}

/* Profile image square */
body[data-theme="retro"] .profile-image {
    border-radius: 0;
    border: 2px solid #808080;
    background: #ffffff;
}

/* Dark Theme */
body[data-theme="dark"] {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #00ffff;
    font-family: 'Fira Code', monospace;
    position: relative;
    overflow-x: hidden;
}

body[data-theme="dark"]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 100, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body[data-theme="dark"] .container {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 100, 255, 0.1);
    border-radius: 1rem;
}

body[data-theme="dark"] .bio {
    color: #0099ff;
    text-shadow: 0 0 10px rgba(0, 153, 255, 0.6);
    animation: bioGlow 3s ease-in-out infinite alternate;
}

@keyframes bioGlow {
    from { 
        color: #0099ff;
        text-shadow: 0 0 10px rgba(0, 153, 255, 0.6);
    }
    to { 
        color: #00ccff;
        text-shadow: 0 0 15px rgba(0, 204, 255, 0.8), 0 0 25px rgba(0, 153, 255, 0.4);
    }
}

body[data-theme="dark"] .name {
    background: linear-gradient(45deg, #00ffff, #0066ff, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from { text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
    to { text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.3); }
}

body[data-theme="dark"] .floating-menu {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

body[data-theme="dark"] .menu-link {
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 255, 255, 0.05);
}

body[data-theme="dark"] .menu-link:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

body[data-theme="dark"] .menu-link.active {
    background: rgba(0, 100, 255, 0.3);
    border-color: #0066ff;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 100, 255, 0.5);
}

body[data-theme="dark"] .item {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.1);
}

body[data-theme="dark"] .item:hover {
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.2);
    background: rgba(0, 255, 255, 0.05);
}

body[data-theme="dark"] .item-title {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

body[data-theme="dark"] .item-subtitle {
    color: #ffffff;
    opacity: 0.9;
}

body[data-theme="dark"] .item-description {
    color: #ffffff;
    opacity: 0.8;
}

body[data-theme="dark"] .item-location {
    color: #ffffff;
    opacity: 0.7;
}

body[data-theme="dark"] .item-details li {
    color: #ffffff;
    opacity: 0.8;
}

body[data-theme="dark"] .section-title {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

body[data-theme="dark"] .tag {
    background: rgba(0, 100, 255, 0.2);
    border: 1px solid rgba(0, 100, 255, 0.4);
    color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 100, 255, 0.2);
}

body[data-theme="dark"] .tag:hover {
    background: rgba(0, 100, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 100, 255, 0.4);
}

body[data-theme="dark"] .lang-switcher {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 0.5rem;
}

body[data-theme="dark"] .lang-button {
    color: #00ffff;
}

body[data-theme="dark"] .lang-button:hover {
    background: rgba(0, 255, 255, 0.1);
}

body[data-theme="dark"] .lang-button.active {
    background: rgba(0, 100, 255, 0.3);
    color: #ffffff;
}

body[data-theme="dark"] .theme-switcher {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 0.5rem;
}

body[data-theme="dark"] .theme-button {
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

body[data-theme="dark"] .theme-button:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

body[data-theme="dark"] .theme-button.active {
    background: rgba(0, 100, 255, 0.3);
    color: #ffffff;
    border-color: #0066ff;
    box-shadow: 0 0 15px rgba(0, 100, 255, 0.4);
}

/* Futuristic contact icons */
body[data-theme="dark"] .contact-list {
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid rgba(0, 153, 255, 0.6);
    box-shadow: 0 0 25px rgba(0, 153, 255, 0.4);
    backdrop-filter: blur(20px);
}

body[data-theme="dark"] .contact-list img {
    filter: invert(1) brightness(0.5) sepia(1) hue-rotate(180deg) saturate(5);
    animation: iconPulse 2s ease-in-out infinite alternate;
    border: 1px solid #0099ff;
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
}

@keyframes iconPulse {
    from { 
        filter: invert(1) brightness(0.5) sepia(1) hue-rotate(180deg) saturate(5);
        box-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
    }
    to { 
        filter: invert(1) brightness(0.8) sepia(1) hue-rotate(180deg) saturate(8);
        box-shadow: 0 0 20px rgba(0, 153, 255, 0.8);
    }
}

body[data-theme="dark"] .contact-list li:hover img {
    filter: invert(1) brightness(1) sepia(1) hue-rotate(180deg) saturate(10);
    box-shadow: 0 0 25px rgba(0, 153, 255, 1);
    border-color: #0099ff;
    transform: scale(1.1);
}


/* ============================================
   Neutralize system.css window chrome in non-system themes
   ============================================ */
body:not([data-theme="system"]) .site-window {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    width: auto;
    min-width: 0;
}

body:not([data-theme="system"]) .site-window > .title-bar,
body:not([data-theme="system"]) .site-window > .separator {
    display: none;
}

body:not([data-theme="system"]) .site-window > .window-pane {
    overflow: visible;
    max-height: none;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
}

/* ============================================
   System Theme - Apple System 6 (system.css)
   ============================================ */
body[data-theme="system"] {
    font-family: Inconsolata, Menlo, Chicago, Geneva, monospace;
    color: #000;
    /* Checkerboard pattern from system.css */
    background: linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%),
                linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%);
    background-color: #fff;
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    background-attachment: fixed;
    overflow-x: hidden;
}

body[data-theme="system"]::before {
    display: none;
}

body[data-theme="system"] .background-elements {
    display: none;
}

body[data-theme="system"] .container {
    max-width: 95%;
    padding: 1rem 2rem 6rem;
    justify-content: flex-start;
    padding-top: 2rem;
}

body[data-theme="system"] .site-window {
    margin-bottom: 1.5rem;
    background-color: #fff;
    border: 0.1em solid #000;
    box-shadow: 2px 2px #000;
    min-width: 0;
}

body[data-theme="system"] .site-window .window-pane {
    overflow: visible;
    max-height: none;
    padding: 1rem;
    border: none;
}

body[data-theme="system"] .name {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #000;
    background-clip: unset;
    color: #000;
    font-family: Chicago_12, Chicago, Geneva, monospace;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0;
}

body[data-theme="system"] .role {
    font-family: Geneva_9, Geneva, Chicago, monospace;
    color: #000;
    font-size: 20px;
    text-transform: none;
    font-weight: normal;
    letter-spacing: 0;
}

body[data-theme="system"] .bio {
    font-family: Inconsolata, Menlo, Geneva, monospace;
    font-size: 16px;
    color: #000;
    line-height: 1.6;
    text-align: left;
    max-width: none;
}

body[data-theme="system"] header {
    text-align: center;
    margin-bottom: 1rem;
    opacity: 1;
    animation: none;
}

body[data-theme="system"] main {
    opacity: 1;
    animation: none;
}

body[data-theme="system"] .section {
    margin: 0;
    opacity: 1;
    animation: none;
}

body[data-theme="system"] .section-title {
    display: none;
}

body[data-theme="system"] .section-title::after {
    display: none;
}

body[data-theme="system"] .item {
    background: #fff;
    border: 1px solid #000;
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 0.5rem;
    font-family: Inconsolata, Menlo, Geneva, monospace;
    font-size: 16px;
    box-shadow: none;
}

body[data-theme="system"] .item:hover {
    background: #000;
    color: #fff;
    transform: none;
    box-shadow: none;
    border-color: #000;
}

body[data-theme="system"] .item:hover .item-title,
body[data-theme="system"] .item:hover .item-subtitle,
body[data-theme="system"] .item:hover .item-location,
body[data-theme="system"] .item:hover .item-duration,
body[data-theme="system"] .item:hover .item-description,
body[data-theme="system"] .item:hover .item-details li {
    color: #fff;
}

body[data-theme="system"] .item-title {
    font-family: Chicago_12, Chicago, Geneva, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

body[data-theme="system"] .item-subtitle {
    font-family: Geneva_9, Geneva, Chicago, monospace;
    font-size: 18px;
    color: #000;
    font-weight: normal;
}

body[data-theme="system"] .item-location {
    font-size: 15px;
    color: #000;
}

body[data-theme="system"] .item-duration {
    background: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    color: #000;
    font-family: Geneva_9, Geneva, Chicago, monospace;
    font-size: 15px;
    padding: 2px 8px;
}

body[data-theme="system"] .item:hover .item-duration {
    border-color: #fff;
    color: #fff;
    background: #000;
}

body[data-theme="system"] .item-description {
    font-family: Inconsolata, Menlo, Geneva, monospace;
    font-size: 16px;
    color: #000;
    line-height: 1.6;
    text-align: left;
}

body[data-theme="system"] .item-details li {
    font-family: Inconsolata, Menlo, Geneva, monospace;
    font-size: 15px;
    color: #000;
}

body[data-theme="system"] .item-details li::before {
    content: '\25B8';
    color: #000;
}

body[data-theme="system"] .item:hover .item-details li::before {
    color: #fff;
}

body[data-theme="system"] .item-details {
    border-top: 1px solid #000;
}

body[data-theme="system"] .item:hover .item-details {
    border-top-color: #fff;
}

body[data-theme="system"] .tag {
    background: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    color: #000;
    font-family: Geneva_9, Geneva, Chicago, monospace;
    font-size: 15px;
    font-weight: normal;
    padding: 4px 12px;
}

body[data-theme="system"] .tag:hover {
    background: #000;
    color: #fff;
    transform: none;
}

body[data-theme="system"] .item:hover .tag {
    background: #fff;
    color: #000;
}

body[data-theme="system"] .tags .tag {
    background: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    color: #000;
    font-family: Geneva_9, Geneva, Chicago, monospace;
    font-size: 18px;
    padding: 6px 16px;
}

body[data-theme="system"] .contact-links {
    gap: 0.5rem;
}

body[data-theme="system"] .contact-link {
    background: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    color: #000;
    font-family: Geneva_9, Geneva, Chicago, monospace;
}

body[data-theme="system"] .contact-link:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: none;
    box-shadow: none;
}

body[data-theme="system"] .contact-icon {
    filter: none;
}

body[data-theme="system"] .contact-link:hover .contact-icon {
    filter: invert(1);
}

/* System theme - floating menu */
body[data-theme="system"] .floating-menu {
    background: #fff;
    border: 0.1em solid #000;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: 2px 2px #000;
}

@media (min-width: 1025px) {
    body[data-theme="system"] .floating-menu {
        border-radius: 0;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 1024px) {
    body[data-theme="system"] .floating-menu {
        border: none;
        border-top: 0.1em solid #000;
        box-shadow: none;
    }
}

body[data-theme="system"] .menu-link {
    color: #000;
    font-family: Chicago_12, Chicago, Geneva, monospace;
    font-size: 11px;
    border-radius: 0;
    min-height: auto;
}

body[data-theme="system"] .menu-link:hover {
    background: #000;
    color: #fff;
    transform: none;
    border-radius: 0;
}

body[data-theme="system"] .menu-link:hover .menu-icon {
    transform: none;
    stroke: #fff;
    color: #fff;
}

body[data-theme="system"] .menu-link.active {
    background: #000;
    color: #fff;
    transform: none;
    font-weight: normal;
}

body[data-theme="system"] .menu-link.active .menu-icon {
    stroke: #fff;
    color: #fff;
}

body[data-theme="system"] .menu-link.active::before {
    display: none;
}

body[data-theme="system"] .menu-icon {
    width: 16px;
    height: 16px;
}

/* System theme - lang switcher */
body[data-theme="system"] .lang-switcher {
    background: #fff;
    border: 0.1em solid #000;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: 2px 2px #000;
    padding: 0.2rem;
}

body[data-theme="system"] .lang-button {
    font-family: Chicago_12, Chicago, Geneva, monospace;
    font-size: 11px;
    color: #000;
    border-radius: 0;
    padding: 2px 6px;
}

body[data-theme="system"] .lang-button:hover {
    background: #000;
    color: #fff;
    transform: none;
}

body[data-theme="system"] .lang-button.active {
    background: #000;
    color: #fff;
    box-shadow: none;
}

/* System theme - theme switcher */
body[data-theme="system"] .theme-switcher {
    background: #fff;
    border: 0.1em solid #000;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: 2px 2px #000;
    padding: 0.2rem;
}

body[data-theme="system"] .theme-button {
    font-family: Chicago_12, Chicago, Geneva, monospace;
    font-size: 11px;
    color: #000;
    border-radius: 0;
    padding: 2px 6px;
}

body[data-theme="system"] .theme-button:hover {
    background: #000;
    color: #fff;
    transform: none;
}

body[data-theme="system"] .theme-button.active {
    background: #000;
    color: #fff;
    box-shadow: none;
}

body[data-theme="system"] .scroll-indicator {
    display: none;
}

body[data-theme="system"] .floating-shape {
    display: none;
}

/* Utilities */
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #4a90e2);
    opacity: 0.6;
    animation: pulse 2s infinite;
}

@media (max-width: 1024px) {
    .scroll-indicator {
        bottom: 6rem;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.2; }
}

/* Arkanoid Game */
.arkanoid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.arkanoid-hud {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

#arkanoid-canvas {
    display: block;
    max-width: 100%;
    cursor: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile and Tablet Responsive */
@media (max-width: 1024px) {
    .container { padding: 0 1rem; justify-content: flex-start; padding-top: 2rem; padding-bottom: 6rem; }
    .profile-image { width: 120px; height: 150px; border-width: 3px; margin-bottom: 1.5rem; }
    .name { font-size: clamp(2rem, 8vw, 2.5rem); margin-bottom: 0.8rem; }
    .role { font-size: 1rem; margin-bottom: 1rem; }
    header { margin-bottom: 1rem; }
    .bio { font-size: 1rem; line-height: 1.6; margin-bottom: 2rem; text-align: justify; }
    .section { margin: 2rem 0; }
    .section-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
    .item { padding: 1.2rem; margin-bottom: 1.5rem; border-radius: 0.8rem; }
    .item-header { flex-direction: column; align-items: flex-start; gap: 0.3rem; margin-bottom: 0.8rem; }
    .item-title { font-size: 1.1rem; line-height: 1.3; }
    .item-subtitle { font-size: 0.9rem; margin-top: 0.2rem; }
    .item-location { font-size: 0.8rem; margin-top: 0.1rem; }
    .item-duration { font-size: 0.8rem; padding: 0.2rem 0.6rem; margin-top: 0.5rem; align-self: flex-start; }
    .item-description { font-size: 0.9rem; line-height: 1.5; text-align: justify; margin-top: 0.5rem; }
    .item-details { margin-top: 0.8rem; padding-top: 0.8rem; }
    .item-details li { font-size: 0.85rem; line-height: 1.4; margin-bottom: 0.4rem; padding-left: 1.2rem; text-align: justify; }
    .item-tags { gap: 0.4rem; margin-top: 0.8rem; }
    .tag { padding: 0.25rem 0.6rem; font-size: 0.75rem; border-radius: 0.8rem; min-height: 32px; display: inline-flex; align-items: center; }
    .tags .tag { padding: 0.4rem 0.8rem; font-size: 0.8rem; font-weight: 400; }
    .tags .section-content { gap: 0.6rem; margin-bottom: 2rem; justify-content: flex-start; }
    .contact-links { gap: 0.8rem; flex-direction: row; align-items: center; justify-content: center; flex-wrap: wrap; }
    .contact-link { padding: 0.8rem 1.5rem; font-size: 0.9rem; width: auto; max-width: none; justify-content: center; border-radius: 1.5rem; }
    .floating-shape { display: none; }
    .cursor-dot { display: none; }
    
}

@media (max-width: 480px) {
    .container { padding: 0 0.8rem; padding-top: 1.5rem; padding-bottom: 6rem; }
    .profile-image { width: 100px; height: 100px; }
    .name { font-size: clamp(1.8rem, 10vw, 2.2rem); }
    .bio { font-size: 0.95rem; }
    .item { padding: 1rem; }
    .contact-link { max-width: 240px; padding: 0.7rem 1.2rem; font-size: 0.85rem; }
}

/* =========================================================
   AUTARQUI — minimalist editorial theme (autarqui.co dossier)
   Single active theme. Flat, hairline-ruled, Lora + Poppins.
   All rules scoped under body[data-theme="autarqui"].
   ========================================================= */
body[data-theme="autarqui"] {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-heading: #000000;
    --color-muted: #6e6e6e;
    --color-faint: #9a9a9a;
    --color-rule: #d4d4d4;
    --color-rule-soft: #ebebeb;
    --color-surface: #fafafa;

    --font-display: 'Lora', Georgia, 'Times New Roman', serif;
    --font-body: 'Poppins', 'Helvetica Neue', Arial, sans-serif;

    --track-wide: 0.08em;
    --track-extra: 0.18em;

    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

/* --- Layout: left-aligned editorial column, section counter --- */
body[data-theme="autarqui"] .container {
    max-width: 760px;
    justify-content: flex-start;
    padding-top: 5rem;
}

/* Kill decoration & entrance animations */
body[data-theme="autarqui"] .background-elements,
body[data-theme="autarqui"] .floating-shape,
body[data-theme="autarqui"] .scroll-indicator { display: none; }

body[data-theme="autarqui"] header,
body[data-theme="autarqui"] main,
body[data-theme="autarqui"] .section {
    opacity: 1;
    animation: none;
}

/* --- Hero --- */
body[data-theme="autarqui"] header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 1rem;
}
body[data-theme="autarqui"] .hero-text { min-width: 0; }
body[data-theme="autarqui"] .hero-photo {
    flex-shrink: 0;
    width: 108px;
    height: 132px;
    border-radius: 10px;
    border: 1px solid var(--color-rule-soft);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
}
body[data-theme="autarqui"] .hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1.25);
    transform-origin: center 22%;
    display: block;
}

/* --- Photo lightbox --- */
body[data-theme="autarqui"] .photo-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: rgba(15, 15, 15, 0.82);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
body[data-theme="autarqui"] .photo-modal.open { display: flex; }
body[data-theme="autarqui"] .photo-modal-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
body[data-theme="autarqui"] .photo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 150ms cubic-bezier(0.2, 0, 0, 1);
}
body[data-theme="autarqui"] .photo-modal-close:hover { opacity: 1; }

@media (max-width: 768px) {
    body[data-theme="autarqui"] .photo-modal { padding: 0; }
    body[data-theme="autarqui"] .photo-modal-img {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

body[data-theme="autarqui"] .name {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--color-heading);
    /* undo the gradient-clipped text of the base theme */
    background: none;
    -webkit-text-fill-color: var(--color-heading);
    -webkit-background-clip: border-box;
    background-clip: border-box;
    margin-bottom: 0.6rem;
}

body[data-theme="autarqui"] .role {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: var(--track-extra);
    text-transform: uppercase;
    color: var(--color-muted);
}

body[data-theme="autarqui"] .bio {
    font-family: var(--font-body);
    font-weight: 350;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text);
    text-align: justify;
    max-width: none;
    margin: 1.5rem 0 0;
}

body[data-theme="autarqui"] em { font-style: italic; }
body[data-theme="autarqui"] strong { font-weight: 600; color: var(--color-heading); }

/* --- Sections: hairline-separated blocks --- */
body[data-theme="autarqui"] .container > .site-window {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-rule-soft);
}
body[data-theme="autarqui"] .container > .site-window:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

body[data-theme="autarqui"] .section { margin: 0; }

body[data-theme="autarqui"] .section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.55rem;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--color-heading);
    text-align: left;
    margin-bottom: 1.75rem;
}
body[data-theme="autarqui"] .section-title::after { display: none; }

body[data-theme="autarqui"] .section-title-link {
    color: var(--color-heading);
    transition: color 150ms cubic-bezier(0.2, 0, 0, 1);
}
body[data-theme="autarqui"] .section-title-link:hover {
    color: var(--color-muted);
    transform: none;
}
body[data-theme="autarqui"] .section-title-link::before,
body[data-theme="autarqui"] .section-title-link:hover::before { content: none; }

/* Left-align content; timeline as hairline-separated list */
body[data-theme="autarqui"] .section-content { justify-content: flex-start; }
body[data-theme="autarqui"] .timeline .section-content { gap: 0; }

/* --- Items --- */
body[data-theme="autarqui"] .item {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1.75rem 0;
    border-top: 1px solid var(--color-rule-soft);
}
body[data-theme="autarqui"] .timeline .section-content > .item-link:first-child .item {
    border-top: none;
    padding-top: 0;
}
body[data-theme="autarqui"] .item:hover {
    background: none;
    border-color: var(--color-rule-soft);
    box-shadow: none;
    transform: none;
}

body[data-theme="autarqui"] .item-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-heading);
}
body[data-theme="autarqui"] .item-subtitle {
    color: var(--color-text);
    font-weight: 500;
}
body[data-theme="autarqui"] .item-link:hover .item-subtitle { text-decoration: underline; }
body[data-theme="autarqui"] .item-location { color: var(--color-faint); }
body[data-theme="autarqui"] .item-duration {
    background: none;
    padding: 0;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--color-faint);
}
body[data-theme="autarqui"] .item-description {
    color: var(--color-text);
    font-weight: 350;
    line-height: 1.65;
    text-align: justify;
}
body[data-theme="autarqui"] .item-details {
    border-top: 1px solid var(--color-rule-soft);
}
body[data-theme="autarqui"] .item-details li {
    color: var(--color-text);
    text-align: justify;
    padding-left: 1.1rem;
}
body[data-theme="autarqui"] .item-details li::before {
    content: '·';
    color: var(--color-muted);
    font-weight: 700;
    left: 0.1rem;
}
body[data-theme="autarqui"] .item-details a,
body[data-theme="autarqui"] .item-subtitle a {
    color: var(--color-heading);
    text-decoration: none;
    border-bottom: 1px solid var(--color-rule);
    transition: border-color 150ms cubic-bezier(0.2, 0, 0, 1);
}
body[data-theme="autarqui"] .item-details a:hover,
body[data-theme="autarqui"] .item-subtitle a:hover {
    border-color: var(--color-heading);
}

/* Publications */
body[data-theme="autarqui"] .publication .item-subtitle em { color: var(--color-muted); }
body[data-theme="autarqui"] .pub-link { color: var(--color-text); text-decoration: underline; }

/* --- Tags: squared hairline chips --- */
body[data-theme="autarqui"] .tag,
body[data-theme="autarqui"] .tags .tag {
    background: var(--color-surface);
    border: 1px solid var(--color-rule);
    border-radius: 2px;
    color: var(--color-muted);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    padding: 0.4rem 0.7rem;
    transition: border-color 150ms cubic-bezier(0.2, 0, 0, 1),
                color 150ms cubic-bezier(0.2, 0, 0, 1);
}
body[data-theme="autarqui"] .tag:hover {
    background: var(--color-surface);
    border-color: var(--color-heading);
    color: var(--color-heading);
    transform: none;
}

/* --- Contact: centered title + hairline chips --- */
body[data-theme="autarqui"] .contact-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: var(--track-extra);
    text-transform: uppercase;
    color: var(--color-muted);
    text-align: center;
    margin: 2.5rem 0 1.25rem;
}
body[data-theme="autarqui"] .contact-links { justify-content: center; gap: 1.25rem; }
body[data-theme="autarqui"] .contact-link {
    background: none;
    border: none;
    border-radius: 0;
    color: var(--color-text);
    padding: 0.4rem;
    opacity: 0.85;
    transition: opacity 150ms cubic-bezier(0.2, 0, 0, 1);
}
body[data-theme="autarqui"] .contact-link:hover {
    opacity: 1;
    background: none;
    box-shadow: none;
    transform: none;
}
body[data-theme="autarqui"] .contact-icon { width: 20px; height: 20px; }

/* --- Essays / journal section --- */
body[data-theme="autarqui"] .essays {
    text-align: center;
    margin-top: 2.75rem;
}
body[data-theme="autarqui"] .essays-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: var(--track-extra);
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.85rem;
}
body[data-theme="autarqui"] .essays-link {
    display: inline-block;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-rule);
    padding-bottom: 1px;
    transition: color 150ms cubic-bezier(0.2, 0, 0, 1),
                border-color 150ms cubic-bezier(0.2, 0, 0, 1);
}
body[data-theme="autarqui"] .essays-link:hover {
    color: var(--color-heading);
    border-color: var(--color-heading);
}

/* --- Navigation dock (desktop) --- */
@media (min-width: 1025px) {
    body[data-theme="autarqui"] .floating-menu {
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(8px);
        border: 1px solid var(--color-rule);
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        padding: 0.5rem 0.75rem;
    }
    body[data-theme="autarqui"] .menu-link {
        font-family: var(--font-body);
        font-weight: 500;
        color: var(--color-muted);
        border-radius: 6px;
        transition: color 150ms cubic-bezier(0.2, 0, 0, 1),
                    background 150ms cubic-bezier(0.2, 0, 0, 1);
    }
    body[data-theme="autarqui"] .menu-link:hover {
        color: var(--color-heading);
        background: var(--color-surface);
        transform: none;
    }
    body[data-theme="autarqui"] .menu-link:hover .menu-icon { transform: none; }
    body[data-theme="autarqui"] .menu-link.active {
        color: var(--color-heading);
        background: var(--color-surface);
        font-weight: 600;
        transform: none;
    }
    body[data-theme="autarqui"] .menu-link.active::before {
        background: var(--color-heading);
        box-shadow: none;
    }
}

/* --- Navigation (mobile bottom bar) --- */
@media (max-width: 1024px) {
    body[data-theme="autarqui"] .floating-menu {
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid var(--color-rule);
        box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.04);
    }
    body[data-theme="autarqui"] .menu-link {
        font-family: var(--font-body);
        color: var(--color-muted);
        transition: color 150ms cubic-bezier(0.2, 0, 0, 1);
    }
    body[data-theme="autarqui"] .menu-link:hover,
    body[data-theme="autarqui"] .menu-link.active {
        color: var(--color-heading);
        background: var(--color-surface);
        transform: none;
    }
    body[data-theme="autarqui"] .menu-link.active::before {
        background: var(--color-heading);
        box-shadow: none;
    }
}

/* --- Top bar: language switcher minimal; hide theme switcher --- */
body[data-theme="autarqui"] .theme-switcher { display: none; }

body[data-theme="autarqui"] .lang-switcher {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--color-rule);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
}
body[data-theme="autarqui"] .lang-button {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-muted);
    border-radius: 4px;
}
body[data-theme="autarqui"] .lang-button:hover {
    background: var(--color-surface);
    color: var(--color-heading);
}
body[data-theme="autarqui"] .lang-button.active {
    background: var(--color-heading);
    color: #fff;
}

body[data-theme="autarqui"] .loading { color: var(--color-muted); }

/* --- Minimalist scrollbar (viewport lives on <html>; use literal cold neutrals) --- */
html:has(body[data-theme="autarqui"]) {
    scrollbar-width: thin;
    scrollbar-color: #d4d4d4 transparent;
}
html:has(body[data-theme="autarqui"])::-webkit-scrollbar,
body[data-theme="autarqui"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html:has(body[data-theme="autarqui"])::-webkit-scrollbar-track,
body[data-theme="autarqui"] ::-webkit-scrollbar-track { background: transparent; }
html:has(body[data-theme="autarqui"])::-webkit-scrollbar-thumb,
body[data-theme="autarqui"] ::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 8px;
    border: 3px solid #ffffff;
    background-clip: padding-box;
}
html:has(body[data-theme="autarqui"])::-webkit-scrollbar-thumb:hover,
body[data-theme="autarqui"] ::-webkit-scrollbar-thumb:hover { background: #9a9a9a; }

/* --- Responsive tuning --- */
@media (max-width: 1024px) {
    body[data-theme="autarqui"] .container { padding-top: 3rem; }
    body[data-theme="autarqui"] .container > .site-window {
        margin-top: 2.25rem;
        padding-top: 2.25rem;
    }
    body[data-theme="autarqui"] .section-title { font-size: 1.35rem; margin-bottom: 1.25rem; }
    body[data-theme="autarqui"] .item { padding: 1.25rem 0; }
    body[data-theme="autarqui"] .bio { font-size: 1rem; }
    body[data-theme="autarqui"] .hero-photo { width: 84px; height: 104px; }
}

/* Mobile: language selector 2x, pinned to the right margin */
@media (max-width: 768px) {
    body[data-theme="autarqui"] .top-bar { justify-content: flex-end; }
    body[data-theme="autarqui"] .lang-switcher {
        gap: 0.3rem;
        padding: 0.3rem;
        border-radius: 8px;
    }
    body[data-theme="autarqui"] .lang-button {
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
        border-radius: 6px;
    }
}

