/* ===== Eureka web fonts (woff2) — declared so every visitor renders the design type, not Helvetica fallback.
   Family names are the exact strings used elsewhere in this file; src points at bundled woff2 under FONTS/. font-display:swap = match today's instant-text behavior. */
@font-face{
    font-family: 'EurekaSansScComp-Light';
    src: url('FONTS/EurekaSansScComp-Light.woff2') format('woff2');
    font-style: normal; font-weight: 300; font-display: swap;
}
@font-face{
    font-family: 'EurekaSansScComp-Medium';
    src: url('FONTS/EurekaSansScComp-Medium.woff2') format('woff2');
    font-style: normal; font-weight: 500; font-display: swap;
}
@font-face{
    font-family: 'EurekaSansScComp-Bold';
    src: url('FONTS/EurekaSansScComp-Bold.woff2') format('woff2');
    font-style: normal; font-weight: 700; font-display: swap;
}
@font-face{
    font-family: 'EurekaSansComp';
    src: url('FONTS/EurekaSansComp.woff2') format('woff2');
    font-style: normal; font-weight: 300; font-display: swap;
}
@font-face{
    font-family: 'EurekaSansComp-Medium';
    src: url('FONTS/EurekaSansComp-Medium.woff2') format('woff2');
    font-style: normal; font-weight: 500; font-display: swap;
}
@font-face{
    font-family: 'EurekaSansComp-LightItalic';
    src: url('FONTS/EurekaSansComp-LightItalic.woff2') format('woff2');
    font-style: italic; font-weight: 300; font-display: swap;
}
@font-face{
    font-family: 'EurekaComp';
    src: url('FONTS/EurekaComp.woff2') format('woff2');
    font-style: normal; font-weight: 400; font-display: swap;
}

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

body {
    font-family: 'EurekaSansScComp-Light', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.portfolio-container {
    max-width: 1024px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 60px 40px;
}

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-image-placeholder {
    width: 130px;
    height: 92.5px;
    margin: 0 auto 20px;
    background: rgba(127, 119, 111, 0.05);
    box-shadow: 4px 4px 12px rgba(44, 41, 38, 0.30) inset;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.profile-name {
    color: #3D3835;
    font-size: 36px;
    font-family: EurekaSansScComp-Light;
    font-weight: 350;
    text-transform: uppercase;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.profile-location {
    color: #7F776F;
    font-size: 20px;
    font-family: EurekaSansScComp-Light;
    font-weight: 350;
    text-transform: lowercase;
}

/* Hero Section */
.hero-container {
    width: 100%;
    padding: 20px 30px;
    background: #F3F2F1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    /* Height derives from the hero image's aspect ratio (871x450) instead of a fixed
       pixel value, so the box 'matches the size and scale of the hero image' at ANY
       viewport. PDFs (portfolio/resume) are fitted into this same box. */
    aspect-ratio: 871 / 450;
    height: auto;
    background: #F9F8F8;
    overflow: hidden;
}

/* Fallback for engines that lack aspect-ratio (older iPadOS): a padding-top percentage
   drives the identical 871/450 box so the hero can never collapse to 0 height. */
@supports not (aspect-ratio: 1 / 1) {
    .hero-image-wrapper { padding-top: 51.55%; height: 0; }
}

.hero-image-wrapper.pdf-scroll {
    /* One PDF page at a time, fitted inside the image-proportioned box: no growth,
       no scroll, no layout shift when portfolio/resume is selected. */
    display: flex;
    flex-direction: column;
}

.pdf-scroll .hero-image-wrapper::before {
    visibility: hidden;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 2px 2px 10px 4px rgba(44, 41, 38, 0.30), 0 0 0 1px rgba(44, 41, 38, 0.15);
    pointer-events: none;
    z-index: 1;
}

.hero-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    display: block;
}

.hero-image-wrapper .pdf-canvas-wrapper {
    /* Fills the hero box and centers the fitted page within it */
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-image-wrapper .pdf-canvas {
    display: block;
}


.pdf-canvas:fullscreen {
    background: #1a1a1a;
}

.pdf-annotation-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.pdf-annotation-layer a {
    pointer-events: auto;
    cursor: pointer;
}

.pdf-toolbar {
    display: none;
    gap: 16px;
    align-items: center;
    z-index: 10;
    width: 100%;
    padding: 0 20px 20px;
}

.pdf-toolbar.visible {
    display: flex;
     /* Absolute pin to the bottom of the (overflow:hidden, aspect-ratio) hero box.
        'position:sticky' inside an overflow:hidden, non-scrolling box is unreliable on
        iOS Safari and can clip the toolbar to nothing; a plain absolute pin looks
        identical on desktop but paints robustly on the iPad. PDFs are contained in the
        box (not scrolled), so sticky was never doing any real work here. */
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.pdf-scroll .pdf-toolbar {
    display: flex;
    z-index: 10;
    margin-top: auto;
    justify-content: center;
    /* Absolute pin: when the toolbar is visible it leaves the flex flow (see
       .pdf-toolbar.visible above), so it is anchored to the bottom of the hero box
       rather than relying on sticky. */
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-group--right {
    margin-left: auto;
}

.pdf-page-info {
    color: #7F776F;
    font-size: 12px;
    font-family: EurekaSansComp, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 26px;
    user-select: none;
    white-space: nowrap;
}

.pdf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(218, 101, 38, 0.5);
    border: none;
    border-radius: 100px;
    outline: 2px #DA6526 solid;
    outline-offset: -2px;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 0;
}

.pdf-btn:hover,
.pdf-btn:focus-visible {
    opacity: 0.85;
}

.pdf-btn:focus-visible {
    outline: 2px #FE9C65 solid;
    outline-offset: 4px;
}

.pdf-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: #fff !important;
}

.hero-title {
    width: 100%;
    text-align: center;
    color: #9F4A1D;
    font-size: 20px;
    font-family: EurekaSansScComp-Bold;
    font-weight: 700;
    text-transform: capitalize;
    line-height: 20px;
}

/* Navigation Buttons */
.buttons-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.button-wrapper {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    gap: 8px;
    background: #DA6526;
    border-radius: 6px;
    outline: 2px #FE9C65 solid;
    outline-offset: -2px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.button-wrapper:hover,
.button-wrapper:focus-visible {
    opacity: 0.85;
}

.button-wrapper.active {
    box-shadow: 0 0 0 3px #FE9C65;
}

.buttons-container.has-active .button-wrapper:not(.active) {
    opacity: 0.4;
}

.button-wrapper:focus-visible {
    outline: 2px #FE9C65 solid;
    outline-offset: 4px;
}

.button-text {
    color: white;
    font-size: 24px;
    font-family: EurekaSansScComp-Medium;
    font-weight: 500;
    text-transform: lowercase;
    word-wrap: break-word;
}

.button-icon {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {

    .pdf-btn {
        padding: 3px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .portfolio-container {
        padding: 30px 12px;
    }


    .profile-name {
        font-size: 28px;
    }

    .profile-location {
        font-size: 16px;
    }

    .pdf-btn {
        padding: 2px 8px;
        font-size: 11px;
    }

    .pdf-page-info {
        font-size: 11px;
        min-width: 50px;
    }

    .buttons-container {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .button-wrapper {
        justify-content: center;
    }
}

/* About Section */
.about-section {
    width: 100%;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #F3F2F1;
}

.about-text {
    color: #2C2926;
    font-size: 28px;
    font-family: 'EurekaSansComp-Medium', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    line-height: 36px;
    word-wrap: break-word;
    margin-bottom: 20px;
}

.about-grid {
    display: flex;
    gap: 48px;
    margin-top: 24px;
}

.about-column {
    flex: 1 1 0;
}

.about-heading {
    color: #2C2926;
    font-size: 20px;
    font-family: 'EurekaSansScComp-Bold', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: lowercase;
    margin-bottom: 8px;
}

.about-list,
.about-list ul,
.about-list ol {
    color: #2C2926;
    font-size: 22px;
    font-family: 'EurekaSansScComp-Light', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 350;
    text-transform: lowercase;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.about-list li {
    margin-bottom: 4px;
    padding-left: 0;
}

.about-value {
    display: inline-block;
    margin-left: 10px;
}

.about-label {
    color: #2C2926;
    font-size: 22px;
    font-family: 'EurekaSansScComp-Light', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 350;
    text-transform: lowercase;
}

.about-value {
    color: #2C2926;
    font-size: 22px;
    font-family: 'EurekaSansComp-LightItalic', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 350;
    text-transform: lowercase;
}

.about-highlight {
    color: #DA6426;
}

/* References Section */
.references-section {
    width: 100%;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #F3F2F1;
}

.references-heading {
    color: #7F776F;
    font-size: 36px;
    font-family: 'EurekaSansScComp-Bold', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: capitalize;
    margin-bottom: 24px;
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.references-list.collapsed {
    height: 400px;
    overflow: hidden;
}

.reference-card {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.reference-portrait {
    width: 200px;
    height: 200px;
    border-radius: 100px;
    flex-shrink: 0;
    box-shadow: 2px 2px 10px 4px rgba(44, 41, 38, 0.30) inset;
    object-fit: cover;
}

.reference-body {
    flex: 1 1 0;
}

.reference-meta {
    color: #918E7E;
    font-size: 20px;
    font-family: 'EurekaSansScComp-Bold', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: lowercase;
    margin-bottom: 4px;
    line-height: 1.3;
}

.reference-quote {
    color: #2C2926;
    font-size: 18px;
    font-family: 'EurekaComp', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 26px;
}

.references-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 32px auto 0;
    padding: 4px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    outline: 2px #FE9C65 solid;
    outline-offset: -2px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.references-more-btn:hover,
.references-more-btn:focus-visible {
    opacity: 0.85;
}

.references-more-btn:focus-visible {
    outline: 2px #FE9C65 solid;
    outline-offset: 4px;
}

.references-more-btn span {
    color: #FE9C65;
    font-size: 24px;
    font-family: 'EurekaSansScComp-Medium', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    text-transform: lowercase;
}

.references-more-btn svg.icon-plus,
.references-more-btn svg.icon-minus {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

       /* ---------- PDF loading overlay (download progress + spinner) ---------- */
       /* Scoped to the hero viewport (.hero-image-wrapper is position:relative): the overlay fills ONLY the hero, not the page */
       .pdf-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(44,41,38,0.92); color: #f3f2f1; font-family: 'EurekaSansScComp-Light','Helvetica Neue',Arial,sans-serif; z-index: 10; text-align: center; padding: 18px; }
       .pdf-spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.15); border-top-color: #DA7B23; border-radius: 50%; animation: pdf-spin .8s linear infinite; }
       @keyframes pdf-spin { to { transform: rotate(360deg); } }
       .pdf-loading-cta { font-size: clamp(.9rem,1.4vw,1.1rem); letter-spacing: .04em; font-weight: 500; }
       .pdf-progress { width: min(72%,300px); height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden; }
       .pdf-progress-bar { height: 100%; width: 0%; background: #DA7B23; transition: width .18s ease; }
       .pdf-loading-meta { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }

/* ============================================================
   Mobile & touch fixes  (audit 2026-09-10, scope C)
   All additive @media — no effect on the >=561px desktop layout.
   ============================================================ */

/* #7 Respect reduced-motion — stop the spinner for users who opt out */
@media (prefers-reduced-motion: reduce) {
    .pdf-spinner { animation: none; }
}

/* #4 Neutralize sticky :hover ghost highlight on touch; add tap feedback */
@media (hover: none) and (pointer: coarse) {
    .pdf-btn:hover,
    .button-wrapper:hover,
    .references-more-btn:hover { opacity: 1; }
}
.pdf-btn:active,
.button-wrapper:active,
.references-more-btn:active { opacity: .85; }

/* #1 about-grid (KEY SKILLS / VALUES two-column) stacks on phones */
@media (max-width: 560px) {
    .about-grid { flex-direction: column; gap: 28px; }
}

/* #2 reference-card (portrait + quote) stacks on phones */
@media (max-width: 560px) {
    .reference-card { flex-direction: column; align-items: center; }
    .reference-portrait { width: 140px; height: 140px; border-radius: 70px; }
    .reference-body { text-align: center; width: 100%; }
}

/* #3 PDF bottom toolbar wraps on narrow widths; #5 bump 38->44px tap target */
@media (max-width: 560px) {
    .pdf-scroll .pdf-toolbar { flex-wrap: wrap; row-gap: 10px; }
    .pdf-scroll .pdf-toolbar .toolbar-group { flex-wrap: nowrap; }
    .pdf-btn { width: 44px; height: 44px; }
}

/* #8 Trim oversized body type on phones (readable, consistent) */
@media (max-width: 560px) {
    .about-text { font-size: 22px; line-height: 30px; }
    .about-list,
    .about-label,
    .about-value { font-size: 18px; }
}

/* ============================================================
480) Final tweaks ONLY  -  smallest breakpoint, <= 480.
   PDF viewer toolbar: drop the pager, centre download +
   fullscreen ~10% smaller. Content area: 2px from every edge.
   Appended last so it wins over the earlier 480 block.
   ============================================================ */
@media (max-width: 480px) {
        /* Content area: ~2px from every edge (was body padding 40/20) */
     body { padding: 2px; margin: 0; }

        /* 1) Drop the whole pager (prev / "1 / N" / next = left group) */
     .pdf-toolbar .toolbar-group--left { display: none; }

        /* 2) Centre the remaining download + fullscreen group */
     .pdf-toolbar.visible { justify-content: center; }
     .pdf-toolbar .toolbar-group--right { margin-left: 0; margin-right: 0; }

        /* 3) ~10% smaller - scoped to .pdf-toolbar so the "View
           Portfolio / Resume" nav buttons keep their normal size */
     .pdf-toolbar .pdf-btn {
        transform: scale(0.9);
        transform-origin: center;
     }
}

/* ============================================================
   FULLSCREEN OVERLAY TOOLBAR  (~09)
    - .fs-toolbar = the cloned toolbar injected into the fixed
      overlay by createFsOverlay(). These rules live AFTER the
      <=480px block so they win the cascade, which is the only
      reason they can override that block's .toolbar-group--left
      {display:none} that otherwise hides the pager in fullscreen
      at small widths.
    - Effect: in fullscreen the pager (prev/next) is ALWAYS shown
      on the LEFT and the download + full-page buttons on the RIGHT
      (via the clone's inline space-between bar); the "1 / N" page
      count is hidden. The in-page small preview is untouched, so
      its pager stays hidden at <=480px as before.
   ============================================================ */
.fs-toolbar .toolbar-group--left {
    display: flex;
}
.fs-toolbar .pdf-page-info {
    display: none;
}
