* {
    box-sizing: border-box;
}

:root {
    --bg-start: #130818;
    --bg-mid: #1d0f2a;
    --bg-end: #261338;
    --bg-overlay: radial-gradient(circle at top, #4b1f63 0%, transparent 46%);
    --bg-gradient: linear-gradient(to bottom, var(--bg-start), var(--bg-mid), var(--bg-end));
    --surface: rgba(28, 14, 40, 0.8);
    --surface-border: rgba(206, 172, 255, 0.22);
    --text-main: #f4f5ff;
    --text-muted: #c7c9e5;
    --accent: #d1a9ff;
    --accent-strong: #a56eff;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --breakpoint-mobile: 700px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    background: var(--bg-overlay), var(--bg-gradient);
    color: var(--text-main);
}

header {
    background: rgba(23, 10, 34, 0.84);
    padding: 21px 20px 1px;
    text-align: center;
}

header h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

header p {
    font-size: 1.15em;
    margin-top: 1px;
    color: var(--text-muted);
}

nav {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(23, 10, 34, 0.84);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background-color 0.25s, color 0.25s, transform 0.25s;
}

nav a:hover {
    background-color: rgba(209, 169, 255, 0.2);
    color: var(--accent);
    transform: translateY(-1px);
}

main {
    max-width: 980px;
    margin: 32px auto 48px;
    padding: 0 20px;
}

h2 {
    color: #ddd0ff;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 8px;
    margin: 0 0 20px;
}

main > div {
    margin: 28px auto;
}

main > div p {
    text-align: left;
}

#sobre img {
    width: min(100%, 360px);
    display: block;
    margin: 0 auto;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.cont {
    display: flow;
    gap: 24px;
    align-items:center;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.cont .button-link {
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    display: block;
    width: fit-content;
    margin: 8px auto 0;
}

.mid {
    display: flex;
    gap: 24px;
    align-items:center;
    padding: 22px;
}

.mid .logo {
    flex: 0 0 300px;
    width: 300px;
    display: block;
    margin: 0 auto;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible;
    filter: drop-shadow(none);
}

.mid .logo img,
.mid .logo picture {
    width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    object-position: center top;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    filter: drop-shadow(none);
}

.mid .foto {
    flex: 0 0 300px;
    width: 300px;
    display: block;
    margin: 0 auto;
}

.mid .foto-desktop-only {
    flex: 0 0 300px;
    width: 300px;
    display: block;
    margin: 0 auto;
}

.mid .foto-mobile-only {
    display: none;
}

.mid .foto img,
.mid .foto picture {
    width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.half {
    display: flex;
    gap: 24px;
    align-items:center;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.half picture {
    flex: 0 1 340px;
    width: 100%;
    max-width: 360px;
}

.half-media {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.half-media .button-link {
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    margin-bottom:initial;
}

.half p {
    flex: 1;
}

.book-cover {
    width: min(100%, 200px);
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

#contato {
    text-align: center;
}

#contato p {
    text-align: center;
}

.button-link {
    align-self: center;
    display: inline-block;
    margin: 5px 2px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #6a2f91, #4a1d6a);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.2s, filter 0.2s;
}

.button-link:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.button-link.mobile-only {
    display: none;
}

.highlight {
    color: var(--accent);
}

.section-title-centered {
    border-bottom: 0;
    margin: 0;
    text-align: center;
}

.center-text {
    text-align: center;
}

.compact {
    margin: 2px;
    align-self: center;
    font-size: 1em;
}

footer {
    text-align: center;
    padding: 30px 10px;
    background-color: #1b0d27;
    color: #a9acc6;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: var(--breakpoint-mobile)), (orientation: portrait) and (max-width: 900px) {
    .mid {
        flex-direction: column;
        text-align: center;
        padding: 0;
    }

    .mid .foto {
        width: 100%;
        flex: 1 1 auto;
        padding: 22px 0;
    }

    .mid .foto-mobile-only {
        display: block;
        width: 100%;
        flex: 1 1 auto;
        padding: 22px 0;
    }

    .mid .foto-desktop-only {
        display: none;
    }

    .mid p {
        text-align: center;
        padding: 0 22px;
    }

    .half {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .half p {
    text-align: center;
    }

    .half picture {
        flex: 1 1 auto;
        width: 100%;
    }

    #sobre img {
        width: min(100%, 320px);
    }

    .desktop-only {
        display: none;
    }

    .button-link.mobile-only {
        background: linear-gradient(135deg, #4fc3f7, #0288d1);
        display: inline-block;
        margin-top: 4px;
    }
}
