/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent horizontal scroll on all elements */
*, *::before, *::after {
    max-width: 100%;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --text-color: #334155;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* Dark Mode Variables */
body.dark-mode {
    --dark-color: #f8fafc;
    --light-color: #0f172a;
    --text-color: #cbd5e1;
    --gray-color: #94a3b8;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

body.dark-mode .navbar {
    background-color: rgba(15, 23, 42, 0.95);
}

body.dark-mode .navbar.scrolled {
    background-color: #0f172a;
}

body.dark-mode .skill-bar {
    background-color: #1e293b;
}

body.dark-mode .project-card,
body.dark-mode .contact-form,
body.dark-mode .skill-category {
    background-color: #1e293b;
    border-color: #334155;
}

body.dark-mode .footer {
    background-color: #020617;
}

body.dark-mode input,
body.dark-mode textarea {
    background-color: #1e293b;
    color: var(--text-color);
    border-color: #334155;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748b;
}

body.dark-mode .student-avatar {
    box-shadow: 
        0 20px 60px rgba(37, 99, 235, 0.4),
        0 0 0 15px rgba(37, 99, 235, 0.15),
        0 0 0 30px rgba(124, 58, 237, 0.1);
}

body.dark-mode .student-avatar:hover {
    box-shadow: 
        0 25px 80px rgba(37, 99, 235, 0.5),
        0 0 0 15px rgba(37, 99, 235, 0.2),
        0 0 0 30px rgba(124, 58, 237, 0.15);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 80px; /* Account for fixed navbar */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section {
    padding: 80px 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.gradient-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.03) 0%,
        rgba(124, 58, 237, 0.03) 50%,
        rgba(6, 182, 212, 0.03) 100%
    );
    animation: gradientShift 15s ease infinite;
}

body.dark-mode .gradient-bg {
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.08) 0%,
        rgba(124, 58, 237, 0.08) 50%,
        rgba(6, 182, 212, 0.08) 100%
    );
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.15;
    animation: float-around 20s infinite ease-in-out;
}

body.dark-mode .shape {
    opacity: 0.08;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 20%;
    top: 20%;
    right: 15%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 15%;
    left: 20%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.shape-4 {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    top: 50%;
    right: 10%;
    animation-duration: 28s;
    animation-delay: -15s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    bottom: 20%;
    right: 25%;
    animation-duration: 32s;
    animation-delay: -20s;
}

.shape-6 {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 60%;
    left: 15%;
    animation-duration: 26s;
    animation-delay: -8s;
}

.shape-7 {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    top: 30%;
    left: 50%;
    animation-duration: 40s;
    animation-delay: -12s;
}

.shape-8 {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    bottom: 40%;
    right: 40%;
    animation-duration: 29s;
    animation-delay: -18s;
}

@keyframes float-around {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(30px, -50px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translate(-20px, -80px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translate(-50px, -30px) rotate(270deg) scale(1.05);
    }
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(20deg);
    }
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
    font-family: inherit;
}

.primary-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 20px rgba(37, 99, 235, 0.2);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
    will-change: transform;
}

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo-dot {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

body.dark-mode .theme-toggle {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body.dark-mode .theme-toggle:hover {
    background-color: var(--accent-color);
    color: #0f172a;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 100px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeInLeft 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-role {
    font-size: 1.8rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 350px;
    height: 350px;
    animation: float 6s ease-in-out infinite;
}

.student-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 
        0 20px 60px rgba(37, 99, 235, 0.3),
        0 0 0 15px rgba(37, 99, 235, 0.1),
        0 0 0 30px rgba(124, 58, 237, 0.05);
    z-index: 2;
    position: relative;
    overflow: hidden;
    padding: 8px;
    transition: var(--transition);
}

.student-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

.student-avatar:hover {
    transform: scale(1.02);
    box-shadow: 
        0 25px 80px rgba(37, 99, 235, 0.4),
        0 0 0 15px rgba(37, 99, 235, 0.15),
        0 0 0 30px rgba(124, 58, 237, 0.08);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.student-avatar:hover .profile-image {
    transform: scale(1.03);
    filter: brightness(1.05) contrast(1.05);
}

@keyframes shimmer {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.code-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.code-line {
    position: absolute;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
    animation: codeFlow 4s linear infinite;
}

.code-line:nth-child(1) {
    width: 120px;
    top: 20%;
    left: -50px;
    animation-delay: 0s;
}

.code-line:nth-child(2) {
    width: 90px;
    top: 40%;
    left: -30px;
    animation-delay: 1s;
}

.code-line:nth-child(3) {
    width: 150px;
    top: 60%;
    left: -70px;
    animation-delay: 2s;
}

.code-line:nth-child(4) {
    width: 80px;
    top: 80%;
    left: -40px;
    animation-delay: 3s;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
}

.image-frame {
    width: 100%;
    max-width: 400px;
    height: 400px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow);
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.tech-icons i {
    font-size: 3.5rem;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tech-icons i:hover {
    transform: translateY(-10px) scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Individual icon colors on hover */
.tech-icons .fa-python:hover {
    color: #3776ab;
    background-color: rgba(55, 118, 171, 0.2);
}

.tech-icons .fa-js-square:hover {
    color: #f7df1e;
    background-color: rgba(247, 223, 30, 0.2);
}

.tech-icons .fa-java:hover {
    color: #007396;
    background-color: rgba(0, 115, 150, 0.2);
}

.tech-icons .fa-cuttlefish:hover {
    color: #00599c;
    background-color: rgba(0, 89, 156, 0.2);
}

.tech-icons .fa-database:hover {
    color: #47a248;
    background-color: rgba(71, 162, 72, 0.2);
}

.tech-icons .fa-php:hover {
    color: #777bb4;
    background-color: rgba(119, 123, 180, 0.2);
}

.about-content {
    flex: 1;
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.about-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #ddd;
}

.detail-label {
    font-weight: 600;
    color: var(--dark-color);
}

.detail-value {
    color: var(--gray-color);
}

/* Skills Section */
.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.skill-category h3 i {
    color: var(--primary-color);
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    width: 120px;
    font-weight: 500;
}

.skill-bar {
    flex: 1;
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-percent {
    width: 50px;
    text-align: right;
    font-weight: 600;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.skill-tag {
    background-color: #e0f2fe;
    color: var(--primary-color);
    padding: 0.7rem 1.2rem;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(124, 58, 237, 0.85));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.1);
    filter: blur(2px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.project-content p {
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--secondary-color);
    gap: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: #24292e;
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.github-link:hover {
    background-color: #1a1e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.github-link i {
    font-size: 1.2rem;
}

body.dark-mode .github-link {
    background-color: #161b22;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .github-link:hover {
    background-color: #0d1117;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Contact Section */
.contact-container {
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background-color: #e0f2fe;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.contact-item h4 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.contact-item p {
    margin-bottom: 0;
    color: var(--gray-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: #e0f2fe;
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 20px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.footer-links {
    margin-top: 1.5rem;
}

.footer-links a {
    color: #cbd5e1;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Animations */
@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);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes codeFlow {
    0% {
        transform: translateX(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(400px) scale(1.2);
        opacity: 0;
    }
}

.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.animate-text:nth-child(1) { animation-delay: 0.2s; }
.animate-text:nth-child(2) { animation-delay: 0.4s; }
.animate-text:nth-child(3) { animation-delay: 0.6s; }
.animate-text:nth-child(4) { animation-delay: 0.8s; }
.animate-text:nth-child(5) { animation-delay: 1s; }

/* Responsive Design */
@media screen and (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
        gap: 2rem;
    }
    
    .hero-content {
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .projects-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Reduce background animation complexity on mobile */
    .shape-7,
    .shape-8 {
        display: none;
    }
    
    .shape {
        animation-duration: 20s !important;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 80px 0 2rem;
        z-index: 900;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    body.dark-mode .nav-menu {
        background-color: #1e293b;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-left: 0.5rem;
        z-index: 1001;
    }
    
    .hero {
        padding: 100px 15px 60px;
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-role {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 60px 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-details {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .project-tech {
        font-size: 0.85rem;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .hero {
        padding: 90px 10px 40px;
    }
    
    .section {
        padding: 40px 10px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-role {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .image-container {
        width: 280px;
        height: 280px;
    }
    
    .student-avatar {
        font-size: 6rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .project-card {
        margin: 0 5px;
    }
    
    .project-tech span {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .skill-name {
        width: 100px;
        font-size: 0.9rem;
    }
    
    /* Make tech icons grid 2 columns on mobile */
    .tech-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .tech-icons i {
        width: 65px;
        height: 65px;
        font-size: 2.8rem;
    }
    
    /* Further reduce shapes on small screens */
    .shape-4,
    .shape-5,
    .shape-6 {
        display: none;
    }
    
    .shape {
        opacity: 0.1;
    }
    
    body.dark-mode .shape {
        opacity: 0.05;
    }
}