*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #071320, #0d3524, #091b2e, #0a2e1c);
    background-size: 400% 400%;
    animation: gradient 20s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
}

/* Language selector */
#language-selector {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    z-index: 100;
}

#language-selector .lang-button + .lang-button {
    margin-left: 8px;
}

.lang-button {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.13);
    padding: 6px 16px;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.lang-button:hover {
    background: rgba(255, 255, 255, 0.11);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-button.active {
    background: rgba(45, 212, 191, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #2dd4bf;
    border-color: rgba(45, 212, 191, 0.45);
}

/* Hero */
#animation-container {
    text-align: center;
    padding: 22vh 2rem 4vh;
}

#animation-container h1 {
    font-size: 2.25rem;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    color: white;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

#animation-container p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.95rem;
    margin: 0;
}

/* Spline */
#spline {
    width: 100%;
}

#spline-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

#spline-animation spline-viewer {
    display: block;
    width: 100%;
    max-width: 900px;
    height: 580px;
}

/* Tabs */
#tabs-container {
    display: flex;
    justify-content: center;
    padding: 8px 16px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

#tabs-container .tab-button + .tab-button {
    margin-left: 4px;
}

.tab-button {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.13);
    padding: 9px 22px;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.18s;
    flex: 1;
    max-width: 160px;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-button.active {
    background: rgba(45, 212, 191, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #5eead4;
    border-color: rgba(45, 212, 191, 0.45);
}

/* Content sections */
#sections {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 72px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #5eead4;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}

.tab-content p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.tab-content a {
    color: #2dd4bf;
    text-decoration: none;
    transition: color 0.15s;
}

.tab-content a:hover {
    color: #5eead4;
    text-decoration: underline;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 22px;
    margin-top: 4px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: rgba(45, 212, 191, 0.2);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2dd4bf;
    box-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
}

.tl-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.tl-logo-wrap {
    margin-right: 12px;
}

.tl-logo-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.tl-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.tl-info {
    flex: 1;
    min-width: 0;
}

.tl-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.tl-role {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.93rem;
    font-weight: 600;
}

.tl-date {
    color: #2dd4bf;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.tl-company {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.tl-company-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.tl-company-link:hover {
    color: rgba(255, 255, 255, 0.75);
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

.timeline-item p {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.875rem;
    line-height: 1.75;
    margin: 0 0 8px;
}

.tl-skills {
    color: rgba(45, 212, 191, 0.6);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
}

.tl-footer {
    margin-top: 24px !important;
    font-size: 0.85rem !important;
}

.pub-venue {
    color: rgba(45, 212, 191, 0.5);
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 4px;
}

.pub-badge {
    display: inline-block;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.35);
    color: #2dd4bf;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 1px 7px;
    border-radius: 100px;
    vertical-align: middle;
    margin-right: 4px;
    text-transform: uppercase;
}


/* Scroll hint */
#scroll-hint {
    position: fixed;
    bottom: 14vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: none;
    animation: hintReveal 3.8s ease forwards;
}

.scroll-hint-inner {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 100px;
    padding: 11px 22px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.88);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.scroll-hint-arrow {
    color: #2dd4bf;
    display: inline-block;
    margin-left: 10px;
    animation: arrowBounce 0.9s ease infinite;
}

@keyframes hintReveal {
    0%   { opacity: 0; transform: translateX(-50%) translateY(10px); }
    14%  { opacity: 1; transform: translateX(-50%) translateY(0);    }
    78%  { opacity: 1; transform: translateX(-50%) translateY(0);    }
    100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0);   }
    50%       { transform: translateY(4px); }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mobile */
@media screen and (max-width: 600px) {
    #tabs-container {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    #tabs-container .tab-button + .tab-button {
        margin-left: 0;
    }

    .tab-button {
        margin: 3px;
    }

    .tab-button {
        flex: 1 1 calc(50% - 4px);
        max-width: none;
        font-size: 0.82rem;
        padding: 8px 10px;
    }

    #sections {
        padding: 24px 16px 60px;
    }

    #spline-animation spline-viewer {
        height: 340px;
    }


}
