/* =============================================================================
   15. RESUME PAGE
   ============================================================================= */

.resume-page {
    min-height: 100dvh;
}

.resume-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.resume-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.resume-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.resume-header .logo:hover .logo-text {
    opacity: 0.8;
}

.resume-header .back-arrow {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent-primary);
    color: var(--bg-primary);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.download-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.resume-main {
    padding: 7rem 0 4rem; /* Extra top padding to account for fixed header */
}

/* Hide resume content until JS builds it and adds .rendered class */
.resume-main > .container {
    visibility: hidden;
}

.resume-main > .container.rendered {
    visibility: visible;
}

.resume-hero-intro {
    margin-bottom: 3rem;
}

/* Staggered animations for resume page hero elements (matches homepage) */
.resume-main > .container.rendered .hero-headshot {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.resume-main > .container.rendered .hero-name {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.resume-main > .container.rendered .hero-description {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.resume-main > .container.rendered .social-links {
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

.resume-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
}

.resume-main > .container.rendered .resume-grid {
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.resume-section {
    margin-bottom: 2.5rem;
}

.resume-section-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-primary);
}

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

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

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.resume-item-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.resume-item-dates {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.resume-item-role {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.resume-role-title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

.resume-item-location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.resume-item-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.resume-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resume-highlights li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.resume-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.resume-skills-group {
    margin-bottom: 1.25rem;
}

.resume-skills-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.resume-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.resume-skill-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(var(--accent-primary-rgb, 99, 102, 241), 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.resume-skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resume-skills-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    padding-left: 0.75rem;
    position: relative;
}

.resume-skills-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.resume-project {
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.resume-project-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.resume-project-link:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resume-project-link:hover .resume-project-title {
    color: var(--accent-primary);
}

.resume-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.resume-project-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.resume-project-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.25s ease;
}

.resume-project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.resume-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.resume-tech-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: var(--bg-primary);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.resume-page footer {
    margin-top: 0;
    width: 100%;
}

.resume-page footer .container {
    max-width: var(--max-width);
}

@media (max-width: 768px) {
    /* Fluid resume typography - scales from small phones (320px) to large phones (430px) */
    .resume-item-title {
        font-size: clamp(0.95rem, 0.6rem + 1.75vw, 1.05rem);
    }

    .resume-item-dates {
        font-size: clamp(0.7rem, 0.5rem + 1vw, 0.75rem);
    }

    .resume-role-title {
        font-size: clamp(0.85rem, 0.55rem + 1.5vw, 0.9rem);
    }

    .resume-item-location {
        font-size: clamp(0.75rem, 0.5rem + 1.25vw, 0.8rem);
    }

    .resume-item-subtitle {
        font-size: clamp(0.85rem, 0.55rem + 1.5vw, 0.9rem);
    }

    .resume-highlights li {
        font-size: clamp(0.8rem, 0.55rem + 1.25vw, 0.85rem);
    }

    .resume-skills-label {
        font-size: clamp(0.7rem, 0.5rem + 1vw, 0.75rem);
    }

    .resume-skill-tag {
        font-size: clamp(0.65rem, 0.45rem + 1vw, 0.7rem);
    }

    .resume-skills-list li {
        font-size: clamp(0.75rem, 0.5rem + 1.25vw, 0.8rem);
    }
}

@media (max-width: 600px) {
    .resume-item-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* =============================================================================
   16. SHORT VIEWPORT ADAPTATIONS
   =============================================================================
   Discrete style changes for very short viewports. Sizing is handled fluidly
   via clamp() in the base mobile styles above.
   ============================================================================= */

/* Hide nav subtitles on very short screens to save space */
@media (max-width: 800px) and (max-height: 600px) {
    .hero-nav-subtitle {
        display: none;
    }
}

/* =============================================================================
   17. TOUCH DEVICE FIXES
   =============================================================================
   Prevents "sticky" hover states on touch devices where :hover persists
   after tapping until another element is touched.

   Using (hover: none) targets devices where the primary pointing device
   cannot hover. This is precise and avoids affecting laptops with
   touchscreens when users are primarily using a mouse/trackpad.
   ============================================================================= */

@media (hover: none) {
    /* -------------------------------------------------------------------------
       General Focus Reset
       ------------------------------------------------------------------------- */
    /* Remove focus outlines on touch - focus states are less meaningful
       and create "sticky" highlights when returning from new tabs */
    .content-card:focus,
    .tweet-card:focus,
    .training-card-link:focus,
    a.personal-card:focus,
    .stats-link:focus,
    .hero-nav-item:focus,
    .hero-intro .social-links a:focus,
    .view-all-link:focus,
    .resume-project-link:focus,
    .download-btn:focus {
        outline: none;
    }

    /* -------------------------------------------------------------------------
       Navigation
       ------------------------------------------------------------------------- */
    .nav-links a:hover {
        color: var(--text-secondary);
        background: transparent;
    }

    .nav-links a:hover::after {
        width: 0;
    }

    /* Keep active state visible */
    .nav-links a.active:hover {
        color: var(--accent-primary);
    }

    .nav-links a.active:hover::after {
        width: 60%;
    }

    /* -------------------------------------------------------------------------
       Logo
       ------------------------------------------------------------------------- */
    .logo:hover .logo-headshot {
        border-color: var(--border-color);
    }

    /* -------------------------------------------------------------------------
       Hero Section
       ------------------------------------------------------------------------- */
    .hero-headshot:hover {
        border-color: var(--border-color);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.5),
            0 0 0 4px var(--bg-primary),
            inset 0 0 20px rgba(0, 0, 0, 0.2);
        transform: none;
    }

    .hero-intro .social-links a:hover,
    .hero-intro .social-links a:focus {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
    }

    .hero-intro .social-links a:hover::before,
    .hero-intro .social-links a:focus::before {
        opacity: 0;
    }

    .hero-intro .social-links a.resume-cta:hover,
    .hero-intro .social-links a.resume-cta:focus {
        background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
        box-shadow: none;
        transform: none;
    }

    .hero-nav-item:hover,
    .hero-nav-item:focus {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
    }

    .hero-nav-item:hover::before,
    .hero-nav-item:focus::before {
        opacity: 0;
    }

    .hero-nav-item:hover .hero-nav-icon,
    .hero-nav-item:focus .hero-nav-icon {
        background: color-mix(in srgb, var(--section-accent) 12%, transparent);
        transform: none;
    }

    .hero-nav-item:hover .hero-nav-subtitle,
    .hero-nav-item:focus .hero-nav-subtitle {
        color: var(--text-muted);
    }

    .hero-nav-item:hover .hero-nav-arrow,
    .hero-nav-item:focus .hero-nav-arrow {
        color: var(--text-muted);
        transform: none;
    }

    /* -------------------------------------------------------------------------
       Buttons & Links
       ------------------------------------------------------------------------- */
    .btn-primary:hover {
        box-shadow: none;
        transform: none;
    }

    .btn-secondary:hover {
        background: var(--bg-card);
        border-color: var(--border-color);
    }

    .social-links a:hover {
        color: var(--text-muted);
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
    }

    .view-all-link:hover,
    .view-all-link:focus,
    .content-section .view-all-link:hover,
    .content-section .view-all-link:focus {
        gap: 0.35rem;
        color: var(--section-color, var(--text-secondary));
        background: transparent;
    }

    .view-all-link:hover::after,
    .view-all-link:focus::after {
        transform: none;
    }

    /* -------------------------------------------------------------------------
       Section Headers & Tags
       ------------------------------------------------------------------------- */
    .section-header:hover .section-icon {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
    }

    .section-topic-tag:hover {
        background: color-mix(in srgb, var(--section-color, var(--section-offtheClock)) 10%, transparent);
        border-color: color-mix(in srgb, var(--section-color, var(--section-offtheClock)) 20%, transparent);
        box-shadow: none;
        transform: none;
    }

    /* -------------------------------------------------------------------------
       Stats Section
       ------------------------------------------------------------------------- */
    .stats-link:hover,
    .stats-link:focus {
        border-color: var(--border-color);
        color: var(--text-secondary);
        box-shadow: none;
        transform: none;
    }

    .stats-link:hover::before,
    .stats-link:focus::before {
        opacity: 0;
    }

    .stats-link:hover svg,
    .stats-link:focus svg {
        opacity: 0.6;
        color: inherit;
        transform: none;
    }

    .stats-category-btn:hover {
        border-color: var(--border-color);
        background: var(--bg-card);
    }

    .stats-category-btn:hover .stats-category-name {
        color: var(--text-muted);
    }

    .stats-category-btn:hover .stats-category-years {
        opacity: 0.7;
    }

    /* Keep active state for category buttons */
    .stats-category-btn.active:hover {
        background: color-mix(in srgb, var(--section-field) 15%, var(--bg-card));
        border-color: var(--section-field);
        box-shadow: 0 0 12px color-mix(in srgb, var(--section-field) 20%, transparent);
    }

    .stats-category-btn.active:hover .stats-category-name {
        color: var(--section-field);
    }

    .stats-category-btn.active:hover .stats-category-years {
        color: var(--section-field);
        opacity: 0.8;
    }

    .stat-card-large:hover {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
    }

    .stat-card-large:hover::before {
        opacity: 0;
    }

    .stat-card-large:hover .stat-value {
        transform: none;
    }

    .stats-table tbody tr:hover {
        background: transparent;
        box-shadow: none;
    }

    .stats-table tbody tr:hover .level-badge,
    .stats-table tbody tr:hover .league-badge {
        transform: none;
    }

    /* -------------------------------------------------------------------------
       Training Cards
       ------------------------------------------------------------------------- */
    .training-card:hover,
    .training-card:focus,
    .training-card-link:hover .training-card,
    .training-card-link:focus .training-card {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
        outline: none;
    }

    /* -------------------------------------------------------------------------
       Tweet Cards
       ------------------------------------------------------------------------- */
    .tweet-card:hover,
    .tweet-card:focus {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
        outline: none;
    }

    .tweet-card:hover::before,
    .tweet-card:focus::before {
        opacity: 0;
    }

    /* -------------------------------------------------------------------------
       Content Cards
       ------------------------------------------------------------------------- */
    .content-card:hover,
    .content-card:focus,
    .content-section .content-card:hover,
    .content-section .content-card:focus {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
        outline: none;
    }

    .content-card:hover::before,
    .content-card:focus::before {
        opacity: 0;
    }

    .content-card:hover .card-badge,
    .content-card:focus .card-badge,
    .content-section .content-card:hover .card-badge,
    .content-section .content-card:focus .card-badge {
        background: color-mix(in srgb, var(--section-color, var(--accent-primary)) 10%, transparent);
        border-color: color-mix(in srgb, var(--section-color, var(--accent-primary)) 25%, transparent);
    }

    .content-card:hover .thumbnail,
    .content-card:focus .thumbnail {
        transform: none;
        filter: brightness(0.95) saturate(1.05);
    }

    .section-feature:hover .feature-image img {
        transform: none;
    }

    /* -------------------------------------------------------------------------
       Personal Cards
       ------------------------------------------------------------------------- */
    a.personal-card:hover,
    a.personal-card:focus {
        border-color: var(--border-color);
        box-shadow: none;
        transform: none;
        outline: none;
    }

    a.personal-card:hover::before,
    a.personal-card:focus::before {
        opacity: 0;
    }

    a.personal-card:hover .personal-cover,
    a.personal-card:focus .personal-cover {
        transform: none;
        filter: brightness(0.95) saturate(1.05);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .learning-tag:hover {
        background: color-mix(in srgb, var(--section-offtheClock) 10%, transparent);
        border-color: color-mix(in srgb, var(--section-offtheClock) 20%, transparent);
        box-shadow: none;
        transform: none;
    }

    /* -------------------------------------------------------------------------
       Footer Theme Buttons
       ------------------------------------------------------------------------- */
    .theme-btn:hover {
        border-color: var(--border-color);
        color: var(--text-secondary);
        transform: none;
    }

    .theme-btn:hover::before {
        opacity: 0;
    }

    /* Keep active state for theme buttons */
    .theme-btn.active:hover {
        background: var(--accent-primary);
        border-color: var(--accent-primary);
        color: var(--bg-primary);
    }

    /* -------------------------------------------------------------------------
       Resume Page
       ------------------------------------------------------------------------- */
    .resume-header .logo:hover .logo-text {
        opacity: 1;
    }

    .download-btn:hover:not(:disabled) {
        opacity: 1;
        transform: none;
    }

    .resume-project-link:hover,
    .resume-project-link:focus {
        border-color: var(--border-color);
        background: var(--bg-secondary);
        box-shadow: none;
        transform: none;
    }

    .resume-project-link:hover .resume-project-title,
    .resume-project-link:focus .resume-project-title {
        color: var(--text-primary);
    }
}
