/* =========================================================================
   Mo Sherman — Resume Stylesheet
   Modern, responsive, no external dependencies
   ========================================================================= */

:root {
    --color-text: #444;
    --color-heading: #333;
    --color-accent: #209CEE;
    --color-bg: #f5f5f5;
    --color-border: #ccc;
    --color-btn: #555;
    --color-btn-hover: #333;
    --color-white: #fff;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    --max-width: 960px;
    --section-gap: 2em;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: #e8e8e8;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: var(--max-width);
    margin: 60px auto;
    padding: 20px 60px;
    background: var(--color-bg);
    border-top: 8px solid #666;
    border-bottom: 2px solid #666;
}

/* Links */
a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---- Header ---- */
header {
    margin-bottom: var(--section-gap);
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--color-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1em;
}

.header-name h1 {
    font-family: var(--font-heading);
    font-size: 2.8em;
    letter-spacing: 2px;
    color: var(--color-heading);
    line-height: 1.2;
}

.header-name h2 {
    font-family: var(--font-heading);
    font-size: 1.3em;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--color-heading);
    font-weight: normal;
    margin-top: 0.15em;
}

.header-actions {
    padding-top: 0.5em;
    flex-shrink: 0;
}

.btn-pdf {
    display: inline-block;
    background: var(--color-btn);
    color: var(--color-white);
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-pdf:hover {
    background: var(--color-btn-hover);
    text-decoration: none;
}

.header-links {
    margin-top: 0.6em;
    display: flex;
    gap: 1em;
    font-size: 0.9em;
}

/* ---- Sections (two-column: label | content) ---- */
.section {
    display: flex;
    gap: 2em;
    margin-bottom: var(--section-gap);
    padding-bottom: var(--section-gap);
    border-bottom: 1px solid var(--color-border);
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-label {
    flex: 0 0 140px;
}

.section-label h2 {
    font-family: var(--font-heading);
    font-size: 1.15em;
    font-style: italic;
    color: var(--color-heading);
    font-weight: normal;
}

.section-content {
    flex: 1;
    min-width: 0;
}

/* Lead text (About / Skills) */
.lead {
    font-size: 1.05em;
    line-height: 1.7;
}

.lead strong {
    color: #222;
}

/* ---- Job entries ---- */
.job {
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--color-border);
}

.job.last,
.job:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.job h3 {
    font-family: var(--font-heading);
    font-size: 1.25em;
    color: var(--color-heading);
}

.job h4 {
    font-size: 1.05em;
    color: #555;
    font-weight: normal;
    margin-top: 0.1em;
}

.job .date {
    font-size: 0.9em;
    color: #777;
    margin-top: 0.15em;
    margin-bottom: 0.5em;
}

.job p {
    margin-top: 0.4em;
    line-height: 1.6;
    padding-right: 1em;
}

/* ---- Footer ---- */
footer {
    padding: 1.5em 0 3em;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.9em;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .page {
        margin: 0;
        padding: 20px 24px;
        border-top-width: 4px;
    }

    .header-content {
        flex-direction: column;
    }

    .header-name h1 {
        font-size: 2em;
    }

    .section {
        flex-direction: column;
        gap: 0.5em;
    }

    .section-label {
        flex: none;
    }

    .job h4 {
        position: static;
    }

    .job p {
        padding-right: 0;
    }
}

/* ---- Print ---- */
@media print {
    body {
        background: #fff;
    }

    .page {
        margin: 0;
        padding: 0;
        border: none;
        max-width: none;
    }

    .btn-pdf {
        display: none;
    }

    a {
        color: var(--color-heading);
    }

    .section {
        break-inside: avoid;
    }

    .job {
        break-inside: avoid;
    }
}
