/* ========================================
   Modern Professional Portfolio CSS
   ======================================== */

/* === CSS Variables === */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-light: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* === Animated Background === */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.gradient-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    bottom: -150px;
    left: -150px;
    animation-delay: 7s;
}

.circle-3 {
    width: 350px;
    height: 350px;
    background: var(--gradient-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.logo-bracket {
    color: var(--primary-color);
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

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

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    animation: fadeInUp 1s ease;
}

.greeting {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.typing-text {
    color: var(--primary-color);
}

.cursor {
    animation: blink 1s infinite;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

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

/* === Hero Image === */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease 0.3s backwards;
}

.profile-card {
    position: relative;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 30px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.profile-icon {
    font-size: 8rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
}

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

.tech-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tech-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.tech-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* === Scroll Indicator === */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.scroll-indicator a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* === Section Styles === */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto 1rem;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* === About Section === */
.about-section {
    background: rgba(30, 41, 59, 0.3);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
}

.about-intro {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: var(--shadow-md);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* === Skills Section === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.75rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list i {
    color: var(--success-color);
    font-size: 0.9rem;
}

/* === Projects Section === */
.projects-section {
    background: rgba(30, 41, 59, 0.3);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    background: rgba(99, 102, 241, 0.9);
}

.project-icon {
    font-size: 4rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.project-card:hover .project-icon {
    color: white;
    transform: scale(1.2);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

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

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

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

/* === Contact Section === */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-item a,
.contact-item p {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* === Footer === */
.footer {
    background: rgba(30, 41, 59, 0.5);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer i {
    color: var(--accent-color);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.footer-subtext {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* === Scroll to Top Button === */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive Design === */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .profile-card {
        width: 300px;
        height: 300px;
    }

    .profile-icon {
        font-size: 6rem;
    }

    .tech-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-left: 1px solid var(--border-color);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    /* FIX: Ensure grids don't overflow */
    .project-grid, 
    .skills-grid,
    .completed-projects-grid,
    .notes-grid {
        grid-template-columns: 1fr; /* Force single column on mobile */
    }

    /* FIX: Add more padding to bottom of hero so Scroll Button doesn't overlap card */
    .hero {
        padding-top: 8rem;
        padding-bottom: 8rem; /* Increased space for scroll button */
        min-height: auto;
    }

    /* FIX: Profile Card Size & Icon */
    .profile-card {
        width: 100%;           /* Fluid width */
        max-width: 320px;      /* Cap width so it doesn't get huge */
        height: auto;          /* Remove fixed height */
        aspect-ratio: 1/1;     /* Keep it square-ish */
        padding: 2rem;         /* Reduce padding */
    }

    .profile-icon {
        font-size: 4rem;       /* Shrink icon from 8rem to 4rem */
        margin-bottom: 0;      /* Remove extra space */
    }

    .tech-icons {
        gap: 0.5rem;           /* Tighter spacing for icons */
    }

    .tech-icon {
        width: 40px;           /* Smaller tech icons */
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* FIX: Adjust modal padding */
    .note-modal-content {
        margin: 1rem;
    }
    
    .note-modal-body {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .profile-card {
        width: 280px;
        height: 280px;
    }
}
/* ========================================
   Background Image Slideshow
   ======================================== */
.bg-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.bg-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.bg-slideshow .slide.active {
    opacity: 0.15;
}

/* ========================================
   Featured Projects Carousel
   ======================================== */
.featured-projects-section {
    padding: 5rem 2rem;
    background: rgba(30, 41, 59, 0.3);
}

.featured-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.carousel-container {
    overflow: hidden;
    border-radius: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.featured-project-slide {
    min-width: 100%;
    padding: 0 1rem;
}

.featured-project-card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

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

.featured-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge.working {
    background: rgba(236, 72, 153, 0.9);
}

.featured-project-content {
    padding: 2rem;
}

.featured-project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.featured-project-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-progress {
    margin-top: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: -25px;
}

.next-btn {
    right: -25px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dots .dot.active,
.carousel-dots .dot:hover {
    background: var(--primary-color);
    transform: scale(1.3);
}

/* ========================================
   Completed Projects Grid
   ======================================== */
.completed-projects-section {
    padding: 5rem 2rem;
}

.completed-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.completed-project-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.completed-project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.completion-badge {
    padding: 0.4rem 0.8rem;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.completed-project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.completed-project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.load-more-container {
    width: 100%;
    display: block;
    text-align: center;
    margin-top: 3rem;
    padding-bottom: 2rem;
    clear: both; /* Ensures it sits below everything */
}

.load-more-btn {
    padding: 1rem 2.5rem;
}

/* ========================================
   Notes Section
   ======================================== */
.notes-section {
    padding: 5rem 2rem;
    background: rgba(30, 41, 59, 0.3);
}

.notes-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.note-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.note-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.note-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.note-type {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.note-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.note-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.note-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.note-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.note-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.note-link:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

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

.view-note-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.add-note-container {
    text-align: center;
    margin-top: 3rem;
}

/* Note Modal */
.note-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
}

.note-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.note-modal-content {
    background: var(--bg-dark);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: sticky;
    top: 1rem;
    right: 1rem;
    float: right;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.note-modal-body {
    padding: 3rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.note-modal-body h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.note-modal-body h3 {
    margin: 2rem 0 1rem;
    color: var(--text-secondary);
}

.note-modal-body p {
    margin-bottom: 1.5rem;
}

.note-modal-body code {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
}

.note-modal-body pre {
    background: rgba(30, 41, 59, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 968px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .prev-btn {
        left: -20px;
    }
    
    .next-btn {
        right: -20px;
    }
    
    .featured-project-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .carousel-btn {
        position: relative;
        left: auto !important;
        right: auto !important;
        margin: 1rem 0.5rem;
    }
    
    .featured-carousel {
        padding-bottom: 4rem;
    }
    
    .completed-projects-grid,
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .notes-filter {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .note-modal-content {
        margin: 1rem;
    }
    
    .note-modal-body {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .featured-project-image {
        height: 250px;
    }
    
    .featured-project-content {
        padding: 1.5rem;
    }
    
    .featured-project-content h3 {
        font-size: 1.4rem;
    }
}


/* ========================================
   FAIL-SAFE MOBILE FIXES (Replace the previous block at bottom of style.css)
   ======================================== */

@media (max-width: 768px) {
    /* 1. RESET GRID TO FLEX: This kills the "minmax" width restriction completely */
    .completed-projects-grid,
    .notes-grid,
    .project-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* 2. FORCE CARDS TO FIT: Ensure cards don't exceed screen width */
    .completed-project-card,
    .note-card,
    .project-card {
        width: 100% !important;
        min-width: 0 !important; /* Allows text to wrap instead of pushing width */
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important; /* Includes padding in width calculation */
    }

    /* 3. FIX CONTAINER PADDING: Give content more room on narrow screens */
    section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        overflow-x: hidden !important; /* Prevents horizontal scrollbar */
    }
    
    .container {
        width: 100% !important;
        padding: 0 !important;
    }

    /* 4. PREVIOUS HERO FIXES (Keep these) */
    .hero {
        padding-top: 7rem !important;
        padding-bottom: 7rem !important;
        min-height: auto !important;
    }

    .profile-card {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
    }
    
    .profile-icon {
        font-size: 4rem !important;
    }
}