/* ========== ANIMATIONS ========== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes barGrow { from { width: 0; } to { width: 100%; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.animate-fadeIn { animation: fadeIn 1s ease-out; }
.animate-slideLeft { animation: slideInLeft 0.6s ease-out both; }
.animate-slideRight { animation: slideInRight 0.6s ease-out both; }
.animate-scaleIn { animation: scaleIn 0.5s ease-out both; }

/* ========== REUSABLE COMPONENTS ========== */
.glass-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.05);
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    transition: all 0.3s;
}
.stat-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.nav-link {
    padding: 6px 14px;
    border-radius: 8px;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
}

.section-header { text-align: center; margin-bottom: 3rem; }
.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 9999px;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: #94a3b8;
    font-size: 1.125rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid;
    min-width: 100px;
    transition: transform 0.3s;
}
.flow-step:hover { transform: translateY(-4px); }

.number-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s;
}
.number-card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,0.3); }
.number-value { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.number-label { font-size: 0.875rem; color: #94a3b8; margin-top: 0.5rem; font-weight: 500; }

/* ========== TIMELINE STEPS ========== */
.timeline-step {
    position: relative;
    padding-left: 3.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.timeline-step.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-step .step-dot {
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 2;
}
@media (min-width: 768px) {
    .timeline-step { padding-left: 0; padding-right: 0; }
    .timeline-step:nth-child(odd) { padding-right: calc(50% + 2rem); text-align: right; }
    .timeline-step:nth-child(even) { padding-left: calc(50% + 2rem); text-align: left; }
    .timeline-step:nth-child(odd) .step-dot { left: auto; right: calc(-1.5rem); right: -1.5rem; left: calc(50% - 1.5rem); }
    .timeline-step:nth-child(even) .step-dot { left: calc(50% - 1.5rem); }
}

/* ========== MODULE TABS ========== */
.module-tab {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}
.module-tab:hover { color: #fff; border-color: rgba(99,102,241,0.3); }
.module-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-color: #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* ========== ARCHITECTURE BOXES ========== */
.arch-box {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.3s;
}
.arch-box:hover { transform: translateY(-2px); }
.arch-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ========== IMPROVEMENT CARDS ========== */
.improve-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.improve-row:last-child { border-bottom: none; }
.improve-old { color: #f87171; font-size: 0.9rem; }
.improve-arrow { color: #6366f1; font-size: 1.2rem; }
.improve-new { color: #34d399; font-size: 0.9rem; font-weight: 500; }

/* ========== ROLE CARDS ========== */
.role-card {
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s;
}
.role-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-4px); }

/* ========== SPRINT CARDS ========== */
.sprint-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s;
    cursor: pointer;
}
.sprint-card:hover { border-color: rgba(99,102,241,0.3); }
.sprint-card .sprint-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}
.sprint-details { display: none; margin-top: 0.75rem; }
.sprint-card.expanded .sprint-details { display: block; }
.sprint-card.expanded { border-color: rgba(99,102,241,0.4); background: rgba(30,41,59,0.7); }

/* ========== SECURITY CARDS ========== */
.security-card {
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.3s;
}
.security-card:hover { border-color: rgba(34,197,94,0.3); }

/* ========== PDF / REPORT ITEMS ========== */
.doc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 10px;
    font-size: 0.875rem;
    color: #cbd5e1;
    transition: all 0.2s;
}
.doc-item:hover { background: rgba(30, 41, 59, 0.7); color: #fff; transform: translateX(4px); }
.doc-item .doc-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ========== RECEIPT CARDS ========== */
.receipt-card {
    padding: 1.25rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}
.receipt-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-3px); }
.receipt-code { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; font-weight: 700; }

/* ========== SCROLL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Sprint bar animation */
.sprint-bar { animation: barGrow 2s ease-out both; }

/* ========== DETAIL LINK CARDS ========== */
.detail-link-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid;
    border-radius: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.detail-link-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Info box */
.info-box {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid;
    background: rgba(30,41,59,0.4);
    margin-bottom: 1rem;
}

/* Step flow inline */
.step-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}
.step-flow .sf-step {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(255,255,255,0.07);
    color: #cbd5e1;
    white-space: nowrap;
}
.step-flow .sf-arrow { color: #475569; font-size: 0.9rem; flex-shrink: 0; }

/* Formula box */
.formula-box {
    background: rgba(15,23,42,0.85);
    border: 1px solid rgba(99,102,241,0.25);
    border-left: 3px solid rgba(99,102,241,0.6);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #c7d2fe;
    margin: 1rem 0;
    white-space: pre-wrap;
    overflow-x: auto;
    line-height: 1.75;
    word-break: break-word;
    tab-size: 2;
}

/* Table style */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { background: rgba(30,41,59,0.8); color: #94a3b8; font-weight: 600; padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
.data-table td { padding: 0.6rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); color: #cbd5e1; vertical-align: top; }
.data-table tr:hover td { background: rgba(30,41,59,0.4); }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 2px 10px; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; }

/* Page hero */
.page-hero { padding: 2.5rem 1.5rem 2rem; text-align: center; background: linear-gradient(to bottom, rgba(15,23,42,1), rgba(15,23,42,0.5)); }
.page-hero h1 { font-size: 2.5rem; font-weight: 800; background: linear-gradient(to right, #fff, #a5b4fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; font-weight: 700; border-radius: 12px;
  padding: 10px 24px; font-size: 0.875rem;
  transition: all 0.3s; box-shadow: 0 4px 20px rgba(99,102,241,0.3);
  cursor: pointer; text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(30,41,59,0.6); border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0; font-weight: 600; border-radius: 12px;
  padding: 10px 24px; font-size: 0.875rem;
  transition: all 0.3s; cursor: pointer; text-decoration: none;
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: rgba(99,102,241,0.4); color: #fff; transform: translateY(-2px); }

/* ========== REPORT CARD ========== */
.report-card { cursor: pointer; transition: all 0.3s; }
.report-card:hover { transform: translateY(-3px); border-color: rgba(99,102,241,0.3) !important; }

/* ========== FA-REACT (fontawesome doesn't have fab fa-react as fa- prefix) ========== */
.fa-react::before { content: "\f41b"; font-family: 'Font Awesome 6 Brands'; }
.fa-python::before { content: "\f3e2"; font-family: 'Font Awesome 6 Brands'; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
