@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Animated Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 0%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -3;
    pointer-events: none;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    25% {
        opacity: 0.8;
        transform: scale(1.1) rotate(1deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    75% {
        opacity: 0.9;
        transform: scale(1.05) rotate(-1deg);
    }
}

/* Floating Orbs */
body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: floatOrb1 20s ease-in-out infinite;
    z-index: -2;
    pointer-events: none;
}

@keyframes floatOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-100px, 100px) scale(1.1);
    }

    50% {
        transform: translate(-50px, 200px) scale(0.9);
    }

    75% {
        transform: translate(-150px, 50px) scale(1.05);
    }
}

/* Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Grid Pattern Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Second Floating Orb */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -2;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(168, 85, 247, 0.2);
    bottom: -200px;
    left: -200px;
    animation: floatOrb2 25s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.15);
    top: 50%;
    left: 50%;
    animation: floatOrb3 18s ease-in-out infinite;
}

@keyframes floatOrb2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(150px, -100px);
    }

    66% {
        transform: translate(50px, -150px);
    }
}

@keyframes floatOrb3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-30%, -70%) scale(1.2);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header/Hero Section */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

.hero-split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

@media (max-width: 1024px) {
    .hero-main-title {
        font-size: 3.2rem;
    }

    .hero-split {
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 100px 0 60px;
    }

    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3.5rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-action-btns {
        justify-content: center;
    }

    .hero-mini-socials {
        justify-content: center;
    }

    .hero-right {
        max-width: 450px;
        margin: 0 auto;
        order: -1;
    }

    .hero-main-title {
        font-size: 2.8rem;
    }
}

/* Left Content */
.hero-welcome {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
    animation: fadeInLeft 0.8s ease-out;
}

.hero-main-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    animation: fadeInLeft 1s ease-out;
    color: white;
    font-weight: 800;
}

.hero-main-title .highlight {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-job-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInLeft 1.2s ease-out;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 550px;
    margin-bottom: 3rem;
    animation: fadeInLeft 1.4s ease-out;
}

/* Buttons */
.hero-action-btns {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInLeft 1.6s ease-out;
}

.btn-work,
.btn-resume {
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-work {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-work:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn-resume {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn-resume:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Socials mini */
.hero-mini-socials {
    display: flex;
    gap: 2rem;
    animation: fadeInLeft 1.8s ease-out;
}

.hero-mini-socials a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.hero-mini-socials a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: var(--transition);
}

.hero-mini-socials a:hover {
    color: var(--primary-color);
}

.hero-mini-socials a:hover::after {
    width: 100%;
}

/* Right Content: Elegant Profile Card */
.elegant-profile-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    animation: fadeInRight 1s ease-out;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.card-top-info {
    margin-bottom: 2rem;
    text-align: left;
}

.card-top-info h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.card-top-info span {
    color: var(--text-secondary);
    font-size: 1rem;
}

.card-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.elegant-profile-card:hover .card-main-image img {
    transform: scale(1.05);
}

.image-overlay-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
}

.card-floating-footer {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    transition: var(--transition);
}

.elegant-profile-card:hover .card-floating-footer {
    transform: translateY(0);
}

.footer-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--primary-color);
}

.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.meta-name {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

.meta-status {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.footer-hire-btn {
    background: white;
    color: black;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
}

.footer-hire-btn:hover {
    background: var(--primary-color);
    color: white;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Projects Section */
.section-title {
    display: block;
    width: fit-content;
    margin: 0 auto 6rem;
    text-align: center;
    font-size: 2.2rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 3D Stage Carousel */
#projects {
    perspective: 2500px;
    padding: 120px 0 150px;
    /* Increased top gap with CV section */
    overflow: hidden;
    min-height: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.carousel-container {
    position: relative;
    width: 380px;
    height: 550px;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.projects-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.project-card {
    position: absolute;
    width: 380px;
    height: 550px;
    left: 0;
    top: 0;
    /* Use solid semi-transparent background - much faster than blur */
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    /* Remove CSS transitions on transform to prevent conflicts with JS animation loop */
    transition: box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    backface-visibility: hidden;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    /* Ensure hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

/* Specific styling for the card in focus */
.project-card.active {
    background: rgba(15, 23, 42, 0.4);
    /* Slightly darker for better readability */
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4),
        inset 0 0 20px rgba(99, 102, 241, 0.1);
    transform: translateZ(100px) scale(1.1);
    z-index: 10;
}

/* Dynamics handled by JS */

.project-card.active .project-img {
    filter: brightness(1.2);
}

/* Featured Badge Adjustment */
.featured-badge {
    position: absolute;
    top: -15px;
    right: auto;
    /* Reset right from previous definition */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    /* Keep z-index */
    text-transform: uppercase;
    /* Keep text-transform */
    letter-spacing: 1px;
    /* Keep letter-spacing */
}

/* Project Content Adjustments */
.project-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.project-img-container {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.15);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.project-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: var(--glass-border);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CV Showcase Section */
.cv-display-section {
    padding: 100px 0;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    /* Center the title and content */
}

.cv-showcase-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 4rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.cv-showcase-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(99, 102, 241, 0.2);
}

.cv-showcase-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.cv-card-inner {
    display: flex;
    flex-direction: column;
    /* Vertical layout for centering */
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.cv-visual {
    position: relative;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary-color);
}

.cv-status-pulse {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.cv-info h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cv-title-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.cv-badges {
    display: flex;
    justify-content: center;
    /* Center badges */
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.badge-item {
    font-size: 0.9rem;
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-btn-group {
    display: flex;
    justify-content: center;
    /* Center buttons */
    gap: 2rem;
    flex-wrap: wrap;
}

.cv-primary-btn,
.cv-secondary-btn {
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cv-primary-btn {
    background: var(--primary-color);
    color: white;
}

.cv-secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.cv-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .cv-card-inner {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .cv-btn-group {
        flex-direction: column;
        width: 100%;
    }

    .cv-primary-btn,
    .cv-secondary-btn {
        justify-content: center;
    }
}

.skills-section {
    padding: 100px 0;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 20px;
}

.skill-category {
    background: var(--bg-card);
    border: var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .hero-content {
        padding: 2rem 1.5rem;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem 0;
}

.nav-container {
    max-width: 1400px;
    /* Wider container */
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
}

.logo-modern-symbol {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-hex {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #22d3ee);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition);
}

.logo-a-mark {
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -1px;
    transform: translateY(-1px);
}

.logo-glow {
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, var(--primary-color), #22d3ee);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    opacity: 0.4;
    filter: blur(8px);
    z-index: 1;
    transition: var(--transition);
}

.logo-name-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #22d3ee;
    /* Unified color: Ali is Blue */
}

.logo-name-wrapper span {
    color: #22d3ee;
    /* Unified color: Aljamal is now also Blue */
    font-weight: 900;
}

.nav-logo:hover .logo-hex {
    transform: rotate(10deg) scale(1.1);
    background: linear-gradient(135deg, #22d3ee, var(--primary-color));
}

.nav-logo:hover .logo-glow {
    opacity: 0.7;
    transform: rotate(10deg) scale(1.2);
}

.title-icon {
    display: inline-block;
    animation: waveEmoji 2.5s infinite;
    margin-left: 10px;
    font-size: 2.5rem;
}

@keyframes waveEmoji {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

.nav-links {
    display: flex;
    gap: 3rem;
    /* More gap */
    align-items: center;
}

.nav-item {
    color: white;
    /* Brighter items */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    /* Bigger font */
    transition: var(--transition);
    position: relative;
    opacity: 0.8;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
    opacity: 1;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 10px;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hire-me-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.hire-me-btn:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.nav-btn-mobile {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .hire-me-btn {
        display: none;
    }

    .nav-btn-mobile {
        display: block;
        background: var(--primary-color);
        color: white;
        padding: 12px 40px;
        border-radius: 12px;
        text-decoration: none;
        font-weight: 700;
        margin-top: 1rem;
        width: 80%;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-item {
        font-size: 1.5rem;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Contact Section Styles */
.contact-section {
    padding: 100px 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: -1.5rem;
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    padding: 0 20px;
}

.contact-info-card,
.contact-form-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.info-header h3 {
    font-size: 1.5rem;
    color: white;
}

.info-details {
    margin: 2.5rem 0;
}

.info-item {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item .label {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item a,
.info-item span:not(.label) {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.info-item a:hover {
    color: var(--primary-color);
}

.contact-socials {
    display: flex;
    gap: 15px;
}

.social-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Form Styles */
.contact-form-card h3 {
    font-size: 1.6rem;
    color: white;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

.form-agreement {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.form-agreement input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-agreement label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.form-footer {
    display: flex;
    align-items: center;
    gap: 25px;
}

.send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.respond-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .send-btn {
        width: 100%;
    }
}

/* AI Chat Assistant Styles */
.ai-chat-wrapper {
    position: fixed;
    bottom: 40px;
    left: 40px;
    /* Positioned like in the image */
    z-index: 2000;
}

.chat-toggle {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chat-toggle:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.toggle-avatar,
.assistant-avatar,
.message-avatar {
    width: 35px;
    height: 35px;
    /* Copilot-inspired gradient */
    background: linear-gradient(135deg, #0078d4 0%, #a672f6 50%, #f7630c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(0, 120, 212, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-avatar img,
.assistant-avatar img,
.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-toggle span strong {
    color: var(--primary-color);
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 350px;
    background: #0b0f1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.3s ease;
}

.chat-window.active {
    display: flex;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.assistant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-text {
    display: flex;
    flex-direction: column;
}

.assistant-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

.assistant-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.close-chat {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.close-chat:hover {
    color: white;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.chat-input-area {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#chatFormInput {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 25px;
}

#chatFormInput input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

#chatFormInput button {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

#chatFormInput button:hover {
    transform: scale(1.1);
}

/* Typing Indicator Animation */
.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Footer (Revised to allow space for chat) */
@media (max-width: 768px) {
    .ai-chat-wrapper {
        bottom: 20px;
        left: 20px;
    }

    .chat-window {
        width: 300px;
        bottom: 55px;
    }
}

/* Tech Stack Scrolling Section */
.tech-stack-section {
    padding: 120px 0;
    overflow: hidden;
    background: transparent;
}

.tech-titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 70px;
}

.tech-label {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.tech-main-title {
    font-size: 2.8rem;
    color: white;
    font-weight: 800;
    margin: 15px 0 25px;
    position: relative;
    display: inline-block;
}

.tech-main-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.tech-underline {
    display: none;
}

.marquee-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    /* Edge Fade Effect for professional look */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee {
    display: flex;
    width: 100%;
    overflow: hidden;
    user-select: none;
}

.marquee-content {
    display: flex;
    gap: 3rem;
    flex-shrink: 0;
    min-width: 100%;
    justify-content: space-around;
    animation: scroll 60s linear infinite;
}

.marquee.reverse .marquee-content {
    animation-direction: reverse;
}

.tech-item {
    width: 90px;
    height: 90px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.tech-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.tech-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 1.5rem));
    }
}

@media (max-width: 768px) {
    .tech-stack-section {
        padding: 80px 0;
    }

    .tech-main-title {
        font-size: 2rem;
    }

    .tech-item {
        width: 70px;
        height: 70px;
        padding: 15px;
        border-radius: 18px;
    }

    .marquee-content {
        gap: 1.5rem;
    }

    @keyframes scroll {
        to {
            transform: translateX(calc(-50% - 0.75rem));
        }
    }
}

/* Main Footer Styles */
.main-footer {
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 120px 0 120px;
    /* Increased bottom space for AI bot */
    margin-top: 150px;
    /* More distance from previous section */
}

.footer-top {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 8rem;
    /* Increased spread */
    padding: 0 40px 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    display: inline-flex;
    /* Changed to inline-flex to match content width */
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    /* Increased to make room for line */
    position: relative;
    padding-bottom: 15px;
}

.footer-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Spans full width of the words */
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-logo i {
    color: var(--primary-color);
}

.footer-logo span {
    color: inherit;
}

.footer-description {
    line-height: 1.8;
    /* Increased line height for better readability */
    margin-bottom: 3rem;
    /* More space below description */
    font-size: 1.05rem;
}

.footer-social-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.social-link:hover {
    color: white;
}

.social-link.highlighted {
    color: var(--primary-color);
}

.footer-nav h4,
.footer-cta h4 {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    /* Huge margin for titles */
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
    /* Changed to inline-block to match text width */
}

.footer-nav h4::after,
.footer-cta h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    /* Positioned slightly lower */
    left: 0;
    width: 100%;
    /* Spans full width of the words */
    height: 4px;
    /* Thicker line */
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav ul a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav ul a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-cta p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    /* More space for CTA text */
    line-height: 1.7;
}

.footer-btn-group {
    display: flex;
    gap: 15px;
}

.footer-btn {
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-btn.primary {
    background: var(--primary-color);
    color: white;
}

.footer-btn.outline {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-btn:hover {
    transform: translateY(-3px);
}

.footer-btn.outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    max-width: 1300px;
    margin: 30px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.heart {
    color: #ef4444;
    display: inline-block;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.3);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 968px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        padding: 0 40px 60px;
    }

    .footer-bottom {
        padding: 0 40px;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .main-footer {
        padding: 80px 0 100px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 20px 40px;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 0 20px;
    }
}

/* --- NEW BENTO TECH STACK STYLE --- */
.tech-bento-section {
    padding: 120px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.bento-grid-container {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    padding: 0 40px;
}

.tech-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.group-header i {
    color: var(--primary-color);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
}

.bento-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.bento-card:hover::after {
    opacity: 0.15;
}

.bento-card img {
    width: 45px;
    height: 45px;
    transition: transform 0.4s ease;
}

.bento-card:hover img {
    transform: scale(1.15) rotate(5deg);
}

.bento-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.bento-card:hover span {
    color: white;
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 1rem;
    }

    .bento-grid-container {
        padding: 0 20px;
    }
}

/* --- THE GALAXY ORBIT STYLE --- */
.tech-galaxy-section {
    padding: 150px 0;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.galaxy-container {
    position: relative;
    height: 700px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.galaxy-core {
    width: 120px;
    height: 120px;
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.3);
    animation: pulseCore 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.galaxy-core i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.galaxy-core span {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

/* Orbit Rings */
.orbit {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Prevent blocking inner orbits */
}

.orbit-1 {
    width: 300px;
    height: 300px;
    animation: rotateGalaxy 30s linear infinite;
}

.orbit-2 {
    width: 500px;
    height: 500px;
    animation: rotateGalaxy 50s linear infinite reverse;
}

.orbit-3 {
    width: 700px;
    height: 700px;
    animation: rotateGalaxy 80s linear infinite;
}

.galaxy-item {
    position: absolute;
    width: 70px;
    height: 70px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    pointer-events: auto;
    /* Re-enable clicks for items */
    /* Reverse rotation to keep icon upright */
    animation: keepUpright var(--duration) linear infinite var(--direction);
}

.orbit-1 .galaxy-item {
    --duration: 30s;
    --direction: reverse;
}

.orbit-2 .galaxy-item {
    --duration: 50s;
    --direction: normal;
}

.orbit-3 .galaxy-item {
    --duration: 80s;
    --direction: reverse;
}

.galaxy-item:hover {
    transform: scale(1.3);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    z-index: 20;
}

/* Specific glow for Canva to make it pop */
.galaxy-item[data-name="Canva"]:hover {
    box-shadow: 0 0 25px rgba(0, 196, 204, 0.6);
    border-color: #00c4cc;
}

.galaxy-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tooltip on Hover */
.galaxy-item::before {
    content: attr(data-name);
    position: absolute;
    bottom: -30px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.galaxy-item:hover::before {
    opacity: 1;
    bottom: -40px;
}

@keyframes rotateGalaxy {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes keepUpright {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseCore {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 50px rgba(99, 102, 241, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 70px rgba(99, 102, 241, 0.5);
    }
}

/* --- Interactive Super Spin Mode --- */
.galaxy-container {
    transition: transform 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
}

.galaxy-container.super-spin {
    transform: rotateX(30deg) rotateY(-10deg) scale(0.9);
}

.galaxy-container.super-spin .orbit-1 {
    animation-duration: 5s;
    border-color: rgba(99, 102, 241, 0.3);
}

.galaxy-container.super-spin .orbit-2 {
    animation-duration: 8s;
    border-color: rgba(236, 72, 153, 0.3);
}

.galaxy-container.super-spin .orbit-3 {
    animation-duration: 12s;
    border-color: rgba(16, 185, 129, 0.3);
}

.galaxy-container.super-spin .galaxy-item {
    animation-duration: inherit !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.galaxy-core {
    cursor: pointer;
    transition: all 0.3s ease;
}

.galaxy-core:active {
    transform: scale(0.9);
}

.galaxy-core.active {
    background: var(--primary-color);
    box-shadow: 0 0 80px var(--primary-color);
}

/* Positioning Icons on Orbits */
.orbit-1 .galaxy-item:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 .galaxy-item:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
}

.orbit-1 .galaxy-item:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
}

.orbit-1 .galaxy-item:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
}

.orbit-2 .galaxy-item:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-2 .galaxy-item:nth-child(2) {
    top: 15%;
    right: 15%;
    transform: translate(50%, -50%);
}

.orbit-2 .galaxy-item:nth-child(3) {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
}

.orbit-2 .galaxy-item:nth-child(4) {
    bottom: 15%;
    right: 15%;
    transform: translate(50%, 50%);
}

.orbit-2 .galaxy-item:nth-child(5) {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
}

.orbit-2 .galaxy-item:nth-child(6) {
    bottom: 15%;
    left: 15%;
    transform: translate(-50%, 50%);
}

.orbit-2 .galaxy-item:nth-child(7) {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
}

.orbit-2 .galaxy-item:nth-child(8) {
    top: 15%;
    left: 15%;
    transform: translate(-50%, -50%);
}

.orbit-3 .galaxy-item:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-3 .galaxy-item:nth-child(2) {
    top: 15%;
    right: 15%;
    transform: translate(50%, -50%);
}

.orbit-3 .galaxy-item:nth-child(3) {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
}

.orbit-3 .galaxy-item:nth-child(4) {
    bottom: 15%;
    right: 15%;
    transform: translate(50%, 50%);
}

.orbit-3 .galaxy-item:nth-child(5) {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
}

.orbit-3 .galaxy-item:nth-child(6) {
    bottom: 15%;
    left: 15%;
    transform: translate(-50%, 50%);
}

.orbit-3 .galaxy-item:nth-child(7) {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
}

.orbit-3 .galaxy-item:nth-child(8) {
    top: 15%;
    left: 15%;
    transform: translate(-50%, -50%);
}

@media (max-width: 968px) {
    .galaxy-container {
        height: 500px;
        transform: scale(0.7);
    }

    .tech-galaxy-section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .galaxy-container {
        height: 400px;
        transform: scale(0.5);
    }
}