/* ========================================
   PROFILE PAGE
   Follows the homepage visual system
======================================== */

.profile-hero {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: clamp(36px, 5vw, 80px);
    padding-block: 42px 80px;
}

.profile-content {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.profile-title {
    margin: 0;
    font-size: clamp(48px, 6.5vw, 100px);
    font-weight: 720;
    letter-spacing: -0.075em;
    line-height: 1.04;
    overflow-wrap: anywhere;
}

.profile-description {
    max-width: 660px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 1.45vw, 20px);
    font-weight: 400;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-overview {
    max-width: 760px;
    margin-top: 24px;
    color: var(--foreground);
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-actions {
    margin-top: 32px;
}

/* ========================================
   FLOATING PROFILE PHOTO
======================================== */

.profile-visual {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.profile-logo-stage {
    position: relative;
    width: min(100%, 410px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    perspective: 1000px;
}

/* The photo wrapper has a fixed square aspect ratio.
   Long overview text cannot resize this element. */

.profile-logo-object {
    position: relative;
    z-index: 2;
    width: 76%;
    aspect-ratio: 1 / 1;
    flex: none;

    --float-offset: -20px;

    animation: logo-float 4s ease-in-out infinite;
}

.profile-logo-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--card-border);
    border-radius: 22%;
    background: var(--background);
    box-shadow: 0 2px 3px rgba(var(--shadow-color), 0.04), 0 14px 28px rgba(var(--shadow-color), 0.08);
    transition: border-color var(--transition), box-shadow var(--transition);
}

/* Crop automatically to a square without stretching. */

.profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    user-select: none;
    pointer-events: none;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--background);
    color: var(--foreground);
    font-size: clamp(48px, 7vw, 84px);
    font-weight: 750;
    letter-spacing: -0.08em;
}

/* Elliptical shadow beneath the floating photo. */

.profile-logo-shadow {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 5%;
    width: 60%;
    height: 8%;
    border-radius: 50%;
    background: var(--foreground);

    --shadow-opacity: 0.32;
    --shadow-opacity-mid: 0.18;
    --shadow-blur: 7px;
    --shadow-blur-mid: 10px;

    opacity: 0.32;
    filter: blur(7px);
    transform: translateX(-50%);
    animation: shadow-breathe 4s ease-in-out infinite;
    pointer-events: none;
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 900px) {
    .profile-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        padding-block: 44px 64px;
    }

    .profile-title {
        font-size: clamp(54px, 10vw, 82px);
    }

    .profile-visual {
        width: 100%;
        justify-content: center;
    }

    .profile-logo-stage {
        width: min(78%, 340px);
    }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 520px) {
    .profile-hero {
        gap: 42px;
        padding-block: 38px 54px;
    }

    .profile-title {
        font-size: clamp(42px, 10.8vw, 60px);
        letter-spacing: -0.07em;
    }

    .profile-description {
        margin-top: 20px;
        font-size: 15px;
        line-height: 1.8;
    }

    .profile-overview {
        font-size: 15px;
        line-height: 1.85;
    }

    .profile-logo-stage {
        width: min(90%, 300px);
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {
    .profile-logo-object,
    .profile-logo-shadow {
        animation: none;
    }
}
