/* ===== EDUCATION UNIVERSE ===== */
.education-universe {
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

/* ---- BG Canvas ---- */
#education-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ===== HERO ===== */
.edu-hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 40px 60px;
}

.edu-hero .bg-title {
    position: absolute;
    font-size: clamp(6rem, 20vw, 18rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px rgba(124,58,237,0.06);
    text-stroke: 2px rgba(124,58,237,0.06);
    letter-spacing: 0.08em;
    pointer-events: none;
    user-select: none;
    animation: heroPulse 5s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { -webkit-text-stroke-color: rgba(124,58,237,0.06); }
    50% { -webkit-text-stroke-color: rgba(124,58,237,0.14); }
}

.edu-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, #7c3aed 35%, #06b6d4 65%, #ec4899 100%);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    position: relative;
    z-index: 1;
    line-height: 1.15;
    max-width: 900px;
}

.edu-hero .subtitle {
    color: var(--text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 18px;
    font-size: clamp(0.6rem, 1vw, 0.8rem);
    max-width: 650px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.edu-hero .scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.15);
    font-size: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: hintFloat 2.5s ease-in-out infinite;
}

@keyframes hintFloat {
    0%, 100% { opacity: 0.15; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(6px); }
}

/* Hero floating symbols */
.hero-symbols {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hero-symbol {
    position: absolute;
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    opacity: 0.05;
    animation: symbolFloat 8s ease-in-out infinite;
}

@keyframes symbolFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

/* ===== EDUCATION SECTION ===== */
.edu-section {
    position: relative;
    z-index: 1;
    padding: 100px 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.edu-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.edu-section-header h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.edu-section-header p {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 12px;
}

/* ---- Education Holographic Card ---- */
.edu-card-wrap {
    width: 100%;
    max-width: 900px;
    perspective: 1200px;
    margin-bottom: 80px;
}

.edu-card {
    position: relative;
    padding: 50px 48px;
    border-radius: 24px;
    background: rgba(19,28,49,0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(124,58,237,0.1);
    transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
    transform-style: preserve-3d;
    cursor: default;
}

.edu-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.04));
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.edu-card:hover::before {
    opacity: 1;
}

.edu-card .ec-degree {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(124,58,237,0.5);
    margin-bottom: 12px;
    display: block;
}

.edu-card .ec-title {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.2;
}

.edu-card .ec-title span {
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.edu-card .ec-institution {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.edu-card .ec-meta {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.edu-card .ec-meta-item {
    display: flex;
    flex-direction: column;
}

.edu-card .ec-meta-item .emi-label {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.25);
}

.edu-card .ec-meta-item .emi-value {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

/* ---- Knowledge Chips ---- */
.knowledge-section {
    width: 100%;
    max-width: 900px;
}

.knowledge-section h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.6);
}

.knowledge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.knowledge-chip {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.1);
    color: rgba(255,255,255,0.5);
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    cursor: default;
}

.knowledge-chip:hover {
    background: rgba(124,58,237,0.18);
    border-color: rgba(124,58,237,0.3);
    color: #fff;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 30px rgba(124,58,237,0.12);
}

/* ===== CERTIFICATIONS SECTION ===== */
.cert-section {
    position: relative;
    z-index: 1;
    padding: 100px 60px 140px;
    min-height: 100vh;
}

.cert-header {
    text-align: center;
    margin-bottom: 60px;
}

.cert-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4, #ec4899);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.cert-header p {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 12px;
}

/* ---- Certification Wall ---- */
.cert-wall {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1500px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cert-card {
    position: relative;
    border-radius: 20px;
    background: rgba(19,28,49,0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.04);
    padding: 32px 28px;
    transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
    transform-style: preserve-3d;
    cursor: pointer;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.cert-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.cert-card .cert-year {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(124,58,237,0.4);
    margin-bottom: 8px;
}

.cert-card .cert-name {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-shrink: 0;
}

.cert-card .cert-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
    flex: 1;
}

.cert-card .cert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
}

.cert-card .cert-tag {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.08);
    color: rgba(255,255,255,0.35);
    transition: all 0.3s ease;
}

/* Hover */
.cert-card:hover {
    transform: translateZ(30px) scale(1.03);
    border-color: rgba(124,58,237,0.2);
    box-shadow: 0 20px 60px rgba(124,58,237,0.12);
}

.cert-card:hover .cert-name {
    color: #fff;
    text-shadow: 0 0 20px rgba(124,58,237,0.2);
}

.cert-card:hover .cert-tag {
    background: rgba(124,58,237,0.15);
    border-color: rgba(124,58,237,0.2);
    color: rgba(255,255,255,0.6);
}

/* Per-card accent colors */
.cert-card:nth-child(1) { --card-accent: #7c3aed; }
.cert-card:nth-child(2) { --card-accent: #06b6d4; }
.cert-card:nth-child(3) { --card-accent: #10b981; }
.cert-card:nth-child(4) { --card-accent: #ef4444; }
.cert-card:nth-child(5) { --card-accent: #f59e0b; }
.cert-card:nth-child(6) { --card-accent: #ec4899; }

.cert-card:nth-child(1)::before { background: linear-gradient(135deg, rgba(124,58,237,0.05), transparent); }
.cert-card:nth-child(2)::before { background: linear-gradient(135deg, rgba(6,182,212,0.05), transparent); }
.cert-card:nth-child(3)::before { background: linear-gradient(135deg, rgba(16,185,129,0.05), transparent); }
.cert-card:nth-child(4)::before { background: linear-gradient(135deg, rgba(239,68,68,0.05), transparent); }
.cert-card:nth-child(5)::before { background: linear-gradient(135deg, rgba(245,158,11,0.05), transparent); }
.cert-card:nth-child(6)::before { background: linear-gradient(135deg, rgba(236,72,153,0.05), transparent); }

/* ===== AI SCANNER ===== */
.edu-scanner {
    position: fixed;
    top: 50%; left: 50%;
    width: min(450px, 75vw);
    height: min(450px, 75vw);
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.edu-scanner.active { opacity: 1; }

.edu-scanner .sr-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(124,58,237,0.12);
    animation: srPulse 3.5s ease-in-out infinite;
}
.edu-scanner .sr-ring:nth-child(2) { animation-delay: 0.4s; }
.edu-scanner .sr-ring:nth-child(3) { animation-delay: 0.8s; }

@keyframes srPulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.edu-scanner .sr-arc {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #7c3aed;
    border-right-color: #06b6d4;
    animation: srRotate 5s linear infinite;
    filter: blur(1px);
    box-shadow: 0 0 20px rgba(124,58,237,0.15);
}

@keyframes srRotate { to { transform: rotate(360deg); } }

.edu-scanner .sr-line {
    position: absolute;
    top: 50%; left: 50%;
    width: 130%;
    height: 1px;
    transform: translate(-50%, -50%) rotate(0deg);
    background: linear-gradient(90deg, transparent, #7c3aed, #06b6d4, transparent);
    animation: srLineRotate 7s linear infinite;
    opacity: 0.3;
}

@keyframes srLineRotate { to { transform: translate(-50%, -50%) rotate(360deg); } }

.edu-scanner .sr-info {
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.edu-scanner.active .sr-info {
    opacity: 1;
    bottom: -55px;
}

.sr-info .sr-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #7c3aed, #06b6d4);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.sr-info .sr-year {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ===== STATS COUNTERS ===== */
.stats-section {
    position: relative;
    z-index: 1;
    padding: 80px 60px 100px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.stat-card {
    padding: 32px 16px;
    border-radius: 16px;
    background: rgba(19,28,49,0.25);
    border: 1px solid rgba(255,255,255,0.03);
    transition: all 0.4s ease;
}

.stat-card:hover {
    background: rgba(19,28,49,0.35);
    border-color: rgba(124,58,237,0.1);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.stat-card .stat-value {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    margin-top: 6px;
    display: block;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .edu-hero { padding: 100px 30px 50px; }
    .edu-section { padding: 80px 40px; }
    .cert-section { padding: 80px 40px 120px; }
    .cert-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
    .edu-hero { padding: 80px 20px 40px; min-height: 80vh; }
    .edu-hero h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); }
    .edu-hero .bg-title { font-size: clamp(3rem, 12vw, 6rem); }
    .edu-hero .scroll-hint { display: none; }
    .edu-card { padding: 32px 24px; }
    .edu-card .ec-meta { flex-wrap: wrap; gap: 12px; }
    .edu-section { padding: 60px 20px; }
    .cert-section { padding: 60px 20px 100px; }
    .cert-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
    .cert-card { min-height: auto; padding: 24px 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-section { padding: 60px 20px; }
    .edu-scanner { width: min(280px, 80vw); height: min(280px, 80vw); }
    .edu-scanner .sr-info { display: none; }
}

@media (max-width: 480px) {
    .edu-hero { padding: 60px 16px 30px; min-height: 70vh; }
    .edu-hero .bg-title { display: none; }
    .edu-card { padding: 24px 16px; border-radius: 16px; }
    .knowledge-chip { font-size: 0.55rem; padding: 5px 12px; }
    .cert-card { padding: 20px 16px; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 20px 12px; }
}

/* ===== GALLERY ===== */
.portal-gallery {
    padding: 60px 0; overflow: hidden;
    position: relative; z-index: 1;
}
.gallery-header {
    text-align: center; margin-bottom: 36px; padding: 0 20px;
}
.gallery-header h2 {
    font-size: clamp(1rem, 2vw, 1.6rem); font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 0%, #7c3aed 50%, #06b6d4 100%);
    -webkit-text-fill-color: transparent; background-clip: text; -webkit-background-clip: text;
}
.gallery-header p {
    font-size: 0.55rem; color: rgba(255,255,255,0.2);
    text-transform: uppercase; letter-spacing: 2px; margin-top: 6px;
}
.gallery-track-wrap {
    position: relative; display: flex; flex-direction: column; gap: 12px;
}
.gallery-track {
    display: flex; gap: 12px; width: fit-content;
    animation: galleryScroll 70s linear infinite;
}
.gallery-track-2 {
    animation: galleryScroll2 90s linear infinite;
}
@keyframes galleryScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes galleryScroll2 {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.gallery-item {
    width: 200px; height: 140px; border-radius: 16px; flex-shrink: 0;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0; position: relative; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    cursor: pointer;
}
.gallery-item img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 16px;
}
.gallery-item::after {
    content: ''; position: absolute; inset: 0; border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    pointer-events: none;
}
.gallery-item .gi-label {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: #fff; position: relative; z-index: 2; margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); text-align: center; padding: 0 8px;
}
.gallery-item:hover {
    transform: translateY(-6px) scale(1.03); border-radius: 20px;
    box-shadow: 0 15px 40px rgba(124,58,237,0.15);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item img { transition: transform 0.4s ease; }

.gallery-empty {
    color: rgba(255,255,255,0.08); font-size: 0.6rem; text-transform: uppercase;
    letter-spacing: 2px; padding: 20px 0; width: 100%; text-align: center;
}

/* ===== CERTIFICATE DRAWER ===== */
.cert-drawer-section {
    padding: 40px 0 80px; overflow: hidden; position: relative; z-index: 1;
}
.cert-drawer {
    padding: 0 20px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
}
.cert-drawer::-webkit-scrollbar { display: none; }
.cert-drawer-track {
    display: flex; gap: 20px; width: fit-content; padding-bottom: 12px;
}
.cd-item {
    flex-shrink: 0; cursor: pointer; position: relative;
    border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    background: rgba(19,28,49,0.3);
    max-height: 340px;
}
.cd-item img {
    display: block; height: 280px; width: auto;
    object-fit: contain; transition: transform 0.4s ease;
}
.cd-item .cd-label {
    display: block; text-align: center;
    font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: rgba(255,255,255,0.5); padding: 8px 12px;
    background: rgba(19,28,49,0.6);
}
.cd-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 50px rgba(124,58,237,0.12);
    border-color: rgba(124,58,237,0.1);
}
.cd-item:hover img { transform: scale(1.04); }

/* ===== ZOOM LIGHTBOX ===== */
.zoom-lightbox {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(16px);
    display: none; align-items: center; justify-content: center;
    padding: 40px; opacity: 0; transition: opacity 0.3s ease;
}
.zoom-lightbox.open { display: flex; opacity: 1; }
.zoom-lightbox .zoom-image {
    max-width: 95vw; max-height: 90vh; object-fit: contain;
    border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}
.zoom-lightbox .zoom-image:hover { transform: scale(1.02); }
.zoom-lightbox .zoom-close {
    position: absolute; top: 20px; right: 24px;
    background: none; border: none; color: rgba(255,255,255,0.3);
    font-size: 2.2rem; cursor: pointer; transition: color 0.3s ease;
    line-height: 1; z-index: 2;
}
.zoom-lightbox .zoom-close:hover { color: #fff; }

@media (max-width: 768px) {
    .portal-gallery { padding: 40px 0; }
    .gallery-track { gap: 8px; }
    .gallery-item { width: 150px; height: 100px; border-radius: 12px; }
    .gallery-item .gi-label { font-size: 0.5rem; }
    .cert-drawer-track { gap: 12px; }
    .cd-item img { height: 200px; }
    .zoom-lightbox { padding: 20px; }
}
