/* ===== VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #0a192f;
    --secondary-color: #112240;
    --accent-color: #64ffda;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --text-accent: #64ffda;
    --bg-dark: #020c1b;
    --bg-light: #233554;
    
    /* Typography */
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(2, 12, 27, 0.7);
    --shadow-md: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    --shadow-lg: 0 20px 30px -15px rgba(2, 12, 27, 0.7);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea {
    font-family: var(--font-secondary);
    outline: none;
    border: none;
}

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

section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Add a specific class for non-home sections to reduce top padding */
section:not(.home-section) {
    padding-top: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    color: var(--accent-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-align: center;
}

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

.primary-btn:hover {
    background-color: transparent;
    color: var(--accent-color);
}

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

.secondary-btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.highlight {
    color: var(--accent-color);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    background-color: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

.logo a {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

.nav-links ul {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-primary);
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* ===== HOME SECTION ===== */
.home-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 20px;
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(100, 255, 218, 0.1), transparent 50%);
    z-index: 0;
}

.home-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.text-content {
    flex: 1;
}

.text-content h1 {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.text-content h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.text-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
}

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

.visual-element {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.cube-wrapper {
    perspective: 800px;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    transform-style: preserve-3d;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1s ease, transform 1s ease;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeSpin 20s linear infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: bounce 2s infinite;
    text-align: center;
}

.scroll-indicator p {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-align: center;
    width: 100%;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

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

/* Home section text initial state - hide by default */
.text-content h1, 
.text-content h2, 
.text-content p, 
.text-content .cta-buttons {
    will-change: opacity, transform;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background-color: var(--primary-color);
    position: relative;
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    z-index: 1; /* Ensure proper stacking */
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(100, 255, 218, 0.05), transparent 70%);
    z-index: 0;
    opacity: 0.5;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-top: 20px;
}

.about-image {
    flex: 1;
    max-width: 400px;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    opacity: 1 !important; /* Ensure visibility */
}

.about-image img {
    border-radius: 5px;
    filter: grayscale(30%);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    transform: translateZ(0);
    display: block;
    width: 100%;
    height: auto;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    z-index: -1;
    transition: var(--transition);
}

.about-image:hover img {
    filter: grayscale(0%);
    transform: translateZ(20px);
}

.about-image:hover::after {
    top: 15px;
    left: 15px;
}

.about-text {
    flex: 1.5;
    opacity: 1 !important; /* Ensure visibility */
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.about-text:hover h3::after {
    width: 100%;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(100, 255, 218, 0.1), transparent);
    transform: translateX(-100%);
    transition: var(--transition);
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.detail-item:hover::before {
    transform: translateX(100%);
}

.detail-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* About Social Links */
.about-social {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.about-social .social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.about-social .social-link:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* ===== SKILLS SECTION ===== */
.skills-section {
    background-color: var(--bg-dark);
    position: relative;
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.skills-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(100, 255, 218, 0.03), transparent);
    z-index: 0;
}

.skills-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.skill-category {
    margin-bottom: 20px;
}

.skill-category h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 25px;
}

.skill-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    min-height: 140px;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.skill-item:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    transition: var(--transition);
}

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

.skill-item h4 {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.skill-level {
    width: 100%;
    height: 4px;
    background-color: var(--bg-light);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.skill-progress {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 2px;
    transform-origin: left;
    transition: transform 1s ease;
}

.skill-item[data-skill="Python"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Java"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="C"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="C#"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="C++"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="HTML"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="CSS"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="JavaScript"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Kotlin"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="TypeScript"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="React"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Next.js"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="React Native"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Bootstrap"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Material UI"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="SQL"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Node.js"] .skill-progress { transform: scaleX(0); }
.skill-item[data-skill="Git"] .skill-progress { transform: scaleX(0); }

/* Skill level tooltip */
.skill-item::after {
    position: absolute;
    top: -30px;
    right: 10px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
    pointer-events: none;
}

.skill-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    padding: 100px 0;
    background-color: var(--bg-dark);
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    border: 1px solid var(--secondary-color);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--secondary-color);
    color: var(--accent-color);
}

#viewAllProjects {
    margin-top: 30px;
    padding: 12px 40px;
    font-size: 1rem;
    transition: var(--transition);
}

#viewAllProjects:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

/* Hide all project cards by default - they will be shown by the filter */
.project-card {
    display: none !important;
}

/* Override when filter applies the display */
.project-card.filter-fade-in {
    display: flex !important;
}

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

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

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tech span {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-left: 0;
}

.project-links .btn {
    justify-content: center;
}

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

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-color);
    padding: 30px 0;
    text-align: center;
    position: relative;
}

.footer p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.footer-social {
    display: inline-flex;
    gap: 15px;
    align-items: center;
}

.footer-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.footer-social .social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 480px) {
    .footer {
        padding: 25px 0;
    }
    
    .footer p {
        flex-direction: column;
        gap: 15px;
        font-size: 1rem;
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 1024px) {
    .home-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .text-content p {
        margin: 0 auto 30px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        margin: 0 auto 30px;
    }
    
    .about-details {
        justify-content: center;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info {
        margin-bottom: 40px;
    }
    
    .contact-form {
        width: 100%;
        align-items: center;
    }
    
    .contact-form form {
        width: 100%;
    }
    
    .about-text h3::after {
        width: 60px;
    }
    
    /* Adjust cube size for tablet */
    .cube-wrapper {
        width: 180px;
        height: 180px;
        margin-bottom: 40px;
    }
    
    /* Ensure scroll indicator is properly positioned */
    .scroll-indicator {
        bottom: 20px;
    }
    
    /* Ensure section padding is appropriate for tablets */
    section {
        padding: 80px 0;
    }
    
    /* Adjust section titles for tablets */
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 50px;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        padding: 0 20px;
        width: 100%;
        box-sizing: border-box;
        height: 80px !important; /* Force consistent height in mobile view */
    }
    
    .navbar.scrolled {
        height: 80px !important; /* Maintain same height when scrolled */
    }
    
    .nav-links {
        position: fixed;
        top: 80px; /* Match navbar height */
        right: -100%;
        width: 70%;
        height: calc(100vh - 80px);
        background-color: var(--secondary-color);
        flex-direction: column;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        padding: 40px 0;
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .text-content h1 {
        font-size: 2.5rem;
        margin-top: 30px;
    }
    
    .text-content h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .skill-category h3 {
        font-size: 1.5rem;
    }
    
    .skill-item::after {
        display: none;
    }
    
    /* Adjust cube size for mobile */
    .cube-wrapper {
        width: 150px;
        height: 150px;
        margin-top: 30px;
        margin-bottom: 80px;
    }
    
    /* Ensure buttons don't overlap with cube */
    .cta-buttons {
        margin-top: 30px;
        z-index: 5;
        position: relative;
    }
    
    /* Ensure scroll indicator is properly positioned */
    .scroll-indicator {
        bottom: 25px;
        opacity: 0.9;
        z-index: 5;
    }
    
    /* Fix about section background for mobile */
    .about-section {
        background-color: var(--primary-color);
    }
    
    .about-section::before {
        width: 100%; /* Full width background */
        opacity: 0.2; /* Reduce opacity for subtle effect */
        background: radial-gradient(circle at center, rgba(100, 255, 218, 0.03), transparent 80%);
    }
    
    /* Center contact form elements on mobile */
    .contact-form {
        text-align: center;
    }
    
    .contact-form h3 {
        text-align: center;
    }
    
    .form-group {
        display: flex;
        justify-content: center;
    }
    
    .form-group input, 
    .form-group textarea {
        width: 100%;
        max-width: 500px;
    }
    
    .contact-form .btn {
        margin: 0 auto;
        display: block;
        width: auto;
        min-width: 200px;
    }
    
    /* Ensure section padding is appropriate for mobile */
    section {
        padding: 60px 0;
        min-height: auto; /* Remove min-height constraint for better mobile layout */
    }
    
    section:not(.home-section) {
        padding-top: 40px;
    }
    
    /* Ensure about image is properly sized */
    .about-image {
        max-width: 300px;
        margin: 0 auto 30px;
    }
    
    .about-image img {
        width: 100%;
    }
    
    /* Ensure skill items are properly sized */
    .skill-item {
        padding: 15px;
        min-height: 120px;
    }
    
    .skill-icon {
        font-size: 2rem;
    }
    
    .home-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        position: relative;
        padding-bottom: 80px;
        margin-top: -20px;
    }
    
    .text-content {
        margin-bottom: 10px;
    }
    
    .education-experience-content {
        flex-direction: column;
        gap: 30px;
        width: 100%;
        max-width: 100%;
    }
    
    .education-column, .experience-column {
        width: 100%;
        max-width: 100%;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        width: 100%;
    }
    
    /* Mobile section spacing */
    .about-content, 
    .skills-content,
    .education-experience-content,
    .contact-content {
        gap: 30px;
        margin-top: 10px;
    }
    
    .certificates-grid,
    .projects-grid {
        gap: 25px;
        margin-top: 10px;
    }
    
    .projects-filter {
        flex-wrap: wrap;
        margin-bottom: 30px;
    }
    
    /* Ensure section title is properly sized */
    .section-title {
        margin-bottom: 40px;
    }
    
    /* Mobile adjustments for internal elements */
    .about-text h3 {
        font-size: 1.6rem;
    }
    
    .detail-item {
        padding: 10px 15px;
    }
    
    .timeline-item {
        padding: 20px;
    }
    
    .timeline-item h4 {
        font-size: 1.2rem;
    }
    
    .certificate-info, .project-info {
        padding: 15px;
    }
    
    .form-group input, .form-group textarea {
        padding: 12px;
    }
}

@media screen and (max-width: 600px) {
    /* Further adjustments for medium phones */
    .cube-wrapper {
        width: 150px;
        height: 150px;
        margin-top: 25px;
        margin-bottom: 70px;
    }
    
    .visual-element {
        margin-top: 50px;
        padding-bottom: 40px;
    }
    
    .cta-buttons {
        margin-top: 25px;
    }
    
    /* Ensure scroll indicator is visible */
    .scroll-indicator {
        bottom: 20px;
    }
    
    .home-section {
        padding-top: 90px;
    }
    
    .home-content {
        margin-top: -15px;
        padding-bottom: 70px;
    }
}

@media screen and (max-width: 480px) {
    .text-content h1 {
        font-size: 1.8rem;
        margin-top: 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-filter {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* Adjust cube size for small mobile */
    .cube-wrapper {
        width: 120px;
        height: 120px;
        margin-top: 20px;
        margin-bottom: 70px;
    }
    
    /* Add more space between elements */
    .visual-element {
        margin-top: 50px;
        margin-bottom: 15px;
    }
    
    /* Further adjustments for smaller screens */
    .form-group input, 
    .form-group textarea {
        max-width: 100%;
    }
    
    .contact-form .btn {
        width: 100%;
    }
    
    /* Ensure section padding is appropriate for smaller mobile */
    section {
        padding: 50px 0;
    }
    
    section:not(.home-section) {
        padding-top: 30px;
    }
    
    /* Adjust section titles for mobile */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    /* Ensure about image is properly sized for small screens */
    .about-image {
        max-width: 250px;
    }
    
    /* Adjust detail items for better mobile layout */
    .about-details {
        justify-content: center;
    }
    
    .detail-item {
        width: 100%;
        justify-content: center;
    }
    
    /* Adjust scroll indicator for very small screens */
    .scroll-indicator {
        bottom: 15px;
    }
    
    .scroll-indicator p {
        font-size: 0.8rem;
    }
    
    /* Increase margin for buttons on very small screens */
    .cta-buttons {
        margin-top: 50px;
    }
    
    .home-section {
        padding-top: 85px;
    }
    
    .home-content {
        margin-top: -10px;
        padding-bottom: 60px;
    }
    
    .text-content h1 {
        font-size: 1.6rem;
        margin-top: 0;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .timeline {
        padding-left: 25px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .timeline-item {
        padding: 12px;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .timeline-item p {
        font-size: 0.9rem;
    }
    
    .certificate-info p {
        font-size: 0.9rem;
    }
    
    /* Smaller mobile adjustments */
    .about-content, 
    .skills-content,
    .education-experience-content,
    .contact-content {
        gap: 20px;
        margin-top: 5px;
    }
    
    .certificates-grid,
    .projects-grid {
        gap: 20px;
        margin-top: 5px;
    }
    
    .projects-filter {
        margin-bottom: 25px;
    }
    
    /* Ensure section title is properly sized */
    .section-title {
        margin-bottom: 30px;
    }
}

/* Very small phones */
@media screen and (max-width: 375px) {
    .cube-wrapper {
        width: 100px;
        height: 100px;
        margin-top: 15px;
        margin-bottom: 60px;
    }
    
    .cta-buttons {
        margin-top: 60px;
    }
    
    .home-section {
        padding-top: 80px;
    }
    
    .home-content {
        margin-top: -5px;
        padding-bottom: 50px;
    }
    
    .text-content h1 {
        font-size: 1.6rem;
        margin-top: 0;
    }
    
    .scroll-indicator {
        bottom: 10px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .timeline-item p {
        font-size: 0.85rem;
    }
    
    section {
        padding: 50px 0;
    }
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: transform 0.1s;
}

.cursor-hover {
    width: 60px;
    height: 60px;
    border-color: var(--accent-color);
    background-color: rgba(100, 255, 218, 0.1);
}

.dot-hover {
    transform: translate(-50%, -50%) scale(0);
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--accent-color);
    z-index: 1001;
    width: 0;
    transition: width 0.1s;
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(100, 255, 218, 0.2);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== SCRAMBLE TEXT ===== */
.scramble-text {
    color: var(--accent-color);
    font-weight: bold;
}

/* ===== EDUCATION & EXPERIENCE SECTION ===== */
.education-experience-section {
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.education-experience-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom left, rgba(100, 255, 218, 0.1), transparent 50%);
    z-index: 0;
}

.education-experience-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.education-column, .experience-column {
    flex: 1;
    min-width: 300px;
}

.timeline {
    position: relative;
    padding-left: 30px;
    box-sizing: border-box;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    height: calc(100% - 20px);
    width: 2px;
    background: var(--accent-color);
}

.timeline-item {
    position: relative;
    padding: 25px;
    margin-bottom: 30px;
    background-color: var(--secondary-color);
    border-radius: 8px;
    border-left: 2px solid var(--accent-color);
    transition: var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--primary-color);
    z-index: 1;
}

.timeline-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.timeline-item h5 {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.timeline-item .date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

.timeline-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CERTIFICATES & AWARDS SECTION ===== */
.certificates-section {
    background-color: var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.certificates-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(100, 255, 218, 0.1), transparent 50%);
    z-index: 0;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.certificate-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.certificate-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
}

.certificate-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    max-width: 100%;
}

.certificate-card:hover .certificate-img img {
    transform: scale(1.05);
}

.certificate-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.certificate-info h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.certificate-info .issuer {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.certificate-info .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: block;
}

.certificate-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.certificate-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.certificate-links a {
    padding: 5px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    background: rgba(100, 255, 218, 0.1);
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.certificate-links a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Media Queries for Education, Experience, and Certificates Sections */
@media screen and (max-width: 768px) {
    .education-experience-content {
        flex-direction: column;
        gap: 30px;
        width: 100%;
    }
    
    .education-column, .experience-column {
        width: 100%;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        width: 100%;
    }
    
    .certificate-img {
        height: 180px;
    }
    
    .certificate-info h3 {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 480px) {
    .timeline {
        padding-left: 25px;
        width: 100%;
    }
    
    .timeline-item {
        padding: 12px;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .timeline-item::before {
        left: -31px;
        width: 10px;
        height: 10px;
    }
    
    .timeline-item h4 {
        font-size: 1rem;
    }
    
    .timeline-item h5 {
        font-size: 0.9rem;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .certificate-img {
        height: 160px;
    }
    
    .certificate-info {
        padding: 15px;
    }
    
    .certificate-info h3 {
        font-size: 1rem;
    }
}

@media screen and (max-width: 375px) {
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .timeline-item::before {
        left: -26px;
        width: 8px;
        height: 8px;
    }
    
    .certificate-img {
        height: 140px;
    }
}

/* Preload class to prevent FOUC (Flash of Unstyled Content) */
html.preload * {
    transition: none !important;
}

html.preload .home-section .text-content h1,
html.preload .home-section .text-content h2,
html.preload .home-section .text-content p,
html.preload .home-section .text-content .cta-buttons,
html.preload .home-section .cube-wrapper {
    opacity: 0;
    transform: translateY(30px);
}

/* Certificate Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 90vh;
    margin: auto;
    background-color: var(--secondary-color);
    padding: 20px 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.close-modal:hover {
    transform: scale(1.1);
    background-color: var(--text-primary);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Project Gallery Styles */
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 10px;
}

.project-gallery::-webkit-scrollbar {
    width: 8px;
}

.project-gallery::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-radius: 4px;
}

.project-gallery::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 4px;
}

.project-gallery img {
    width: 95%;
    max-width: 1000px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    display: block;
}

/* Media Queries for Project Gallery */
@media screen and (max-width: 768px) {
    .project-gallery {
        gap: 15px;
    }
    
    .modal-content {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .project-gallery {
        gap: 10px;
    }
    
    .modal-content {
        padding: 10px;
    }
}