/* --- PREMIUM PRESENTATION POLISH --- */

/* Scroll Reveal Base */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    /* Fallback: if JS fails, show content after a delay */
    animation: revealFallback 1s forwards 3s;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    animation: none;
    /* Override fallback if JS works */
}

@keyframes revealFallback {
    to {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
}

/* Card Hover Micro-Interactions */
.card,
.catalog-card,
.feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.card:hover,
.catalog-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.15) !important;
    z-index: 10;
}

/* Enhanced Glassmorphism for Command Center */
.command-center-overlay {
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    background-color: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: var(--shadow-lg) !important;
}

[data-theme="dark"] .command-center-overlay {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Search Polish */
.search-bar:focus-within {
    width: 45% !important;
    background: var(--card-bg);
}

/* Button Glow Effect */
.btn-primary,
.btn-hero {
    position: relative;
    overflow: hidden;
}

.btn-primary:after,
.btn-hero:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    transform: rotate(45deg);
    transition: all 0.6s ease;
    z-index: 1;
}

.btn-primary:hover:after,
.btn-hero:hover:after {
    left: 150%;
}

/* --- TALENT POOL PREMIUM UI --- */
.talent-pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.talent-item-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.05);
    border: 1px solid rgba(0, 51, 102, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.talent-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 51, 102, 0.1);
    border-color: var(--primary-color);
}

.talent-item-header {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.2rem;
}

.talent-avatar-img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(13, 138, 188, 0.1);
}

.talent-info-main h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-main);
    font-weight: 700;
}

.talent-role-label {
    margin: 2px 0 0 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.talent-skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.skill-tag {
    background: rgba(13, 138, 188, 0.08);
    color: var(--primary-color);
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(13, 138, 188, 0.1);
}

.talent-academic-list {
    margin: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.talent-academic-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.talent-academic-item i {
    width: 14px;
    opacity: 0.7;
}

.talent-certs-preview {
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(13, 138, 188, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cert-mini-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-main);
}

.cert-mini-item i {
    font-size: 0.85rem;
}

.cert-mini-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.talent-social-links a {
    font-size: 1.1rem;
    transition: opacity 0.2s;
}

.talent-social-links a:hover {
    opacity: 0.7;
}

[data-theme="dark"] .talent-item-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .talent-info-main h4 {
    color: white;
}

[data-theme="dark"] .skill-tag {
    background: rgba(13, 138, 188, 0.2);
}

.btn-edit-id {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-id:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* --- PREMIUM MODAL SYSTEM --- */
.premium-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.3s ease;
}

.premium-modal-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: white !important;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
    position: relative;
    padding: 40px;
}

.premium-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.premium-modal-close:hover {
    background: #0D8ABC;
    transform: rotate(90deg);
}

.modal-header-premium {
    text-align: center;
    margin-bottom: 40px;
}

.modal-header-premium h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: white !important;
}

.modal-header-premium p {
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.6;
}

.partner-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08);
}

.summary-item h3 {
    color: #38bdf8 !important;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85) !important;
}

.free-tag {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- PROFILE TWO-COLUMN LAYOUT --- */
.profile-layout-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 4rem;
}

@media (max-width: 1100px) {
    .profile-layout-grid {
        grid-template-columns: 1fr;
    }
}

.profile-left-col {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- PROFESSIONAL ID CARD --- */
.profile-id-card {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    color: white;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.id-card-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

.id-card-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.id-card-photo-section {
    padding: 2.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.id-photo-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(var(--primary-color), #38bdf8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.id-photo-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1e293b;
}

.photo-edit-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #1e293b;
    transition: transform 0.2s;
}

.photo-edit-badge:hover {
    transform: scale(1.1);
    background: #0ea5e9;
}

.id-badge-type {
    margin-top: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #38bdf8;
}

.id-card-info-section {
    padding: 2rem;
}

.id-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.id-logo {
    height: 18px;
    opacity: 0.8;
    vertical-align: middle;
}

.id-org {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.id-user-details {
    margin-bottom: 2rem;
}

.id-user-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.id-user-job {
    font-size: 0.9rem;
    color: #38bdf8;
    font-weight: 600;
    margin-top: 5px;
}

.id-user-meta {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.id-user-meta span {
    font-size: 0.75rem;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.id-card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
}

.id-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.id-stat-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}

.id-stat-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-top: 2px;
}

.bio-card {
    padding: 2rem;
    border-radius: 24px;
    background: var(--card-bg);
}

.bio-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bio-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.contact-item i {
    width: 18px;
    color: var(--primary-color);
}

/* --- PREMIUM EDIT MODAL --- */
.edit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.edit-modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .edit-modal-content {
    background: #1e293b;
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.edit-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.close-modal-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--text-main);
}

.form-group-premium {
    margin-bottom: 1.5rem;
}

.form-group-premium label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-premium {
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s;
}

[data-theme="dark"] .input-premium {
    background: rgba(255, 255, 255, 0.05);
}

.input-premium:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--card-bg);
}

.modal-footer-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-save-premium {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-save-premium:hover {
    transform: translateY(-2px);
    background: #0b7aa8;
}

.btn-cancel-premium {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-premium:hover {
    background: rgba(0, 0, 0, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}