/* ================================================================
   MATHSVERSITY COOKIE POLICY — MV DESIGN SYSTEM
   Matching dashboard.html & home.html theme
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
    --ink: #0B0F1F;
    --ink-soft: #1B2140;
    --paper: #FDFCF9;
    --paper-dim: #F3F1EA;
    --paper-panel: #FFFFFF;
    --pencil: #4A5170;
    --pencil-light: #8B90A8;
    --blue: #2F4FE0;
    --blue-deep: #1E37A8;
    --blue-glow: rgba(47,79,224,0.12);
    --amber: #E2A63B;
    --amber-deep: #B9821F;
    --amber-glow: rgba(226,166,59,0.12);
    --sage: #3F8F76;
    --sage-deep: #2F6F5C;
    --sage-glow: rgba(63,143,118,0.12);
    --coral: #E8634A;
    --coral-deep: #C44832;
    --line: rgba(11,15,31,0.08);
    --line-strong: rgba(11,15,31,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-card: 0 1px 3px rgba(11,15,31,0.04), 0 12px 32px rgba(11,15,31,0.06);
    --shadow-pop: 0 32px 72px rgba(11,15,31,0.16);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --primary: #2F4FE0;
    --primary-dark: #1E37A8;
    --secondary: #3F8F76;
    --dark: #0B0F1F;
    --gray: #4A5170;
    --light: #F3F1EA;
    --white: #FFFFFF;
}

/* ================================================================
   GLOBAL RESET & BASE
   ================================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.cp-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    min-height: 100vh;
    padding: 0 0 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow: hidden;
}

.cp-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 38px 38px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 45%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* ================================================================
   3D BACKGROUND SCENE
   ================================================================ */
.mv-3d-scene {
    perspective: 1200px;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.mv-3d-object {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
}

/* --- 3D Atom --- */
.mv-3d-atom {
    width: 130px; height: 130px;
    position: relative;
    transform-style: preserve-3d;
    animation: atom-spin 20s linear infinite;
}
.mv-3d-atom-core {
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--blue), var(--blue-deep));
    box-shadow: 0 0 20px rgba(47,79,224,0.5), 0 0 60px rgba(47,79,224,0.2);
    z-index: 2;
}
.mv-3d-atom-core::after {
    content: '';
    position: absolute;
    top: 2px; left: 3px;
    width: 6px; height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
}
.mv-3d-atom-orbit {
    position: absolute;
    top: 50%; left: 50%;
    border: 1.5px solid rgba(47,79,224,0.15);
    border-radius: 50%;
    transform-style: preserve-3d;
}
.mv-3d-atom-orbit:nth-child(2) { width: 100px; height: 100px; margin: -50px 0 0 -50px; animation: orbit-tilt-1 6s linear infinite; }
.mv-3d-atom-orbit:nth-child(3) { width: 120px; height: 120px; margin: -60px 0 0 -60px; animation: orbit-tilt-2 8s linear infinite reverse; }
.mv-3d-atom-orbit:nth-child(4) { width: 90px; height: 90px; margin: -45px 0 0 -45px; animation: orbit-tilt-3 5s linear infinite; }
.mv-3d-atom-electron {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 12px rgba(47,79,224,0.6);
}
.mv-3d-atom-orbit:nth-child(2) .mv-3d-atom-electron { top: -4px; left: 50%; margin-left: -4px; animation: electron-glow 2s ease-in-out infinite; }
.mv-3d-atom-orbit:nth-child(3) .mv-3d-atom-electron { bottom: -4px; left: 50%; margin-left: -4px; background: var(--sage); box-shadow: 0 0 12px rgba(63,143,118,0.6); animation: electron-glow 2s ease-in-out infinite 0.7s; }
.mv-3d-atom-orbit:nth-child(4) .mv-3d-atom-electron { top: 50%; right: -4px; margin-top: -4px; background: var(--amber); box-shadow: 0 0 12px rgba(226,166,59,0.6); animation: electron-glow 2s ease-in-out infinite 1.4s; }

@keyframes atom-spin { 0% { transform: rotateX(20deg) rotateY(0deg); } 100% { transform: rotateX(20deg) rotateY(360deg); } }
@keyframes orbit-tilt-1 { 0% { transform: rotateX(70deg) rotateZ(0deg); } 100% { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes orbit-tilt-2 { 0% { transform: rotateX(50deg) rotateY(40deg) rotateZ(0deg); } 100% { transform: rotateX(50deg) rotateY(40deg) rotateZ(360deg); } }
@keyframes orbit-tilt-3 { 0% { transform: rotateY(70deg) rotateZ(0deg); } 100% { transform: rotateY(70deg) rotateZ(360deg); } }
@keyframes electron-glow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0.7; } }

/* --- 3D Globe --- */
.mv-3d-globe {
    width: 140px; height: 140px;
    border-radius: 50%;
    position: relative;
    transform-style: preserve-3d;
    animation: globe-rotate 16s linear infinite;
}
.mv-3d-globe-ring {
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(47,79,224,0.12);
    border-radius: 50%;
}
.mv-3d-globe-ring:nth-child(1) { transform: rotateY(0deg); }
.mv-3d-globe-ring:nth-child(2) { transform: rotateY(30deg); }
.mv-3d-globe-ring:nth-child(3) { transform: rotateY(60deg); }
.mv-3d-globe-ring:nth-child(4) { transform: rotateY(90deg); }
.mv-3d-globe-ring:nth-child(5) { transform: rotateY(120deg); }
.mv-3d-globe-ring:nth-child(6) { transform: rotateY(150deg); }
.mv-3d-globe-ring:nth-child(7) { transform: rotateX(90deg); }
.mv-3d-globe-ring:nth-child(8) { transform: rotateX(90deg) rotateZ(30deg); }
.mv-3d-globe-ring:nth-child(9) { transform: rotateX(90deg) rotateZ(60deg); }
.mv-3d-globe-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47,79,224,0.08) 0%, transparent 70%);
}
.mv-3d-globe-dot {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 10px rgba(47,79,224,0.6);
}
.mv-3d-globe-dot:nth-child(11) { top: 20%; left: 60%; animation: globe-pulse 3s ease-in-out infinite; }
.mv-3d-globe-dot:nth-child(12) { top: 55%; left: 15%; animation: globe-pulse 3s ease-in-out infinite 1s; background: var(--sage); box-shadow: 0 0 10px rgba(63,143,118,0.6); }
.mv-3d-globe-dot:nth-child(13) { top: 70%; left: 75%; animation: globe-pulse 3s ease-in-out infinite 2s; background: var(--amber); box-shadow: 0 0 10px rgba(226,166,59,0.6); }

@keyframes globe-rotate { 0% { transform: rotateY(0deg) rotateX(-15deg); } 100% { transform: rotateY(360deg) rotateX(-15deg); } }
@keyframes globe-pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(2); opacity: 0.4; } }

/* --- 3D Holographic Card --- */
.mv-3d-holo {
    width: 120px; height: 160px;
    border-radius: 16px;
    position: relative;
    transform-style: preserve-3d;
    background: linear-gradient(135deg,
        rgba(47,79,224,0.08) 0%,
        rgba(63,143,118,0.08) 25%,
        rgba(226,166,59,0.08) 50%,
        rgba(232,99,74,0.08) 75%,
        rgba(47,79,224,0.08) 100%);
    background-size: 400% 400%;
    animation: holo-float 7s ease-in-out infinite, holo-gradient 6s ease infinite;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 8px 32px rgba(47,79,224,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
    overflow: hidden;
}
.mv-3d-holo::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,0.15) 60deg, transparent 120deg, rgba(255,255,255,0.1) 180deg, transparent 240deg, rgba(255,255,255,0.12) 300deg, transparent 360deg);
    animation: holo-shine 4s linear infinite;
}
.mv-3d-holo::after {
    content: '\222B';
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    color: rgba(47,79,224,0.2);
    text-shadow: 0 0 20px rgba(47,79,224,0.15);
}

@keyframes holo-float { 0%, 100% { transform: translateY(0) rotateY(-8deg) rotateX(5deg); } 50% { transform: translateY(-20px) rotateY(8deg) rotateX(-5deg); } }
@keyframes holo-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes holo-shine { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- 3D Crystal --- */
.mv-3d-crystal {
    width: 70px; height: 90px;
    position: relative;
    transform-style: preserve-3d;
    animation: crystal-spin 12s linear infinite;
}
.mv-3d-crystal-face {
    position: absolute;
    width: 0; height: 0;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    transform-origin: bottom center;
}
.mv-3d-crystal-face:nth-child(1) { border-bottom: 60px solid rgba(47,79,224,0.1); transform: rotateY(0deg) translateZ(20px) rotateX(25deg); }
.mv-3d-crystal-face:nth-child(2) { border-bottom: 60px solid rgba(63,143,118,0.1); transform: rotateY(72deg) translateZ(20px) rotateX(25deg); }
.mv-3d-crystal-face:nth-child(3) { border-bottom: 60px solid rgba(226,166,59,0.1); transform: rotateY(144deg) translateZ(20px) rotateX(25deg); }
.mv-3d-crystal-face:nth-child(4) { border-bottom: 60px solid rgba(232,99,74,0.1); transform: rotateY(216deg) translateZ(20px) rotateX(25deg); }
.mv-3d-crystal-face:nth-child(5) { border-bottom: 60px solid rgba(47,79,224,0.08); transform: rotateY(288deg) translateZ(20px) rotateX(25deg); }
.mv-3d-crystal-glow {
    position: absolute;
    bottom: 0; left: 50%;
    width: 60px; height: 60px;
    margin-left: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47,79,224,0.15) 0%, transparent 70%);
    filter: blur(10px);
}
@keyframes crystal-spin { 0% { transform: rotateY(0deg) rotateX(-20deg); } 100% { transform: rotateY(360deg) rotateX(-20deg); } }

/* --- 3D Constellation --- */
.mv-3d-constellation {
    position: relative;
    width: 160px; height: 120px;
    animation: constellation-drift 10s ease-in-out infinite;
}
.mv-3d-star {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 8px rgba(47,79,224,0.5);
}
.mv-3d-star:nth-child(1) { top: 10%; left: 20%; animation: star-twinkle 2s ease-in-out infinite; }
.mv-3d-star:nth-child(2) { top: 30%; left: 65%; animation: star-twinkle 2s ease-in-out infinite 0.4s; background: var(--sage); box-shadow: 0 0 8px rgba(63,143,118,0.5); }
.mv-3d-star:nth-child(3) { top: 60%; left: 40%; animation: star-twinkle 2s ease-in-out infinite 0.8s; background: var(--amber); box-shadow: 0 0 8px rgba(226,166,59,0.5); }
.mv-3d-star:nth-child(4) { top: 80%; left: 80%; animation: star-twinkle 2s ease-in-out infinite 1.2s; }
.mv-3d-star:nth-child(5) { top: 45%; left: 10%; animation: star-twinkle 2s ease-in-out infinite 1.6s; background: var(--coral); box-shadow: 0 0 8px rgba(232,99,74,0.5); }

@keyframes constellation-drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-15px) rotate(3deg); } }
@keyframes star-twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.8); opacity: 0.5; } }

/* --- 3D Torus --- */
.mv-3d-torus {
    width: 100px; height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: torus-spin 10s linear infinite;
}
.mv-3d-torus-band {
    position: absolute;
    inset: 0;
    border: 8px solid transparent;
    border-radius: 50%;
}
.mv-3d-torus-band:nth-child(1) { border-top-color: rgba(47,79,224,0.25); border-right-color: rgba(47,79,224,0.15); transform: rotateX(70deg); }
.mv-3d-torus-band:nth-child(2) { border-bottom-color: rgba(63,143,118,0.2); border-left-color: rgba(63,143,118,0.1); transform: rotateX(70deg) rotateZ(45deg); }
.mv-3d-torus-band:nth-child(3) { border-top-color: rgba(226,166,59,0.15); transform: rotateX(70deg) rotateZ(90deg); }

@keyframes torus-spin { 0% { transform: rotateZ(0deg); } 100% { transform: rotateZ(360deg); } }

/* --- Floating Symbols & Equations --- */
.mv-3d-symbol { pointer-events: none; }
@keyframes float-symbol { 0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; } 50% { transform: translateY(-25px) rotate(5deg); opacity: 0.6; } }

/* --- Gradient Orbs --- */
.mv-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.5;
    animation: drift-orb 15s ease-in-out infinite;
}
@keyframes drift-orb { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.05); } 66% { transform: translate(-20px, 15px) scale(0.95); } }


/* ================================================================
   HEADER
   ================================================================ */
.cp-header {
    padding: 100px 24px 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cp-header-inner {
    max-width: 700px;
    margin: 0 auto;
}

.cp-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.cp-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.cp-last-updated {
    font-size: 0.85rem;
    color: var(--pencil-light);
    font-weight: 500;
}


/* ================================================================
   MAIN CONTENT
   ================================================================ */
.cp-main {
    position: relative;
    z-index: 1;
}

.cp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Intro */
.cp-intro {
    background: var(--paper-panel);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
}

.cp-intro-text {
    font-size: 0.95rem;
    color: var(--pencil);
    line-height: 1.8;
}


/* ================================================================
   CARDS GRID
   ================================================================ */
.cp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.cp-card {
    background: var(--paper-panel);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    transition: all 0.25s ease;
}

.cp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(11,15,31,0.1);
}

.cp-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.75rem 0;
}

.cp-section-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue);
    opacity: 0.3;
    line-height: 1;
    min-width: 40px;
}

.cp-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.cp-card-body {
    padding: 1rem 1.75rem 1.75rem;
}

.cp-section-intro {
    font-size: 0.9rem;
    color: var(--pencil);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.cp-section-intro:last-child {
    margin-bottom: 0;
}


/* ================================================================
   LISTS
   ================================================================ */
.cp-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cp-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--paper-dim);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.cp-list li:hover {
    background: var(--blue-glow);
}

.cp-list-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.cp-list-content {
    font-size: 0.85rem;
    color: var(--pencil);
    line-height: 1.6;
}

.cp-list-content strong {
    color: var(--ink);
    font-weight: 600;
}


/* ================================================================
   LINKS
   ================================================================ */
.cp-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}
.cp-link:hover {
    color: var(--blue-deep);
    border-bottom-color: var(--blue-deep);
}


/* ================================================================
   CONTACT CARD
   ================================================================ */
.cp-contact-card {
    border-left: 4px solid var(--sage);
}
.cp-contact-card .cp-card-header {
    padding-top: 1.5rem;
}


/* ================================================================
   RESPONSIVE — 768px
   ================================================================ */
@media (max-width: 768px) {
    .cp-header {
        padding: 80px 16px 28px;
    }

    .cp-container {
        padding: 0 16px;
    }

    .cp-intro {
        padding: 1.25rem 1.5rem;
    }

    .cp-card-header {
        padding: 1.25rem 1.25rem 0;
    }

    .cp-card-body {
        padding: 0.75rem 1.25rem 1.25rem;
    }

    .cp-list li {
        padding: 0.7rem 0.85rem;
    }

    .mv-3d-symbol { display: none; }
    .mv-3d-atom { width: 80px; height: 80px; }
    .mv-3d-atom-core { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
    .mv-3d-atom-orbit:nth-child(2) { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
    .mv-3d-atom-orbit:nth-child(3) { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
    .mv-3d-atom-orbit:nth-child(4) { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
    .mv-3d-globe { width: 90px; height: 90px; }
    .mv-3d-holo { width: 80px; height: 100px; }
    .mv-3d-crystal { width: 50px; height: 65px; }
    .mv-3d-crystal-face:nth-child(1) { border-left-width: 25px; border-right-width: 25px; border-bottom-width: 42px; }
    .mv-3d-crystal-face:nth-child(2) { border-left-width: 25px; border-right-width: 25px; border-bottom-width: 42px; }
    .mv-3d-crystal-face:nth-child(3) { border-left-width: 25px; border-right-width: 25px; border-bottom-width: 42px; }
    .mv-3d-crystal-face:nth-child(4) { border-left-width: 25px; border-right-width: 25px; border-bottom-width: 42px; }
    .mv-3d-crystal-face:nth-child(5) { border-left-width: 25px; border-right-width: 25px; border-bottom-width: 42px; }
    .mv-3d-torus { width: 65px; height: 65px; }
    .mv-3d-torus-band { border-width: 6px; }
}


/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .mv-3d-object, .mv-orb { animation: none !important; }
}
