/*
 * candidate-template.css
 * Shared candidate-profile template styles.
 * Route-specific pages should supply only data + a light theme overlay.
 */

[data-template="candidate-profile"] {
    --candidate-section-radius: 22px;
    --candidate-panel-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    --candidate-border-strong: rgba(255, 255, 255, 0.14);
    --candidate-font-signature: var(--font-sans);
    --candidate-hero-name-max: 11ch;
    --candidate-section-heading-max: 18ch;
    --candidate-chip-bg: rgba(255, 255, 255, 0.03);
    --candidate-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

html[data-template="candidate-profile"] {
    scroll-padding-top: 8rem;
}

[data-template="candidate-profile"] :where(p, li, a, span, h1, h2, h3, h4) {
    overflow-wrap: anywhere;
}

[data-template="candidate-profile"] .wrap {
    padding-inline: var(--sp-4);
}

[data-template="candidate-profile"] section {
    padding-block: var(--sp-10);
}

[data-template="candidate-profile"] .fade {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-template="candidate-profile"] .fade.in {
    opacity: 1;
    transform: none;
}

html.no-js [data-template="candidate-profile"] .fade,
html.no-animations [data-template="candidate-profile"] .fade,
[data-template="candidate-profile"].no-js .fade,
[data-template="candidate-profile"].no-animations .fade {
    opacity: 1;
    transform: none;
    transition: none;
}

[data-template="candidate-profile"] header.site-header {
    background: rgba(10, 11, 14, 0.88);
}

[data-template="candidate-profile"] .header-row {
    min-height: unset;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
    padding-block: var(--sp-3);
}

[data-template="candidate-profile"] .header-brand {
    font-size: 0.92rem;
}

[data-template="candidate-profile"] .header-brand-logo {
    width: 22px;
    height: 22px;
}

[data-template="candidate-profile"] .header-nav {
    width: 100%;
    gap: var(--sp-3);
    overflow-x: auto;
    padding-bottom: var(--sp-1);
    flex-wrap: nowrap;
    scrollbar-width: thin;
}

[data-template="candidate-profile"] .header-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--candidate-chip-bg);
    color: var(--text-sub);
    white-space: nowrap;
}

[data-template="candidate-profile"] .header-nav a:hover {
    color: var(--text);
    border-color: var(--candidate-border-strong);
}

[data-template="candidate-profile"] #hero {
    padding-block: var(--sp-12) var(--sp-10);
}

.ss-candidate-hero {
    display: grid;
    gap: var(--sp-8);
    align-items: start;
}

.ss-candidate-hero__main,
.ss-candidate-hero__rail,
.ss-candidate-panel,
.ss-candidate-card,
.ss-candidate-experience,
.ss-candidate-artifact,
.ss-candidate-contact,
.ss-candidate-section-intro,
.ss-candidate-experience-list,
.ss-candidate-panel__list,
.ss-candidate-panel__item,
.ss-candidate-contact__body,
.ss-candidate-artifact__actions {
    display: grid;
}

.ss-candidate-hero__main {
    gap: var(--sp-5);
}

.ss-candidate-hero__rail {
    gap: var(--sp-4);
}

[data-template="candidate-profile"] .hero-label,
[data-template="candidate-profile"] .hero-name,
[data-template="candidate-profile"] .hero-title,
[data-template="candidate-profile"] .hero-statement {
    margin-bottom: 0;
}

[data-template="candidate-profile"] .hero-label {
    color: var(--accent-secondary);
}

[data-template="candidate-profile"] .hero-name {
    font-family: var(--candidate-font-signature);
    font-size: clamp(2.6rem, 9vw + 0.6rem, 4.6rem);
    line-height: 0.98;
    max-width: var(--candidate-hero-name-max);
    letter-spacing: -0.04em;
}

[data-template="candidate-profile"] .hero-title {
    font-size: 1rem;
    color: var(--text-sub);
}

[data-template="candidate-profile"] .hero-statement {
    max-width: 61ch;
    color: var(--text-sub);
    font-size: 1rem;
}

.ss-candidate-hero__meta,
.ss-candidate-fit-list,
.hero-cta {
    display: flex;
    flex-wrap: wrap;
}

.ss-candidate-hero__meta,
.ss-candidate-fit-list {
    gap: var(--sp-2);
}

.hero-cta {
    gap: var(--sp-3);
}

[data-template="candidate-profile"] .btn {
    min-height: 3rem;
}

.ss-candidate-chip,
.ss-candidate-fit-chip,
.ss-candidate-artifact__tag {
    display: inline-flex;
    align-items: center;
    min-height: 2.125rem;
    padding: 0.45rem 0.78rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--candidate-chip-bg);
    font: 500 0.74rem/1.2 var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--text-sub);
}

.ss-candidate-panel,
.ss-candidate-card,
.ss-candidate-experience,
.ss-candidate-artifact,
.ss-candidate-contact {
    gap: var(--sp-3);
    padding: var(--sp-5);
    background: var(--candidate-panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--candidate-section-radius);
    box-shadow: var(--candidate-panel-shadow);
}

.ss-candidate-panel__label,
.ss-candidate-block-label,
.ss-candidate-contact__label {
    font: 600 0.68rem/1 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ss-candidate-panel__label,
.ss-candidate-block-label {
    color: var(--accent-secondary);
}

.ss-candidate-contact__label,
.ss-candidate-panel__key {
    color: var(--text-dim);
}

.ss-candidate-panel__list {
    gap: var(--sp-3);
}

.ss-candidate-panel__item {
    gap: var(--sp-1);
}

.ss-candidate-panel__key {
    font: 500 0.68rem/1.3 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ss-candidate-panel__value,
.ss-candidate-card__body,
.ss-candidate-artifact__body,
.ss-candidate-contact__body {
    color: var(--text-sub);
    line-height: 1.7;
    font-size: 0.92rem;
}

.ss-candidate-contact__body {
    display: block;
}

a.ss-candidate-panel__value:hover,
.ss-candidate-contact__body a:hover,
.ss-candidate-inline-link:hover {
    color: var(--text);
}

.ss-candidate-section-intro {
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
}

.ss-candidate-section-label {
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    border-left: 2px solid var(--accent);
    padding-left: var(--sp-3);
}

.ss-candidate-section-heading {
    font-family: var(--candidate-font-signature);
    font-size: clamp(1.35rem, 4vw + 0.35rem, 2.3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    max-width: var(--candidate-section-heading-max);
}

.ss-candidate-section-lead {
    max-width: 68ch;
    color: var(--text-sub);
    line-height: 1.75;
    font-size: 0.97rem;
}

.ss-candidate-grid,
.ss-candidate-signal-grid,
.ss-candidate-artifact-grid,
.ss-candidate-contact-grid {
    display: grid;
    gap: var(--sp-4);
}

.ss-candidate-card__title,
.ss-candidate-artifact__title,
.ss-candidate-contact__title,
.ss-candidate-experience__title {
    font-size: 1rem;
    line-height: 1.35;
    color: var(--text);
}

.ss-candidate-contact__body a,
.ss-candidate-contact__body a:visited,
.ss-candidate-inline-link {
    color: var(--accent-secondary);
}

.ss-candidate-contact-grid {
    grid-template-columns: minmax(0, 1fr);
}

.ss-candidate-experience-list {
    gap: var(--sp-4);
}

.ss-candidate-experience {
    gap: var(--sp-4);
}

.ss-candidate-experience__header,
.ss-candidate-experience__meta {
    display: grid;
    gap: var(--sp-2);
}

.ss-candidate-experience__meta {
    color: var(--text-dim);
    font: 400 0.8rem/1.5 var(--font-mono);
}

.ss-candidate-bullets {
    display: grid;
    gap: var(--sp-2);
    padding-left: 1rem;
    color: var(--text-sub);
    list-style: disc;
}

.ss-candidate-bullets li::marker {
    color: var(--accent);
}

.ss-candidate-signal {
    display: grid;
    gap: var(--sp-2);
}

.ss-candidate-signal__value {
    font: 800 clamp(1.4rem, 3vw + 0.7rem, 2rem)/1 var(--candidate-font-signature);
    color: var(--accent-secondary);
    letter-spacing: -0.04em;
}

.ss-candidate-signal__label {
    font: 600 0.72rem/1.4 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-sub);
}

.ss-candidate-signal__context {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.84rem;
}

.ss-candidate-artifact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-1);
}

.ss-candidate-inline-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font: 500 0.8rem/1.5 var(--font-mono);
}

[data-template="candidate-profile"] .footer-row {
    flex-direction: column;
    align-items: flex-start;
}

[data-template="candidate-profile"] .footer-links a {
    color: var(--text-sub);
}

.ss-candidate-noscript {
    padding-bottom: var(--sp-12);
}

@media (min-width: 640px) {
    [data-template="candidate-profile"] .wrap {
        padding-inline: var(--sp-5);
    }

    [data-template="candidate-profile"] section {
        padding-block: var(--sp-12);
    }

    .hero-cta {
        flex-direction: row;
    }

    [data-template="candidate-profile"] .btn {
        width: auto;
        min-width: 12.5rem;
    }

    .ss-candidate-grid,
    .ss-candidate-signal-grid,
    .ss-candidate-artifact-grid,
    .ss-candidate-contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    [data-template="candidate-profile"] .footer-row {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 900px) {
    [data-template="candidate-profile"] .wrap {
        padding-inline: var(--sp-8);
    }

    [data-template="candidate-profile"] section {
        padding-block: var(--sp-16);
    }

    [data-template="candidate-profile"] .header-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 64px;
        padding-block: 0;
    }

    [data-template="candidate-profile"] .header-nav {
        width: auto;
        overflow: visible;
        padding-bottom: 0;
        gap: var(--sp-4);
    }

    [data-template="candidate-profile"] .header-nav a {
        padding: 0;
        min-height: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    [data-template="candidate-profile"] #hero {
        padding-block: var(--sp-16) var(--sp-12);
    }

    .ss-candidate-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr);
        gap: var(--sp-10);
    }

    .ss-candidate-grid,
    .ss-candidate-signal-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ss-candidate-artifact-grid,
    .ss-candidate-contact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ss-candidate-experience__header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: var(--sp-4) var(--sp-8);
    }

    .ss-candidate-experience__meta:last-child {
        text-align: right;
        align-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-template="candidate-profile"] .fade {
        opacity: 1;
        transform: none;
        transition: none;
    }

    [data-template="candidate-profile"] *,
    [data-template="candidate-profile"] *::before,
    [data-template="candidate-profile"] *::after {
        animation: none !important;
        transition: none !important;
    }
}


