/* ========================================================
   IDN PORTOFOLIO - MAHASISWA PROFILE SHOWCASE STYLESHEET
   Design System: Space Grotesk + Inter, Frosted Glass, Micro-Box 4px
   Harmonized with Landing Page & Directory Aesthetics
   ======================================================== */

:root {
    --lp-primary: #1d72b8;
    --lp-primary-hover: #155e8a;
    --lp-primary-rgb: 29, 114, 184;
    --lp-accent: #0284c7;
    --lp-accent-glow: rgba(2, 132, 199, 0.25);
    --lp-dark-text: #0f172a;
    --lp-muted-text: #64748b;
    --lp-card-bg: #ffffff;
    --lp-card-border: rgba(226, 232, 240, 0.9);
    --lp-card-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.05);
    --lp-card-hover-shadow: 0 16px 36px -8px rgba(29, 114, 184, 0.16);
    --lp-chip-bg: rgba(241, 245, 249, 0.85);
    --lp-glass-bg: rgba(255, 255, 255, 0.85);
    --lp-glass-border: rgba(255, 255, 255, 0.7);
}

/* Dark Mode Tokens */
html.theme-dark,
body.theme-dark,
[data-bs-theme="dark"] {
    --lp-primary: #38bdf8;
    --lp-primary-hover: #7dd3fc;
    --lp-primary-rgb: 56, 189, 248;
    --lp-accent: #38bdf8;
    --lp-accent-glow: rgba(56, 189, 248, 0.3);
    --lp-dark-text: #f8fafc;
    --lp-muted-text: #94a3b8;
    --lp-card-bg: #161d2c;
    --lp-card-border: rgba(255, 255, 255, 0.08);
    --lp-card-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.7);
    --lp-card-hover-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.9), 0 0 25px rgba(56, 189, 248, 0.2);
    --lp-chip-bg: rgba(22, 29, 44, 0.75);
    --lp-glass-bg: rgba(22, 29, 44, 0.8);
    --lp-glass-border: rgba(255, 255, 255, 0.08);
}

/* Base resets & typography */
.profile-showcase-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

/* --------------------------------------------------------
   NAVIGATION (BREADCRUMB & BACK BUTTON)
   -------------------------------------------------------- */
.profile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem !important;
    color: var(--lp-muted-text);
    background: var(--lp-card-bg);
    padding: 7px 16px;
    border-radius: 4px;
    border: 1px solid var(--lp-card-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.profile-breadcrumb a {
    color: var(--lp-muted-text);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-breadcrumb a:hover {
    color: var(--lp-primary);
}

.profile-breadcrumb .separator {
    color: var(--lp-muted-text);
    opacity: 0.4;
    font-size: 0.75rem;
}

.profile-breadcrumb .current {
    color: var(--lp-dark-text);
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-back-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 4px;
    background: var(--lp-card-bg);
    border: 1px solid var(--lp-card-border);
    color: var(--lp-dark-text);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem !important;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.btn-back-pill:hover {
    background: var(--lp-primary);
    color: #ffffff;
    border-color: var(--lp-primary);
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(29, 114, 184, 0.25);
}

/* --------------------------------------------------------
   STUDENT PROFILE HERO HEADER (MICRO-BOX 4px)
   -------------------------------------------------------- */
.student-profile-hero {
    background: var(--lp-card-bg);
    border-radius: 4px;
    border: 1px solid var(--lp-card-border);
    overflow: hidden;
    box-shadow: var(--lp-card-shadow);
    margin-bottom: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.student-hero-banner {
    height: 120px;
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, rgba(29, 114, 184, 0.25) 0%, rgba(2, 132, 199, 0.12) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.banner-prog {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.3) 0%, rgba(8, 145, 178, 0.15) 100%);
}

.banner-eng {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.3) 0%, rgba(217, 119, 6, 0.15) 100%);
}

.banner-des {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3) 0%, rgba(192, 38, 211, 0.15) 100%);
}

/* Banner Glow Elements */
.hero-glow-banner-1 {
    position: absolute;
    top: -40px;
    left: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(var(--lp-primary-rgb), 0.2), transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.hero-glow-banner-2 {
    position: absolute;
    top: -20px;
    right: 15%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.18), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

/* Hero Content Body */
.student-hero-body {
    padding: 0 2rem 2rem;
    position: relative;
}

.student-hero-flex {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: -55px;
    margin-bottom: 1.5rem;
}

.student-hero-avatar-wrap {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.student-hero-avatar {
    width: 110px;
    height: 110px;
    border-radius: 4px;
    object-fit: cover;
    border: 4px solid var(--lp-card-bg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #0f172a;
    transition: transform 0.3s ease;
}

.student-hero-avatar:hover {
    transform: scale(1.04);
}

.student-identity-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.student-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-prodi-chip {
    padding: 4px 10px;
    border-radius: 2px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.75rem !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.badge-prodi-programmer {
    background: rgba(14, 116, 144, 0.95);
    color: #ffffff;
}

.badge-prodi-engineer {
    background: rgba(180, 83, 9, 0.95);
    color: #ffffff;
}

.badge-prodi-designer {
    background: rgba(147, 51, 234, 0.95);
    color: #ffffff;
}

.badge-prodi-default {
    background: rgba(30, 41, 59, 0.95);
    color: #ffffff;
}

.badge-angkatan-chip {
    padding: 4px 10px;
    border-radius: 3px;
    background: rgba(29, 114, 184, 0.08);
    border: 1px solid rgba(29, 114, 184, 0.2);
    color: var(--lp-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.student-hero-name {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem) !important;
    font-weight: 800 !important;
    color: var(--lp-dark-text);
    margin: 0;
    line-height: 1.2 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.verified-badge-icon {
    font-size: 1.25rem;
    color: #0284c7;
}

.unverified-badge-icon {
    font-size: 1.15rem;
    color: var(--lp-muted-text);
}

.student-hero-meta-list {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--lp-muted-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem !important;
    margin-top: 4px;
}

.student-hero-meta-list span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Quick Action / Social Row */
.student-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--lp-card-bg);
    border: 1px solid var(--lp-card-border);
    color: var(--lp-muted-text);
    text-decoration: none;
    transition: all 0.22s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hero-social-btn:hover {
    background: var(--lp-primary);
    color: #ffffff;
    border-color: var(--lp-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 114, 184, 0.25);
}

/* Stats Pill Bar inside Hero */
.student-stats-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.student-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 4px;
    background: var(--lp-chip-bg);
    border: 1px solid var(--lp-card-border);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem !important;
    color: var(--lp-dark-text);
}

.student-stat-item strong {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--lp-primary);
    font-size: 1rem;
}

/* --------------------------------------------------------
   MODERN TAB SWITCHER (MICRO-BOX 4px)
   -------------------------------------------------------- */
.portfolio-tab-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
    background: var(--lp-card-bg);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid var(--lp-card-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    width: fit-content;
}

.profile-tab-btn {
    padding: 8px 20px;
    border-radius: 3px;
    border: none;
    background: transparent;
    color: var(--lp-muted-text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem !important;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.profile-tab-btn:hover {
    color: var(--lp-primary);
    background: rgba(var(--lp-primary-rgb), 0.06);
}

.profile-tab-btn.active {
    background: linear-gradient(135deg, #1d72b8 0%, #155e8a 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(29, 114, 184, 0.25);
}

.tab-badge-num {
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 0.72rem !important;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
}

.profile-tab-btn.active .tab-badge-num {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --------------------------------------------------------
   PORTFOLIO CARDS GRID (MATCHING LANDING & MICRO-BOX 4px)
   -------------------------------------------------------- */
.profile-porto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.profile-porto-card {
    background: var(--lp-card-bg);
    border: 1px solid var(--lp-card-border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--lp-card-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    height: 100%;
}

.profile-porto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--lp-card-hover-shadow);
    border-color: rgba(var(--lp-primary-rgb), 0.4);
}

/* Thumbnail Media Container */
.profile-porto-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.profile-porto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.profile-porto-card:hover .profile-porto-img {
    transform: scale(1.06);
}

.porto-floating-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 3px 9px;
    border-radius: 2px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.72rem !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.porto-latest-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

/* Card Body */
.profile-porto-body {
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.profile-porto-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    color: var(--lp-dark-text);
    margin: 0 0 0.65rem;
    line-height: 1.35 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.profile-porto-card:hover .profile-porto-title {
    color: var(--lp-primary);
}

.profile-porto-title a {
    color: inherit;
    text-decoration: none;
}

.profile-porto-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem !important;
    color: var(--lp-muted-text);
    line-height: 1.55 !important;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Meta Tags */
.profile-porto-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: 1rem;
}

.profile-porto-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem !important;
    color: var(--lp-muted-text);
    background: var(--lp-chip-bg);
    border: 1px solid var(--lp-card-border);
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Card Footer Actions */
.profile-porto-footer {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.btn-porto-detail {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 3px;
    background: rgba(var(--lp-primary-rgb), 0.1);
    color: var(--lp-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-porto-detail:hover {
    background: var(--lp-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 114, 184, 0.25);
}

.btn-porto-detail i {
    transition: transform 0.2s ease;
}

.btn-porto-detail:hover i {
    transform: translateX(3px);
}

.porto-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-porto-action {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: var(--lp-chip-bg);
    border: 1px solid var(--lp-card-border);
    color: var(--lp-muted-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-porto-action:hover {
    background: var(--lp-primary);
    color: #ffffff;
    border-color: var(--lp-primary);
}

/* Empty State Card */
.profile-empty-state {
    background: var(--lp-card-bg);
    border: 1px dashed var(--lp-card-border);
    border-radius: 4px;
    padding: 3.5rem 1.5rem;
    text-align: center;
    margin: 2rem 0;
}

.profile-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    background: rgba(var(--lp-primary-rgb), 0.1);
    color: var(--lp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
}

.profile-empty-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--lp-dark-text);
    margin-bottom: 0.5rem;
}

.profile-empty-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem !important;
    color: var(--lp-muted-text);
    max-width: 480px;
    margin: 0 auto;
}

/* ========================================================
   DARK MODE NORMALIZATION (ZERO FONT INFLATION)
   ======================================================== */
html.theme-dark,
body.theme-dark,
[data-bs-theme="dark"] {
    font-size: 16px !important;
}

html.theme-dark .student-profile-hero,
body.theme-dark .student-profile-hero,
[data-bs-theme="dark"] .student-profile-hero {
    background: var(--lp-card-bg);
    border-color: var(--lp-card-border);
}

html.theme-dark .student-hero-banner,
body.theme-dark .student-hero-banner,
[data-bs-theme="dark"] .student-hero-banner {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

html.theme-dark .student-stats-bar,
body.theme-dark .student-stats-bar,
[data-bs-theme="dark"] .student-stats-bar {
    border-top-color: rgba(255, 255, 255, 0.06);
}

html.theme-dark .profile-porto-footer,
body.theme-dark .profile-porto-footer,
[data-bs-theme="dark"] .profile-porto-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
}

html.theme-dark .profile-tab-btn.active,
body.theme-dark .profile-tab-btn.active,
[data-bs-theme="dark"] .profile-tab-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
}

/* Responsive adjust */
@media (max-width: 768px) {
    .student-hero-body {
        padding: 0 1.25rem 1.5rem;
    }

    .student-hero-flex {
        flex-direction: column;
        align-items: flex-start;
        margin-top: -45px;
    }

    .student-hero-avatar-wrap {
        align-items: flex-start;
    }

    .student-hero-avatar {
        width: 85px;
        height: 85px;
    }

    .student-hero-name {
        font-size: 1.45rem !important;
    }

    .profile-porto-grid {
        grid-template-columns: 1fr;
    }
}
