/* About page — sticky header, photo column, resume blocks. */
/* ABOUT PAGE — STICKY HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
}

/* ABOUT HERO / INTRO SECTION */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0;
    padding: var(--cv-spacer) 0 0; /* standard spacer below the hero divider */
    align-items: stretch;
    overflow: visible;
}

.about-left {
    position: relative;
    border-right: 1px solid var(--border-color);
}

/* Extend the center divider up to the ruler under the headline. */
.about-left::before {
    content: '';
    position: absolute;
    right: -1px;
    bottom: 100%;
    width: 1px;
    height: var(--cv-spacer);
    background: var(--border-color);
}

/* Portrait and card, 240px, centered between the page edge and the divider */
.about-left-sticky {
    position: sticky;
    top: 2rem;
    max-width: 240px;
    margin-inline: auto;
}

.profile-image {
    overflow: hidden;
    opacity: 0;
    animation: slideUp 0.8s ease 0.1s forwards;
}

/* The old resume site's PROFILE card under the portrait, in the site's ink and fonts; the age from profile-age.js */
.profile-card {
    margin-top: 16px;
    padding: 16px;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--accent-contrast);
    opacity: 0;
    animation: slideUp 0.8s ease 0.25s forwards;
}

.profile-card-title {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 32px;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.profile-card-row {
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 24px;
    opacity: 0.9;
    white-space: nowrap;
}

.profile-card-label {
    font-weight: 600;
}

.profile-card a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Download button under the card, the card's width; the PDF matches the language */
.profile-download-row {
    width: 240px;
    margin-top: 16px;
}

.profile-download {
    display: block;
    padding: 8px 16px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 24px;
    color: var(--accent-contrast);
    background: var(--accent);
    border: 1px solid var(--accent);
    transition: background 0.3s ease, color 0.3s ease;
}

.profile-download:hover {
    background: transparent;
    color: var(--accent);
}

.profile-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-right {
    min-width: 0;
    padding-left: 4rem;
    padding-bottom: 8rem;
}

/* Standard CV spacer, applied on both sides of every section divider. */
:root {
    --cv-spacer: 4.5rem;
}

html, body {
    overflow-x: clip; /* dividers bleed past the right viewport edge */
}

.about-intro {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    color: var(--text-body);
    font-style: normal;
    margin-bottom: var(--cv-spacer);
    padding-bottom: 3rem; /* + 1.5rem last-p margin = --cv-spacer */
    margin-left: -4rem;
    padding-left: 4rem;
}

/* Section dividers: full-bleed to the right edge of the screen */
.about-intro,
.resume-experience,
.resume-section-block {
    position: relative;
}

.about-intro::after,
.resume-experience::after,
.resume-section-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 1px;
    background: var(--border-color);
}

.resume-section-block:last-child::after {
    display: none;
}

.about-intro i {
    font-style: normal;
}

/* Italic only for Instrument Serif headlines */
.resume-category-title i,
.resume-item-title i {
    font-style: italic;
}

.about-intro p {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease forwards;
}

.about-intro p:nth-child(1) { animation-delay: 0.2s; }
.about-intro p:nth-child(2) { animation-delay: 0.35s; }
.about-intro p:nth-child(3) { animation-delay: 0.5s; }
.about-intro p:nth-child(4) { animation-delay: 0.65s; }

.about-intro a {
    color: var(--text-tagline);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.3s ease;
}

.about-intro a:hover {
    opacity: 0.6;
}

/* RESUME SECTION */
/* Compound selectors outrank .resume-category's own margin-bottom */
.resume-category.resume-experience {
    margin-bottom: var(--cv-spacer);
    padding-bottom: var(--cv-spacer);
    margin-left: -4rem;
    padding-left: 4rem;
}

.resume-category.resume-section-block {
    margin-bottom: var(--cv-spacer);
    padding-bottom: var(--cv-spacer);
    margin-left: -4rem;
    padding-left: 4rem;
}

.resume-section-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-category {
    margin-bottom: 3rem;
}

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

.resume-category-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-body);
    margin-bottom: 1.25rem;
}

.resume-section-block .resume-category-title {
    margin-bottom: 1rem;
}

.resume-item {
    margin-bottom: 2rem;
    min-height: 3.5rem;
}

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

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.35rem;
    gap: 1.5rem;
}

.resume-item-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-tagline);
}

.resume-item-company {
    font-size: 0.95rem;
    color: var(--text-body);
    text-align: right;
    opacity: 0.6;
}

.resume-item-company a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.3s ease;
}

.resume-item-company a:hover {
    opacity: 0.6;
}

.resume-item-title a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.3s ease;
}

.resume-item-title a:hover {
    opacity: 0.6;
}

.resume-item-summary {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-body);
    line-height: 24px;
    margin: 8px 0;
}

.resume-item-text {
    font-size: 0.85rem;
    color: var(--text-body);
    line-height: 24px;
    opacity: 0.6;
    margin-top: 8px;
}

/* Experience paragraphs carry a square bullet, the site's mark, at the first line's middle */
.resume-experience .resume-item-text {
    position: relative;
    padding-left: 16px;
}

.resume-experience .resume-item-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: currentColor;
}

/* Technical directions: icon and label, three columns */
.direction-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 24px;
}

.direction-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    font-size: 0.85rem;
    line-height: 24px;
    color: var(--text-body);
}

.direction-item svg {
    width: 20px;
    height: 20px;
    flex: none;
}

/* ABOUT PAGE — RESPONSIVE OVERRIDES */
@media (max-width: 768px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0 6rem;
    }

    .about-left {
        border-right: none;
    }

    .about-left::before {
        display: none;
    }

    .about-right {
        padding-left: 0;
    }

    .about-left-sticky {
        position: static;
        max-width: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-image {
        width: 200px;
    }

    .profile-card {
        width: 240px;
    }

    .about-intro {
        margin-bottom: 2.5rem;
        padding-bottom: 2.5rem;
        margin-left: 0;
        padding-left: 0;
    }

    .resume-category.resume-experience,
    .resume-category.resume-section-block {
        margin-left: 0;
        padding-left: 0;
    }

    .direction-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resume-item-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .direction-grid {
        grid-template-columns: 1fr;
    }
}
