/* ========================================
   Formal Resume — Harvard Style
   ======================================== */

:root {
    --ink: #1a1a1a;
    --paper: #ffffff;
    --rule: #1a1a1a;
    --muted: #444444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #e8e6e1;
    color: var(--ink);
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 15px;
    line-height: 1.45;
    padding: 4rem 1rem 3rem;
}

/* ---------- Screen-only toolbar ---------- */
.resume-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background: #1a1a1a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    z-index: 10;
}

.toolbar-link {
    color: #e8e6e1;
    text-decoration: none;
}

.toolbar-link:hover {
    text-decoration: underline;
}

.toolbar-btn {
    background: transparent;
    color: #e8e6e1;
    border: 1px solid #e8e6e1;
    padding: 0.3rem 0.9rem;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.toolbar-btn:hover {
    background: #e8e6e1;
    color: #1a1a1a;
}

/* ---------- Sheet ---------- */
.resume-sheet {
    max-width: 8.5in;
    margin: 0 auto;
    background: var(--paper);
    padding: 0.9in 0.9in 1in;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

/* ---------- Header ---------- */
.resume-header {
    text-align: center;
    margin-bottom: 1.1rem;
}

.resume-header h1 {
    font-size: 1.7rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-line {
    margin-top: 0.3rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.contact-line a {
    color: inherit;
    text-decoration: none;
}

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

/* ---------- Sections ---------- */
.resume-section {
    margin-bottom: 1.05rem;
}

.resume-section h2 {
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 0.15rem;
    margin-bottom: 0.5rem;
}

.summary-text {
    text-align: justify;
}

/* ---------- Entries (education, honors) ---------- */
.entry {
    margin-bottom: 0.6rem;
}

.entry-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.entry-title {
    font-weight: bold;
}

.entry-right {
    white-space: nowrap;
    font-weight: normal;
}

.entry-sub {
    font-style: italic;
}

.entry-detail {
    color: var(--muted);
    font-size: 0.95em;
    margin-top: 0.1rem;
}

.entry ul {
    margin: 0.15rem 0 0 1.2rem;
}

/* ---------- Certifications ---------- */
.cert-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.cert-name {
    flex: 1;
}

.cert-issuer {
    color: var(--muted);
    font-style: italic;
    white-space: nowrap;
}

/* ---------- Skills ---------- */
.skill-row {
    margin-bottom: 0.35rem;
}

.skill-category {
    font-weight: bold;
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    body {
        padding-top: 3.5rem;
    }

    .resume-sheet {
        padding: 1.4rem 1.1rem;
    }

    .entry-row {
        flex-direction: column;
        gap: 0;
    }

    .cert-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0.5rem;
    }

    .cert-issuer {
        white-space: normal;
    }
}

/* ---------- Print ---------- */
@media print {
    body {
        background: var(--paper);
        padding: 0;
        font-size: 11pt;
    }

    .resume-toolbar {
        display: none;
    }

    .resume-sheet {
        max-width: none;
        box-shadow: none;
        padding: 0;
    }

    .resume-section {
        break-inside: avoid;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
