header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    row-gap: 0.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--fg-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

section {
    margin-bottom: 4.5rem;
    scroll-margin-top: 2rem;
}


.intro {
    display: flex;
    flex-direction: column-reverse;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .intro {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 4rem;
    }

    .intro-content {
        flex: 1;
        max-width: 520px;
    }
}

.intro h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.intro-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;

}

.flag-icon {
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
}

.intro p {
    font-size: 1.05rem;
    color: var(--fg-muted);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.intro p:last-of-type {
    margin-bottom: 1.5rem;
}


.highlight-word,
.scramble-text {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    margin: 0;
    padding: 0;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.scramble-text {
    cursor: default;
}

.highlight-word::after,
.scramble-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -1;
    border-radius: 2px;
}

.scramble-text:hover::after,
.highlight-word.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.scramble-text:hover,
.highlight-word.active {
    color: var(--bg);
}

.intro-contact {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.intro-contact p {
    font-size: 0.9rem;
    color: var(--fg-faint);
    margin-bottom: 0.2rem;
    line-height: 1.5;
}

.intro-contact strong {
    font-weight: 600;
    color: var(--fg);
}

.intro strong {
    font-weight: 500;
    color: var(--accent);
}

.intro em {
    font-style: italic;
    font-family: 'Georgia', serif;
}

.intro-photo {
    position: relative;
    width: 200px;
    height: 240px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .intro-photo {
        width: 250px;
        height: 300px;
    }
}

.photo-backdrop {
    position: absolute;
    top: 15px;
    right: -15px;
    bottom: -15px;
    left: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    z-index: 0;
}

.photo-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    z-index: 1;
}


footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--fg-faint);
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2.5rem;
        gap: 1.25rem;
    }

    .nav-links {
        justify-content: center;
        column-gap: 1rem;
    }

    .intro {
        gap: 2rem;
    }

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

    .intro-subtitle {
        justify-content: center;
    }

    .intro h1 {
        font-size: 2.15rem;
    }

    .intro-photo {
        width: 170px;
        height: 204px;
    }

    section {
        margin-bottom: 3rem;
    }
}