* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.language-switch {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid #dbe3e8;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.language-option {
    min-width: 48px;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.language-option.is-active {
    background: #037f66;
    color: #ffffff;
}

.language-option:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.book-container {
    perspective: 1500px;
}

.book {
    display: flex;
    width: 950px;
    height: 600px;
    background: #09af96;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
}

.page-left {
    width: 50%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 8px 0 0 8px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 2px solid #e2e8f0;
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #037f66;
}

.profile-section h1 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 5px;
}

.profile-section h3 {
    font-size: 1rem;
    color: #037f66;
    margin-bottom: 15px;
}

.bio {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.6;
}

.social-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.social-icons a {
    color: #09af96;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn {
    padding: 12px 24px;
    background: #037f66;
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
}

.btn:hover { background: #026c57; }

.page-right {
    width: calc(50% - 20px);
    height: calc(100% - 40px);
    position: absolute;
    right: 20px;
    top: 20px;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.page-right.flipped {
    transform: rotateY(-180deg);
}

.page-front, .page-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 0 8px 8px 0;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: inset 5px 0 10px rgba(0,0,0,0.05);
}

.page-back {
    transform: rotateY(180deg);
    border-radius: 8px 0 0 8px;
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.05);
}

h2 {
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.text-block {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 15px;
    line-height: 1.6;
}

.timeline-item, .project-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.timeline-item h4, .project-item h4 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 5px;
}

.timeline-item p, .project-item p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.date {
    font-size: 0.75rem;
    color: #037f66;
    font-weight: bold;
    display: block;
    margin-bottom: 3px;
}

.tag {
    display: inline-block;
    background: #f1f5f9;
    color: #037f66;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    margin-right: 5px;
}

.skills-section p {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 8px;
}

.awards-list {
    list-style-position: inside;
    font-size: 0.85rem;
    color: #475569;
}

.awards-list li { margin-bottom: 6px; }

.page-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-weight: bold;
}

.next-btn, .prev-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #037f66;
    cursor: pointer;
    transition: 0.2s;
}

.next-btn:hover, .prev-btn:hover { color: #0f172a; }

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        padding: 68px 15px 20px;
        align-items: flex-start;
    }

    .language-switch {
        top: 15px;
        right: 50%;
        transform: translateX(50%);
        z-index: 9999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .book-container {
        width: 100%;
        perspective: none;
    }

    .book {
        width: 100%;
        height: auto;
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .page-left {
        width: 100%;
        border-radius: 12px;
        border: none;
        padding: 30px 20px;
        margin-bottom: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .social-icons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .social-icons a {
        display: block;
        width: 100%;
        padding: 14px;
        background: #f1f5f9;
        border-radius: 8px;
        text-align: center;
        font-size: 1rem;
    }

    .buttons {
        width: 100%;
    }

    .btn {
        padding: 18px 20px;
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
    }

    #pages {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .page-right {
        position: relative;
        width: 100%;
        height: auto;
        right: auto;
        top: auto;
        transform: none !important;
        transition: none;
    }

    .page-front, .page-back {
        position: relative;
        width: 100%;
        height: auto;
        transform: none !important;
        border-radius: 12px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .page-footer {
        display: none !important;
    }
}

.pt {
    display: none !important;
}

body.lang-pt .en {
    display: none !important;
}

body.lang-pt .pt {
    display: inline !important;
}