/* ============================================
   Career Selection - Modal Path Chooser
   ============================================ */

/* ---------- Overlay wrapper ---------- */
.career-selection {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.career-selection.is-exiting {
    opacity: 0;
    pointer-events: none;
}

.career-selection.is-hidden {
    display: none;
}

/* ---------- Backdrop ---------- */
.career-selection__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ---------- Modal panel ---------- */
.career-selection__modal {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 44px 36px 36px;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    text-align: center;
    animation: cs-modalIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cs-modalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Heading ---------- */
.career-selection__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid rgba(8, 8, 8, 0.1);
    background: rgba(255, 182, 70, 0.08);
    color: #b07a1e;
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0;
    animation: cs-fadeUp 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.career-selection__title {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 3.5vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #080808;
    margin: 0 0 10px;
    opacity: 0;
    animation: cs-fadeUp 0.6s 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.career-selection__subtitle {
    max-width: 52ch;
    margin: 0 auto 32px;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(13px, 1.6vw, 15px);
    line-height: 1.65;
    color: #696969;
    opacity: 0;
    animation: cs-fadeUp 0.6s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ---------- Cards grid ---------- */
.career-selection__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ---------- Individual card ---------- */
.career-card {
    position: relative;
    border-radius: 20px;
    border: 2px solid rgba(8, 8, 8, 0.07);
    background: #fafafa;
    padding: 28px 20px 24px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(20px);
}

.career-card:nth-child(1) {
    animation: cs-fadeUp 0.7s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.career-card:nth-child(2) {
    animation: cs-fadeUp 0.7s 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Glow background */
.career-card__glow {
    position: absolute;
    top: -60%;
    left: -30%;
    width: 160%;
    height: 160%;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.career-card--uiux .career-card__glow {
    background: radial-gradient(circle, rgba(255, 182, 70, 0.12) 0%, transparent 60%);
}

.career-card--devops .career-card__glow {
    background: radial-gradient(circle, rgba(74, 144, 217, 0.12) 0%, transparent 60%);
}

.career-card:hover .career-card__glow {
    opacity: 1;
}

/* Hover states */
.career-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(8, 8, 8, 0.08);
    border-color: rgba(8, 8, 8, 0.1);
}

.career-card--uiux:hover {
    border-color: rgba(255, 182, 70, 0.4);
    box-shadow: 0 16px 48px rgba(255, 182, 70, 0.1);
}

.career-card--devops:hover {
    border-color: rgba(74, 144, 217, 0.4);
    box-shadow: 0 16px 48px rgba(74, 144, 217, 0.08);
}

/* Focus visible for keyboard nav */
/* .career-card:focus-visible {
    outline: 3px solid #FFB646;
    outline-offset: 3px;
    transform: translateY(-4px);
} */

/* ---------- Card illustration ---------- */
.career-card__illustration {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: transparent;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.career-card:hover .career-card__illustration {
    transform: scale(1.08);
}

.career-card__illustration dotlottie-wc {
    width: 100%;
    height: 100%;
    display: block;
}

.career-card__illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.career-card:hover .career-card__illustration img {
    transform: scale(1.08);
}

/* ---------- Card content ---------- */
.career-card__content {
    position: relative;
    z-index: 1;
}

.career-card__title {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #080808;
    margin: 0 0 8px;
    letter-spacing: -0.2px;
}

.career-card__desc {
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #696969;
    margin: 0 0 20px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- CTA Button ---------- */
.career-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    border: none;
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.career-card--uiux .career-card__cta {
    background: linear-gradient(135deg, #FFB646, #f5a623);
    color: #080808;
    box-shadow: 0 4px 14px rgba(255, 182, 70, 0.2);
}

.career-card--uiux .career-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 182, 70, 0.3);
}

.career-card--devops .career-card__cta {
    background: linear-gradient(135deg, #4A90D9, #3b7dd8);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(74, 144, 217, 0.2);
}

.career-card--devops .career-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 144, 217, 0.3);
}

.career-card__cta-arrow {
    transition: transform 0.3s ease;
}

.career-card__cta:hover .career-card__cta-arrow {
    transform: translateX(3px);
}

/* ---------- Card Illustration Animations ---------- */

/* --- Shared --- */
.cs-anim {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === UI/UX DESIGNER ANIMATION === */
.cs-anim--uiux {
    background: linear-gradient(145deg, #fef9f0, #f8f0ff);
    border-radius: 16px;
    padding: 12px;
    flex-direction: column;
    gap: 8px;
}

/* Screen (Figma-like workspace) */
.cs-anim__screen {
    width: 100%;
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-template-rows: 14px 1fr;
    overflow: hidden;
}

.cs-anim__topbar {
    grid-column: 1 / -1;
    background: #f5f5f7;
    border-bottom: 1px solid #eee;
}

.cs-anim__sidebar {
    background: #fafafa;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
}

.cs-anim__nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: #e0e0e0;
    transition: background 0.3s;
}

.cs-anim__nav-dot:first-child {
    background: #FFB646;
    animation: cs-navPulse 2s ease-in-out infinite;
}

.cs-anim__canvas {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

/* Animated widgets appearing */
.cs-anim__widget {
    border-radius: 4px;
    animation: cs-widgetSlide 3s ease-in-out infinite;
}

.cs-anim__widget--1 {
    height: 18px;
    background: linear-gradient(90deg, #FFB646 70%, transparent 70%);
    opacity: 0.7;
    animation-delay: 0s;
}

.cs-anim__widget--2 {
    height: 12px;
    background: linear-gradient(90deg, #4A90D9 50%, transparent 50%);
    opacity: 0.5;
    animation-delay: 0.5s;
}

.cs-anim__widget--3 {
    height: 22px;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border: 1px dashed #d0d0d0;
    animation-delay: 1s;
}

/* Cursor */
.cs-anim__cursor {
    position: absolute;
    width: 14px;
    height: 14px;
    top: 45%;
    left: 55%;
    z-index: 2;
    animation: cs-cursorMove 4s ease-in-out infinite;
}

.cs-anim__cursor::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 6px solid #080808;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 4px solid transparent;
    transform: rotate(-30deg);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Color palette */
.cs-anim__palette {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.cs-anim__swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sw);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    animation: cs-swatchBounce 2s ease-in-out infinite;
}

.cs-anim__swatch:nth-child(2) { animation-delay: 0.15s; }
.cs-anim__swatch:nth-child(3) { animation-delay: 0.3s; }

/* === DEVOPS ENGINEER ANIMATION === */
.cs-anim--devops {
    background: linear-gradient(145deg, #1a1d23, #0d1117);
    border-radius: 16px;
    padding: 12px;
    flex-direction: column;
    gap: 10px;
}

/* Terminal */
.cs-anim__terminal {
    width: 100%;
    flex: 1;
    background: #0d1117;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cs-anim__term-bar {
    height: 16px;
    background: #161b22;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}

.cs-anim__term-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--td);
}

.cs-anim__term-body {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

/* Typing lines */
.cs-anim__term-line {
    height: 6px;
    border-radius: 3px;
    background: #27c93f;
    opacity: 0;
    animation: cs-termType 4s ease-in-out infinite;
}

.cs-anim__term-line--1 {
    width: 75%;
    background: linear-gradient(90deg, #58a6ff 40%, #79c0ff 40%);
    animation-delay: 0s;
}

.cs-anim__term-line--2 {
    width: 55%;
    background: #27c93f;
    animation-delay: 1s;
}

.cs-anim__term-line--3 {
    width: 65%;
    background: linear-gradient(90deg, #FFB646 50%, #f0883e 50%);
    animation-delay: 2s;
}

/* Blinking cursor */
.cs-anim__term-cursor {
    width: 7px;
    height: 12px;
    background: #27c93f;
    border-radius: 1px;
    animation: cs-blink 1s step-end infinite;
    margin-top: 2px;
}

/* Pipeline */
.cs-anim__pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
}

.cs-anim__pipe-node {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    animation: cs-nodeGlow 3s ease-in-out infinite;
}

.cs-anim__pipe-node--1 { animation-delay: 0s; }
.cs-anim__pipe-node--2 { animation-delay: 0.6s; }
.cs-anim__pipe-node--3 { animation-delay: 1.2s; }

.cs-anim__pipe-arrow {
    width: 16px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4A90D9, transparent);
    position: relative;
    animation: cs-arrowFlow 2s ease-in-out infinite;
}

.cs-anim__pipe-arrow::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 5px solid #4A90D9;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* === KEYFRAMES === */
@keyframes cs-widgetSlide {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(3px); opacity: 1; }
}

@keyframes cs-cursorMove {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-15px, 8px); }
    50% { transform: translate(10px, -5px); }
    75% { transform: translate(-5px, 12px); }
}

@keyframes cs-navPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes cs-swatchBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes cs-termType {
    0% { width: 0; opacity: 0; }
    10% { opacity: 1; }
    40% { width: 75%; opacity: 1; }
    100% { width: 75%; opacity: 0.6; }
}

.cs-anim__term-line--2 { --tw: 55%; }
.cs-anim__term-line--3 { --tw: 65%; }

@keyframes cs-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes cs-nodeGlow {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(74,144,217,0);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 12px rgba(74,144,217,0.3);
    }
}

@keyframes cs-arrowFlow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ---------- Entrance Animations ---------- */
@keyframes cs-fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .career-selection__modal {
        padding: 32px 20px 28px;
        border-radius: 20px;
    }

    .career-selection__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .career-selection__subtitle {
        margin-bottom: 24px;
    }

    .career-card {
        padding: 24px 18px 20px;
    }

    .career-card__illustration {
        width: 120px;
        height: 120px;
        margin-bottom: 16px;
    }

    .career-card__title {
        font-size: 18px;
    }

    .career-card__desc {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .career-card__cta {
        padding: 10px 18px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .career-selection {
        padding: 12px;
    }

    .career-selection__modal {
        padding: 28px 16px 24px;
    }

    .career-selection__title {
        font-size: 20px;
    }

    .career-card__illustration {
        width: 100px;
        height: 100px;
        border-radius: 16px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .career-selection,
    .career-selection__modal,
    .career-card,
    .career-card__illustration,
    .career-card__illustration img,
    .career-card__cta,
    .career-card__cta-arrow,
    .career-card__glow {
        animation: none !important;
        transition: none !important;
    }

    .career-selection__eyebrow,
    .career-selection__title,
    .career-selection__subtitle,
    .career-card {
        opacity: 1;
        transform: none;
    }
}
