/* ===== FONT IMPORTS ===== */
@import url("https://fonts.cdnfonts.com/css/devil-breeze");
@import url("https://fonts.cdnfonts.com/css/poppins");

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* ===== BODY STYLES ===== */
body {
    margin: 0;
    background-color: #1b1b1b;
    color: #eef8ce;
    overflow-x: hidden;
    padding-left: 78px;
    transition: all 0.5s ease;
    width: 100%;
}

body.sidebar-open {
    padding-left: 250px;
}




/* ===== Custom Mouse Cursor ===== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(209, 255, 72, 0.7);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(209, 255, 72, 0.4);
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease;
    mix-blend-mode: difference;
}

/* Hide default cursor on computers */
@media (min-width: 769px) {
    * {
        cursor: none;
    }
}

/* Hide custom cursor on mobile devices */
@media (max-width: 768px) {
    .custom-cursor,
    .custom-cursor-follower {
        display: none;
    }
    
    * {
        cursor: auto;
    }
}

/* Interactive cursor effects */
a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
.project-card:hover ~ .custom-cursor,
.service-card:hover ~ .custom-cursor,
.book-card:hover ~ .custom-cursor {
    transform: scale(1.5);
    background: rgba(209, 255, 72, 0.9);
}

a:hover ~ .custom-cursor-follower,
button:hover ~ .custom-cursor-follower,
.project-card:hover ~ .custom-cursor-follower,
.service-card:hover ~ .custom-cursor-follower,
.book-card:hover ~ .custom-cursor-follower {
    transform: scale(0.8);
    border-color: rgba(209, 255, 72, 0.8);
}

/* ===== Text Selection Styling ===== */
::selection {
    background: rgba(209, 255, 72, 0.3);
    color: #eef8ce;
    text-shadow: none;
}

::-moz-selection {
    background: rgba(209, 255, 72, 0.3);
    color: #eef8ce;
    text-shadow: none;
}


/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1b1b1b;
}

::-webkit-scrollbar-thumb {
    background: #d1ff48;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a3d936;
}

/* ===== TOP LINKS STYLES ===== */
.top-links {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
    background: rgba(27, 27, 27, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 30px;
    border: 1px solid rgba(238, 248, 206, 0.1);
}

a {
    text-decoration: none;
}

.social-link {
    color: #eef8ce;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: #d1ff48;
    transform: translateY(-3px);
    background: rgba(209, 255, 72, 0.1);
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 78px;
    background: #1b1b1b;
    padding: 6px 14px;
    z-index: 100;
    transition: all 0.5s ease;
    border-right: 1px solid rgba(238, 248, 206, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar.open {
    width: 250px;
}

.sidebar img {
    height: 50px;
}

.sidebar .logo-details {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.sidebar .logo-details .logo_name {
    color: #eef8ce;
    font-size: 20px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.5s ease;
}

.sidebar.open .logo-details .logo_name {
    opacity: 1;
}

.sidebar .logo-details #btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-size: 22px;
    color: #eef8ce;
    cursor: pointer;
    transition: all 0.5s ease;
}

.sidebar i {
    color: #eef8ce;
    height: 60px;
    min-width: 50px;
    font-size: 28px;
    text-align: center;
    line-height: 60px;
}

.sidebar .nav-list {
    margin-top: 20px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

.sidebar li {
    position: relative;
    margin: 8px 0;
    list-style: none;
}

.sidebar li a {
    display: flex;
    height: 50px;
    width: 100%;
    border-radius: 12px;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s ease;
    background: transparent;
    color: #eef8ce;
}

.sidebar li a:hover {
    background: rgba(209, 255, 72, 0.1);
    color: #d1ff48;
}

/* ===== SECTION STYLES ===== */
.section {
    position: relative;
    width: 100%;
    transition: all 0.5s ease;
    margin-bottom: 200px;
    padding: 0 20px;
    max-width: 100%;
}

body.sidebar-open .section {
    width: 100%;
}

/* ===== HEADER ADJUSTMENTS ===== */
header {
    left: 78px;
    width: calc(100% - 78px);
    transition: all 0.5s ease;
}

body.sidebar-open header {
    left: 250px;
    width: calc(100% - 250px);
}

/* ===== HOME SECTION - REDESIGNED ===== */
#home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1b1b1b;
    overflow: hidden;
    padding: 0;
    border-bottom: 1px solid rgba(238, 248, 206, 0.1);
    width: 100%;
    max-width: 100%;
}

.hero-text{
    font-family: "devil breeze";
}

.home-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}

.home-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.bg-circle-1 {
    top: 10%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: rgba(209, 255, 72, 0.2);
}

.bg-circle-2 {
    bottom: 10%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: rgb(209, 255, 72);
}

.home-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 1400px;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-sizing: border-box;
}

.home-left,
.home-center,
.home-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-left {
    align-items: flex-start;
}

.home-right {
    align-items: flex-end;
}

.home-greeting {
    color: #d1ff48;
    font-size: 3.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: "Poppins", sans-serif;
}

.home-name {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: "devil breeze", sans-serif;
}

.home-role {
    color: #d1ff48;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: "Poppins", sans-serif;
}

.home-specialization {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: "devil breeze", sans-serif;
    text-align: right;
}

.home-social-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.home-social-links .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
    border: 1px solid rgba(238, 248, 206, 0.2);
    background: rgba(27, 27, 27, 0.5);
    backdrop-filter: blur(10px);
}

/* ===== PROFILE IMAGE CONTAINER ===== */
.profile-image-container {
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(209, 255, 72, 0.15);
    border-radius: 0;
    filter: blur(40px);
    opacity: 0.6;
    z-index: 1;
    transform: scale(0.95);
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    border: none;
    position: relative;
    z-index: 2;
    box-shadow: none;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
}

.profile-image:hover {
    transform: scale(1.02);
}

.profile-image:hover ~ .profile-image-shadow {
    opacity: 0.8;
    filter: blur(50px);
    transform: scale(1);
}

.home-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(209, 255, 72, 0.1);
    color: #d1ff48;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(209, 255, 72, 0.3);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

.home-resume-btn:hover {
    background: rgba(209, 255, 72, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(209, 255, 72, 0.2);
}

/* ===== CTA BUTTON STYLES ===== */
.cta-button {
    display: inline-block;
    background-color: transparent;
    color: #d1ff48;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 3rem;
    border: 2px solid #d1ff48;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(209, 255, 72, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.cta-button:hover {
    color: #1b1b1b;
    background-color: #d1ff48;
    box-shadow: 0 0 20px rgba(209, 255, 72, 0.4);
    transform: translateY(-3px);
}

.cta-button:hover::before {
    left: 100%;
}

/* ===== SCROLL DOWN INDICATOR ===== */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #eef8ce;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-down:hover {
    opacity: 1;
    color: #d1ff48;
}

.scroll-down .arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    margin-top: 8px;
    animation: bounce 2s infinite;
}

/* ===== PARTICLES BACKGROUND ===== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== ABOUT SECTION STYLES ===== */
#about .content-fit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.section-number {
    font-family: "devil breeze";
    font-size: 10em;
    font-weight: bold;
    color: rgba(238, 248, 206, 0.102);
}

.section-title {
    font-family: "devil breeze";
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

/* ===== SERVICES SECTION STYLES ===== */
.services-section {
    background-color: #1b1b1b;
    color: #eef8ce;
    padding: 5em 0;
    width: 100%;
    max-width: 100%;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
    max-width: 100%;
}

.service-card {
    background: rgba(27, 27, 27, 0.7);
    border: 1px solid rgba(238, 248, 206, 0.1);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #d1ff48;
    box-shadow: 0 10px 20px rgba(209, 255, 72, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    color: #d1ff48;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-family: "devil breeze";
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #d1ff48;
}

.service-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding-left: 0;
}

.service-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #d1ff48;
}

/* ===== SKILLS SECTION STYLES ===== */
.skills-section {
    background: #1b1b1b;
    padding: 5em 0;
    width: 100%;
    max-width: 100%;
}

.skills-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2em;
    margin-top: 2em;
    width: 100%;
    max-width: 100%;
}

.skill-item {
    text-align: center;
    width: 200px;
    max-width: 100%;
}

.skill-icon {
    width: 100px;
    height: 100px;
    transition: transform 0.3s ease;
    max-width: 100%;
}

.skill-item:hover .skill-icon {
    transform: scale(1.1);
}

.skill-item h3 {
    font-family: "devil breeze";
    font-size: 2em;
    margin: 0.5em 0;
}

.progress-container {
    width: 100%;
    height: 10px;
    background-color: rgba(238, 248, 206, 0.102);
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #d1ff48;
    border-radius: 5px;
    position: relative;
    transition: width 1s ease-in-out;
}

.progress-bar span {
    position: absolute;
    right: 5px;
    top: -25px;
    font-family: "Poppins", sans-serif;
    font-size: 0.9em;
    color: #d1ff48;
}

/* ===== BOOKS SECTION STYLES ===== */
.books-section {
    position: relative;
    padding: 6em 0;
    background-color: #1b1b1b;
    width: 100%;
    max-width: 100%;
}

.books-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    max-width: 100%;
}

.books-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.8rem;
    z-index: 2;
    width: 100%;
    max-width: 100%;
}

.book-cover {
    transition: all 0.3s ease;
    width: 30%;
    border-radius: 12px;
    margin-bottom: 1rem;
    max-width: 100%;
}

.book-cover:hover {
    transform: translateY(-8px);
    border-color: #d1ff48;
}

.book-card {
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 100%;
}

/* ===== ENHANCED PROJECTS SECTION ===== */
.projects-section {
    background-color: #1b1b1b;
    color: #eef8ce;
    padding: 5em 0;
    border-top: 1px solid rgba(238, 248, 206, 0.08);
    border-bottom: 1px solid rgba(238, 248, 206, 0.08);
    width: 100%;
    max-width: 100%;
}

/* Section Header */
.projects-section .section-header {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3em;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    padding: 0 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(238, 248, 206, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: #d1ff48;
    box-shadow: 0 12px 30px rgba(209, 255, 72, 0.15);
}

/* Project Image */
.project-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(27, 27, 27, 0.5);
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    max-width: 100%;
}

.project-card:hover .project-image-container img {
    transform: scale(1.05);
}

/* Project Info */
.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.project-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.4rem;
    color: #eef8ce;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: #d1ff48;
}

.project-description {
    color: rgba(238, 248, 206, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Project Tech Tags */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(209, 255, 72, 0.1);
    color: #d1ff48;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(209, 255, 72, 0.3);
    font-family: "Poppins", sans-serif;
}

/* Project Actions */
.project-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    width: 100%;
}

/* Project Buttons */
.project-btn {
    padding: 0.8em 1.5em;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    font-family: "Poppins", sans-serif;
    width: 100%;
    max-width: 100%;
}

/* Download Button */
.download-btn {
    background-color: rgba(238, 248, 206, 0.1);
    color: #eef8ce;
    border: 1px solid rgba(238, 248, 206, 0.3);
    padding: 0.8em 1.5em;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    font-family: "Poppins", sans-serif;
}

.download-btn:hover {
    background-color: rgba(238, 248, 206, 0.2);
    color: #d1ff48;
}

/* Buy Button */
.buy-btn {
    background-color: rgba(209, 255, 72, 0.2);
    color: #d1ff48;
    border: 1px solid #d1ff48;
}

.buy-btn:hover {
    background-color: rgba(209, 255, 72, 0.3);
    box-shadow: 0 0 15px rgba(209, 255, 72, 0.3);
}

/* ===== FOOTER STYLES ===== */
.site-footer {
    background-color: #1b1b1b;
    color: #eef8ce;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(238, 248, 206, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.footer-column {
    margin-bottom: 2rem;
}

.footer-heading {
    color: #d1ff48;
    font-family: "devil breeze", sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #d1ff48;
}

.footer-text {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    color: #eef8ce;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(238, 248, 206, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: #d1ff48;
    border-color: #d1ff48;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #eef8ce;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-links a:hover {
    color: #d1ff48;
    opacity: 1;
    padding-left: 5px;
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.contact-info i {
    color: #d1ff48;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(238, 248, 206, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
}

/* ===== ANIMATIONS ===== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(-45deg);
    }
    40% {
        transform: translateY(-10px) rotate(-45deg);
    }
    60% {
        transform: translateY(-5px) rotate(-45deg);
    }
}

/* ===== MOBILE NAVIGATION BAR ===== */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(27, 27, 27, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(238, 248, 206, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #eef8ce;
    text-decoration: none;
    padding: 8px 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    width: 100%;
}

.mobile-nav-link i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #d1ff48;
    background: rgba(209, 255, 72, 0.1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 1200px) {
    .sidebar {
        width: 65px;
        padding: 6px 10px;
    }
    
    body {
        padding-left: 65px;
    }
    
    .sidebar i {
        font-size: 22px;
        min-width: 40px;
    }
    
    .sidebar img {
        height: 40px;
    }
    
    .home-content {
        max-width: 100%;
        padding: 0 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    .sidebar {
        width: 55px;
        padding: 5px 8px;
    }
    
    body {
        padding-left: 55px;
    }
    
    .sidebar i {
        font-size: 20px;
        min-width: 35px;
    }
    
    .sidebar img {
        height: 35px;
    }
    
    .sidebar .logo-details {
        height: 50px;
    }
    
    .section {
        margin-left: 10px;
        padding: 0 15px;
    }
    
    .home-content {
        padding: 0 1.5rem;
    }
    
    .home-name,
    .home-specialization {
        font-size: 3rem;
    }
    
    .profile-image-container {
        width: 320px;
        height: 320px;
    }
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
@media screen and (max-width: 768px) {
    /* Hide desktop sidebar and show mobile elements */
    .sidebar {
        display: none;
    }
    
    .mobile-nav-bar {
        display: block;
    }
    
    /* Remove body padding for mobile */
    body {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
        overflow-x: hidden;
        padding-bottom: 70px;
    }
    
    body.sidebar-open {
        padding-left: 0 !important;
    }
    
    /* Adjust top links for mobile */
    .top-links {
        top: 10px;
        right: 10px;
        gap: 8px;
        padding: 8px 12px;
    }
    
    .social-link {
        font-size: 1rem;
        width: 32px;
        height: 32px;
    }
    
    /* Home section mobile adjustments */
    .home-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 0 15px;
        width: 100%;
    }
    
    .home-left,
    .home-right {
        align-items: center;
        width: 100%;
    }
    
    .home-social-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .home-specialization {
        text-align: center;
    }
    
    .profile-image-container {
        width: 280px;
        height: 280px;
        max-width: 100%;
    }
    
    .home-name,
    .home-specialization {
        font-size: 2.5rem;
    }
    
    .home-greeting,
    .home-role {
        font-size: 1.1rem;
    }
    
    /* Section adjustments */
    .section {
        margin-left: 0;
        padding: 0 15px;
        margin-bottom: 100px;
        width: 100%;
    }
    
    .section-number {
        font-size: 6em;
    }
    
    .section-title {
        font-size: 2em;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
        width: 100%;
    }
    
    .service-card {
        padding: 1.5rem;
        width: 100%;
    }
    
    /* Skills container */
    .skills-container {
        flex-direction: column;
        align-items: center;
        gap: 2em;
        padding: 0 15px;
        width: 100%;
    }
    
    .skill-item {
        width: 100%;
        max-width: 300px;
        margin-bottom: 2em;
    }
    
    /* Projects grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
        width: 100%;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .project-btn {
        width: 100%;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }
    
    .footer-column {
        margin-bottom: 1.5rem;
    }
    
    /* About section */
    #about .content-fit {
        width: 100%;
        padding: 0 15px;
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    /* Books section */
    .books-container {
        width: 100%;
        padding: 0 15px;
        flex-direction: column;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .book-cover {
        width: 50%;
    }
}

@media screen and (max-width: 576px) {
    /* Additional improvements for very small screens */
    .home-content {
        padding: 0 10px;
    }
    
    .section {
        padding: 0 10px;
        margin-bottom: 80px;
    }
    
    .projects-grid {
        padding: 0 10px;
    }
    
    .profile-image-container {
        width: 250px;
        height: 250px;
    }
    
    .home-name,
    .home-specialization {
        font-size: 2.2rem;
    }
    
    .home-resume-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-number {
        font-size: 4em;
    }
    
    .section-title {
        font-size: 1.8em;
    }
    
    .mobile-nav-link {
        font-size: 0.65rem;
        padding: 6px 3px;
    }
    
    .mobile-nav-link i {
        font-size: 1.1rem;
    }
    
    /* Button fixes */
    .project-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .project-btn {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .home-name,
    .home-specialization {
        font-size: 2rem;
        word-wrap: break-word;
    }
    
    .profile-image-container {
        width: 220px;
        height: 220px;
    }
    
    .home-social-links .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .top-links {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
    }
    
    .social-link {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .mobile-nav-bar {
        padding: 8px 0;
    }
    
    .mobile-nav-link {
        font-size: 0.6rem;
    }
    
    .mobile-nav-link i {
        font-size: 1rem;
    }
    
    .section-number {
        font-size: 4em;
    }
    
    .section-title {
        font-size: 1.6em;
    }
    
    .services-grid,
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-cover {
        width: 70%;
    }
}

@media screen and (max-width: 360px) {
    .home-name,
    .home-specialization {
        font-size: 1.8rem;
    }
    
    .profile-image-container {
        width: 200px;
        height: 200px;
    }
    
    .home-greeting,
    .home-role {
        font-size: 1rem;
    }
    
    .mobile-nav-link {
        font-size: 0.55rem;
        padding: 4px 2px;
    }
    
    .mobile-nav-link i {
        font-size: 0.9rem;
    }
    
    .section {
        padding: 0 8px;
    }
}

/* ===== PREVENT HORIZONTAL SCROLLING ===== */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== FIXES FOR ELEMENTS THAT MAY CAUSE HORIZONTAL SCROLLING ===== */
.container, .row, .col {
    max-width: 100%;
}

/* ===== ENSURE ALL ELEMENTS ADHERE TO WIDTH ===== */
* {
    box-sizing: border-box;
}

/* ===== OPEN SIDEBAR ADJUSTMENTS ===== */
@media screen and (max-width: 1200px) {
    .sidebar.open {
        width: 220px;
    }
    
    body.sidebar-open {
        padding-left: 220px;
    }
}

@media screen and (max-width: 992px) {
    .sidebar.open {
        width: 200px;
    }
    
    body.sidebar-open {
        padding-left: 200px;
    }
}