/* ============================================================
   ronde-resume.css: the Ronde resume page's frame, resume-ronde.html
   ------------------------------------------------------------
   The tokens, the header column, the white page and the PDF sheet;
   the content inside the page is ronde-resume-2.css (header rules:
   ronde-header.css).
   Rules: docs/rondeDesignRules.md. Follows the system appearance.
   The resume sits on a white page that scrolls on its own
   (.resume-paper), between the fixed header and the black PDF sheet
   at the bottom. The sheet's tab geometry matches csPathways and is
   drawn by js/rondeResume.js.
   ============================================================ */
:root {
    --rh-bg: #fff;
    --rh-ink: #111214;
    --rh-text-2: rgba(17, 18, 20, .62);
    --rh-muted: rgba(17, 18, 20, .42);
    --rh-line: rgba(17, 18, 20, .1);
    --rh-line-strong: rgba(17, 18, 20, .22);
    --rh-fill: rgba(17, 18, 20, .07);
    --rh-fill-hover: rgba(17, 18, 20, .04);
    --rh-on-ink-2: rgba(255, 255, 255, .64);
    --rh-green: #3DA73C;
    --rh-panel-shadow: 0 4px 10px rgba(17, 18, 20, .025), 0 12px 28px rgba(17, 18, 20, .055);
    --rh-ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.rh {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--rh-bg);
    color: var(--rh-ink);
    font: 400 16px 'Urbanist', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.rh a { color: inherit; text-decoration: none; }
body.rh button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--rh-ink); outline-offset: 3px; }
/* This page never scrolls as a whole (only .resume-paper does), so it drops the
   page-wide scrollbar gutter from ronde-header.css: that would show as a stripe
   beside the black PDF drawer. The header reserves the same gutter itself, so its
   tabs sit where they do on pages that scroll. */
html { scrollbar-gutter: auto; }
.rh-head { flex: 0 0 auto; width: 100%; padding: 0 32px 20px; overflow: hidden; scrollbar-gutter: stable; }
.rh-head__row { max-width: 1056px; margin: 0 auto; }
/* The tab ends 1px above the viewport: peek = tab depth + 1px.
   Moving the whole sheet preserves the tab's existing shape and size. */
.resume-pullup { --peek: calc(var(--tab-depth) + 1px); --corner: 28px; --tab-depth: 14px; position: relative; flex: 1; min-height: 0; overflow: clip; }
.resume-stage { position: absolute; inset: 0; transform: translateY(calc(var(--shift, 0px) + var(--lift, 0px) + var(--pull, 0px))); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.resume-pullup.is-open .resume-stage { --shift: calc(var(--peek) + var(--corner) - 100%); }
.resume-stage.is-pulling { transition: none; }
.resume-under { position: absolute; top: calc(100% - var(--peek) - var(--corner)); width: 100%; height: 100%; color: #fff; isolation: isolate; pointer-events: none; }
/* Only the tab and the open PDF take pointer input; the white band above the
   black edge passes the wheel through to the white page underneath. */
.resume-handle, .resume-document { pointer-events: auto; }
.resume-edge { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.resume-handle { position: absolute; z-index: 4; top: var(--corner); left: 0; width: 100%; height: calc(var(--peek) + 12px); padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.resume-pullup.is-open .resume-handle { left: calc(50% - var(--tab-width) / 2); width: var(--tab-width); height: calc(var(--tab-depth) + 12px); }
.resume-grip { position: absolute; top: calc((var(--tab-depth) - 3px) / 2); left: calc(50% - 28px); width: 56px; height: 3px; border-radius: 2px; background: #000; transition: scale .2s; }
.resume-handle:hover .resume-grip { scale: 1.25 1; }
.resume-handle:focus-visible { outline: none; }
.resume-handle:focus-visible .resume-grip { outline: 2px solid #000; outline-offset: 4px; }
/* The PDF scrolls in the page, behind a fixed clear blur and the tab.
   There is no opacity mask or dark gradient on the document. */
.resume-tab-cover { position: absolute; z-index: 3; inset: 0; width: 100%; height: calc(var(--corner) + var(--tab-depth) + 1px); fill: #fff; pointer-events: none; }
.resume-document { --resume-blur-height: 48px; position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; visibility: hidden; }
.resume-document::after {
    position: absolute;
    z-index: 2;
    /* Cover the complete upper edge, including the shoulders beside the tab.
       Scrolling content must stay blurred until it leaves the sheet's clip. */
    top: 0;
    left: 50%;
    width: min(calc(100% - 48px), 900px);
    height: calc(var(--corner) + var(--tab-depth) + var(--resume-blur-height));
    transform: translateX(-50%);
    clip-path: inset(0);
    content: '';
    pointer-events: none;
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--corner) + var(--tab-depth) + 12px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(var(--corner) + var(--tab-depth) + 12px), transparent);
}
.resume-pullup.is-open .resume-document { visibility: visible; }
.resume-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 76px 24px 24px; scrollbar-color: #777 #000; }
.resume-pages { width: min(100%, 900px); margin: 0 auto; display: grid; gap: 16px; }
.resume-pdf-page { position: relative; background: #fff; }
.resume-pdf-page canvas { display: block; width: 100%; height: auto; }
.resume-pdf-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: pre-wrap; }
.resume-pdf-status { text-align: center; padding: 16px; }
.resume-pdf-status[hidden] { display: none; }
/* Inverted Ronde pills: one bright primary action, one quiet glass action. */
.resume-actions { margin-top: 24px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 16px 24px max(20px, env(safe-area-inset-bottom)); background: #000; }
.resume-action { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 7px 22px 7px 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.07); font-size: 14px; transition: background .2s, transform .2s; }
body.rh .resume-action--primary { color: var(--rh-ink); background: #fff; border-color: transparent; }
.resume-action__hub { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; font-size: 16px; }
.resume-action--primary .resume-action__hub { color: #fff; background: var(--rh-ink); border-color: transparent; }
.resume-action:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
body.rh .resume-action--primary:hover { background: #ececee; }
.resume-action:active { transform: scale(.98); }
.resume-action:focus-visible { outline-color: #fff; }
.resume-scroll:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

/* ── The white page: the only part that scrolls ──
   It ends at the black edge, above the tab, and the header above it stays
   put. Its last 28px sit under the sheet's white band (the tab cover), so
   the bottom fade is lifted by that much: content dissolves before the
   band and never reaches the tab. */
.resume-paper {
    position: absolute;
    inset: 0 0 var(--peek);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;  /* right side only, like the page gutter, so the column lines up with the header */
    scrollbar-width: thin;
    scrollbar-color: var(--rh-line-strong) transparent;
}

.resume-paper::before,
.resume-paper::after {
    position: sticky;
    z-index: 2;
    display: block;
    content: '';
    pointer-events: none;
}

.resume-paper::before {
    top: 0;
    height: 20px;
    margin-bottom: -20px;
    background: linear-gradient(var(--rh-bg), rgba(255, 255, 255, 0));
}

.resume-paper::after {
    bottom: var(--corner);
    height: 36px;
    margin-top: -36px;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--rh-bg));
}

/* ── Shared bits (same as the home and projects pages) ── */
.rh-lab { color: var(--rh-text-2); font-size: 14px; }

.rh-hub {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--rh-ink);
    font-size: 14px;
}

body.rh .rh-hub { color: var(--rh-bg); }

@media (max-width: 760px) {
    .rh-head { padding: 0 16px 20px; }
    .resume-document { --resume-blur-height: 40px; }
    .resume-scroll { padding: 68px 8px 12px; }
    .resume-document::after { width: min(calc(100% - 16px), 900px); }
    .resume-actions { gap: 8px; padding: 12px 8px max(16px, env(safe-area-inset-bottom)); }
    .resume-action { gap: 8px; padding-right: 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .resume-stage, .resume-grip, .resume-action { transition: none; }
}

@media (prefers-color-scheme: dark) {
    :root {
        --rh-bg: #0e0f11;
        --rh-ink: #f7f7f7;
        --rh-text-2: rgba(255, 255, 255, .7);
        --rh-muted: rgba(255, 255, 255, .45);
        --rh-line: rgba(255, 255, 255, .1);
        --rh-line-strong: rgba(255, 255, 255, .24);
        --rh-fill: rgba(255, 255, 255, .1);
        --rh-fill-hover: rgba(255, 255, 255, .07);
        --rh-on-ink-2: rgba(17, 18, 20, .62);
        --rh-panel-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    }
}
