/*
 * Public CV cards (Cv/Cards, https://tassuk.uk/cv/cards). 15 Nov 2026.
 * Same look as the Home page: navy hero, white cards, blue accent. Colours come from tass-tokens.css (no turquoise).
 * Photos sit in a fixed 4:5 frame with object-fit: cover, so they are never stretched.
 * Everything is scoped under .cvx. prefers-reduced-motion switches all motion off.
 */

.cvx {
    font-family: var(--tass-font-body);
    color: var(--tass-ink);
    background: var(--tass-surface-soft);
    font-size: 15px;
    line-height: 1.6;
}
.cvx *, .cvx *::before, .cvx *::after { box-sizing: border-box; }
.cvx p { margin: 0; }
.cvx ul { list-style: none; margin: 0; padding: 0; }
.cvx :focus-visible { outline: none; box-shadow: var(--tass-focus-ring); border-radius: var(--tass-radius-sm); }

.cvx-container { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }

@keyframes cvx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cvx-float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 10%) scale(1.1); } 100% { transform: translate(-4%, 4%) scale(.96); } }
@keyframes cvx-pan { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(48px, 48px, 0); } }

/* Hero */
.cvx-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(64px + 56px) 0 72px;
    background:
        radial-gradient(70% 90% at 0% 0%, rgba(31, 79, 209, .55) 0%, transparent 60%),
        linear-gradient(160deg, var(--tass-primary) 0%, var(--tass-deep-navy) 80%);
    color: var(--tass-white);
}
.cvx-hero-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cvx-orb { position: absolute; right: -10%; bottom: -40%; width: 46vw; max-width: 620px; aspect-ratio: 1; border-radius: 50%; background: #6B5BFF; opacity: .35; filter: blur(60px); animation: cvx-float 20s ease-in-out infinite alternate; }
.cvx-grid {
    position: absolute;
    inset: -48px;
    background-image: linear-gradient(rgba(143, 180, 255, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 180, 255, .09) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(70% 80% at 75% 40%, #000 0%, transparent 100%);
    mask-image: radial-gradient(70% 80% at 75% 40%, #000 0%, transparent 100%);
    animation: cvx-pan 8s linear infinite;
}
.cvx-hero .cvx-container > * { animation: cvx-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.cvx-hero .cvx-container > :nth-child(2) { animation-delay: .08s; }
.cvx-hero .cvx-container > :nth-child(3) { animation-delay: .16s; }
.cvx-hero .cvx-container > :nth-child(4) { animation-delay: .24s; }
.cvx-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px !important; color: var(--tass-accent); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.cvx-eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--tass-accent); }
.cvx-title { margin: 0; font-family: var(--tass-font-heading); font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1.15; color: var(--tass-white); }
.cvx-lead { max-width: 620px; margin-top: 12px !important; color: var(--tass-lavender); font-size: 17px; }
.cvx-count { display: inline-block; margin-top: 20px !important; padding: 6px 14px; border: 1px solid rgba(192, 199, 234, .3); border-radius: var(--tass-radius-pill); background: rgba(255, 255, 255, .06); color: var(--tass-white); font-size: 13px; font-weight: 600; }

/* Grid */
.cvx-body { padding: 48px 0 80px; }
.cvx-grid-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cvx-empty { padding: 48px 24px; border: 1px solid var(--tass-border); border-radius: var(--tass-radius-lg); background: var(--tass-surface); color: var(--tass-muted); text-align: center; }

/* Card */
.cvx-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--tass-border);
    border-radius: 18px;
    background: var(--tass-surface);
    box-shadow: 0 1px 2px rgba(15, 18, 64, .05);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cvx-card:hover { transform: translateY(-4px); border-color: var(--tass-accent); box-shadow: 0 22px 40px -24px rgba(31, 79, 209, .55); }

/* Photo: fixed frame, never stretched. Faces usually sit in the upper part, so the crop keeps the top. */
.cvx-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, var(--tass-primary), var(--tass-deep-navy)); }
.cvx-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .5s ease; }
.cvx-card:hover .cvx-photo img { transform: scale(1.04); }
.cvx-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(8, 8, 57, .45)); pointer-events: none; }
.cvx-initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--tass-white); font-family: var(--tass-font-heading); font-size: 56px; font-weight: 800; letter-spacing: .04em; }
.cvx-status { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; padding: 4px 10px; border-radius: var(--tass-radius-pill); background: rgba(255, 255, 255, .92); color: var(--tass-success); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cvx-status-pending { color: var(--tass-muted); }

.cvx-content { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; padding: 18px 18px 8px; }
.cvx-name { margin: 0; font-family: var(--tass-font-heading); font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--tass-ink); overflow-wrap: anywhere; }
.cvx-role { color: var(--tass-accent-text); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.cvx-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: var(--tass-muted); font-size: 14px; }
.cvx-meta { display: grid; gap: 4px; margin-top: 6px !important; font-size: 13px; }
.cvx-meta li { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--tass-ink); overflow-wrap: anywhere; }
.cvx-meta i { flex: 0 0 auto; color: var(--tass-accent-text); font-size: 15px; }
.cvx-meta a { color: var(--tass-accent-text); font-weight: 600; text-decoration: none; }
.cvx-meta a:hover { text-decoration: underline; }

.cvx-actions { display: flex; gap: 8px; padding: 12px 18px 18px; }
.cvx-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--tass-border);
    border-radius: 12px;
    background: var(--tass-surface-soft);
    color: var(--tass-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .2s ease;
}
.cvx-btn[disabled] { cursor: not-allowed; }
.cvx-btn-primary { border-color: var(--tass-primary); background: var(--tass-primary); color: var(--tass-white); }
.cvx-btn-primary:hover { background: var(--tass-deep-navy); color: var(--tass-white); transform: translateY(-1px); }
.cvx-btn-ghost { background: var(--tass-surface); color: var(--tass-primary); }
.cvx-btn-ghost:hover { border-color: var(--tass-primary); color: var(--tass-primary); transform: translateY(-1px); }

/* Reveal on scroll (the hidden state only applies once the script switches it on). */
.cvx-reveal-on [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, border-color .25s ease; transition-delay: calc(var(--i, 0) * 80ms); }
.cvx-reveal-on [data-reveal].is-visible { opacity: 1; transform: none; }
.cvx-reveal-on [data-reveal].is-visible:hover { transform: translateY(-4px); transition-delay: 0s; }

@media (max-width: 1199px) { .cvx-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .cvx-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 575px) {
    .cvx-container { padding: 0 16px; }
    .cvx-hero { padding: calc(56px + 32px) 0 48px; }
    .cvx-lead { font-size: 15px; }
    .cvx-body { padding: 24px 0 56px; }
    /* Phones: one card per row, photo beside the text so a list stays short. */
    .cvx-grid-list { grid-template-columns: 1fr; gap: 14px; }
    .cvx-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "photo content" "actions actions"; }
    .cvx-photo { grid-area: photo; aspect-ratio: auto; min-height: 140px; height: 100%; }
    .cvx-photo::after { display: none; }
    .cvx-initials { font-size: 32px; }
    .cvx-status { top: 8px; inset-inline-start: 8px; font-size: 10px; }
    .cvx-content { grid-area: content; padding: 14px 14px 6px; }
    .cvx-name { font-size: 16px; }
    .cvx-summary { -webkit-line-clamp: 2; }
    .cvx-actions { grid-area: actions; padding: 10px 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .cvx *, .cvx *::before, .cvx *::after { animation: none !important; transition: none !important; }
    .cvx-card:hover, .cvx-card:hover .cvx-photo img, .cvx-btn:hover { transform: none; }
}
