:root {
    --bg: #f6f3ed;
    --surface: #fffdf9;
    --surface-print: #ffffff;
    --border: #bdb6aa;
    --text: #151515;
    --text-dim: #5e5a55;
    --accent: #1d1d1d;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'DM Sans', Arial, sans-serif;
}

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

html {
    scroll-behavior: auto;
}

body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(180deg, #d8d2c8 0%, #c8c0b4 100%);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.42;
    padding: 2rem 1.25rem 3rem;
}

::selection {
    background: #1d1d1d;
    color: #ffffff;
}

.page-shell {
    width: min(100%, 920px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-utilities {
    display: flex;
    justify-content: flex-end;
}

.utility-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(21, 21, 21, 0.18);
    background: rgba(255, 253, 249, 0.82);
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.utility-button:hover {
    border-color: rgba(21, 21, 21, 0.32);
    color: var(--text);
}

.paper-sheet {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid rgba(21, 21, 21, 0.12);
    box-shadow: 0 22px 60px rgba(28, 23, 16, 0.16), 0 8px 20px rgba(28, 23, 16, 0.08);
}

.container {
    width: 100%;
    padding: 0 3.1rem;
}

.resume-header {
    padding: 2.5rem 0 1.2rem;
}

.header-name {
    font-size: clamp(2.2rem, 3vw, 2.9rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-align: center;
}

.contact-line {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.4rem;
    margin-top: 0.45rem;
    font-size: 0.83rem;
    color: var(--text-dim);
}

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

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

.contact-separator {
    color: #8f897f;
}

.document-title {
    margin-top: 1rem;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

section {
    padding: 0.85rem 0 0.55rem;
}

.section-header {
    margin-bottom: 0.55rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.skill-list {
    list-style: disc;
    padding-left: 1.25rem;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    font-size: 0.93rem;
}

.skill-label {
    font-weight: 700;
}

.skill-copy {
    flex: 1;
}

.resume-entry,
.portfolio-entry {
    padding: 0.35rem 0 0.7rem;
    border-bottom: 1px solid #d9d2c6;
}

.resume-entry:last-child,
.portfolio-entry:last-child {
    border-bottom: 0;
}

.resume-entry-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
    align-items: start;
}

.resume-heading {
    min-width: 0;
}

.resume-org-line {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
}

.resume-org-note {
    font-size: 0.86rem;
    font-style: italic;
    font-weight: 400;
    color: var(--text-dim);
}

.resume-role-line {
    margin-top: 0.1rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.resume-meta {
    text-align: right;
    font-size: 0.83rem;
    line-height: 1.3;
    color: var(--text-dim);
}

.resume-dates {
    font-weight: 500;
    color: var(--text);
}

.resume-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.18rem;
}

.resume-bullets {
    margin: 0.4rem 0 0 1.25rem;
    font-size: 0.92rem;
}

.resume-bullets li {
    margin-bottom: 0.28rem;
}

.portfolio-entry {
    padding-top: 0.45rem;
}

.portfolio-meta {
    margin-top: 0.28rem;
    font-size: 0.9rem;
}

.document-link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

.document-link:hover {
    color: var(--text-dim);
}

@media print {
    @page {
        margin: 11mm;
    }

    body {
        padding: 0;
        background: var(--surface-print);
        color: #111111;
        font-size: 10.7pt;
    }

    .page-shell {
        width: 100%;
        gap: 0;
    }

    .page-utilities {
        display: none !important;
    }

    .paper-sheet {
        max-width: none;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .container {
        padding: 0;
    }

    .resume-header {
        padding-top: 0;
        padding-bottom: 0.8rem;
    }

    section {
        padding: 0.65rem 0 0.45rem;
    }

    .resume-entry,
    .portfolio-entry {
        padding: 0.25rem 0 0.55rem;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .document-link {
        color: inherit;
        text-decoration: none;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.65rem 1.5rem;
    }

    .container {
        padding: 0 1.15rem;
    }

    .resume-header {
        padding-top: 1.7rem;
    }

    .contact-line,
    .document-title {
        text-align: left;
        justify-content: flex-start;
    }

    .resume-entry-header {
        grid-template-columns: 1fr;
    }

    .resume-meta,
    .resume-links {
        text-align: left;
        align-items: flex-start;
    }

    .skill-item {
        display: block;
    }
}
