/* ==========================================
   EDUCATION + CERTIFICATIONS + TESTIMONIALS — WOW polish
   Load AFTER style.css and earlier enhancements.
   Mint = rgba(46, 242, 160) primary, falls back to --accent-rgb.
   ========================================== */

/* ---------- Section ambient backdrop (dark only) ---------- */
body.dark-theme #education,
body.dark-theme #certifications {
    position: relative;
    isolation: isolate;
}

body.dark-theme #education::before,
body.dark-theme #certifications::before {
    content: "";
    position: absolute;
    inset: -40px auto auto -10%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle at center,
        rgba(46, 242, 160, 0.10) 0%,
        rgba(46, 242, 160, 0.03) 40%,
        transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

body.dark-theme #education > *,
body.dark-theme #certifications > * {
    position: relative;
    z-index: 1;
}

/* ==========================================
   EDUCATION — embleem cards
   ========================================== */

#education .timeline-content.glow-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    grid-template-areas:
        "embleem header   grade"
        "embleem desc     desc";
    column-gap: 1.25rem;
    row-gap: 0.5rem;
    align-items: start;
    padding: 1.4rem 1.5rem;
    background: linear-gradient(180deg,
        rgba(15, 22, 28, 0.78) 0%,
        rgba(10, 16, 20, 0.72) 100%);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

body.light-theme #education .timeline-content.glow-card {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(247, 250, 252, 0.86) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* Embleem glyph (graduation cap) */
#education .timeline-content.glow-card::before {
    content: "";
    grid-area: embleem;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px solid rgba(46, 242, 160, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 6px 18px rgba(46, 242, 160, 0.10);
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232ef2a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M22 10 12 5 2 10l10 5 10-5Z'/><path d='M6 12v5c0 1.5 3 3 6 3s6-1.5 6-3v-5'/><path d='M22 10v6'/></svg>"),
        linear-gradient(135deg,
            rgba(46, 242, 160, 0.18),
            rgba(46, 242, 160, 0.04) 60%,
            transparent);
    background-size: 28px 28px, auto;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    z-index: 1;
}

body.light-theme #education .timeline-content.glow-card::before {
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M22 10 12 5 2 10l10 5 10-5Z'/><path d='M6 12v5c0 1.5 3 3 6 3s6-1.5 6-3v-5'/><path d='M22 10v6'/></svg>"),
        linear-gradient(135deg,
            rgba(59, 130, 246, 0.10),
            rgba(59, 130, 246, 0.02) 60%,
            transparent);
    background-size: 28px 28px, auto;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 4px 14px rgba(59, 130, 246, 0.10);
}

#education .timeline-content.glow-card .role-header {
    grid-area: header;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
}

#education .timeline-content.glow-card .role-header h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
}

#education .timeline-content.glow-card .role-header .company {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

#education .timeline-content.glow-card .role-description {
    grid-area: desc;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Grade chip — top right (GPA / Cum laude / etc.) */
#education .timeline-content.glow-card .grade-chip {
    grid-area: grade;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: rgba(46, 242, 160, 0.95);
    border: 1px solid rgba(46, 242, 160, 0.4);
    border-radius: 999px;
    background: rgba(46, 242, 160, 0.06);
    text-transform: uppercase;
    white-space: nowrap;
    align-self: start;
}

body.light-theme #education .timeline-content.glow-card .grade-chip {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.06);
}

/* Hover lift + mint border */
#education .timeline-content.glow-card:hover {
    transform: translateY(-3px);
    border-color: rgba(46, 242, 160, 0.45);
    box-shadow:
        0 18px 40px -18px rgba(46, 242, 160, 0.35),
        0 0 0 1px rgba(46, 242, 160, 0.12) inset;
}

#education .timeline-content.glow-card:hover::before {
    transform: translateY(-1px) rotate(-3deg);
    border-color: rgba(46, 242, 160, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 24px rgba(46, 242, 160, 0.22);
}

/* Skill / tag rows (if .tags present) */
#education .timeline-content .tags {
    grid-area: desc;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

#education .timeline-content .tags span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* Mobile: stack embleem above */
@media (max-width: 640px) {
    #education .timeline-content.glow-card {
        grid-template-columns: 48px 1fr;
        grid-template-areas:
            "embleem header"
            "embleem grade"
            "desc    desc";
        row-gap: 0.5rem;
    }
    #education .timeline-content.glow-card::before {
        width: 48px;
        height: 48px;
        background-size: 24px 24px, auto;
    }
    #education .timeline-content.glow-card .grade-chip {
        justify-self: start;
    }
}

/* ==========================================
   CERTIFICATIONS — premium glass tiles
   ========================================== */

#certifications .certifications-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    perspective: 1200px;
}

@media (min-width: 1100px) {
    #certifications .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

#certifications .cert-item.glow-card {
    aspect-ratio: 1 / 1.2;
    padding: 1.5rem 1.1rem 1.25rem;
    background: linear-gradient(180deg,
        rgba(15, 22, 28, 0.72) 0%,
        rgba(10, 16, 20, 0.62) 100%);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    transform-style: preserve-3d;
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
    will-change: transform;
}

body.light-theme #certifications .cert-item.glow-card {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(247, 250, 252, 0.84) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

#certifications .cert-badge {
    width: 76px;
    height: 76px;
    margin: 0.25rem auto 1.1rem;
    flex-shrink: 0;
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.4s ease,
        box-shadow 0.4s ease;
}

#certifications .cert-item h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.82rem, 1.6vw, 0.95rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

#certifications .cert-item p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    opacity: 0.78;
    margin-top: auto;
    text-transform: uppercase;
}

/* Hover: rotateY + scale + icon glow */
#certifications .cert-item.glow-card:hover {
    transform: rotateY(8deg) scale(1.04) translateY(-2px);
    border-color: var(--cert-accent, rgba(46, 242, 160, 0.5));
    box-shadow:
        0 22px 50px -20px rgba(0, 0, 0, 0.55),
        0 0 0 1px var(--cert-accent, rgba(46, 242, 160, 0.18)) inset,
        0 0 40px -10px var(--cert-glow, rgba(46, 242, 160, 0.25));
}

#certifications .cert-item.glow-card:hover .cert-badge {
    transform: translateZ(20px) scale(1.06);
    filter: drop-shadow(0 8px 24px var(--cert-glow, rgba(46, 242, 160, 0.45)));
}

#certifications .cert-item.glow-card:hover h4 {
    color: var(--cert-accent, var(--accent-primary));
}

@media (prefers-reduced-motion: reduce) {
    #certifications .cert-item.glow-card,
    #certifications .cert-item.glow-card:hover,
    #certifications .cert-item.glow-card:hover .cert-badge {
        transform: none;
        transition: none;
    }
}

@media (max-width: 640px) {
    #certifications .cert-item.glow-card {
        aspect-ratio: auto;
        padding: 1.25rem 1rem;
    }
    #certifications .cert-item.glow-card:hover {
        transform: translateY(-3px);
    }
}

/* ==========================================
   TESTIMONIALS — quote glyph + premium glass
   ========================================== */

.testimonials-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 1.5rem;
    margin-top: 3.5rem;
}

@media (max-width: 1024px) {
    .testimonials-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonials-compact .quote-box:last-child {
        grid-column: 1 / -1;
        max-width: 60%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .testimonials-compact {
        grid-template-columns: 1fr;
    }
    .testimonials-compact .quote-box:last-child {
        grid-column: auto;
        max-width: none;
    }
}

.testimonials-compact .quote-box {
    position: relative;
    padding: 2.5rem 1.75rem 1.5rem 2.25rem;
    background: linear-gradient(180deg,
        rgba(15, 22, 28, 0.78) 0%,
        rgba(10, 16, 20, 0.70) 100%);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    overflow: hidden;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

body.light-theme .testimonials-compact .quote-box {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(247, 250, 252, 0.86) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* Quote glyph verwijderd op Robin's verzoek */
.testimonials-compact .quote-box::before {
    content: none;
}

body.light-theme .testimonials-compact .quote-box::before {
    color: rgba(59, 130, 246, 0.18);
}

.testimonials-compact .quote-box > * {
    position: relative;
    z-index: 1;
}

/* Hover lift + glyph bump */
.testimonials-compact .quote-box:hover {
    transform: translateY(-4px);
    border-color: rgba(46, 242, 160, 0.4);
    box-shadow:
        0 24px 56px -22px rgba(46, 242, 160, 0.28),
        0 0 0 1px rgba(46, 242, 160, 0.12) inset;
}

.testimonials-compact .quote-box:hover::before {
    color: rgba(46, 242, 160, 0.32);
    transform: translateY(-2px) scale(1.04);
}

body.light-theme .testimonials-compact .quote-box:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow:
        0 24px 56px -22px rgba(59, 130, 246, 0.22),
        0 0 0 1px rgba(59, 130, 246, 0.10) inset;
}

body.light-theme .testimonials-compact .quote-box:hover::before {
    color: rgba(59, 130, 246, 0.32);
}

/* Volgorde: auteur bovenaan, quote eronder + author altijd op bottom van card
   via flex-grow op de quote (zodat verschillende quote-lengtes de card volledig
   vullen en alle author-blokken horizontaal gealigneerd staan over alle cards). */
.testimonials-compact .quote-author {
    order: 1;
    flex: 0 0 auto;
    padding-bottom: 1rem;
    padding-top: 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    align-items: center;
}

.testimonials-compact .quote-text {
    order: 2;
    flex: 1 1 auto;
    font-size: clamp(0.95rem, 1.5vw, 1.02rem);
    line-height: 1.6;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
}

body.light-theme .testimonials-compact .quote-author {
    border-bottom-color: rgba(15, 23, 42, 0.08);
    border-top-color: transparent;
}

.testimonials-compact .quote-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(46, 242, 160, 0.55);
    box-shadow:
        0 0 0 2px rgba(15, 22, 28, 0.6),
        0 6px 18px -6px rgba(46, 242, 160, 0.35);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.light-theme .testimonials-compact .quote-avatar {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow:
        0 0 0 2px #fff,
        0 6px 18px -6px rgba(59, 130, 246, 0.35);
}

.testimonials-compact .quote-box:hover .quote-avatar {
    border-color: rgba(46, 242, 160, 0.9);
}

.testimonials-compact .quote-author-text {
    gap: 0.15rem;
    padding-right: 2.4rem;
}

.testimonials-compact .quote-author strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.testimonials-compact .quote-author span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    color: var(--text-secondary);
    opacity: 0.8;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* LinkedIn / source icon — bottom right, compact subtle */
.testimonials-compact .quote-box .source-link {
    top: auto;
    bottom: 1.1rem;
    right: 1.1rem;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    background: rgba(46, 242, 160, 0.04);
    border: 1px solid rgba(46, 242, 160, 0.18);
    color: rgba(46, 242, 160, 0.7);
    opacity: 0.7;
    transition: all 0.25s ease;
}

.testimonials-compact .quote-box .source-link i,
.testimonials-compact .quote-box .source-link svg {
    width: 12px;
    height: 12px;
}

.testimonials-compact .quote-box .source-link:hover {
    background: rgba(46, 242, 160, 0.14);
    border-color: rgba(46, 242, 160, 0.55);
    color: rgba(46, 242, 160, 1);
    transform: translateY(-1px);
}

body.light-theme .testimonials-compact .quote-box .source-link {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.25);
    color: rgba(59, 130, 246, 0.85);
}

body.light-theme .testimonials-compact .quote-box .source-link:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.55);
    color: rgba(59, 130, 246, 1);
}

@media (max-width: 640px) {
    .testimonials-compact .quote-box {
        padding: 2.25rem 1.25rem 1.25rem 1.5rem;
    }
    .testimonials-compact .quote-box::before {
        font-size: 6.5rem;
    }
}
