/* ══════════════════════════════════════════
   MODAL — Shared shell styles
   ══════════════════════════════════════════ */

/* ─── Overlay ────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 28, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.modal-overlay.modal-visible {
    opacity: 1;
    pointer-events: all;
}

/* ─── Card ───────────────────────────────── */
.modal-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    background: linear-gradient(160deg, rgba(40, 50, 120, 0.98) 0%, rgba(10, 14, 55, 0.98) 100%);
    border: 1px solid rgba(124, 58, 237, 0.32);
    border-radius: 20px;
    padding: 36px 36px 32px;
    overflow-y: auto;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 24px 80px rgba(92, 39, 254, 0.22),
        0 8px 32px rgba(0,0,0,0.5);
    transform: translateY(28px) scale(0.97);
    transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), opacity 0.28s ease;
    /* scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,0.35) transparent;
}

.modal-overlay.modal-visible .modal-box {
    transform: translateY(0) scale(1);
}

.modal-box::-webkit-scrollbar            { width: 4px; }
.modal-box::-webkit-scrollbar-track      { background: transparent; }
.modal-box::-webkit-scrollbar-thumb      { background: rgba(124,58,237,0.4); border-radius: 4px; }

/* purple top-accent line */
.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7c3aed, #c4b5fd, transparent);
    border-radius: 20px 20px 0 0;
}

/* ─── Close button ───────────────────────── */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.5);
    color: #fff;
}

/* ─── Header area ────────────────────────── */
.modal-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(92,39,254,0.35) 0%, rgba(124,58,237,0.15) 100%);
    border: 1px solid rgba(124,58,237,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #c4b5fd;
    margin-bottom: 16px;
}

.modal-icon-purple {
    background: linear-gradient(135deg, rgba(139,92,246,0.35) 0%, rgba(167,139,250,0.15) 100%);
    border-color: rgba(167,139,250,0.4);
    color: #ddd6fe;
}

.modal-icon-green {
    background: linear-gradient(135deg, rgba(16,185,129,0.25) 0%, rgba(5,150,105,0.15) 100%);
    border-color: rgba(16,185,129,0.4);
    color: #6ee7b7;
}

.modal-icon-blue {
    background: linear-gradient(135deg, rgba(59,130,246,0.25) 0%, rgba(37,99,235,0.15) 100%);
    border-color: rgba(59,130,246,0.4);
    color: #93c5fd;
}

.modal-title {
    font-family: 'Aclonica', sans-serif;
    font-size: 22px;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.2;
}

.modal-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    color: rgba(196,181,253,0.7);
    margin: 0 0 0;
    line-height: 1.5;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(124,58,237,0.5) 0%, rgba(124,58,237,0.15) 60%, transparent 100%);
    margin: 20px 0;
}

/* shared action buttons row */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    padding: 11px 18px;
    text-decoration: none;
    border-radius: 10px;
}

/* ─── Resume preview ─────────────────────── */
.modal-resume-preview {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resume-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background 0.2s;
}

.resume-row:hover { background: rgba(124,58,237,0.08); }

.resume-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(167,139,250,0.7);
    min-width: 72px;
    flex-shrink: 0;
}

.resume-value {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.88);
    line-height: 1.5;
}

/* ─── Video modal ────────────────────────── */
.modal-video-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(124,58,237,0.3);
}

.modal-video-placeholder {
    background: linear-gradient(160deg, rgba(15,20,70,0.9) 0%, rgba(5,8,35,0.9) 100%);
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-video-placeholder:hover {
    background: linear-gradient(160deg, rgba(40,20,120,0.9) 0%, rgba(15,8,55,0.9) 100%);
}

.video-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c27fe, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 0 24px rgba(92,39,254,0.5), 0 0 60px rgba(92,39,254,0.2);
    transition: transform 0.25s, box-shadow 0.25s;
}

.modal-video-placeholder:hover .video-play-btn {
    transform: scale(1.1);
    box-shadow: 0 0 36px rgba(92,39,254,0.7), 0 0 80px rgba(92,39,254,0.3);
}

.video-placeholder-text {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(196,181,253,0.6);
    margin: 0;
}

/* ─── Chat modal ─────────────────────────── */
.modal-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages {
    min-height: 200px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,0.3) transparent;
}

.chat-messages::-webkit-scrollbar       { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.35); border-radius: 3px; }

.chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.chat-msg-user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16,185,129,0.35), rgba(5,150,105,0.2));
    border: 1px solid rgba(16,185,129,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #6ee7b7;
    flex-shrink: 0;
}

.chat-msg-user .chat-avatar {
    background: linear-gradient(135deg, rgba(92,39,254,0.35), rgba(124,58,237,0.2));
    border-color: rgba(124,58,237,0.4);
    color: #c4b5fd;
}

.chat-bubble {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px 14px 14px 14px;
    padding: 10px 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.55;
    max-width: 85%;
}

.chat-msg-user .chat-bubble {
    background: rgba(92,39,254,0.18);
    border-color: rgba(124,58,237,0.3);
    border-radius: 14px 8px 14px 14px;
    color: #e9e4ff;
}

/* typing indicator */
.chat-typing .chat-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(196,181,253,0.5);
    animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%            { transform: translateY(-6px); opacity: 1; }
}

/* input row */
.chat-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 11px 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.chat-input::placeholder { color: rgba(255,255,255,0.3); }

.chat-input:focus {
    border-color: rgba(124,58,237,0.6);
    background: rgba(124,58,237,0.07);
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #5c27fe, #7c3aed);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 18px rgba(92,39,254,0.5);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ─── Download options ───────────────────── */
.modal-download-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.download-option-card:hover {
    background: rgba(124,58,237,0.12);
    border-color: rgba(124,58,237,0.4);
    transform: translateX(4px);
}

.download-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(92,39,254,0.3), rgba(124,58,237,0.15));
    border: 1px solid rgba(124,58,237,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #c4b5fd;
    flex-shrink: 0;
}

.download-option-info {
    flex: 1;
}

.download-option-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2px;
}

.download-option-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: rgba(196,181,253,0.6);
}

.download-option-arrow {
    font-size: 13px;
    color: rgba(167,139,250,0.5);
    transition: color 0.2s;
}

.download-option-card:hover .download-option-arrow {
    color: #c4b5fd;
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 600px) {
    .modal-box {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    .modal-title  { font-size: 19px; }
    .modal-actions { flex-direction: column; }
    .modal-btn    { min-width: unset; }

    .modal-video-placeholder { height: 190px; }
    .chat-messages { max-height: 200px; }
}


/* ══════════════════════════════════════════
   BLOG READER MODAL
   ══════════════════════════════════════════ */

/* Wide variant for blog articles */
.modal-box--blog {
    max-width: 740px;
    padding: 0;
    overflow-y: auto;
}

/* Remove the default top-accent line — hero image takes that role */
.modal-box--blog::before { display: none; }

/* ─── Hero banner image ──────────────────── */
.blog-modal-hero {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.blog-modal-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* gradient fade so hero bleeds into card background */
.blog-modal-hero-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(10, 14, 55, 0.98));
}

/* ─── Content area ───────────────────────── */
.blog-modal-content {
    padding: 24px 32px 36px;
}

/* ─── Meta row (tags + read time) ────────── */
.blog-modal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.blog-modal-tag {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: #c4b5fd;
}

.blog-modal-read-time {
    margin-left: auto;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: rgba(196, 181, 253, 0.6);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ─── Title ──────────────────────────────── */
.blog-modal-title {
    font-family: 'Aclonica', sans-serif;
    font-size: 22px;
    line-height: 1.35;
    color: #fff;
    margin: 0 0 18px;
}

/* ─── Author row ─────────────────────────── */
.blog-modal-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.blog-modal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c27fe, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Aclonica', sans-serif;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(92, 39, 254, 0.45);
}

.blog-modal-author-name {
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.blog-modal-author-date {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: rgba(196, 181, 253, 0.55);
}

/* ─── Divider ────────────────────────────── */
.blog-modal-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.5) 0%, rgba(124, 58, 237, 0.15) 60%, transparent 100%);
    margin-bottom: 24px;
}

/* ─── Article body typography ────────────── */
.blog-modal-article {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: rgba(230, 225, 255, 0.82);
}

.blog-modal-article p {
    margin: 0 0 18px;
}

.blog-modal-article h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #e9e4ff;
    margin: 28px 0 10px;
    padding-left: 12px;
    border-left: 3px solid #7c3aed;
}

.blog-modal-article ul {
    margin: 0 0 18px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-modal-article ul li {
    padding: 8px 14px;
    background: rgba(124, 58, 237, 0.07);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 8px;
    position: relative;
    padding-left: 28px;
}

.blog-modal-article ul li::before {
    content: '▸';
    position: absolute;
    left: 10px;
    color: #7c3aed;
    font-size: 11px;
    top: 50%;
    transform: translateY(-50%);
}

.blog-modal-article code {
    background: rgba(92, 39, 254, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #c4b5fd;
}

.blog-modal-article pre {
    background: rgba(5, 8, 30, 0.85);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 12px;
    padding: 20px 22px;
    margin: 0 0 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

.blog-modal-article pre::-webkit-scrollbar      { height: 4px; }
.blog-modal-article pre::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.35); border-radius:4px; }

.blog-modal-article pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: rgba(220, 215, 255, 0.88);
    line-height: 1.65;
    display: block;
    white-space: pre;
}

.blog-modal-article strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.blog-modal-article em { color: #c4b5fd; }

.blog-modal-closing {
    margin-top: 8px;
    padding: 16px 18px;
    background: rgba(124, 58, 237, 0.09);
    border-left: 3px solid rgba(124, 58, 237, 0.6);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: rgba(210, 200, 255, 0.8) !important;
}

/* ─── Blog modal responsive ──────────────── */
@media (max-width: 600px) {
    .blog-modal-hero  { height: 160px; }
    .blog-modal-content { padding: 18px 18px 28px; }
    .blog-modal-title { font-size: 18px; }
    .blog-modal-article { font-size: 14px; }
    .blog-modal-article pre { padding: 14px 14px; }
    .blog-modal-article pre code { font-size: 12px; }
    .blog-modal-read-time { margin-left: 0; }
}
