/* =========================
   BASE
========================= */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f6fa;
    color: #2c3e50;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1100px;
    margin: auto;
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 6px;
    transition: background 0.3s;
}

/* =========================
   TYPOGRAPHY
========================= */
h1 {
    font-size: 32px;
    margin: 0;
}

h2 {
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
    margin-bottom: 6px;
}

h3 {
    font-size: 15px;
    margin: 4px 0;
}

p,
li {
    font-size: 14px;
    line-height: 1.35;
    margin: 4px 0;
}

ul {
    padding-left: 18px;
    margin: 4px 0;
}

/* =========================
   LAYOUT
========================= */
.top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.section {
    margin-top: 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* =========================
   SKILLS
========================= */
.badge {
    background: #ecf0f1;
    padding: 4px 8px;
    margin: 3px;
    font-size: 12px;
    border-radius: 4px;
    display: inline-block;
}

/* =========================
   LINKS & BUTTONS
========================= */
.link {
    color: #3498db;
    text-decoration: none;
}

.copy-btn {
    margin-left: 6px;
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
    border: 1px solid #3498db;
    background: #fff;
    color: #3498db;
    border-radius: 4px;
}

.copy-btn.copied {
    background: #2ecc71;
    border-color: #2ecc71;
    color: #fff;
}

.print-btn {
    float: right;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
}

/* =========================
   DARK MODE
========================= */
body.dark {
    background: #121212;
    color: #eaeaea;
}

body.dark .container {
    background: #1e1e1e;
}

body.dark h2 {
    border-color: #1abc9c;
}

body.dark .badge {
    background: #2c2c2c;
    color: #eaeaea;
}

body.dark .copy-btn {
    border-color: #1abc9c;
    color: #1abc9c;
    background: transparent;
}

body.dark .copy-btn.copied {
    background: #1abc9c;
    color: #000;
}

body.dark .link {
    color: #1abc9c;
}

/* =========================
   THEME TOGGLE
========================= */
.theme-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    border: none;
    background: #3498db;
    color: #fff;
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
}

/* =========================
   RESPONSIVE (MOBILE)
========================= */
@media (max-width: 768px) {

    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .top,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 16px;
    }

    p,
    li {
        font-size: 13px;
    }

    .print-btn {
        float: none;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ======================================
   FINAL – SINGLE PAGE RESUME PRINT
====================================== */
@media print {

    @page {
        size: A4;
        margin: 6mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 10.5px !important;
        line-height: 1.2 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body {
        overflow: visible !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
        border-radius: 0 !important;
    }

    h1 {
        font-size: 22px !important;
    }

    h2 {
        font-size: 13px !important;
        margin-bottom: 3px !important;
    }

    h3 {
        font-size: 12px !important;
    }

    p,
    li {
        font-size: 10.5px !important;
        margin-bottom: 3px !important;
    }

    .top,
    .grid-2 {
        display: block !important;
    }

    .section {
        margin-top: 6px !important;
    }

    * {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .theme-toggle,
    .copy-btn,
    .print-btn {
        display: none !important;
    }
}
