:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animation */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(20, 20, 30, 1), rgba(10, 10, 10, 1));
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fix for compatibility */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-contact {
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color) !important;
}

.btn-contact:hover {
    background: var(--primary-color);
    color: #fff !important;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    padding-top: 80px;
}

.hero-content {
    max-width: 600px;
}

.greeting {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Name Shimmer Effect */
.shimmer-text {
    background: linear-gradient(to right, #fff 20%, #7d7d7d 40%, #7d7d7d 60%, #fff 80%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 15px;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Typing Effect Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.tagline {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 30px;
    max-width: 450px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: #fff;
}

.btn-secondary:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.contact-preview {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #888;
}

.contact-preview a:hover {
    color: var(--secondary-color);
}

/* Hero Visual & Glassmorphism */
.hero-visual {
    position: relative;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    z-index: -1;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -50px;
    right: -50px;
    animation: moveBlob 10s infinite alternate;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    bottom: -50px;
    left: -50px;
    animation: moveBlob 8s infinite alternate-reverse;
}

@keyframes moveBlob {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    /* Faster transition for tilt */
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.card-glass:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.card-content-3d {
    transform: translateZ(20px);
}

.timeline-content.card-glass,
.skill-category,
.education-card {
    will-change: transform;
}

.profile-card-mockup {
    width: 350px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed static rotation to let JS handle it */
}

/* Enhanced 3D for Skills */
.skill-category:hover {
    transform: translateY(-5px) scale(1.02);
}

.tags span {
    /* Existing styles */
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #ddd;
    transition: all 0.3s ease;
    transform: translateZ(10px);
    /* Pop out effect */
}

.code-snippet {
    font-family: 'Fira Code', monospace;
    color: #ccc;
    font-size: 0.9rem;
}

.keyword {
    color: var(--primary-color);
}

.variable {
    color: var(--secondary-color);
}

.string {
    color: #a29bfe;
}

/* Sections Common */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #ccc;
}

.info-list {
    margin-top: 30px;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* Timeline/Experience */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 50px;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    left: 13px;
    top: 5px;
    z-index: 2;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 400;
    color: #bbb;
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 20px;
    color: #ccc;
    font-size: 0.95rem;
}

.timeline-content:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.08);
}

/* Education */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.education-card {
    position: relative;
    overflow: hidden;
}

.education-card:hover {
    transform: translateY(-5px);
}

.icon-bg {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.03);
    transform: rotate(15deg);
}

.year {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(108, 92, 231, 0.2);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.skill-category {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--secondary-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #ddd;
    transition: all 0.3s ease;
}

.tags span:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: black;
    padding: 60px 0 30px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer-content p {
    color: #888;
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.contact-item {
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item:hover {
    color: var(--primary-color);
}

.location {
    margin-bottom: 30px;
    color: #888;
}

.copyright {
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #222;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: black;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        margin-top: 40px;
    }

    .name {
        font-size: 2.8rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .contact-preview {
        justify-content: center;
        flex-direction: column;
        gap: 5px;
    }

    .separator {
        display: none;
    }

    .profile-card-mockup {
        width: 280px;
        height: 180px;
    }
}

/* WhatsApp Chat Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 400px;
    display: flex;
    flex-direction: column;
    padding: 0;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    overflow: hidden;
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: #075e54;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 16px 16px 0 0;
}

.chat-avatar {
    font-size: 2rem;
    color: #fff;
}

.chat-info h4 {
    font-size: 1rem;
    margin: 0;
    color: #fff;
}

.chat-info p {
    font-size: 0.8rem;
    color: #dcf8c6;
    margin: 0;
}

.chat-close {
    margin-left: auto;
    color: #fff;
    cursor: pointer;
}

.chat-body {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px;
    border-radius: 10px;
    position: relative;
    font-size: 0.9rem;
}

.message.received {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border-top-left-radius: 0;
}

.message .time {
    display: block;
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.chat-footer {
    padding: 10px;
    background: var(--glass-bg);
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--glass-border);
}

#whatsapp-input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#whatsapp-send {
    background: #25d366;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#whatsapp-send:hover {
    transform: scale(1.1);
}

/* 3D Globe Section */
.globe-section {
    min-height: 100vh;
    /* Take full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Remove padding as we are centering */
    overflow: hidden;
    position: relative;
    /* Context for absolute positioning if needed */
}

.globe-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    width: 100%;
}

.scene {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Central Globe */
.globe {
    position: absolute;
    width: 150px;
    height: 150px;
    transform-style: preserve-3d;
    animation: rotateGlobe 20s linear infinite;
}

.globe-sphere {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(108, 92, 231, 0.4), rgba(0, 0, 0, 0.8));
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.4), inset 0 0 20px rgba(108, 92, 231, 0.2);
    border: 1px solid rgba(108, 92, 231, 0.3);
}

/* Wireframe Rings */
.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 206, 201, 0.3);
    border-radius: 50%;
    transform-origin: center;
}

.ring:nth-child(2) {
    transform: translate(-50%, -50%) rotateX(60deg);
}

.ring:nth-child(3) {
    transform: translate(-50%, -50%) rotateY(60deg);
}

.ring:nth-child(4) {
    transform: translate(-50%, -50%) rotateX(-60deg);
}

/* Orbit System */
.orbit-system {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: orbitSpin 15s linear infinite;
}

.orbit-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    /* Slightly larger */
    height: 60px;
    margin: -30px;
    /* Center offset */
    background: rgba(255, 255, 255, 0.08);
    /* Darker background */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    /* Stack icon and text */
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
}

/* Label Styling */
.orbit-item span {
    display: block;
    font-size: 0.6rem;
    font-family: var(--font-body);
    margin-top: 2px;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 4px;
    border-radius: 4px;
}

/* Positioning in 3D Space */
.item-html {
    transform: rotateY(0deg) translateZ(180px);
}

.item-css {
    transform: rotateY(60deg) translateZ(180px);
}

.item-js {
    transform: rotateY(120deg) translateZ(180px);
}

.item-react {
    transform: rotateY(180deg) translateZ(180px);
}

.item-node {
    transform: rotateY(240deg) translateZ(180px);
}

.item-python {
    transform: rotateY(300deg) translateZ(180px);
}

/* Counter rotation to keep icons facing front */
.orbit-item i,
.orbit-item span {
    animation: counterSpin 15s linear infinite;
}

/* Animations */
@keyframes rotateGlobe {
    0% {
        transform: rotateX(0) rotateY(0);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes orbitSpin {
    0% {
        transform: rotateY(0);
    }

    100% {
        transform: rotateY(360deg);
    }
}

@keyframes counterSpin {
    0% {
        transform: rotateY(360deg);
    }

    100% {
        transform: rotateY(0);
    }
}

/* Specific Icon Colors */
.item-html {
    color: #e34c26;
    box-shadow: 0 0 15px rgba(227, 76, 38, 0.4);
}

.item-css {
    color: #264de4;
    box-shadow: 0 0 15px rgba(38, 77, 228, 0.4);
}

.item-js {
    color: #f7df1e;
    box-shadow: 0 0 15px rgba(247, 223, 30, 0.4);
}

.item-react {
    color: #61dafb;
    box-shadow: 0 0 15px rgba(97, 218, 251, 0.4);
}

.item-node {
    color: #339933;
    box-shadow: 0 0 15px rgba(51, 153, 51, 0.4);
}

.item-python {
    color: #3776ab;
    box-shadow: 0 0 15px rgba(55, 118, 171, 0.4);
}

/* Responsive Globe */
@media (max-width: 768px) {
    .scene {
        transform: scale(0.8);
    }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image {
    height: 200px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.9;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
    opacity: 1;
}

.project-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 10px;
    color: #fff;
}

.project-info p {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: #fff;
}

.btn-sm:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}