/* Profile and gallery experience – 3.11.0 */
.modern-profile-page,
.modern-gallery-page {
    --surface: rgba(13, 22, 41, .92);
    --surface-raised: rgba(21, 33, 58, .95);
    --line: rgba(148, 163, 184, .17);
}

.modern-profile-hero {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #0b1325;
}

.modern-profile-cover {
    position: relative;
    height: clamp(210px, 27vw, 320px);
    border-radius: 0;
    background:
        radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--accent) 82%, white), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(34, 211, 238, .32), transparent 26%),
        linear-gradient(125deg, #121c35, #111a2e 48%, #08111f);
}

.modern-profile-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #0b1325, transparent 60%),
        linear-gradient(115deg, transparent 35%, rgba(255,255,255,.06) 35.2%, transparent 35.5%);
}

.modern-profile-headline {
    position: relative;
    z-index: 1;
    margin-top: -76px;
    padding: 0 clamp(20px, 4vw, 42px) 30px;
    align-items: flex-end;
}

.modern-profile-avatar {
    width: clamp(118px, 12vw, 158px);
    height: clamp(118px, 12vw, 158px);
    border: 6px solid #0b1325;
    border-radius: 36px;
    box-shadow: 0 22px 50px rgba(2,6,23,.5);
}

.modern-profile-title { align-items: flex-end; }
.modern-profile-title > div { min-width: 0; }
.modern-profile-title h1 {
    margin: 4px 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -.045em;
    line-height: 1;
}

.profile-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: #eef2ff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.profile-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.profile-hero-stats a {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(3, 8, 20, .42);
    color: #cbd5e1;
    text-decoration: none;
}
.profile-hero-stats a:hover { border-color: var(--accent); color: #fff; }
.profile-hero-stats strong { color: #fff; font-size: 1rem; }
.profile-hero-stats span { font-size: .78rem; }

.modern-profile-headline > .button-row {
    justify-content: flex-end;
    max-width: 420px;
}

.profile-tab-nav {
    position: sticky;
    z-index: 12;
    top: 10px;
    margin: 18px 0 22px;
    padding: 8px;
    overflow-x: auto;
    border-radius: 18px;
    background: rgba(10, 18, 34, .86);
    backdrop-filter: blur(18px);
}
.profile-tab-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.profile-tab-nav a i { color: color-mix(in srgb, var(--accent) 75%, white); }

.profile-modern-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--surface-raised), var(--surface));
}
.profile-modern-card:hover { border-color: rgba(148,163,184,.28); }
.profile-about-card { padding-left: clamp(24px, 8vw, 104px); }
.profile-card-icon {
    position: absolute;
    left: 24px;
    top: 24px;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--accent) 20%, #111827);
    color: color-mix(in srgb, var(--accent) 70%, white);
    font-size: 1.35rem;
}
.profile-gallery-preview { gap: 9px; }
.profile-gallery-preview a { overflow: hidden; border-radius: 14px; }
.profile-gallery-preview img { border-radius: 14px; transition: transform .3s ease; }
.profile-gallery-preview a:hover img { transform: scale(1.06); }

.gallery-hero-symbol {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(139,92,246,.35), rgba(34,211,238,.16));
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 20px 50px rgba(2,6,23,.3);
}

.gallery-browser {
    display: grid;
    gap: 18px;
    padding: clamp(14px, 2vw, 22px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(7, 13, 26, .5);
}
.gallery-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
}
.gallery-toolbar > label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(15,23,42,.9);
    color: #94a3b8;
}
.gallery-toolbar input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
}
.gallery-toolbar input::placeholder { color: #78879e; }
.gallery-toolbar [data-gallery-result-count] { color: #94a3b8; font-size: .86rem; white-space: nowrap; }
.gallery-view-buttons { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; }
.gallery-view-buttons button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.gallery-view-buttons button:hover,
.gallery-view-buttons button.active { background: rgba(99,102,241,.22); color: #fff; }

.gallery-tile { content-visibility: auto; contain-intrinsic-size: 360px; }
.gallery-tile-body > p {
    display: -webkit-box;
    margin: 5px 0;
    overflow: hidden;
    color: #aebbd0;
    font-size: .86rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.modern-gallery-grid.is-compact { grid-template-columns: 1fr; }
.modern-gallery-grid.is-compact .gallery-tile {
    display: grid;
    grid-template-columns: minmax(150px, 250px) minmax(0, 1fr);
}
.modern-gallery-grid.is-compact .gallery-image-link { height: 100%; }
.modern-gallery-grid.is-compact .gallery-image-link img { height: 100%; min-height: 170px; aspect-ratio: auto; }
.modern-gallery-grid.is-compact .gallery-tile-body { align-content: center; }

.gallery-filter-empty {
    padding: 58px 20px;
    border: 2px dashed rgba(148,163,184,.18);
    border-radius: 22px;
    text-align: center;
    color: #94a3b8;
}
.gallery-filter-empty i { display: block; margin-bottom: 12px; color: #8b5cf6; font-size: 1.8rem; }
.gallery-filter-empty strong { display: block; color: #e2e8f0; font-size: 1.05rem; }
.gallery-filter-empty p { margin-bottom: 0; }

@media (max-width: 900px) {
    .modern-profile-headline { align-items: flex-start; }
    .modern-profile-headline > .button-row { max-width: none; }
    .gallery-hero-symbol { width: 64px; height: 64px; border-radius: 20px; }
}

@media (max-width: 650px) {
    .modern-profile-headline { margin-top: -60px; }
    .modern-profile-title { align-items: center; }
    .modern-profile-headline > .button-row { width: 100%; }
    .profile-about-card { padding-left: 18px; padding-top: 84px; }
    .profile-card-icon { left: 18px; top: 18px; }
    .gallery-toolbar { grid-template-columns: 1fr auto; }
    .gallery-toolbar > label { grid-column: 1 / -1; }
    .modern-gallery-grid.is-compact .gallery-tile { grid-template-columns: 120px minmax(0, 1fr); }
    .modern-gallery-grid.is-compact .gallery-image-link img { min-height: 145px; }
}

@media (max-width: 430px) {
    .modern-profile-title { align-items: flex-start; }
    .modern-profile-avatar { border-radius: 28px; }
    .modern-gallery-grid.is-compact .gallery-tile { display: block; }
    .modern-gallery-grid.is-compact .gallery-image-link img { height: auto; aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-tile,
    .gallery-tile img,
    .profile-gallery-preview img { transition: none !important; }
}
