/* =================================================
   SHARED SECTION PRIMITIVES
   ================================================= */

.section__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.section__head {
    margin-bottom: 64px;
    max-width: 920px;
}

.section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: 28px;
}

.section__eyebrow-num {
    color: var(--coral);
    font-weight: 800;
}

.section__eyebrow-line {
    width: 36px;
    height: 1px;
    background: rgba(14, 18, 23, 0.24);
}

.section__eyebrow--light {
    color: var(--paper-dim);
}

.section__eyebrow--light .section__eyebrow-line {
    background: rgba(245, 241, 232, 0.24);
}

.section__title {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 96;
    font-weight: 700;
    font-size: clamp(40px, 6vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--ink);
    max-width: 16ch;
}

.section__title em {
    font-style: italic;
    font-weight: 700;
    color: var(--coral);
}

.section__title--light {
    color: var(--paper);
}

.text-coral { color: var(--coral); }
.text-lime { color: var(--lime); }

@media (max-width: 768px) {
    .section__head {
        margin-bottom: 44px;
    }
    .section__title {
        line-height: 1.05;
    }
}

/* =================================================
   SEKCJA 3 — BIO
   ================================================= */
.bio {
    background: var(--bg-soft);
    color: var(--ink);
    padding: 120px 0;
    position: relative;
}

.bio::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--container-px);
    right: var(--container-px);
    height: 1px;
    background: rgba(14, 18, 23, 0.08);
}

.bio__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 80px;
    align-items: start;
}

.bio__achievements {
    list-style: none;
    margin: 0 0 56px;
    padding: 0;
}

.bio__achievements li {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(14, 18, 23, 0.08);
}

.bio__achievements li:first-child {
    padding-top: 0;
}

.bio__achievement-num {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--coral);
    padding-top: 4px;
    flex-shrink: 0;
    min-width: 28px;
}

.bio__achievement-body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.45;
    color: var(--ink);
}

.bio__achievement-body strong {
    font-weight: 600;
    color: var(--ink);
    display: block;
}

.bio__achievement-body em {
    display: block;
    font-style: normal;
    color: var(--ink-muted);
    font-size: 14px;
    margin-top: 4px;
}

.bio__facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(14, 18, 23, 0.12);
}

.bio__fact dt {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bio__fact dd {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
    margin: 0;
}

/* Bio photos masonry */
.bio__photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 18px;
}

.bio__photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: var(--g-200);
    border-radius: 2px;
    transition: transform var(--dur-base) var(--ease-rise);
}

.bio__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--ease-rise);
}

.bio__photo:hover {
    transform: translateY(-4px);
}

.bio__photo:hover img {
    transform: scale(1.04);
}

.bio__photo--tall {
    grid-row: span 2;
    aspect-ratio: 3/4;
}

.bio__photo--wide {
    aspect-ratio: 4/3;
}

.bio__photo--small {
    aspect-ratio: 4/3;
}

.bio__photo figcaption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 8px 12px;
    background: rgba(14, 18, 23, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .bio {
        padding: 88px 0;
    }
    .bio__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .bio__photos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bio__photos {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bio__photo--tall {
        grid-row: auto;
        aspect-ratio: 4/3;
    }
    .bio__facts {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* =================================================
   SEKCJA 4 — KARIERA
   ================================================= */
.career {
    background: var(--bg-ink);
    color: var(--paper);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

/* Court lines decoration */
.career__lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    color: var(--paper);
    opacity: 0.04;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.career .section__container {
    position: relative;
    z-index: 2;
}

/* Lede — krótkie wprowadzenie pod tytułem */
.career__lede {
    font-family: var(--font-body);
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.55;
    color: var(--paper-dim);
    max-width: 56ch;
    margin: 28px 0 0;
}

.career__lede strong {
    color: var(--coral);
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.01em;
}

/* Ranking chart — główny bohater sekcji */
.career__chart {
    margin: 56px 0 64px;
}

.career__chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 22px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--paper-dim);
    text-transform: uppercase;
}

.career__chart-title {
    color: var(--paper);
}

.career__chart-svg {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 360;
    display: block;
}

.career__chart-line {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
}

[data-reveal].is-visible .career__chart-line {
    animation: chart-draw 2400ms var(--ease-rise) 200ms forwards;
}

.career__chart-area {
    opacity: 0;
}

[data-reveal].is-visible .career__chart-area {
    animation: chart-area-fade 1200ms ease-out 1800ms forwards;
}

@keyframes chart-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes chart-area-fade {
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .career__chart-line { stroke-dashoffset: 0; }
    .career__chart-area { opacity: 1; animation: none; }
}

/* 3 lekkie milestone cards */
.career__milestones {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(245, 241, 232, 0.1);
    border: 1px solid rgba(245, 241, 232, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.career__milestone {
    background: var(--bg-ink);
    padding: 36px 32px;
    position: relative;
    transition: background-color var(--dur-base) ease;
}

.career__milestone:hover {
    background: rgba(245, 241, 232, 0.04);
}

.career__milestone-year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: var(--paper-dim);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.career__milestone-title {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 72;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.18;
    color: var(--paper);
    margin: 0 0 10px;
    letter-spacing: -0.015em;
}

.career__milestone-text {
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--paper-dim);
    margin: 0;
}

.career__milestone--accent .career__milestone-year {
    color: var(--lime);
}

.career__milestone--live .career__milestone-year {
    color: var(--coral);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.career__milestone--live .career__milestone-year::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 78, 90, 0.18);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

/* Mobile-only timeline (zastępuje chart) — desktop hidden */
.career__moments-mobile {
    display: none;
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    position: relative;
}

.career__moments-mobile::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 13px;
    width: 1px;
    background: linear-gradient(180deg,
        rgba(245, 241, 232, 0.18) 0%,
        rgba(255, 78, 90, 0.4) 100%);
}

.career__step {
    position: relative;
    padding: 14px 0 14px 38px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: baseline;
}

.career__step::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 22px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(245, 241, 232, 0.4);
    box-shadow: 0 0 0 3px var(--bg-ink);
}

.career__step--win::before {
    background: var(--lime);
    box-shadow: 0 0 0 3px var(--bg-ink), 0 0 10px rgba(216, 242, 94, 0.4);
}

.career__step--peak::before {
    background: var(--coral);
    box-shadow: 0 0 0 3px var(--bg-ink), 0 0 14px rgba(255, 78, 90, 0.6);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

.career__step-rank {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
    color: var(--paper);
    letter-spacing: 0.01em;
}

.career__step--win .career__step-rank { color: var(--lime); }
.career__step--peak .career__step-rank { color: var(--coral); }

.career__step-date {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--paper-dim);
    text-transform: uppercase;
    grid-column: 2;
    justify-self: end;
}

.career__step-event {
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--paper-dim);
    grid-column: 1 / -1;
    margin-top: 2px;
}

.career__step--peak .career__step-event {
    color: var(--paper);
}

@media (max-width: 1024px) {
    .career { padding: 88px 0; }
    .career__milestones {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    /* Chart wygląda nieczytelnie na mobile (SVG annotacje, drobne fonty) — pokazujemy stacked timeline */
    .career__chart {
        display: none;
    }
    .career__moments-mobile {
        display: block;
        margin-bottom: 32px;
    }
    .career__lede {
        font-size: 15px;
        margin-top: 20px;
    }
}

@media (max-width: 640px) {
    .career__chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .career__milestone { padding: 28px 24px; }
}

/* =================================================
   SEKCJA 5 — KALENDARZ
   ================================================= */
.schedule {
    background: var(--bg-soft);
    color: var(--ink);
    padding: 120px 0;
}

.schedule__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 32px;
    padding: 4px;
    background: rgba(14, 18, 23, 0.06);
    border-radius: 999px;
}

.schedule__toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    border-radius: 999px;
    transition: all var(--dur-base) var(--ease-rise);
    cursor: pointer;
}

.schedule__toggle-btn:hover {
    color: var(--ink);
}

.schedule__toggle-btn.is-active {
    background: var(--ink);
    color: var(--paper);
}

.schedule__toggle-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 78, 90, 0.18);
    color: var(--coral);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
}

.schedule__toggle-btn.is-active .schedule__toggle-count {
    background: rgba(255, 78, 90, 0.85);
    color: var(--paper);
}

.schedule__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule__item {
    display: grid;
    grid-template-columns: 180px 1fr auto auto;
    align-items: center;
    gap: 32px;
    padding: 28px 32px;
    background: var(--paper);
    border: 1px solid rgba(14, 18, 23, 0.08);
    border-radius: 4px;
    transition:
        transform var(--dur-base) var(--ease-rise),
        border-color var(--dur-base) var(--ease-rise),
        box-shadow var(--dur-base) var(--ease-rise);
}

.schedule__item:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 18, 23, 0.16);
    box-shadow: 0 8px 24px rgba(14, 18, 23, 0.08);
}

.schedule__item--featured {
    background: var(--ink);
    color: var(--paper);
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(14, 18, 23, 0.12);
    position: relative;
}

.schedule__item--featured::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--coral);
    border-radius: 0 2px 2px 0;
}

.schedule__date {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-weight: 700;
}

.schedule__date-day {
    font-size: 44px;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1;
}

.schedule__item--featured .schedule__date-day {
    color: var(--paper);
}

.schedule__date-rest {
    font-size: 13px;
    letter-spacing: 0.16em;
    color: var(--ink-muted);
    text-transform: uppercase;
}

.schedule__item--featured .schedule__date-rest {
    color: var(--paper-dim);
}

.schedule__info {
    min-width: 0;
}

.schedule__loc {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.schedule__city {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 48;
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.schedule__item--featured .schedule__city {
    color: var(--paper);
}

.schedule__flag {
    font-size: 18px;
    line-height: 1;
}

.schedule__country {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 500;
}

.schedule__item--featured .schedule__country {
    color: var(--paper-dim);
}

.schedule__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.schedule__surface {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    border-radius: 2px;
    color: var(--paper);
}

.schedule__surface--clay {
    background: #C97651;
}

.schedule__surface--hard {
    background: #1B7AB8;
}

.schedule__surface--grass {
    background: #6FA968;
}

.schedule__cat {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--ink);
    padding: 4px 9px;
    background: rgba(14, 18, 23, 0.08);
    border-radius: 2px;
}

.schedule__item--featured .schedule__cat {
    background: rgba(245, 241, 232, 0.14);
    color: var(--paper);
}

.schedule__prize {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-muted);
    letter-spacing: 0.06em;
}

.schedule__item--featured .schedule__prize {
    color: var(--paper-dim);
}

/* Status as WTA-style pill */
.schedule__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 11px;
    border-radius: 999px;
    background: var(--coral);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 0 0 0 var(--coral-glow);
    animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 78, 90, 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 78, 90, 0); }
}

.schedule__status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--paper);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
    animation: pulse-dot 1.6s ease-in-out infinite;
}

.schedule__status-time {
    color: rgba(245, 241, 232, 0.72);
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-left: 2px;
}

/* Qualifier (lime pill, no pulse) */
.schedule__status--quali {
    background: var(--lime);
    color: var(--bg-ink-deep);
    animation: none;
    box-shadow: 0 0 18px var(--lime-glow);
}
.schedule__status--quali .schedule__status-time { color: rgba(14, 18, 23, 0.6); }

/* Planned (outline pill) */
.schedule__status--planned {
    background: transparent;
    color: var(--ink-muted);
    border: 1px solid rgba(14, 18, 23, 0.18);
    animation: none;
    box-shadow: none;
    padding: 6px 11px;
}

.schedule__item--featured .schedule__status--planned {
    color: var(--paper-dim);
    border-color: rgba(245, 241, 232, 0.2);
}

.schedule__support {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--coral);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: background-color var(--dur-base) ease, transform var(--dur-base) ease;
    white-space: nowrap;
}

.schedule__support:hover {
    background: var(--coral-deep);
    transform: translateY(-1px);
}

.schedule__footer {
    margin-top: 32px;
    text-align: center;
}

.schedule__all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink);
    border: 1px solid rgba(14, 18, 23, 0.16);
    border-radius: 999px;
    transition: all var(--dur-base) var(--ease-rise);
    text-transform: uppercase;
}

.schedule__all-link:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    gap: 12px;
}

@media (max-width: 1024px) {
    .schedule {
        padding: 88px 0;
    }
    .schedule__item {
        grid-template-columns: 140px 1fr auto;
        gap: 24px;
        padding: 24px;
    }
    .schedule__support {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .schedule__date-day {
        font-size: 36px;
    }
    .schedule__city {
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    .schedule__item {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .schedule__date {
        align-items: center;
    }
    .schedule__date-day {
        font-size: 32px;
    }
}
