.resume-main {
    max-width: 48rem;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 1.25rem) 1.5rem 3.5rem;
}

.resume-sheet-actions {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    z-index: 2;
}

.resume-exporting .resume-sheet-actions {
    display: none !important;
}

.resume-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid var(--rule-strong);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    line-height: 1.2;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.resume-toolbar-btn:hover {
    border-color: var(--accent-bright);
    color: var(--accent);
}

.resume-toolbar-btn--primary {
    border: none;
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-tint);
}

.resume-toolbar-btn--primary:hover {
    color: #fff;
    filter: brightness(1.05);
}

button.resume-toolbar-btn {
    -webkit-appearance: none;
    appearance: none;
}

.resume-toolbar-btn:disabled {
    opacity: 0.85;
    cursor: wait;
}

.resume-sheet {
    position: relative;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.75rem 1.75rem;
}

.resume-sheet.resume-exporting {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    outline: none !important;
}

.resume-exporting .resume-skill-list li,
.resume-exporting .resume-item,
.resume-exporting .resume-closing {
    break-inside: avoid;
    page-break-inside: avoid;
}

.resume-exporting .resume-block h2 {
    break-after: avoid;
    page-break-after: avoid;
}

.resume-sheet section.resume-block {
    padding: 0;
    scroll-margin-top: 0;
}

.resume-sheet p {
    margin: 0;
}

.resume-sheet-header {
    text-align: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--rule);
}

.resume-sheet-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.35rem;
}

.resume-contact-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.25rem;
    font-size: 1rem;
    margin-bottom: 0;
}

.resume-contact-line a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

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

.resume-contact-line a[href^="https://"] {
    word-break: break-all;
}

.resume-contact-sep {
    color: var(--muted);
    user-select: none;
    font-weight: 500;
}

.resume-tagline {
    font-size: 0.97rem;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: 0;
    text-align: left;
}

.resume-tagline + .resume-tagline {
    margin-top: 0.75rem;
}

.resume-tagline a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.resume-tagline a:hover {
    text-decoration: underline;
}

.resume-block {
    margin-bottom: 1.35rem;
}

.resume-block:last-of-type {
    margin-bottom: 0;
}

.resume-block h2 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 0.35rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid var(--accent-bright);
}

.resume-projects-cta {
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.resume-projects-cta a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.resume-projects-cta a:hover {
    text-decoration: underline;
}

.resume-item {
    margin-bottom: 0.65rem;
}

.resume-item:last-child {
    margin-bottom: 0;
}

.resume-item-head {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.2rem;
}

.resume-item-title-stack {
    flex: 1 1 auto;
    min-width: min(100%, 12rem);
}

.resume-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.resume-item-subtitle {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    margin: 0.2rem 0 0;
    line-height: 1.35;
}

.resume-item .resume-item-head + p,
.resume-item h3 + p {
    font-size: 0.97rem;
    line-height: 1.45;
    color: var(--ink-soft);
}

.resume-meta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    text-align: right;
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-start;
    max-width: 100%;
}

@media (min-width: 480px) {
    .resume-meta {
        white-space: nowrap;
    }
}

.resume-skill-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.97rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.resume-skill-list li {
    margin-bottom: 0.4rem;
}

.resume-skill-list li:last-child {
    margin-bottom: 0;
}

.resume-skill-list strong {
    color: var(--ink);
    font-weight: 600;
}

.resume-closing {
    margin-top: 1.15rem;
    padding: 1rem 0.5rem;
    border-top: 1px solid var(--rule);
    font-size: 0.97rem;
    line-height: 1.45;
    color: var(--ink-soft);
    text-align: center;
}

.resume-closing p {
    margin-bottom: 0.5rem;
}

.resume-closing p:last-child {
    margin-bottom: 0;
}

body.resume-page footer .footer-inner {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
}

.resume-closing a {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 520px) {
    .resume-sheet {
        padding: 1.35rem 1.15rem 1.5rem;
    }

    .resume-sheet-actions {
        position: static;
        display: flex;
        justify-content: flex-end;
        margin-bottom: 0.65rem;
    }

    .resume-sheet-actions .resume-toolbar-btn {
        width: auto;
        max-width: 100%;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .resume-main {
        padding-top: 0.5rem;
        max-width: none;
    }

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