/* CV — matches index editorial style */

:root {
    --cv-max: 960px;
}

body.cv-page {
    display: block;
}

.shell--cv {
    min-height: 100dvh;
    display: block;
}

/* ── Layout ── */

.cv-container {
    position: relative;
    z-index: 1;
    max-width: var(--cv-max);
    margin: 0 auto;
    padding: clamp(2rem, 6vh, 4rem) clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vh, 5rem);
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 5vh, 3rem);
}

/* ── Nav ── */

.cv-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--dim);
    border: 1px solid var(--rule);
    border-radius: 3px;
    transition: color 0.2s, border-color 0.2s, background 0.2s, padding-left 0.25s;
}

.cv-btn:hover {
    color: var(--gold);
    border-color: rgba(212, 181, 118, 0.4);
    background: var(--gold-faint);
}

.cv-btn--back:hover {
    padding-left: 0.65rem;
}

.cv-btn--download {
    color: var(--gold);
    border-color: rgba(212, 181, 118, 0.4);
    background: rgba(212, 181, 118, 0.1);
}

.cv-btn--download:hover {
    border-color: rgba(212, 181, 118, 0.65);
    background: rgba(212, 181, 118, 0.16);
    box-shadow: 0 0 24px rgba(212, 181, 118, 0.1);
}

/* ── Header ── */

.cv-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cv-name {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--cream);
}

.cv-name em {
    font-style: italic;
    color: var(--gold);
}

.cv-rule {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--gold) 4rem, var(--rule) 4rem);
}

.cv-role {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.cv-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.cv-contact a {
    position: relative;
    display: grid;
    grid-template-columns: 1.25rem 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.35rem;
    margin: 0 -0.35rem;
    font-size: 0.8125rem;
    color: var(--dim);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    border-radius: 3px;
    transition: color 0.2s, padding-left 0.25s;
}

.cv-contact li:first-child a {
    border-top: 1px solid var(--rule);
}

.cv-contact a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold-faint);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: -1;
}

.cv-contact a:hover {
    color: var(--gold);
    padding-left: 0.5rem;
}

.cv-contact a:hover::before {
    opacity: 1;
}

.cv-contact-num {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--muted);
}

.cv-contact a:hover .cv-contact-num {
    color: var(--gold);
}

/* ── Summary ── */

.cv-summary {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--dim);
    max-width: 62ch;
}

/* ── Blocks ── */

.cv-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* block-head, block-label, block-line — from style.css */

/* ── Entries ── */

.cv-entry {
    padding: 1.125rem 0;
    border-bottom: 1px solid var(--rule);
    transition: padding-left 0.25s;
}

.cv-block .cv-entry:first-of-type {
    border-top: 1px solid var(--rule);
}

.cv-entry-head {
    display: grid;
    grid-template-columns: 3.5rem 1fr auto;
    gap: 1rem 1.25rem;
    align-items: start;
    margin-bottom: 0.875rem;
}

.cv-logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    flex-shrink: 0;
    padding: 0.35rem;
    background: rgba(255, 252, 245, 0.04);
    border: 1px solid var(--rule);
    border-radius: 4px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.cv-logo--color {
    filter: none;
    opacity: 1;
}

.cv-entry-meta {
    min-width: 0;
}

.cv-entry-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.cv-entry-sub {
    font-weight: 400;
    color: var(--dim);
    font-size: 0.875rem;
}

.cv-entry-role {
    font-size: 0.875rem;
    color: var(--soft);
    font-weight: 500;
    margin-bottom: 0.15rem;
    line-height: 1.4;
}

.cv-entry-note {
    font-size: 0.8125rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.cv-entry-aside {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gold);
    font-style: normal;
    margin-bottom: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: rgba(212, 181, 118, 0.12);
    border-left: 2px solid var(--gold);
    border-radius: 0 3px 3px 0;
    line-height: 1.45;
    max-width: 42ch;
}

.cv-entry-location {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.cv-entry-link {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.cv-entry-link:hover {
    color: var(--gold-light);
}

.cv-date {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    white-space: nowrap;
    text-align: right;
    padding-top: 0.15rem;
}

.cv-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-left: 4.75rem;
}

.cv-list li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--soft);
}

.cv-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.75rem;
}

/* ── Skills ── */

.cv-skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cv-skill {
    padding: 0.875rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: rgba(255, 252, 245, 0.02);
    transition: border-color 0.2s, background 0.2s;
}

.cv-skill:hover {
    border-color: rgba(212, 181, 118, 0.3);
    background: var(--gold-faint);
}

.cv-skill--wide {
    grid-column: 1 / -1;
}

.cv-skill-name {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.cv-skill p {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--soft);
}

.cv-skill p strong {
    color: var(--cream);
    font-weight: 500;
}

/* ── Footer ── */

.cv-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.cv-btn--footer {
    padding: 0.7rem 1.125rem;
    font-size: 0.75rem;
}

.cv-footer p {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

/* ── Entry animation ── */

@media (prefers-reduced-motion: no-preference) {
    .cv-container > * {
        animation: cv-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .cv-container > *:nth-child(1) { animation-delay: 0.04s; }
    .cv-container > *:nth-child(2) { animation-delay: 0.1s; }
    .cv-container > *:nth-child(3) { animation-delay: 0.16s; }
    .cv-container > *:nth-child(4) { animation-delay: 0.22s; }
    .cv-container > *:nth-child(5) { animation-delay: 0.28s; }
    .cv-container > *:nth-child(6) { animation-delay: 0.34s; }
    .cv-container > *:nth-child(7) { animation-delay: 0.4s; }
    .cv-container > *:nth-child(8) { animation-delay: 0.46s; }

    @keyframes cv-enter {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ── Responsive ── */

@media (max-width: 640px) {
    .cv-nav {
        flex-wrap: wrap;
    }

    .cv-btn span {
        display: none;
    }

    .cv-btn {
        padding: 0.55rem 0.75rem;
    }

    .cv-btn--footer span {
        display: inline;
    }

    .cv-entry-head {
        grid-template-columns: 3rem 1fr;
    }

    .cv-date {
        grid-column: 2;
        text-align: left;
        white-space: normal;
        padding-top: 0;
    }

    .cv-logo {
        width: 3rem;
        height: 3rem;
    }

    .cv-list {
        padding-left: 0;
    }

    .cv-skills {
        grid-template-columns: 1fr;
    }
}

/* ── Print ── */

@media print {
    .shell--cv::before,
    .ambient,
    .cv-nav,
    .cv-btn--footer {
        display: none !important;
    }

    body.cv-page {
        background: white;
        color: black;
    }

    .cv-container {
        max-width: 100%;
        padding: 0;
    }

    .cv-name,
    .cv-entry-title,
    .cv-skill p strong {
        color: black;
    }

    .cv-name em,
    .cv-role,
    .cv-entry-link,
    .cv-skill-name {
        color: #555;
    }

    .cv-summary,
    .cv-list li,
    .cv-skill p {
        color: #333;
    }

    .cv-logo {
        filter: none;
    }

    .cv-entry,
    .cv-contact a {
        border-color: #ddd;
    }

    .cv-rule {
        background: #ccc;
    }
}
