* {
    box-sizing: border-box;
}

.profile-page {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    color: #172033;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.profile-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(100% - 2rem, 72rem);
    margin: 0 auto;
    padding: 1.25rem 0;
}

.profile-site-header a,
.profile-actions a,
.profile-current-link a,
.profile-owner-actions a {
    color: #315f8f;
    font-weight: 700;
    text-decoration: none;
}

.profile-site-header a:hover,
.profile-actions a:hover,
.profile-current-link a:hover,
.profile-owner-actions a:hover {
    text-decoration: underline;
}

.profile-shell {
    width: min(100% - 2rem, 60rem);
    margin: 0 auto;
    padding: 2rem 0 5rem;
}

.profile-card {
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid #dce4ef;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 1.25rem 3rem rgba(20, 42, 79, 0.08);
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid #e5ebf3;
}

.profile-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border-radius: 50%;
    background: #142a4f;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
}

.profile-identity h1 {
    margin: 0;
    color: #142a4f;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
}

.profile-username {
    margin: 0.35rem 0 0;
    color: #668caf;
    font-weight: 700;
}

.profile-headline {
    margin: 0.65rem 0 0;
    color: #46556a;
    font-size: 1.05rem;
}

.profile-card section {
    padding-top: 1.5rem;
}

.profile-card h2 {
    margin: 0 0 0.7rem;
    color: #142a4f;
    font-size: 1.1rem;
}

.profile-card p,
.profile-card li {
    line-height: 1.65;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-tags li {
    padding: 0.35rem 0.7rem;
    border: 1px solid #d7e2ef;
    border-radius: 999px;
    background: #f8fbff;
    color: #315f8f;
    font-size: 0.92rem;
}

.profile-owner-actions {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5ebf3;
}

.profile-form textarea,
.profile-form select {
    width: 100%;
}

.profile-form textarea {
    resize: vertical;
}

.profile-form select {
    min-height: 2.75rem;
    padding: 0.65rem;
    border: 1px solid #cdd7e4;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #172033;
}

.profile-help {
    margin: -0.5rem 0 1rem;
    color: #68778a;
    font-size: 0.88rem;
    line-height: 1.5;
}

.profile-current-link {
    padding: 0.8rem 1rem;
    border: 1px solid #d7e2ef;
    border-radius: 0.65rem;
    background: #f8fbff;
}

.profile-media-note {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid #d7e2ef;
    border-radius: 0.65rem;
    background: #f8fbff;
}

.profile-media-note p {
    margin-bottom: 0;
    color: #5d6879;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 640px) {
    .profile-identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-avatar {
        width: 4rem;
        height: 4rem;
        font-size: 1.5rem;
    }
}

.profile-cover-image {
    display: block;
    width: calc(
        100% + clamp(3rem, 8vw, 6rem)
    );
    max-height: 20rem;
    margin:
        calc(-1 * clamp(1.5rem, 4vw, 3rem))
        calc(-1 * clamp(1.5rem, 4vw, 3rem))
        1.5rem;
    object-fit: cover;
    background: #eef3f8;
}

.profile-avatar-image {
    display: block;
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    background: #eef3f8;
}

.profile-media-controls {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5ebf3;
}

.profile-media-controls form {
    margin-top: 1rem;
}
