/* --- CSS Variables --- */
:root {
    --primary-blue: #2563EB;
    --primary-blue-dark: #1e40af;
    --primary-blue-gradient: linear-gradient(135deg, #2563EB 0%, #9333ea 100%);
    --secondary-purple: #9333ea;
    --background-dark: #0a0f18;
    --card-background: rgba(255, 255, 255, 0.05);
    --glassmorphism-blur: 10px;
    --glassmorphism-border-color: rgba(255, 255, 255, 0.1);
    --text-color-light: #e0e0e0;
    --text-color-dark: #a0a0a0;
    --hover-glow: 0 0 20px rgba(37, 99, 235, 0.7);
    --animation-duration-fast: 0.3s;
    --animation-duration-medium: 0.5s;
    --animation-duration-slow: 1s;
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-dark);
    color: var(--text-color-light);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

.section {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.glassmorphism-card {
    background: var(--card-background);
    backdrop-filter: blur(var(--glassmorphism-blur));
    -webkit-backdrop-filter: blur(var(--glassmorphism-blur));
    border-radius: 15px;
    border: 1px solid var(--glassmorphism-border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform var(--animation-duration-fast) ease-out, box-shadow var(--animation-duration-fast) ease-out;
}

.glassmorphism-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--animation-duration-medium) cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: var(--text-color-light);
}

.btn-primary {
    background: var(--primary-blue-gradient);
    color: var(--text-color-light);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #6b21a8 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--text-color-light);
    transform: translateY(-3px);
}

.btn-link {
    background: transparent;
    color: var(--primary-blue);
    border: none;
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: #fff;
    background: var(--primary-blue);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
}

/* --- Progress Bars --- */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-blue-gradient);
    border-radius: 5px;
    animation: fillProgress var(--animation-duration-slow) forwards ease-out;
}

/* --- Cursor Glow Effect --- */
#cursor-glow {
    position: fixed;
    width: 30px;
    height: 30px;
    background: rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    filter: blur(15px);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

body.cursor-active #cursor-glow {
    opacity: 1;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* --- Background Animations --- */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.animated-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(147, 51, 230, 0.1) 10%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.05) 5%, transparent 45%);
    animation: moveBlobs var(--animation-duration-slow) infinite alternate ease-in-out;
}

.shimmer-rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shimmer-rain-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05) 5%, transparent 15%);
    background-size: 100% 50px; /* Adjust for density */
    animation: shimmerRain 5s linear infinite;
    opacity: 0.8;
}

.shimmer-rain-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 10px);
    animation: fall 10s linear infinite;
    opacity: 0.5;
}

.floating-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-particles-container::before,
.floating-particles-container::after {
    content: '';
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 50%);
    border-radius: 50%;
    animation: float var(--animation-duration-slow) infinite ease-in-out alternate;
}

.floating-particles-container::before {
    width: 20px;
    height: 20px;
    top: 10%;
    left: 30%;
    animation-duration: 6s;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0) 50%);
}

.floating-particles-container::after {
    width: 30px;
    height: 30px;
    top: 70%;
    left: 70%;
    animation-duration: 7s;
    background: radial-gradient(circle, rgba(147, 51, 230, 0.2) 0%, rgba(147, 51, 230, 0) 50%);
}

/* --- Navigation Bar --- */
.navbar {
    background: var(--card-background);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glassmorphism-border-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    color: var(--text-color-light);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--primary-blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu ul {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-link {
    color: var(--text-color-light);
    font-weight: 500;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all var(--animation-duration-medium) cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.nav-link:hover {
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--hover-glow);
}

/* Active section indicator */
.nav-link.active {
    color: var(--primary-blue);
    font-weight: 700;
    background: rgba(37, 99, 235, 0.15);
    box-shadow: var(--hover-glow);
}

/* Bubble Animation on Click */
.bubble-animation {
    position: absolute;
    background: rgba(37, 99, 235, 0.5);
    border-radius: 50%;
    animation: bubbleExpand 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--text-color-light);
    margin: 5px auto;
    transition: all var(--animation-duration-medium) ease-in-out;
}

/* --- Hero Section --- */
.hero-section {
    flex-direction: column;
    justify-content: space-around;
    text-align: center;
    padding-top: 150px; /* Space for fixed navbar */
}

.hero-content {
    max-width: 700px;
    margin-bottom: 40px;
    text-align: center;
    animation: fadeIn var(--animation-duration-medium) forwards;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    background: var(--primary-blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.8rem;
    color: var(--text-color-light);
    margin-bottom: 25px;
    font-weight: 500;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.profile-photo-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-box {
    width: 300px;
    height: 350px;
    padding: 8px;
    background: linear-gradient(135deg, #00bfff, #0066ff);
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(0, 102, 255, 0.5);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.profile-box {
    width: 300px;
    height: 350px;
    padding: 8px;
    background: linear-gradient(135deg, #00bfff, #0066ff);
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(0, 102, 255, 0.5);
    transition: all 0.4s ease;
}

.profile-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 102, 255, 0.7);
}
/* --- About Me Section --- */
.about-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    animation: slideInLeft var(--animation-duration-medium) forwards;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    margin-bottom: 15px;
}

.timeline-container {
    flex: 1.5;
    min-width: 300px;
    max-width: 650px;
    animation: slideInRight var(--animation-duration-medium) forwards;
}

.timeline-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    background: var(--primary-blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--primary-blue);
    opacity: 0.3;
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
    padding: 0 30px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 0; /* Overwrite padding from general item */
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 0; /* Overwrite padding from general item */
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-blue);
    top: 15px;
    right: -7px; /* Position on the line */
    border: 3px solid var(--card-background);
    box-shadow: var(--hover-glow);
}

.timeline-item:nth-child(odd)::before {
    right: -7px;
}

.timeline-item:nth-child(even)::before {
    left: -7px; /* Position on the line for even items */
    right: auto;
}

.timeline-content {
    background-color: var(--card-background);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeInUp var(--animation-duration-medium) forwards;
    transform: translateY(20px); /* Initial slight shift for fade-in */
    opacity: 0;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 60px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 60px;
}

.timeline-content h4 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-color-dark);
}

.timeline-content .progress-bar-container {
    margin-top: 15px;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.skill-card {
    text-align: center;
    padding: 30px 20px;
    cursor: pointer;
    transition: transform var(--animation-duration-fast) ease, box-shadow var(--animation-duration-fast) ease, filter var(--animation-duration-fast) ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skill-card:hover {
    transform: perspective(1000px) rotateY(5deg) scale(1.03);
    box-shadow: 0 20px 5
