/* ============================================
   DARK PURPLE 3D PORTFOLIO - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-dark: #0a0612;
    --primary-purple: #1a0a2e;
    --accent-purple: #7b2cbf;
    --accent-light: #9d4edd;
    --accent-pink: #c77dff;
    --accent-cyan: #00d4ff;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d1;
    --glass-bg: rgba(26, 10, 46, 0.7);
    --glass-border: rgba(157, 78, 221, 0.3);
    --glow-purple: 0 0 30px rgba(123, 44, 191, 0.5);
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background: var(--primary-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Three.js Canvas Background */
#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Main Content Wrapper */
.main-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ============================================
   GLASSMORPHISM NAVBAR
   ============================================ */
.navbar-3d {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 6, 18, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glow-purple);
}

.navbar-3d .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-3d .brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-3d .brand-logo {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(123, 44, 191, 0.5));
}

.navbar-3d .brand-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.7));
}

.navbar-3d .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-3d .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-3d .nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-3d .nav-links a:hover {
    color: var(--text-primary);
    text-shadow: var(--glow-cyan);
}

.navbar-3d .nav-links a:hover::before {
    width: 80%;
}

.navbar-3d .nav-links a.active {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-purple);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Page Titles */
.page-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 10px rgba(123, 44, 191, 0.5)); }
    100% { filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5)); }
}

/* ============================================
   FLASHY NAME EFFECT
   ============================================ */
.flashy-name {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
}

.flashy-name .letter-wrap {
    display: flex;
    justify-content: center;
}

.flashy-name .letter {
    display: inline-block;
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(
        135deg,
        var(--accent-purple) 0%,
        var(--accent-pink) 25%,
        var(--accent-cyan) 50%,
        var(--accent-pink) 75%,
        var(--accent-purple) 100%
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: 
        letterWave 0.8s ease-in-out calc(var(--i) * 0.05s) infinite alternate,
        gradientShift 4s ease infinite,
        letterGlow 2s ease-in-out calc(var(--i) * 0.1s) infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 10px rgba(123, 44, 191, 0.5));
    transition: transform 0.3s ease;
}

.flashy-name .letter:hover {
    animation: letterPop 0.4s ease forwards, gradientShift 4s ease infinite;
    transform: scale(1.3) rotate(5deg);
}

.flashy-name .name-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        ellipse at center,
        rgba(123, 44, 191, 0.4) 0%,
        rgba(0, 212, 255, 0.2) 30%,
        transparent 70%
    );
    filter: blur(40px);
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.flashy-name .name-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.flashy-name .name-particles::before,
.flashy-name .name-particles::after {
    content: '✦';
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.flashy-name .name-particles::before {
    top: 10%;
    left: 5%;
    color: var(--accent-cyan);
    animation-delay: 0s;
}

.flashy-name .name-particles::after {
    bottom: 10%;
    right: 5%;
    color: var(--accent-pink);
    animation-delay: 1s;
}

@keyframes letterWave {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-8px) rotate(2deg);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes letterGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(123, 44, 191, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8)) drop-shadow(0 0 40px rgba(199, 125, 255, 0.5));
    }
}

@keyframes letterPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4) rotate(-5deg);
    }
    100% {
        transform: scale(1.2) rotate(3deg);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1) rotate(360deg);
    }
    75% {
        opacity: 1;
        transform: scale(1.3) rotate(540deg);
    }
}

/* Electric arc effect between letters on hover */
.flashy-name:hover .letter {
    animation: 
        electricPulse 0.15s ease-in-out calc(var(--i) * 0.03s) infinite,
        gradientShift 2s ease infinite;
}

@keyframes electricPulse {
    0%, 100% {
        transform: translateX(0) translateY(0);
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.9));
    }
    25% {
        transform: translateX(-2px) translateY(-1px);
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(199, 125, 255, 1)) drop-shadow(0 0 50px rgba(0, 212, 255, 0.8));
    }
    75% {
        transform: translateX(2px) translateY(1px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .flashy-name .letter {
        font-size: 2.5rem;
    }
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(157, 78, 221, 0.1), transparent);
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--glow-purple), var(--glow-cyan);
    border-color: var(--accent-purple);
}

/* ============================================
   CATEGORY FILTER
   ============================================ */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0;
    background: transparent;
    border: none;
}

.filter-btn {
    position: relative;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--accent-purple);
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink), var(--accent-cyan));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(123, 44, 191, 0.3);
}

.filter-btn:hover::before {
    opacity: 0.2;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    color: var(--text-primary);
    border-color: transparent;
    box-shadow: 
        0 5px 25px rgba(123, 44, 191, 0.5),
        0 0 40px rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

.filter-btn.active::before {
    opacity: 0;
}

.filter-btn.active:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 
        0 10px 35px rgba(123, 44, 191, 0.6),
        0 0 60px rgba(0, 212, 255, 0.4);
}

.filter-btn i {
    font-size: 1.1rem;
}

.no-projects-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.no-projects-message i {
    font-size: 4rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    display: block;
}

.no-projects-message p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .category-filter {
        gap: 0.6rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   3D FLIPPING PROJECT CARDS
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
    perspective: 2000px;
}

.flip-card {
    height: 450px;
    perspective: 2000px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.flip-card:hover {
    text-decoration: none;
    color: inherit;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

/* Front - Image Carousel */
.flip-card-front {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

/* Single thumbnail image */
.flip-card-front > .project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.flip-card-front .carousel-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.flip-card-front .carousel-images {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.flip-card-front .carousel-images img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-front .carousel-dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.flip-card-front .carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.flip-card-front .carousel-dots .dot.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.flip-card-front .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(10, 6, 18, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.flip-card-front .carousel-nav:hover {
    background: var(--accent-purple);
    box-shadow: var(--glow-purple);
}

.flip-card-front .carousel-nav.prev { left: 10px; }
.flip-card-front .carousel-nav.next { right: 10px; }

.flip-card-front .card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(10, 6, 18, 0.95));
}

.flip-card-front .card-title-overlay h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.flip-card-front .card-title-overlay .flip-hint {
    color: var(--accent-cyan);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Back - Project Info */
.flip-card-back {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.flip-card-back h3 {
    font-size: 1.6rem;
    color: var(--accent-pink);
    margin-bottom: 1rem;
    text-align: center;
}

.flip-card-back .project-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
    align-self: center;
}

.flip-card-back .project-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.flip-card-back .project-description::-webkit-scrollbar {
    width: 4px;
}

.flip-card-back .project-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.flip-card-back .project-description::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}

.flip-card-back .project-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-light));
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-3d:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-purple);
    color: var(--text-primary);
}

.btn-3d:hover::before {
    left: 100%;
}

.btn-3d-outline {
    background: transparent;
    border: 2px solid var(--accent-purple);
}

.btn-3d-outline:hover {
    background: var(--accent-purple);
}

.btn-3d-cyan {
    background: linear-gradient(135deg, #0077b6, var(--accent-cyan));
}

.btn-3d-cyan:hover {
    box-shadow: var(--glow-cyan);
}

.btn-3d-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-3d-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-3d-block {
    width: 100%;
}

/* ============================================
   HERO SECTION (Index)
   ============================================ */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero-section .hero-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-section .hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-section .hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Latest Projects Section */
.latest-projects {
    margin-top: 4rem;
}

.latest-projects .section-title {
    font-size: 2rem;
    color: var(--accent-pink);
    text-align: center;
    margin-bottom: 2rem;
}

/* ============================================
   TIMELINE (Journey)
   ============================================ */
.timeline-3d {
    position: relative;
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-3d::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan), var(--accent-purple));
    border-radius: 4px;
    box-shadow: var(--glow-purple);
}

.timeline-item-3d {
    position: relative;
    margin-bottom: 3rem;
    width: 45%;
    opacity: 1;
}

.timeline-item-3d:nth-child(odd) {
    margin-left: 5%;
}

.timeline-item-3d:nth-child(even) {
    margin-left: 50%;
}

.timeline-badge-3d {
    position: absolute;
    top: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
    box-shadow: var(--glow-purple);
}

.timeline-item-3d:nth-child(odd) .timeline-badge-3d {
    right: -80px;
}

.timeline-item-3d:nth-child(even) .timeline-badge-3d {
    left: -80px;
}

.timeline-badge-3d.purple { background: linear-gradient(135deg, var(--accent-purple), var(--accent-light)); }
.timeline-badge-3d.cyan { background: linear-gradient(135deg, #0077b6, var(--accent-cyan)); }
.timeline-badge-3d.pink { background: linear-gradient(135deg, #c77dff, #e0aaff); }

.timeline-content-3d {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s ease;
}

.timeline-content-3d:hover {
    transform: scale(1.03);
    box-shadow: var(--glow-purple);
    border-color: var(--accent-purple);
}

.timeline-content-3d h4 {
    color: var(--accent-pink);
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-content-3d .timeline-date {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.timeline-content-3d p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   ASPIRATIONS CARDS
   ============================================ */
.aspirations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.aspiration-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.aspiration-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--glow-purple), var(--glow-cyan);
}

.aspiration-card .card-header-3d {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aspiration-card .card-header-3d.career { background: linear-gradient(135deg, var(--accent-purple), var(--accent-light)); }
.aspiration-card .card-header-3d.education { background: linear-gradient(135deg, #0077b6, var(--accent-cyan)); }
.aspiration-card .card-header-3d.personal { background: linear-gradient(135deg, #c77dff, #e0aaff); }

.aspiration-card .card-header-3d h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0;
}

.aspiration-card .card-header-3d .icon {
    font-size: 2rem;
}

.aspiration-card .card-body-3d {
    padding: 1.5rem;
}

.aspiration-card .aspiration-list {
    list-style: none;
}

.aspiration-card .aspiration-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(157, 78, 221, 0.2);
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.aspiration-card .aspiration-list li:last-child {
    border-bottom: none;
}

.aspiration-card .aspiration-list li .check-icon {
    color: var(--accent-cyan);
    font-size: 1rem;
    margin-top: 2px;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-section {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--accent-pink);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(10, 6, 18, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

textarea.form-input {
    resize: vertical;
    min-height: 150px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.4rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-purple);
    box-shadow: var(--glow-purple);
    transform: translateY(-5px) scale(1.1);
    color: var(--text-primary);
}

/* ============================================
   ALERTS
   ============================================ */
.alert-3d {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-3d.success {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #00c853;
}

.alert-3d.error {
    background: rgba(255, 82, 82, 0.15);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: #ff5252;
}

/* ============================================
   PROJECT DETAIL PAGE
   ============================================ */
.project-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}

.project-carousel-large {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    max-width: 100%;
    z-index: 1;
    isolation: isolate;
    box-sizing: border-box;
}

.project-carousel-container {
    max-width: 100%;
    overflow: hidden;
}

.project-carousel-large .main-image {
    width: 100%;
    height: 450px;
    object-fit: contain;
    background: rgba(10, 6, 18, 0.5);
    transition: opacity 0.25s ease-in-out;
    max-width: 100%;
}

.project-carousel-large .main-image.fade {
    opacity: 0;
}

.project-carousel-large .carousel-controls {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 10;
}

.project-carousel-large .carousel-nav {
    width: 50px;
    height: 50px;
    background: rgba(10, 6, 18, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 11;
}

.project-carousel-large .carousel-nav:hover {
    background: var(--accent-purple);
    box-shadow: var(--glow-purple);
    transform: scale(1.1);
}

.project-carousel-large .carousel-nav:active {
    transform: scale(0.95);
}

.thumbnail-strip {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    max-width: 100%;
    flex-wrap: nowrap;
}

.thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 6px;
}

.thumbnail-strip img {
    width: 80px;
    min-width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-strip img:hover,
.thumbnail-strip img.active {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.project-info-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.project-info-panel h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    word-break: break-word;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(123, 44, 191, 0.2);
    border-radius: 20px;
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.project-description-full {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-3d {
    background: rgba(10, 6, 18, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-3d p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-3d .footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-3d .footer-links a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-3d .footer-links a:hover {
    color: var(--accent-pink);
    text-shadow: var(--glow-cyan);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-light), var(--accent-pink));
}

/* ============================================
   NO IMAGE PLACEHOLDER
   ============================================ */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
        margin-top: 3rem;
    }
    
    .project-carousel-large .main-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    /* Fix horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    .content-container {
        padding: 100px 1rem 2rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .project-detail-grid {
        gap: 1.5rem;
        margin-top: 4rem;
    }
    
    .project-carousel-large .main-image {
        height: 250px;
    }
    
    .project-carousel-large .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .project-info-panel {
        padding: 1.5rem;
    }
    
    .project-info-panel h1 {
        font-size: 1.6rem;
    }
    
    .thumbnail-strip img {
        width: 60px;
        min-width: 60px;
        height: 45px;
    }
    
    .thumbnail-strip {
        gap: 0.5rem;
    }
    
    .navbar-3d .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 6, 18, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .navbar-3d .nav-links.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .hero-section .hero-title {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-3d::before {
        left: 30px;
    }
    
    .timeline-item-3d,
    .timeline-item-3d:nth-child(odd),
    .timeline-item-3d:nth-child(even) {
        width: calc(100% - 70px);
        margin-left: 60px;
    }
    
    .timeline-item-3d:nth-child(odd) .timeline-badge-3d,
    .timeline-item-3d:nth-child(even) .timeline-badge-3d {
        left: -60px;
        right: auto;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .flip-card {
        height: 400px;
    }
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
    background: rgba(123, 44, 191, 0.2);
    color: var(--accent-pink);
}

.admin-table tr:hover {
    background: rgba(123, 44, 191, 0.1);
}

.admin-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
}

/* Center Button Container */
.center-buttons {
    text-align: center;
    margin-top: 3rem;
}

/* Next Section */
.next-section {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.next-section h3 {
    color: var(--accent-pink);
    margin-bottom: 1rem;
}

.next-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================
   THREE.JS 3D DEPTH ENHANCEMENTS
   ============================================ */

/* Flip card 3D wrapper */
.flip-card-3d-wrapper {
    position: relative;
    height: 450px;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.flip-card-3d-wrapper .flip-card {
    height: 100%;
}

.flip-card-3d-wrapper.is-hovered-3d {
    z-index: 10;
}

/* Glow effect on wrapper, not on flip-card */
.flip-card-3d-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, 
        var(--accent-purple) 0%, 
        var(--accent-cyan) 50%, 
        var(--accent-pink) 100%);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(10px);
}

.flip-card-3d-wrapper.is-hovered-3d::before {
    opacity: 0.7;
    animation: borderPulse 2s ease-in-out infinite;
}

/* Remove glow from flip-card itself to prevent bleed-through */
.flip-card.card-3d-target::before {
    display: none;
}

/* Depth indicator with corner glows */
.depth-indicator-3d {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    backface-visibility: hidden;
}

/* Hide depth indicators during flip animation */
.flip-card.flipped ~ .depth-indicator-3d,
.flip-card-3d-wrapper:has(.flip-card.flipped) .depth-indicator-3d {
    opacity: 0 !important;
}

.is-hovered-3d > .depth-indicator-3d,
.card-3d-target:hover > .depth-indicator-3d {
    opacity: 1;
}

.corner-glow {
    position: absolute;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    box-shadow: 0 0 25px var(--accent-cyan), 0 0 50px var(--accent-cyan);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.corner-glow.corner-tl {
    top: -5px;
    left: -5px;
    animation-delay: 0s;
}

.corner-glow.corner-tr {
    top: -5px;
    right: -5px;
    animation-delay: 0.4s;
}

.corner-glow.corner-bl {
    bottom: -5px;
    left: -5px;
    animation-delay: 0.8s;
}

.corner-glow.corner-br {
    bottom: -5px;
    right: -5px;
    animation-delay: 1.2s;
}

/* Edge glows */
.edge-glow {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-cyan), var(--accent-purple), transparent);
    opacity: 0.8;
}

.edge-glow.edge-top {
    top: -2px;
    left: 10%;
    right: 10%;
    height: 3px;
    animation: edgePulse 2s ease-in-out infinite;
}

.edge-glow.edge-bottom {
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 3px;
    animation: edgePulse 2s ease-in-out infinite 0.5s;
}

.edge-glow.edge-left {
    left: -2px;
    top: 10%;
    bottom: 10%;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--accent-purple), var(--accent-cyan), var(--accent-purple), transparent);
    animation: edgePulse 2s ease-in-out infinite 1s;
}

.edge-glow.edge-right {
    right: -2px;
    top: 10%;
    bottom: 10%;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--accent-purple), var(--accent-cyan), var(--accent-purple), transparent);
    animation: edgePulse 2s ease-in-out infinite 1.5s;
}

@keyframes edgePulse {
    0%, 100% {
        opacity: 0.4;
        filter: blur(1px);
    }
    50% {
        opacity: 1;
        filter: blur(0px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ============================================
   3D CARD TARGET BASE STYLES
   ============================================ */

/* 3D Target Cards - Enhanced depth */
.card-3d-target {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}

.card-3d-target::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, 
        var(--accent-purple) 0%, 
        var(--accent-light) 50%, 
        var(--accent-pink) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(10px);
}

.card-3d-target:hover::before,
.is-hovered-3d .card-3d-target::before {
    opacity: 0;
}

/* Enhanced shadow on hover */
.card-3d-target:hover,
.is-hovered-3d {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

@keyframes borderPulse {
    0%, 100% {
        filter: blur(10px);
        opacity: 0.5;
    }
    50% {
        filter: blur(15px);
        opacity: 0.8;
    }
}

/* ============================================
   SECTION 3D DECORATIONS
   ============================================ */
.section-3d-decorations {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-3d-shape {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--glass-border);
    opacity: 0.2;
    animation: float3D 8s ease-in-out infinite;
}

.floating-3d-shape.shape-1 {
    top: 10%;
    left: 5%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border-color: var(--accent-purple);
    animation-delay: 0s;
    transform: rotate3d(1, 1, 0, 45deg);
}

.floating-3d-shape.shape-2 {
    top: 20%;
    right: 8%;
    width: 60px;
    height: 60px;
    border-color: var(--accent-cyan);
    animation-delay: -2s;
    transform: rotate(45deg);
}

.floating-3d-shape.shape-3 {
    bottom: 30%;
    left: 10%;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border-color: var(--accent-pink);
    animation-delay: -4s;
    transform: rotate3d(1, 0, 1, 60deg);
}

.floating-3d-shape.shape-4 {
    bottom: 15%;
    right: 5%;
    width: 70px;
    height: 70px;
    border-radius: 50% 0 50% 0;
    border-color: var(--accent-light);
    animation-delay: -6s;
}

@keyframes float3D {
    0%, 100% {
        transform: translateY(0) rotate3d(1, 1, 1, 0deg);
    }
    25% {
        transform: translateY(-20px) rotate3d(1, 1, 1, 90deg);
    }
    50% {
        transform: translateY(-10px) rotate3d(1, 1, 1, 180deg);
    }
    75% {
        transform: translateY(-25px) rotate3d(1, 1, 1, 270deg);
    }
}

/* ============================================
   ENHANCED 3D CARD STYLES
   ============================================ */

/* Flip cards in 3D wrapper */
.flip-card-3d-wrapper .flip-card .flip-card-front,
.flip-card-3d-wrapper .flip-card .flip-card-back {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.flip-card-3d-wrapper.is-hovered-3d .flip-card .flip-card-front,
.flip-card-3d-wrapper.is-hovered-3d .flip-card .flip-card-back {
    box-shadow: 
        0 35px 70px -15px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 3D Aspiration Cards */
.aspiration-card.card-3d-target {
    transform-style: preserve-3d;
}

.aspiration-card.card-3d-target .card-header-3d {
    transform: translateZ(15px);
    transition: transform 0.3s ease;
}

.aspiration-card.card-3d-target .card-body-3d {
    transform: translateZ(10px);
    transition: transform 0.3s ease;
}

.aspiration-card.card-3d-target:hover .card-header-3d {
    transform: translateZ(30px);
}

.aspiration-card.card-3d-target:hover .card-body-3d {
    transform: translateZ(25px);
}

/* 3D Timeline Items */
.timeline-item-3d.card-3d-target {
    transform-style: preserve-3d;
}

.timeline-item-3d.card-3d-target .timeline-badge-3d {
    transform: translateZ(20px);
    transition: transform 0.3s ease;
}

.timeline-item-3d.card-3d-target .timeline-content-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateZ(10px);
}

.timeline-item-3d.card-3d-target:hover .timeline-badge-3d {
    transform: translateZ(40px) scale(1.1);
}

.timeline-item-3d.card-3d-target:hover .timeline-content-3d {
    transform: translateZ(30px) scale(1.02);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(123, 44, 191, 0.4);
}

/* 3D Contact Form Enhancement */
.contact-form.card-3d-target {
    transform-style: preserve-3d;
}

.contact-form.card-3d-target .form-group {
    transform: translateZ(5px);
    transition: transform 0.3s ease;
}

.contact-form.card-3d-target:hover .form-group {
    transform: translateZ(20px);
}

.contact-form.card-3d-target .btn-3d {
    transform: translateZ(15px);
    transition: transform 0.3s ease;
}

.contact-form.card-3d-target:hover .btn-3d {
    transform: translateZ(35px);
}

/* 3D Project Info Panel */
.project-info-panel.card-3d-target {
    transform-style: preserve-3d;
}

.project-info-panel.card-3d-target h1 {
    transform: translateZ(25px);
    transition: transform 0.3s ease;
}

.project-info-panel.card-3d-target:hover h1 {
    transform: translateZ(45px);
}

.project-info-panel.card-3d-target .project-meta {
    transform: translateZ(15px);
    transition: transform 0.3s ease;
}

.project-info-panel.card-3d-target:hover .project-meta {
    transform: translateZ(35px);
}

/* 3D Carousel Container */
.project-carousel-container.card-3d-target {
    transform-style: preserve-3d;
    isolation: isolate; /* Prevent 3D transforms from breaking z-index stacking */
    max-width: 100%;
    overflow: hidden;
}

.project-carousel-container.card-3d-target .main-image {
    transform: translateZ(15px);
    transition: transform 0.3s ease, opacity 0.3s ease-in-out;
}

.project-carousel-container.card-3d-target:hover .main-image {
    transform: translateZ(30px);
}

.project-carousel-container.card-3d-target .main-image.fade {
    opacity: 0;
}

.project-carousel-container.card-3d-target .carousel-controls {
    /* No translateZ to prevent breaking z-index stacking */
}

.project-carousel-container.card-3d-target .thumbnail-strip {
    transform: translateZ(10px);
    transition: transform 0.3s ease;
}

.project-carousel-container.card-3d-target:hover .thumbnail-strip {
    transform: translateZ(25px);
}