/* =============================================
   CV Stylesheet — Olimpiu Ticudean
   ============================================= */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e5e5e5;
    color: #111;
    margin: 0;
    padding: 40px 20px;
    line-height: 1.6;
}

.document {
    background-color: #fff;
    max-width: 21cm;
    margin: 0 auto;
    padding: 1.8cm 2cm;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Print Button --- */
.print-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #0f172a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 10.5pt;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.print-btn:hover {
    background-color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* --- Print / PDF --- */
@page {
    size: A4;
    margin: 1.5cm 1.8cm;
}

@media print {
    body {
        background-color: #fff;
        padding: 0;
        margin: 0;
    }

    .document {
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }

    .print-btn {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    h1 {
        font-size: 22pt;
        margin-bottom: 4px;
    }

    h2 {
        margin-top: 16px;
        margin-bottom: 8px;
        font-size: 10.5pt;
        page-break-after: avoid;
    }

    p {
        margin-bottom: 4px;
        font-size: 9.5pt;
    }

    .contact-info {
        margin-bottom: 14px;
    }

    .entry {
        margin-bottom: 8px;
        page-break-inside: avoid;
    }

    .project-entry {
        margin-bottom: 10px;
        page-break-inside: avoid;
    }

    .cert-grid,
    .skills-grid,
    .languages-row {
        page-break-inside: avoid;
    }

    .section-toggle {
        display: none !important;
    }

    .cv-section.exclude-print {
        display: none !important;
    }

    .project-details li {
        margin-bottom: 2px;
    }

    .skills-grid {
        gap: 5px 10px;
    }

    .cert-grid {
        gap: 5px 15px;
    }
}

/* --- Section Toggle --- */
.section-toggle {
    margin-left: auto;
    position: relative;
    width: 32px;
    height: 16px;
    flex-shrink: 0;
}

.section-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.section-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 16px;
    transition: 0.2s;
}

.section-toggle .slider:before {
    content: "";
    position: absolute;
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.section-toggle input:checked + .slider {
    background-color: #2a2a2a;
}

.section-toggle input:checked + .slider:before {
    transform: translateX(16px);
}

.cv-section.exclude-print {
    opacity: 0.35;
}

/* --- Header --- */
h1 {
    font-size: 26pt;
    margin: 0 0 6px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #000;
}

/* --- Contact Info --- */
.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 9.5pt;
}

.contact-info a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-info svg {
    width: 14px;
    height: 14px;
    margin-right: 0;
    stroke: #444;
}

.contact-info .separator {
    color: #bbb;
    font-weight: 300;
    user-select: none;
}

/* --- Section Headings --- */
h2 {
    font-size: 12pt;
    color: #1a1a1a;
    border-bottom: 1.5px solid #2a2a2a;
    padding-bottom: 6px;
    margin-top: 26px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

h2 svg {
    width: 18px;
    height: 18px;
    stroke: #1a1a1a;
    stroke-width: 2.2;
}

/* --- Body Text --- */
p {
    font-size: 10pt;
    margin-bottom: 10px;
    text-align: left;
    color: #333;
    line-height: 1.55;
}

/* --- Entry (Education) --- */
.entry {
    margin-bottom: 14px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0px;
    flex-wrap: wrap;
    gap: 8px;
}

.entry-title {
    font-weight: 600;
    font-size: 10.5pt;
    color: #111;
    line-height: 1.2;
}

.entry-meta {
    font-size: 9.5pt;
    color: #555;
    font-weight: 500;
    text-align: right;
}

.entry-sub {
    font-size: 9pt;
    color: #666;
    font-weight: normal;
    display: block;
    margin-top: -3px;
    margin-bottom: 5px;
    line-height: 1.2;
}

/* --- Project / Experience Entry --- */
.project-entry {
    margin-bottom: 16px;
}

.project-header {
    margin-bottom: 2px;
}

.project-title {
    font-weight: 600;
    font-size: 10.5pt;
    color: #111;
}

.project-tech {
    font-size: 9.5pt;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.project-tech strong {
    color: #111;
    font-weight: 600;
}

.project-details {
    font-size: 10pt;
    color: #333;
    margin: 0;
    padding-left: 20px;
}

.project-details li {
    margin-bottom: 4px;
    text-align: left;
    list-style-type: square;
    line-height: 1.5;
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 12px;
    font-size: 10pt;
    margin-bottom: 10px;
    color: #333;
    align-items: center;
}

.skill-category {
    font-weight: 600;
    color: #111;
    text-align: left;
    font-size: 9.5pt;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.skill-tag {
    display: inline-block;
    background-color: #f5f5f5;
    border: 1px solid #e2e2e2;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 9pt;
    color: #333;
}

/* --- Certifications --- */
.cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    margin-top: 2px;
}

.cert-item {
    display: flex;
    flex-direction: column;
}

.cert-name {
    font-size: 9.5pt;
    font-weight: 600;
    color: #111;
}

.cert-issuer {
    font-size: 8.5pt;
    color: #666;
}

/* --- Languages --- */
.languages-row {
    display: flex;
    gap: 25px;
    font-size: 10pt;
    color: #333;
    margin-top: 2px;
}

.languages-row .lang-item {
    display: flex;
    gap: 5px;
}

.languages-row .lang-name {
    font-weight: 600;
    color: #111;
}

.languages-row .lang-level {
    color: #555;
}

/* =============================================
   Mobile Responsive
   ============================================= */
@media screen and (max-width: 768px) {
    body {
        padding: 0;
        background-color: #fff;
    }

    .document {
        padding: 24px 20px;
        box-shadow: none;
        max-width: 100%;
    }

    h1 {
        font-size: 18pt;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }

    h2 {
        font-size: 10pt;
        margin-top: 18px;
        margin-bottom: 8px;
        gap: 6px;
        letter-spacing: 1px;
    }

    h2 svg {
        width: 14px;
        height: 14px;
    }

    p {
        font-size: 9pt;
        line-height: 1.5;
    }

    .contact-info {
        gap: 4px 10px;
        font-size: 8.5pt;
        margin-bottom: 16px;
    }

    .contact-info .separator {
        display: none;
    }

    .contact-info a {
        gap: 4px;
    }

    .contact-info svg {
        width: 12px;
        height: 12px;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .entry-meta {
        text-align: left;
        font-size: 8.5pt;
    }

    .entry-title,
    .entry-sub,
    .project-title {
        font-size: 9.5pt;
    }

    .project-tech {
        font-size: 8.5pt;
    }

    .project-details {
        font-size: 9pt;
        padding-left: 16px;
    }

    .project-details li {
        margin-bottom: 3px;
        line-height: 1.45;
    }

    .entry {
        margin-bottom: 10px;
    }

    .project-entry {
        margin-bottom: 12px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2px 0;
        font-size: 9pt;
    }

    .skill-category {
        margin-top: 6px;
        font-size: 8.5pt;
    }

    .skill-tag {
        font-size: 8pt;
        padding: 1px 6px;
    }

    .cert-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cert-name {
        font-size: 8.5pt;
    }

    .cert-issuer {
        font-size: 7.5pt;
    }

    .languages-row {
        font-size: 9pt;
        gap: 16px;
    }

    .section-toggle {
        width: 26px;
        height: 13px;
    }

    .section-toggle .slider:before {
        height: 9px;
        width: 9px;
    }

    .section-toggle input:checked + .slider:before {
        transform: translateX(13px);
    }

    .print-btn {
        bottom: 12px;
        right: 12px;
        padding: 8px 14px;
        font-size: 8.5pt;
        gap: 5px;
        border-radius: 6px;
    }

    .print-btn svg {
        width: 14px;
        height: 14px;
    }
}

