.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); 
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 1000; display: none; justify-content: center;
    align-items: center; opacity: 0; transition: opacity 0.3s; padding: 20px;
    will-change: opacity;
    transform: translateZ(0);
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: #050505; border: 1px solid var(--glass-border);
    width: 90%; max-width: 600px; border-radius: 20px;
    padding: 40px; position: relative; transform: translateY(50px);
    transition: transform 0.3s; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-height: 90vh; overflow-y: auto; margin: 0 auto; 
    will-change: transform;
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
.modal-content::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.5rem; cursor: none; z-index: 10;
}
.modal-close:hover { color: var(--danger); }

.modal-title {
    font-family: 'Compressa VF', sans-serif;
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 15px;
    line-height: 1;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-links {
    display: flex;
    gap: 15px;
}

.modal-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 15px;
    font-family: 'JetBrains Mono', monospace;
}

#cv-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.98); 
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 2000; 
    opacity: 0; pointer-events: none;
    overflow-y: auto; transition: opacity 0.4s ease; padding: 80px 20px 50px 20px;
    display: none; 
    will-change: opacity;
    transform: translateZ(0);

}
#cv-overlay.active { 
    display: block; 
    opacity: 1; 
    pointer-events: auto; 
}

.cv-container {
    max-width: 900px; margin: 0 auto; border-radius: 10px; padding: 50px;
    position: relative; background: #050505; min-height: 100%;
    contain: content;
}

.close-cv {
    position: fixed; top: 25px; right: 25px;
    background: var(--dark); border: 1px solid var(--glass-border);
    color: white; width: 45px; height: 45px; border-radius: 50%;
    font-size: 1.2rem; cursor: none; z-index: 2001;
    display: none; 
    align-items: center; justify-content: center;
    transition: all 0.2s;
}
.close-cv:hover { background: var(--accent); color: var(--dark); transform: rotate(90deg); }

.cv-header {
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 20px; margin-bottom: 30px;
    display: flex; justify-content: space-between; align-items: flex-start;
}

.cv-name {
    font-size: 2.5rem; font-weight: 800;
    color: #fff; text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-contact {
    color: var(--text-muted); font-size: 0.9rem;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

.cv-section { margin-bottom: 35px; }

.cv-section-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(3, 179, 195, 0.3);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.cv-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}


.cv-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}

.cv-detail h3 { color: #fff; font-size: 1.1rem; margin-bottom: 5px; }
.cv-detail h4 { color: #ccc; font-size: 1rem; font-weight: 400; font-style: italic; margin-bottom: 10px; }
.cv-detail ul { list-style: none; }
.cv-detail li { position: relative; padding-left: 15px; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 5px; }
.cv-detail li::before { content: '>'; position: absolute; left: 0; color: var(--accent); font-size: 0.8rem; }

.cv-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.cv-skill-category { font-weight: 700; color: #fff; margin-bottom: 5px; font-size: 0.9rem; }

@media (max-width: 900px) {
    .cv-item { grid-template-columns: 1fr; gap: 5px; }
    .cv-date { margin-bottom: 5px; color: var(--accent); }
    .cv-container { padding: 25px; }
    .cv-header { flex-direction: column; gap: 20px; }
    .cv-contact { text-align: left; }
}

@media (max-width: 600px) {
    .modal-content {
        padding: 25px 20px; 
        width: 95%; 
        max-height: 80vh; 
    }
    .modal-title {
        font-size: 2rem;
    }
}