/* =========================================
   PREMIUM DATA-DRIVEN MODAL STYLES
   ========================================= */

.premium-glass-card {
    background: rgba(18, 18, 20, 0.85);
    /* Deep dark glass */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 0;
    overflow: hidden;
    position: relative;
    margin: auto !important;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(20px) scale(0.95) !important;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .premium-glass-card {
    transform: translateY(0) scale(1) !important;
    opacity: 1;
}

.modal-banner {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.fallback-banner {
    height: 120px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(18, 18, 20, 1) 100%);
}

.premium-glass-card .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: #fff;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.premium-glass-card .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.premium-modal-body {
    padding: 0 30px 30px;
    position: relative;
    text-align: center;
}

.modal-avatar-floater {
    margin-top: -45px;
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
}

.icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: #fff;
    border: 4px solid #121214;
    /* Match card background to cut into banner */
    position: relative;
}

.modal-platform-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-color);
    margin: 0 0 10px;
}

.scraped-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    line-height: 1.2;
}

.scraped-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-action-buttons {
    display: flex;
    gap: 12px;
}

.btn-premium-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    flex: 1;
    border: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-premium-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-premium-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
}

.btn-premium-action:active {
    transform: scale(0.94);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s;
}

/* CSS Ripple Effect */
.btn-premium-action::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.btn-premium-action:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.2s ease-out;
}

.btn-premium-action:hover::before {
    opacity: 1;
}

.btn-premium-action i {
    transition: transform 0.3s ease;
}

.btn-premium-action:hover i {
    transform: translateX(5px);
}

.copy-link-btn {
    flex: 0 0 60px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: auto;
}

.copy-link-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.copy-link-btn i {
    transform: none !important;
}

.copy-link-btn:hover i {
    transform: scale(1.1) !important;
}

/* GitHub Repositories Custom UI */
.github-repos-container {
    margin: 15px 0 20px;
    text-align: left;
    background: rgba(12, 14, 18, 0.7);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gh-repos-title {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.gh-repos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gh-repos-list::-webkit-scrollbar {
    width: 4px;
}

.gh-repos-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.gh-repo-item {
    display: block;
    background: rgba(24, 27, 34, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gh-repo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.12), transparent);
    opacity: 0.6;
    transition: width 0.35s ease;
    z-index: 0;
    pointer-events: none;
}

.gh-repo-item:hover {
    background: rgba(35, 39, 48, 0.9);
    border-color: rgba(88, 166, 255, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 14px rgba(88, 166, 255, 0.12);
}

.gh-repo-item:hover::before {
    width: 100%;
}

.gh-repo-item:active {
    transform: scale(0.98);
}

.gh-repo-item.is-current-working {
    border-color: rgba(16, 185, 129, 0.45);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(24, 27, 34, 0.85));
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.gh-repo-item.is-current-working:hover {
    border-color: rgba(16, 185, 129, 0.75);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.2);
}

.gh-repo-header,
.gh-repo-desc,
.gh-repo-footer {
    position: relative;
    z-index: 1;
}

.gh-repo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.gh-repo-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0; /* Prevents overflow in flexbox */
}

/* Polished Project Name - Handles long project names with graceful wrapping */
.gh-repo-name {
    color: #58a6ff;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: break-word;
    display: block;
}

.gh-repo-slug {
    font-family: 'JetBrains Mono', monospace, monospace;
    font-size: 0.72rem;
    color: #8b949e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.gh-repo-stars {
    color: #e2e8f0;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.gh-repo-desc {
    color: #cbd5e1;
    font-size: 0.82rem;
    margin: 4px 0 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-repo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.74rem;
    color: #8b949e;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gh-repo-lang {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
}

.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f1e05a;
    display: inline-block;
}

.gh-repo-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #8b949e;
}

/* Current Working Project Badge */
.current-working-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 9999px;
    color: #34d399;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
    white-space: nowrap;
    width: fit-content;
}

.active-pulse-pip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: activePulsePip 2s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes activePulsePip {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}

/* =========================================
   PORTFOLIO MAIN PAGE: CURRENT WORKING PROJECT CARD
   ========================================= */
.current-working-card {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 24px;
    background: rgba(16, 20, 26, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 18px;
    padding: 14px 18px;
    text-align: left;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(16, 185, 129, 0.09);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.current-working-card:hover {
    border-color: rgba(16, 185, 129, 0.65);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.2);
}

.cwp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.cwp-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #34d399;
}

.cwp-calendar {
    font-size: 0.74rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'JetBrains Mono', monospace, sans-serif;
}

.cwp-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.cwp-info {
    flex: 1;
    min-width: 0;
}

.cwp-title {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow-wrap: break-word;
    word-break: normal;
}

.cwp-desc {
    display: block;
    font-size: 0.81rem;
    color: #94a3b8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cwp-arrow {
    color: #34d399;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.current-working-card:hover .cwp-arrow {
    transform: translate(2px, -2px);
}

/* =========================================
   PORTFOLIO MAIN PAGE: FEATURED PROJECTS SECTION
   ========================================= */
.portfolio-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 32px auto 14px;
    max-width: 500px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 0 4px;
    position: relative;
    z-index: 2;
}

.portfolio-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
}

.featured-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 2;
}

.featured-project-card {
    display: block;
    background: rgba(18, 20, 26, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 16px 18px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
    position: relative;
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.featured-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3.5px;
    height: 100%;
    background: var(--proj-accent, #00f0ff);
    box-shadow: 0 0 12px var(--proj-accent, #00f0ff);
}

.featured-project-card:hover {
    background: rgba(25, 29, 39, 0.92);
    border-color: var(--proj-accent, #00f0ff);
    transform: translateY(-2.5px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 22px rgba(0, 240, 255, 0.12);
}

.featured-project-card:active {
    transform: scale(0.98);
}

.proj-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.proj-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.proj-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--proj-accent, #00f0ff);
    flex-shrink: 0;
    overflow: hidden;
}

.proj-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.proj-title-wrap {
    min-width: 0;
}

.proj-title-wrap h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
}

.proj-title-wrap span {
    font-size: 0.74rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proj-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--proj-accent, #00f0ff);
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.proj-card-desc {
    font-size: 0.83rem;
    color: #cbd5e1;
    line-height: 1.42;
    margin: 6px 0 10px;
}

.proj-action-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.proj-action-btn {
    font-size: 0.76rem;
    font-weight: 600;
    color: #f0f0f0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    transition: all 0.22s ease;
}

.featured-project-card:hover .proj-action-btn {
    background: var(--proj-accent, #00f0ff);
    color: #080a0e;
    border-color: var(--proj-accent, #00f0ff);
    box-shadow: 0 0 14px var(--proj-accent, #00f0ff);
    gap: 8px;
}
