/* =========================================
   BASE RESET & TYPOGRAPHY
   ========================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}

.resume-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 40px 50px;
    border: 1px solid #ddd;
}

/* =========================================
   HEADINGS
   ========================================= */
h1 { font-size: 2.5em; font-weight: 700; color: #222; margin: 0 0 5px 0; }
h2 {
    font-size: 1.5em; font-weight: 600; color: #495a2f;
    border-bottom: 2px solid #e0e0e0; padding-bottom: 8px;
    margin-top: 30px; margin-bottom: 20px;
}
h3 { font-size: 1.25em; font-weight: 600; color: #333; margin: 0 0 2px 0; }
h4 { font-size: 1.0em; font-weight: 500; color: #555; margin: 0 0 10px 0; font-style: italic; }
p, li { font-size: 0.95em; color: #444; }
a { color: #495a2f; text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

/* =========================================
   HEADER & CONTACT INFO
   ========================================= */
.header { border-bottom: 2px solid #495a2f; padding-bottom: 20px; margin-bottom: 20px; }
.contact-info span { margin: 0 5px; color: #ccc; }

/* =========================================
   SUMMARY & SKILLS
   ========================================= */
.summary ul { padding-left: 0; list-style: none; }
.summary-bullet { margin-bottom: 8px; }

.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.skill-category h3 { font-size: 1.1em; margin-bottom: 10px; border-left: 3px solid #495a2f; padding-left: 8px; }
.skill-category ul { padding-left: 20px; list-style-type: disc; margin: 0; }
.skill-category li { font-size: 0.95em; margin-bottom: 5px; }

/* =========================================
   CATEGORY HEADERS
   ========================================= */
.category-group { background: #ffffff; margin-bottom: 25px; }
.category-header {
    background-color: #f7f7f7; padding: 8px 15px; font-size: 1.1em;
    font-weight: 600; color: #495a2f; border-left: 5px solid #495a2f;
    margin-bottom: 15px; border-radius: 0 4px 4px 0;
}
.group-content { padding: 0 5px; }

/* =========================================
   PROJECT CARDS (VERTICAL LAYOUT)
   ========================================= */
.project-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.project-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.job-item {
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 3px solid #e0e0e0;
}

.project-content { width: 100%; }
.project-header-row { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }

.responsibilities { margin-top: 8px; margin-bottom: 15px; padding-left: 20px; }
.responsibilities li { margin-bottom: 5px; }

/* =========================================
   PROJECT FOOTER (VIDEO + TAGS)
   ========================================= */
.project-footer {
    display: flex;
    align-items: center; 
    gap: 20px;
    margin-top: 10px;
    padding-top: 10px;
}

.project-media {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #ddd;
    flex: 0 0 240px; 
    height: 135px; 
    background: #000;
}

.project-media > img {
    width: 100%; height: 100%; object-fit: cover;
    display: block; transition: transform 0.3s ease;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
    flex: 1; 
    align-content: center;
}

.project-tech-list li {
    background-color: #f0f2f5; color: #495a2f;
    padding: 4px 12px; border-radius: 12px;
    font-size: 0.85em; font-weight: 600;
}

/* =========================================
   MEDIA TRIGGERS (ALWAYS DIMMED)
   ========================================= */
.media-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3); 
    display: flex; align-items: center; justify-content: center;
    opacity: 1; transition: background 0.3s ease;
}

.media-icon {
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.media-icon svg {
    width: 30px; 
    height: 30px; 
    display: block; 
    fill: #ffffff;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.project-media:hover .media-overlay { 
    background: rgba(0, 0, 0, 0.5); 
}

.project-media:hover .media-icon { transform: scale(1.15); }
.project-media:hover > img { transform: scale(1.05); }

/* =========================================
   COPY BUTTON
   ========================================= */
.copy-btn {
    background: transparent; border: 1px solid #495a2f; color: #495a2f;
    font-size: 0.75em; font-weight: 600; padding: 3px 10px; border-radius: 4px;
    cursor: pointer; transition: all 0.2s ease-in-out; text-transform: uppercase;
    font-family: inherit; line-height: 1;
}
.copy-btn:hover { background-color: #495a2f; color: #ffffff; }
.copy-btn.copied { background-color: #2f5a34; color: #ffffff; border-color: #2f5a34; cursor: default; }

/* =========================================
   FOOTER & BOTTOM
   ========================================= */
.bottom-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
.edu-item h3 { font-size: 1.15em; } .edu-item p { margin: 2px 0; }
.lang-list { list-style: none; padding: 0; margin: 0; } .lang-list li { font-size: 1.0em; margin-bottom: 8px; }
.gdpr-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; font-size: 0.75em; color: #999; text-align: justify; }

/* =========================================
   MODAL (LIGHTBOX)
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); z-index: 2000; display: none;
    align-items: center; justify-content: center; opacity: 0;
    transition: opacity 0.3s ease; backdrop-filter: blur(5px);
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { max-width: 90%; max-height: 90%; position: relative; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.modal-content img, .modal-content video { max-width: 100%; max-height: 90vh; display: block; border-radius: 4px; }
.modal-close {
    position: absolute; top: 20px; right: 30px; background: transparent;
    border: none; color: white; font-size: 3em; cursor: pointer; z-index: 2001;
    line-height: 0.5; transition: color 0.2s;
}
.modal-close:hover { color: #ff5555; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-overlay.active .modal-content { animation: zoomIn 0.3s ease forwards; }



.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.fab-button {
    background-color: #495a2f;
    color: white;
    width: 80px;
    height: 50px;
    border-radius: 28px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
    cursor: pointer;
    transition: background-color .2s ease-in-out;
    padding: 0 15px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.fab-button:hover {
    background-color: #3a4725;
}

.fab-button span {
    margin-right: 8px;
}

.fab-button svg {
    fill: white;
}
/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .resume-container { padding: 20px; border: none; box-shadow: none; border-radius: 0; }
    h1 { font-size: 2.0em; }
    .project-footer { flex-direction: column; align-items: flex-start; }
    .project-media {
        width: 100%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 16/9;
        flex: none;
        margin-bottom: 10px;
        align-self: flex-start;
    }
    .skills-grid, .bottom-container { grid-template-columns: 1fr; gap: 25px; }
    .contact-info span { display: none; }
    /* .copy-btn { display: none; }  */
    .fab-container {
        flex-direction: column;
        bottom: 10px;
        right: 10px;
    }
    .fab-button {
        width: 80px;
        height: 30px;
        font-size: 11px;
        padding: 0 10px;
        border-radius: 20px;
    }
    .fab-button span {
        margin-right: 5px;
    }
}

/* =========================================
   PRINT STYLES (Clean Version)
   ========================================= */
@media print {
    @page { margin: 1cm; size: auto; }
    
    body { 
        background-color: #fff; 
        color: #000; 
        padding: 0; 
        margin: 0; 
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
        font-size: 10pt;
    }

    .resume-container { 
        box-shadow: none; 
        margin: 0; 
        padding: 0; 
        max-width: 100%; 
        border: none; 
        width: 100%;
    }

    .copy-btn,
    .project-media,
    .media-overlay,
    .modal-overlay,
    .modal-close {
        display: none !important;
    }

    a { 
        color: #000 !important; 
        text-decoration: none; 
        font-weight: 600;
    }
    
    h1 { color: #000; font-size: 24pt; margin-bottom: 5px; }
    h2 { color: #000; border-bottom: 2px solid #000; margin-top: 20px; font-size: 14pt; }
    h3 { color: #000; font-size: 12pt; }
    h4 { color: #333; font-size: 10pt; }
    p, li { color: #000; }

    .category-header {
        background-color: transparent !important;
        color: #000 !important;
        border-left: 5px solid #000 !important;
        padding-left: 10px;
        margin-bottom: 10px;
    }
    
    .skill-category h3 {
        border-left-color: #000 !important;
    }

    .project-tech-list li {
        background-color: transparent !important;
        border: 1px solid #666;
        color: #000 !important;
        padding: 2px 8px;
        font-size: 0.8em;
    }

    .project-footer {
        margin-top: 5px;
        padding-top: 0;
        display: block;
    }
    
    .project-tech-list {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 5px;
    }

    .project-card, 
    .job-item, 
    .skill-category, 
    section { 
        page-break-inside: avoid; 
    }
    
    h2, h3 { 
        page-break-after: avoid; 
    }

    .skills-grid, .bottom-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .fab-container {
        display: none !important;
    }
}