:root {
    --bg-gradient: radial-gradient(circle at top left, #e0f2fe 0%, #eef2ff 40%, #f9fafb 100%);
    --primary: #111827;
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.08);
    --text-muted: #6b7280;
    --border-subtle: #e5e7eb;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius-xl: 1.5rem;
    --radius-pill: 999px;
    --transition-fast: 0.35s ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-gradient);
    color: var(--primary);
    min-height: 100%;
}

/* 🔁 Changed: remove flex-centering on body */
body {
    padding: 24px 12px;
}

/* Global image safety */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-shell {
    width: 100%;
    max-width: 1120px;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    padding: 32px 24px 28px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

@media (min-width: 768px) {
    body {
        padding: 32px 16px;
    }

    .page-shell {
        padding: 40px 40px 32px;
    }
}

.page-shell::before {
    content: "";
    position: absolute;
    inset: -80%;
    background:
        radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.06) 0, transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.04) 0, transparent 55%);
    opacity: 1;
    pointer-events: none;
    z-index: -1;
}

header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background-color: #f3f4ff;
    border: 1px solid rgba(79, 70, 229, 0.2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.brand-pill i {
    font-size: 12px;
}

.header-text h1 {
    font-size: 26px;
    line-height: 1.2;
    margin: 6px 0 6px;
    letter-spacing: -0.03em;
}

.header-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    max-width: 520px;
}

.badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mini-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #4f46e5, #22c55e, #0ea5e9, #4f46e5);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #111827;
    font-size: 14px;
    letter-spacing: 0.08em;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.logo-text span:first-child {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

main {
    margin-top: 4px;
}

/* Centered carousel */
.carousel-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    padding: 22px 26px 26px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .carousel-shell {
        padding: 18px 14px 24px;
        max-width: 100%;
    }
}

.carousel-inner {
    position: relative;
    min-height: 320px; /* Desktop baseline */
}

.profile-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(10px) scale(0.98);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: stretch;
    pointer-events: none;
    padding-right: 32px; /* room for nav arrows */
}

.profile-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 900px) {
    .profile-slide {
        grid-template-columns: 1fr;
        padding-right: 0;
    }
}

.profile-text h2 {
    margin: 0 0 4px;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 8px;
}

.role-line {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.profile-text p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 6px;
}

.tag-chip {
    padding: 4px 9px;
    border-radius: var(--radius-pill);
    border: 1px dashed #cbd5f5;
    font-size: 11px;
    color: #4b5563;
    background-color: #f1f5f9;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-chip i {
    font-size: 11px;
}

/* News / updates area */
.news-title {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.news-list {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
}

.news-list li {
    margin-bottom: 2px;
}

.profile-media {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.avatar-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    padding: 14px;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), rgba(15, 23, 42, 0.8));
    color: #e5e7eb;
    min-height: 150px;
}

.avatar-faux {
    position: absolute;
    right: -6px;
    bottom: -10px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #f9fafb, #b4c6fc);
    opacity: 0.2;
    pointer-events: none;
}

.avatar-monogram {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(249, 250, 251, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    background: rgba(17, 24, 39, 0.4);
    margin-bottom: 8px;
    overflow: hidden;
}

/* if you remove inline styles on the img later, this will take over */
.avatar-monogram img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.avatar-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #cbd5f5;
    margin-bottom: 2px;
}

.avatar-headline {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.avatar-caption {
    font-size: 11px;
    color: #d1d5db;
    max-width: 220px;
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-pill);
    border: none;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(248, 113, 22, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(248, 113, 22, 0.45);
    background: #ea580c;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.4);
    color: #e5e7eb;
    font-size: 11px;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.ghost-link:hover {
    border-color: #e5e7eb;
}

.link-row i {
    font-size: 11px;
}

.carousel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.carousel-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    background: #e5e7eb;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    width: 22px;
    opacity: 1;
    background: #4f46e5;
    border-color: transparent;
}

.carousel-status {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
}

.playback-toggle {
    border-radius: var(--radius-pill);
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.playback-toggle i {
    font-size: 11px;
}

/* Left/Right nav buttons */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
    transition: background 0.2s ease, transform 0.15s ease;
    z-index: 5;
}

.nav-button:hover {
    background: #eef2ff;
    transform: translateY(calc(-50% - 1px));
}

.nav-button i {
    font-size: 14px;
    color: #4b5563;
}

.nav-prev {
    left: 10px;
}

.nav-next {
    right: 10px;
}

footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #9ca3af;
}

footer a {
    color: #6b21a8;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* 📱 Mobile-specific overrides */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-text h1 {
        font-size: 22px;
    }

    .header-text p {
        font-size: 13px;
        max-width: none;
    }

    .page-shell {
        border-radius: 16px;
        padding: 20px 16px 24px;
    }

    .carousel-inner {
        min-height: 0; /* allow content height to define */
    }

    /* Let slides participate in flow on mobile */
    .profile-slide {
        position: relative;
        inset: auto;
        padding-right: 0;
        transform: none;
    }

    .profile-slide:not(.active) {
        display: none;
    }

    .profile-slide.active {
        display: grid;
    }

    .avatar-caption {
        max-width: none;
    }

    .carousel-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-top: 22px;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-prev {
        left: 4px;
    }

    .nav-next {
        right: 4px;
    }
}
