/* ── CARD 6: CERTIFICATIONS ── */

#card-6 { background: transparent; }



.certs-container {

    width: 100%;

    max-width: 680px;

    position: relative;

    padding-left: 20px;

}



.timeline-line {

    position: absolute;

    left: 0; top: 0; bottom: 0;

    width: 2px;

    background: linear-gradient(to bottom, var(--purple), var(--pink));

}



.cert-item {

    display: flex;

    align-items: center;

    gap: 30px;

    margin-bottom: 24px;

    position: relative;

}



.timeline-dot {

    position: absolute;

    left: -24px;

    top: 50%;

    transform: translateY(-50%);

    width: 10px; height: 10px;

    border-radius: 50%;

    background: var(--purple);

    box-shadow: 0 0 10px var(--purple);

    z-index: 2;

}



.cert-card {

    flex: 1;

    background: var(--glass-bg);

    border: 1px solid var(--glass-border);

    backdrop-filter: blur(10px);

    border-radius: 20px;

    padding: 28px 32px;

    display: flex;

    align-items: center;

    gap: 24px;

    opacity: 0;

    transform: translateX(-30px);

    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease !important;

    text-decoration: none;

    color: var(--text-white);

    cursor: pointer;

}



.cert-card.anim-in {

    opacity: 1;

    transform: translateX(0) !important;

}



.cert-card:hover {

    transform: translateY(-12px) rotate(1deg) scale(1.02) !important;

    border-color: var(--pink) !important;

    box-shadow: 0 15px 45px rgba(236, 72, 153, 0.45) !important;

}



.cert-icon {

    width: 50px; height: 50px; min-width: 50px;

    border-radius: 14px;

    background: rgba(236,72,153,0.12);

    border: 1px solid var(--pink);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;

}



.cert-info  { flex: 1; }

.cert-title { font-weight: 700; font-size: 15px; display: block; margin-bottom: 2px; }

.cert-issuer { font-size: 12px; color: var(--text-muted); }



.status-badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }



.status-inprogress {

    background: rgba(0, 229, 255,0.1);

    border: 1px solid var(--cyan);

    color: var(--cyan);

}



.status-completed {

    background: rgba(124,58,237,0.1);

    border: 1px solid var(--purple);

    color: var(--purple);

}



/* ── CARD 8: CASE STUDIES ── */

#card-8 { background: rgba(0, 229, 255, 0.03); }



.cs-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 28px;

    width: 100%;

    margin-top: 8px;

}



/* Case Study Card */

.winner-ribbon {

    position: absolute;

    top: 20px;

    left: -45px;

    background: linear-gradient(135deg, #B829FF 0%, #B829FF 100%);

    color: #000;

    padding: 6px 45px;

    font-size: 13px;

    font-weight: 900;

    font-family: inherit;

    transform: rotate(-45deg);

    text-transform: uppercase;

    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);

    letter-spacing: 2px;

    z-index: 10;

    pointer-events: none;

}



.cs-card {

    background: rgba(255,255,255,0.07);

    border: 1px solid rgba(255,255,255,0.12);

    border-radius: 20px;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    opacity: 0;

    transform: translateY(30px);

    transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.3s ease, box-shadow 0.3s ease;

}

.cs-card.anim-in { opacity: 1; transform: translateY(0); }

.cs-card:nth-child(2) { transition-delay: 0.1s; }

.cs-card:nth-child(3) { transition-delay: 0.2s; }



.cs-card:hover {

    border-color: rgba(0, 229, 255, 0.5);

    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2);

    transform: translateY(-8px);

}



/* Gradient placeholder images */

.cs-card-img {

    height: 180px;

    position: relative;

    display: flex;

    align-items: flex-end;

    padding: 14px;

}

.cs-img-1 { background: linear-gradient(135deg, #1a0533 0%, #3b0764 40%, #06b6d4 100%); }

.cs-img-2 { background: linear-gradient(135deg, #052533 0%, #0c4a6e 40%, #7c3aed 100%); }

.cs-img-3 { background: linear-gradient(135deg, #1a0520 0%, #ec4899 60%, #7c3aed 100%); }



/* Animated grid lines on placeholder */

.cs-card-img::before {

    content: '';

    position: absolute;

    inset: 0;

    background-image:

        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),

        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);

    background-size: 28px 28px;

}



/* Floating icon on placeholder */

.cs-card-img::after {

    content: attr(data-icon);

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -60%);

    font-size: 48px;

    opacity: 0.25;

}



.cs-card-tag {

    position: relative;

    z-index: 1;

    background: rgba(0,0,0,0.5);

    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,0.15);

    color: var(--cyan);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    padding: 4px 12px;

    border-radius: 99px;

}



.cs-card-body {

    padding: 22px 24px;

    display: flex;

    flex-direction: column;

    flex: 1;

    gap: 10px;

}



.cs-card-title {

    font-size: 16px;

    font-weight: 700;

    color: var(--text-white);

    line-height: 1.4;

}



.cs-card-summary {

    font-size: 13px;

    color: var(--text-muted);

    line-height: 1.65;

    flex: 1;

}



.cs-card-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 6px;

}



.cs-tags { display: flex; flex-wrap: wrap; gap: 6px; }



.cs-tag {

    background: rgba(124,58,237,0.12);

    border: 1px solid rgba(124,58,237,0.3);

    color: var(--purple);

    font-size: 10px;

    font-weight: 700;

    padding: 3px 9px;

    border-radius: 6px;

    letter-spacing: 0.5px;

}



.cs-read-btn {

    background: none;

    border: none;

    color: var(--cyan);

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    font-family: inherit;

    padding: 0;

    transition: color 0.2s, letter-spacing 0.2s;

    display: inline-flex;

    align-items: center;

    gap: 4px;

}

.cs-read-btn:hover { color: var(--text-white); letter-spacing: 0.5px; }



/* ── CASE STUDY DETAIL MODAL ── */

.cs-modal {

    position: fixed;

    inset: 0;

    z-index: 3000;

    background: rgba(5, 5, 15, 0.88);

    backdrop-filter: blur(18px);

    display: none;

    justify-content: center;

    align-items: flex-start;

    padding: 30px 20px 40px;

    opacity: 0;

    transition: opacity 0.4s ease;

    overflow-y: auto;

    scrollbar-width: thin;

    scrollbar-color: var(--purple) transparent;

}

.cs-modal.active { display: flex; }

.cs-modal.visible { opacity: 1; }



.cs-modal-panel {

    background: rgba(15, 12, 28, 0.96);

    border: 1px solid rgba(124, 58, 237, 0.25);

    border-radius: 24px;

    width: 100%;

    max-width: 780px;

    position: relative;

    overflow: hidden;

    transform: translateY(30px);

    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);

}

.cs-modal.visible .cs-modal-panel { transform: translateY(0); }



.cs-modal-close {

    position: absolute;

    top: 18px;

    right: 18px;

    z-index: 10;

    width: 36px;

    height: 36px;

    border-radius: 50%;

    background: rgba(255,255,255,0.08);

    border: 1px solid rgba(255,255,255,0.15);

    color: var(--text-white);

    font-size: 18px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: background 0.2s, transform 0.2s;

    font-family: inherit;

}

.cs-modal-close:hover { background: var(--pink); transform: scale(1.1) rotate(90deg); }



.cs-modal-hero {

    padding: 44px 44px 36px;

    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(0, 229, 255,0.1));

    border-bottom: 1px solid rgba(255,255,255,0.08);

}

.cs-modal-category {

    display: inline-block;

    background: rgba(0, 229, 255,0.1);

    border: 1px solid rgba(0, 229, 255,0.3);

    color: var(--cyan);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;

    padding: 4px 14px;

    border-radius: 99px;

    margin-bottom: 14px;

}

.cs-modal-title {

    font-size: clamp(22px, 4vw, 32px);

    font-weight: 800;

    color: var(--text-white);

    line-height: 1.2;

}



.cs-modal-body { padding: 36px 44px 44px; display: flex; flex-direction: column; gap: 36px; }



/* Problem / Solution / Result grid */

.cs-detail-grid { display: flex; flex-direction: column; gap: 24px; }



.cs-detail-section {

    display: flex;

    gap: 18px;

    padding: 22px 24px;

    border-radius: 16px;

    border-left: 3px solid;

    background: rgba(255,255,255,0.04);

}

.cs-problem  { border-color: #ef4444; background: rgba(239,68,68,0.06); }

.cs-solution { border-color: var(--cyan); background: rgba(0, 229, 255,0.06); }

.cs-result   { border-color: #22c55e; background: rgba(34,197,94,0.06); }



.cs-detail-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }



.cs-detail-heading {

    font-size: 16px;

    font-weight: 700;

    color: var(--text-white);

    margin-bottom: 8px;

}

.cs-detail-text { font-size: 14px; color: var(--text-muted); line-height: 1.75; }



/* Tech section */

.cs-tech-section {

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 16px;

    padding: 22px 24px;

}

.cs-tags-large { display: flex; flex-wrap: wrap; gap: 10px; }

.cs-tags-large .cs-tag {

    font-size: 12px;

    padding: 5px 14px;

    border-radius: 8px;

    background: rgba(0, 229, 255,0.1);

    border: 1px solid rgba(0, 229, 255,0.3);

    color: var(--cyan);

}



/* ── COMMENTS SECTION ── */

.cs-comments-section { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 30px; }



.cs-comments-heading {

    font-size: 18px;

    font-weight: 700;

    color: var(--text-white);

    margin-bottom: 22px;

}



.cs-comments-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }



.cert-card { 

  display: flex; 

  align-items: center; 

  justify-content: space-between; 

  padding: 20px 30px; 

  min-height: 100px; 

  background: rgba(255,255,255,0.03); 

  border: 1px solid rgba(255,255,255,0.06); 

  border-radius: 20px; 

  transition: all 0.3s ease; 

  box-shadow: 0 10px 30px rgba(0,0,0,0.2);

}



.cs-comment {

    display: flex;

    gap: 14px;

    padding: 16px;

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.07);

    border-radius: 14px;

    transition: border-color 0.2s;

}

.cs-comment:hover { border-color: rgba(124,58,237,0.3); }



.cs-comment-avatar {

    width: 40px;

    height: 40px;

    min-width: 40px;

    border-radius: 12px;

    background: linear-gradient(135deg, var(--purple), var(--cyan));

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 13px;

    font-weight: 700;

    color: white;

}



.cs-comment-content { flex: 1; }



.cs-comment-meta {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 6px;

}

.cs-comment-meta strong { font-size: 14px; color: var(--text-white); }

.cs-comment-meta span  { font-size: 12px; color: var(--text-muted); }

.cs-comment-content p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }



/* Comment Form */

.cs-comment-form {

    background: rgba(255,255,255,0.03);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 18px;

    padding: 24px;

    display: flex;

    flex-direction: column;

    gap: 14px;

}

.cs-form-title { font-size: 15px; font-weight: 700; color: var(--text-white); }



.cs-comment-name,

.cs-comment-textarea {

    width: 100%;

    background: rgba(255,255,255,0.05);

    border: 1px solid rgba(255,255,255,0.1);

    border-radius: 12px;

    padding: 12px 16px;

    color: var(--text-white);

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition: border-color 0.25s;

    resize: none;

}

.cs-comment-name:focus,

.cs-comment-textarea:focus { border-color: var(--purple); }

.cs-comment-name { height: 44px; }

.cs-comment-textarea { height: 100px; }



.cs-comment-submit {

    align-self: flex-end;

    background: linear-gradient(90deg, var(--purple), var(--cyan));

    color: white;

    border: none;

    border-radius: 99px;

    padding: 11px 28px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    font-family: inherit;

    transition: transform 0.2s, box-shadow 0.2s;

}

.cs-comment-submit:hover {

    transform: translateY(-3px);

    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.35);

}



/* ── PREMIUM CASE STUDY MODAL UI ── */

.cs-wrap {

  font-family: inherit;

  width: 100%;

  margin: 0 auto;

  color: #f0ede8;

}



.cs-header .cs-category {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  font-size: 11px;

  font-weight: 600;

  letter-spacing: 0.08em;

  text-transform: uppercase;

  color: #9994a3;

  margin-bottom: 14px;

}

.cs-header .cs-category-dot { width: 6px; height: 6px; border-radius: 50%; background: #7c3aed; }

.cs-header .cs-title { font-size: 28px; font-weight: 700; color: #f0ede8; line-height: 1.2; margin: 0 0 16px; letter-spacing: -0.02em; }

.cs-header .cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.cs-header .cs-tag { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }

.tag-py  { background: #2d1f6e; color: #afa9ec; border:1px solid rgba(175,169,236,0.2); }

.tag-ml  { background: #083326; color: #5dcaa5; border:1px solid rgba(93,202,165,0.2);}

.tag-aws { background: #3a2500; color: #ef9f27; border:1px solid rgba(239,159,39,0.2);}

.tag-web { background: rgba(255,255,255,0.05); color: #fff; border:1px solid rgba(255,255,255,0.1); }



.cs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 2.5rem; }

.cs-stats .stat-card { background: rgba(255,255,255,0.05); border: 0.5px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 1rem 1.25rem; }

.cs-stats .stat-label { font-size: 11px; color: #9994a3; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }

.cs-stats .stat-value { font-size: 22px; font-weight: 700; }

.cs-stats .stat-sub { font-size: 11px; color: #9994a3; margin-top: 3px; }

.stat-value.green  { color: #5dcaa5; }

.stat-value.purple { color: #afa9ec; }

.stat-value.amber  { color: #ef9f27; }

.stat-value.blue  { color: var(--cyan); }



.cs-section { margin-bottom: 1.75rem; }

.cs-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.cs-section-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.icon-problem  { background: rgba(239,68,68,0.15); }

.icon-solution { background: rgba(16,185,129,0.15); }

.icon-result   { background: rgba(124,58,237,0.15); }

.cs-section-title { font-size: 12px; font-weight: 700; color: #9994a3; letter-spacing: 0.08em; text-transform: uppercase; }

.cs-text { font-size: 14px; line-height: 1.75; color: var(--text-muted); margin: 0; }

.cs-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 1.75rem 0; }



.cs-pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 1.25rem 0; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }

.pipe-step { padding: 14px 10px; background: rgba(255,255,255,0.03); text-align: center; border-right: 1px solid rgba(255,255,255,0.08); position: relative; }

.pipe-step:last-child { border-right: none; }

.pipe-icon  { font-size: 20px; margin-bottom: 6px; }

.pipe-label { font-size: 12px; font-weight: 700; color: #f0ede8; }

.pipe-sub   { font-size: 10px; color: #9994a3; margin-top: 3px; }



.cs-result-box { background: rgba(124,58,237,0.08); border-left: 3px solid #7c3aed; padding: 1rem 1.25rem; margin-bottom: 12px; }

.cs-result-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(124,58,237,0.2); color: #afa9ec; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; }



.cs-live-link { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: #f0ede8; text-decoration: none; transition: border-color 0.15s, background 0.15s; margin-right: 8px; margin-bottom: 8px;}

.cs-live-link:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); flex-shrink: 0; }



@media (max-width: 640px) {

  .cs-stats, .cs-pipeline { grid-template-columns: 1fr 1fr; }

  .cs-header .cs-title { font-size: 22px; }

  .pipe-step { border-bottom: 1px solid rgba(255,255,255,0.08); border-right: 1px solid rgba(255,255,255,0.08); }

  .pipe-step:nth-child(even) { border-right: none; }

}

@media (max-width: 400px) { .cs-stats { grid-template-columns: 1fr; } }



/* ============================================================

   === SPACE ANIMATIONS ===

   ============================================================ */



#warp-overlay {

    position: fixed;

    inset: 0;

    z-index: 200;

    pointer-events: none;

    opacity: 0;

    background: radial-gradient(ellipse at center, rgba(255,255,255,0.14) 0%, transparent 65%);

    transition: opacity 0.4s ease;

}

#warp-overlay.warp-flash {

    opacity: 1;

    transition: opacity 0.2s ease;

}



/* Disable older warp flash overlays to avoid double-screen feel */

#warp-overlay,

#warp-flash-overlay {

    display: none !important;

}



/* ── FIX 4: Case Study Cards — 3D tilt + scan line ── */

#card-6 .cs-card {

    transform-style: preserve-3d;

    will-change: transform;

    transition: transform 0.4s cubic-bezier(0.25,1,0.5,1), box-shadow 0.4s ease !important;

    overflow: hidden;

    position: relative;

}



/* Scan line sweep pseudo-element (JS toggles .cs-scanning class) */

#card-6 .cs-card.cs-scanning::after {

    content: '';

    position: absolute;

    left: 0; right: 0;

    height: 40%;

    background: linear-gradient(

        to bottom,

        transparent,

        rgba(0, 229, 255, 0.08),

        transparent

    );

    pointer-events: none;

    z-index: 10;

    animation: csScanSweep 1.2s ease-out forwards;

}

@keyframes csScanSweep {

    from { top: -40%; }

    to   { top: 100%; }

}

#csCommentSubmit {
    align-self: flex-end;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    color: white;
    border: none;
    border-radius: 99px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#csCommentSubmit:hover {
    transform: translateY(-10px) rotate(1deg) scale(1.05);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--purple);
    color: var(--purple);
    box-shadow: 0 15px 45px rgba(124, 58, 237, 0.45);
    backdrop-filter: blur(8px);
}



