/* --- GLOBAL DEEP PURPLE THEME --- */
body {
    background-color: #0b0710 !important;
    color: #e0dced !important;
}

/* Override previous backgrounds */
.bg-light, .bg-light-alt, .bg-white, .card {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e0dced !important;
}

.text-dark, .text-muted {
    color: #a19bb5 !important;
}

/* --- TOP NAVBAR STYLES --- */
.navbar-nav .nav-link {
    color: #a19bb5 !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: #b388ff !important;
}

/* --- HERO SECTION: AVATAR & GLOW --- */
.avatar-glow-wrapper {
    width: 160px;
    height: 160px;
    z-index: 2;
}

/* The deep purple aura behind the head */
.avatar-glow-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(138,43,226,0.55) 0%, rgba(138,43,226,0.1) 40%, rgba(11,7,16,0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-avatar, .default-avatar-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    background-color: #1a102b;
}

/* --- HERO SECTION: GREETING & ARROW --- */
.greeting-element {
    top: -10px; 
    left: 110%; /* Anchors the start of the text to the outside right edge of the avatar */
    white-space: nowrap; /* Prevents the text from wrapping and falling back over the image */
    z-index: 10;
}
.text-purple {
    color: #b388ff !important;
}

/* --- HERO SECTION: HAND-DRAWN CIRCLE --- */
.circled-word {
    display: inline-block;
    padding: 0 5px;
    z-index: 2;
}

/* Creates the tilted oval ring */
.circled-word::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-4deg);
    width: 115%;
    height: 140%;
    border: 2px solid #b388ff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(138,43,226,0.3);
    pointer-events: none;
    z-index: -1;
}

/* Mobile Adjustments for Hero */
@media (max-width: 767.98px) {
    .hero-section {
        text-align: center;
    }
    .hero-bio-container p {
        margin-left: auto;
        margin-right: auto;
    }
    .d-flex.gap-3 {
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(11, 7, 16, 0.95);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.05);
        margin-top: 15px;
    }
}

/* --- ORBITAL SKILL SECTION --- */
.skill-orbit-section {
    position: relative;
    padding: 100px 0;
    /* Replicates the deep glowing background */
    background: radial-gradient(circle at 50% 50%, #3a1c71 0%, #170d2b 40%, #0b0710 80%);
    overflow: hidden;
}

.orbit-container {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

/* The central glowing logo */
.center-orb {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 0 40px 10px rgba(138, 43, 226, 0.6), inset 0 0 20px rgba(138, 43, 226, 0.8);
    text-shadow: 0 0 10px #fff;
}

/* Orbital Rings */
.orbit {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: spin linear infinite;
    transform-origin: center;
}

.orbit-inner { width: 250px; height: 250px; animation-duration: 25s; }
.orbit-middle { width: 400px; height: 400px; animation-duration: 35s; animation-direction: reverse; }
.orbit-outer { width: 550px; height: 550px; animation-duration: 50s; }

/* The icons on the rings */
.skill-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 45px;
    height: 45px;
    background: #1a102b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    
    /* Pushes the node out to the edge of the ring */
    margin-top: -22.5px;
    margin-left: -22.5px;
    transform: rotate(var(--angle)) translate(calc(var(--orbit-size) / 2)) rotate(calc(var(--angle) * -1));
}

.orbit-inner .skill-node { --orbit-size: 250px; }
.orbit-middle .skill-node { --orbit-size: 400px; }
.orbit-outer .skill-node { --orbit-size: 550px; }

/* Counter-rotation so icons stay upright while spinning */
.skill-node i {
    animation: counter-spin linear infinite;
}
.orbit-inner .skill-node i { animation-duration: 25s; }
.orbit-middle .skill-node i { animation-duration: 35s; animation-direction: reverse; }
.orbit-outer .skill-node i { animation-duration: 50s; }

/* --- NEON CARD STYLES (Experience, Education, Certifications) --- */
.neon-card {
    background: linear-gradient(145deg, #241442 0%, #110820 100%);
    border: 2px solid transparent; /* Transparent by default for hover transition */
    border-radius: 16px;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    height: 100%;
    cursor: default;
}

/* Replicates the bright blue border on hover from the image */
.neon-card:hover {
    border-color: #00d2ff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.15), inset 0 0 10px rgba(0, 210, 255, 0.05);
    transform: translateY(-5px);
}

.neon-icon-wrapper {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(138,43,226,0.15) 0%, rgba(0,0,0,0) 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 25px;
}

/* Adds a 3D-like glow to the bootstrap icons */
.neon-icon-wrapper i {
    font-size: 3.5rem;
    color: #b388ff;
    filter: drop-shadow(0 0 15px rgba(179, 136, 255, 0.6));
}

.neon-card-content {
    flex-grow: 1;
}

.neon-card-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.neon-card-subtitle {
    color: #a19bb5;
    font-size: 0.85rem;
    margin-bottom: 0; /* Removed bottom margin since buttons are gone in most cards */
    line-height: 1.6;
    white-space: pre-line; /* Preserves line breaks in job responsibilities */
}

/* Certificate Thumbnail Wrapper - STRICT LOCK */
.neon-icon-wrapper.has-image {
    background: transparent;
    padding: 0; 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    
    /* NEW: Force strict dimensions so massive images can't break the layout */
    width: 140px !important; 
    height: 100px !important;
    flex-shrink: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Certificate Thumbnail Image */
.neon-cert-thumb {
    width: 100%;
    height: 100%;
    /* Use 'cover' for uniform edge-to-edge thumbnails, or 'contain' if you want to see the whole cert without cropping */
    object-fit: cover; 
    border-radius: 8px; 
    max-width: 100%;
    display: block;
}
/* --- CERTIFICATE THUMBNAIL CLICK EFFECTS --- */
.neon-cert-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 8px; 
    max-width: 100%;
    display: block;
    cursor: pointer; /* Shows the click hand */
    transition: transform 0.3s ease;
}

.neon-cert-thumb:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}
/* "LEARN MORE" Button Style */
.neon-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0dced;
    border-radius: 20px;
    padding: 6px 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.neon-card:hover .neon-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: #b388ff;
    color: #fff;
}
/* --- PROJECT SHOWCASE SECTION --- */
.project-row {
    margin-bottom: 120px !important;
}

.project-overline {
    color: #b388ff; /* Vibrant purple accent matching the image */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.project-title {
    font-size: 2.2rem;
}

.project-img-wrapper {
    transition: transform 0.3s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #1a102b; /* Fallback color */
}

.project-img-wrapper:hover {
    transform: scale(1.02);
}

.project-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/10;
    display: block;
}

/* The Glassmorphism Description Box */
.project-glass-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* --- OVERLAP LOGIC (Desktop Only) --- */
@media (min-width: 768px) {
    /* If text is on the LEFT, pull it into the right image */
    .project-content-col.order-md-1 .project-glass-box {
        margin-right: -80px; 
    }
    
    /* If text is on the RIGHT, pull it into the left image */
    .project-content-col.order-md-2 .project-glass-box {
        margin-left: -80px;
    }
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 767.98px) {
    .project-row {
        margin-bottom: 60px !important;
    }
    
    /* On mobile, force image on top, text on bottom regardless of alternating logic */
    .project-content-col {
        order: 2 !important;
        text-align: left !important;
        margin-top: -30px; /* Pull text slightly up over the image on mobile */
    }
    
    .project-img-col {
        order: 1 !important;
    }
    
    .project-content-col .d-flex {
        justify-content: flex-start !important;
    }
}

/* --- PROJECT MODAL DARK THEME --- */
#projectDetailsModal .modal-content {
    background: linear-gradient(145deg, #1a102b 0%, #0b0710 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

/* Darken the left half where the image carousel sits */
#projectDetailsModal .bg-light {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Fix Text Colors */
#projectDetailsModal h2,
#projectDetailsModal .border-bottom {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

#projectDetailsModal #modal-tech,
#projectDetailsModal #modal-description {
    color: #a19bb5 !important;
}

#projectDetailsModal .text-muted {
    color: #8c85a6 !important;
}

/* Close Button Customization */
#projectDetailsModal .btn-close {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Inverts the default black Bootstrap 'X' into white */
    filter: invert(1) brightness(200%); 
    opacity: 0.8;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#projectDetailsModal .btn-close:hover {
    background-color: rgba(138, 43, 226, 0.8) !important;
    opacity: 1;
    transform: rotate(90deg);
}

/* Modal Bottom Buttons (GitHub, Live Link) */
#projectDetailsModal .btn-dark {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e0dced !important;
}

#projectDetailsModal .btn-dark:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Carousel Controls */
#projectDetailsModal .carousel-control-prev-icon,
#projectDetailsModal .carousel-control-next-icon {
    background-color: rgba(138, 43, 226, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}


/* Animation Keyframes */
@keyframes spin {
    100% { transform: rotate(360deg); }
}
@keyframes counter-spin {
    100% { transform: rotate(-360deg); }
}

/* Make it responsive */
@media (max-width: 768px) {
    .orbit-container { height: 400px; transform: scale(0.6); }
}