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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #8b5cf6;
    --accent: #0ea5e9;
    --text: #1e293b;
    --text-light: #64748b;
    --background: #f8fafc;
    --card: #ffffff;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-text: #e2e8f0;
    --dark-text-light: #94a3b8;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 10px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: var(--transition);
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

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

section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    animation: underlinePulse 2s infinite;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    margin: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

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

/* ===== STARLIGHT LOADER ===== */
#starlight-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars::before, .stars2::before, .stars3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px;
    animation: starsAnim 120s linear infinite;
}

.stars2::before {
    background-size: 100px 100px;
    opacity: 0.5;
    animation: starsAnim 80s linear infinite;
}

.stars3::before {
    background-size: 150px 150px;
    opacity: 0.3;
    animation: starsAnim 200s linear infinite;
}

@keyframes starsAnim {
    from { background-position: 0 0; }
    to { background-position: 1000px 1000px; }
}

.loading-text {
    color: white;
    font-size: 1.5rem;
    margin-top: 20px;
    position: relative;
    z-index: 10;
    text-align: center;
    animation: textGlow 2s infinite alternate;
}

/* ===== MAGIC TOGGLE BUTTON ===== */
#magic-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: var(--transition);
    animation: rotateSlow 20s linear infinite;
}

body.dark-mode #magic-toggle {
    background: var(--dark-card);
    color: var(--dark-text);
}

#magic-toggle:hover {
    animation: spin 0.5s linear;
}
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
    filter: blur(10px);
    animation: float 15s infinite ease-in-out;
    opacity: 0.7;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(10px) translateX(-20px); }
    75% { transform: translateY(-15px) translateX(-15px); }
}

/* ===== HEADER SECTION ===== */
.header {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.header-text {
    flex: 1;
    min-width: 300px;
}

.university-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: badgePulse 2s infinite;
}

body.dark-mode .university-badge {
    background: rgba(37, 99, 235, 0.2);
    color: var(--accent);
}

.title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-text {
    font-size: 1.8rem;
    min-height: 2.5rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-light);
}

body.dark-mode .typing-text {
    color: var(--dark-text-light);
}

.cursor {
    display: inline-block;
    width: 3px;
    margin-left: 4px;
    background: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--text-light);
}

body.dark-mode .subtitle {
    color: var(--dark-text-light);
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transform-origin: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.language-item:nth-child(1) { animation-delay: 0.4s; }
.language-item:nth-child(2) { animation-delay: 0.5s; }
.language-item:nth-child(3) { animation-delay: 0.6s; }
.language-item:nth-child(4) { animation-delay: 0.7s; }
.language-item:nth-child(5) { animation-delay: 0.8s; }
.language-item:nth-child(6) { animation-delay: 0.9s; }
.language-item:nth-child(7) { animation-delay: 1.0s; }
.language-item:nth-child(8) { animation-delay: 1.1s; }

.language-item:hover {
    animation: bounce 0.8s;
}

.language-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.language-icon:hover {
    transform: scale(1.2);
}

.fa-js { color: #f7df1e; }
.fa-react { color: #61dafb; }
.fa-node-js { color: #68a063; }
.fa-html5 { color: #e34f26; }
.fa-css3-alt { color: #264de4; }
.fa-python { color: #3776ab; }
.fa-database { color: #589636; }
.fa-fire { color: #ffa611; }

.header-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.header-image {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 1000px; /* Further increased width for a larger picture */
    max-width: 1000px; /* Adjusted max-width accordingly */
    aspect-ratio: 1 / 1; /* Ensures the picture remains square */
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #4e9af1, #8b5cf6);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    filter: grayscale(0%);
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
    height: 1000px; 
}

.profile-img:hover {
    transform: scale(2); /* Increased the scale for hover effect */
    opacity: 1;
    filter: brightness(1.2);
}

@keyframes moveSideways {
    0% { transform: translateX(0); }
    50% { transform: translateX(20px); }
    100% { transform: translateX(0); }
}

.profile-img {
    animation: moveSideways 3s infinite ease-in-out;
}


.floating-circle {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
}

.accent-circle {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.2;
    filter: blur(30px);
    top: 20%;
    left: 10%;
    animation: floatCircle 8s infinite ease-in-out;
}

.secondary-circle {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--secondary), #a855f7);
    opacity: 0.15;
    filter: blur(30px);
    bottom: 10%;
    right: 10%;
    animation: floatCircle 10s infinite ease-in-out;
}

@keyframes floatCircle {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -15px); }
    50% { transform: translate(-15px, 10px); }
    75% { transform: translate(5px, -10px); }
}

/* ===== ABOUT SECTION ===== */
.skill-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 30px;
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

body.dark-mode .skill-card {
    background: var(--dark-card);
}

.skill-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.skill-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.skill-card p {
    margin-bottom: 20px;
    color: var(--text-light);
}

body.dark-mode .skill-card p {
    color: var(--dark-text-light);
}

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

.skill-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
    animation: pulse 1s infinite;
}

body.dark-mode .skill-tag {
    background: rgba(37, 99, 235, 0.2);
    color: var(--accent);
}

/* ===== SKILLS SECTION ===== */
.skills-section .skill-card {
    margin-bottom: 25px;
}

.skill-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary);
}

body.dark-mode .skill-title {
    color: var(--accent);
}

.skill-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-section .skill-card {
    margin-bottom: 30px;
}

.experience-title {
    color: var(--text);
    margin-bottom: 5px;
}

body.dark-mode .experience-title {
    color: var(--dark-text);
}

.experience-company {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
}

body.dark-mode .experience-company {
    color: var(--dark-text-light);
}

.experience-dates {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.experience-details {
    padding-left: 20px;
}

.experience-details li {
    margin-bottom: 10px;
    color: var(--text-light);
    position: relative;
    padding-left: 20px;
}

.experience-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.5s infinite;
}

body.dark-mode .experience-details li {
    color: var(--dark-text-light);
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
    padding: 100px 0;
}

body.dark-mode .projects-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform: translateY(30px);
    opacity: 0;
}

.project-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.project-card:hover .project-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 15px;
}

body.dark-mode .project-description {
    color: var(--dark-text-light);
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

body.dark-mode .tech-tag {
    background: rgba(37, 99, 235, 0.2);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    display: flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.project-link i {
    margin-right: 5px;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

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

body.dark-mode .contact-content p {
    color: var(--dark-text-light);
}

.contact-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tech-pulse {
    position: relative;
    overflow: hidden;
}

.tech-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    animation: pulseBorder 2s infinite;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--card);
    padding: 50px 0 20px;
    text-align: center;
}

body.dark-mode .footer {
    background: var(--dark-card);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--background);
    color: var(--primary);
    font-size: 1.3rem;
    transition: var(--transition);
    animation: floatSocial 4s ease-in-out infinite;
}

body.dark-mode .social-link {
    background: var(--dark-bg);
    color: var(--accent);
}

.social-link:hover {
    animation: bounce 0.8s;
}

.footer p {
    margin: 10px 0;
    color: var(--text-light);
}

body.dark-mode .footer p {
    color: var(--dark-text-light);
}

/* ===== ANIMATIONS ===== */
.animate-delay-1 {
    animation-delay: 0.2s !important;
}

.animate-delay-2 {
    animation-delay: 0.4s !important;
}

.animate-delay-3 {
    animation-delay: 0.6s !important;
}

/* Animation Keyframes */
@keyframes floatProfile {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

@keyframes floatProfile {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
    100% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.8); }
}

@keyframes badgePulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes pulseBorder {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes underlinePulse {
    0% { width: 80px; }
    50% { width: 100px; }
    100% { width: 80px; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floatSocial {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes colorize {
    0% { filter: grayscale(100%); }
    100% { filter: grayscale(0%); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-cta {
        justify-content: center;
    }
    
    .language-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .title {
        font-size: 2.8rem;
    }
    
    .typing-text {
        font-size: 1.5rem;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 80%;
        max-width: 300px;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .typing-text {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .language-icon {
        font-size: 2rem;
    }
    
    section {
        padding: 70px 0;
    }
}