* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg: #0f0f0f;
    --text: #EDEDED;
    --primary: #6b6dff;
    --primary-dark: #45FF8F;
    --card: #1a1a1a;
    --card-hover: #1a1a1a;
    --nav-bg: #0A0A0A;
    --border: #727272;
    --shadow: rgba(0, 0, 0, 0.8);
    --accent: #45FF8F;
    --success: #2EEA7F;
    --error: #FF4A4A;
    --text-secondary: #9E9E9E;
} 



.dark {
    --bg: #F9FAFB;
    --text: #1A1A1A;
    --primary: #4A56FF; 
    --primary-dark: #22C76B;
    --card: #FFFFFF;
    --card-hover: #F1F4F8;
    --nav-bg: #FFFFFF;
    --border: #D1D5DB;
    --shadow: rgba(0, 0, 0, 0.12);
    --accent: #22C76B;
    --success: #16A34A;
    --error: #E11D48;
    --text-secondary: #6B7280;
}


/* Main Container - Two Column Layout */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
}

/* Left Side - Content Area */
.content-side {
    flex: 1;
    padding: 40px 80px;
    max-width: calc(100% - 320px);
    margin-left: 320px;
    overflow-y: auto;
    height: 100vh;
}

/* Right Side - Navigation Sidebar */
.nav-side {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--nav-bg);
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 10px var(--shadow);
    overflow-y: auto;
    z-index: 1000;
}

.nav-content {
    padding: 40px 30px;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: block;
    padding: 14px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--card-hover);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--primary);
    color: #ffffff;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.nav-link:hover::before {
    height: 60%;
}

/* Sections */
.section {
    margin-bottom: 0;
    animation: fadeIn 0.6s ease;
}

/* Single-section view: hide all sections by default and reveal the active one */
.section {
    display: none !important;
}

.section.active-section {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary);
    font-weight: 700;
    position: sticky;
    top: -60px;
    z-index: 100;
    background: var(--bg);
    padding: 60px 0 15px 0;
    margin-top: -60px;
    box-shadow: 0 2px 10px var(--bg);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Home Section */
#home {
    background-image: url('assets/homebg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    min-height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.home-content {
    padding: 60px 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.highlight {
    color: var(--primary);
    position: relative;
}

.subtitle {
    font-size: 1.5rem;
    color: #ffffff;
    opacity: 0.95;
    margin-bottom: 25px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    color: #ffffff;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.contact-me-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    z-index: 10;
    display: inline-block;
}

.contact-me-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

/* About Section */
.about-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.profile-img {
    width: 220px;
    height: 220px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 20px var(--shadow);
    transition: transform 0.3s ease;
}

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

.about-text {
    flex: 1;
}

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

.about-actions {
    margin-top: 15px;
}

/* Skills - Using Timeline Layout */
#skills .timeline-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

#skills .timeline-date {
    font-size: 0.95rem;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 10px;
}

#skills .skill-desc {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
}

/* Timeline Container (Work, Internships, Education) */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-item {
    background: var(--card);
    padding: 25px 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    box-shadow: 0 5px 15px var(--shadow);
    transform: translateX(5px);
}

.timeline-item h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text);
}

.timeline-date {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.timeline-item p {
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 25px;
}

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

.project-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text);
    opacity: 0.85;
}

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

.tag {
    background: var(--primary);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.course-card {
    background: var(--card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

.course-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text);
}

.course-provider {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.course-card p {
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

/* Awards List */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.award-item {
    display: flex;
    gap: 20px;
    background: var(--card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.award-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px var(--shadow);
}

.award-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.award-icon img {
    width: 3rem;
    height: 3rem;
    display: block;
}

.award-details h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text);
}

.award-date {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.award-details p {
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

/* Contact Section */
.contact-content {
    max-width: 600px;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text);
    opacity: 0.9;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-status {
    font-size: 0.95rem;
    margin-top: -5px;
    color: var(--primary);
    min-height: 20px;
    font-weight: 600;
}

.contact-status.error {
    color: #d9534f;
    font-weight: 600;
}

/* Buttons */
.btn {
    background: var(--primary);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.btn-small {
    background: var(--primary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 2px solid #727272;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    top: 0px;
    left: 0px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.theme-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    color: var(--text);
    opacity: 0.7;
    background: var(--bg);
}

/* Project Detail Styles */
.project-detail-header {
    margin-bottom: 30px;
    position: relative;
}

.project-detail-header .section-title {
    position: static;
    margin-top: 0;
    padding-top: 0;
    z-index: auto;
}

   /* .btn-back {
    background: var(--card);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    z-index: 103;
    display: inline-block;
} */

.project-back-btn {
    /* position: fixed;
    top: 5px;
    left: 355px; */
    background: var(--card);
    border: 2px solid var(--primary);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 1001;
    display: inline-block;
    box-shadow: 0 2px 8px var(--shadow);
}

.project-back-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

/* .btn-back:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--primary);
} */

.project-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px var(--shadow);
}

.project-detail-info {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.project-meta {
    background: var(--card);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.meta-label {
    font-weight: 700;
    color: var(--primary);
    margin-right: 8px;
}

.project-section {
    margin-bottom: 35px;
}

.project-section h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.project-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text);
    opacity: 0.9;
}

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

.feature-list li {
    padding: 12px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.9;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Social Links (Contact Page) */
.social-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.social-links h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #fff;
    margin-right: 15px;
    margin-bottom: 15px;
}

.social-btn svg {
    width: 24px;
    height: 24px;
}

.social-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(188, 24, 136, 0.4);
}

.twitter-btn {
    background: #000000;
}

.twitter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.linkedin-btn {
    background: #0A66C2;
}

.linkedin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 102, 194, 0.4);
}

.github-btn {
    background: #181717;
}

.github-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(24, 23, 23, 0.4);
}

.email-btn {
    background: #EA4335;
}

.email-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(234, 67, 53, 0.4);
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.stackoverflow-btn {
    background: #26A5E4;
}

.stackoverflow-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(38, 165, 228, 0.4);
}

/* Responsive Design */
/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .content-side {
        padding: 60px 100px;
        max-width: calc(100% - 350px);
        margin-left: 350px;
    }
    
    .nav-side {
        width: 350px;
    }
}

/* Tablet and Small Desktop (769px - 1024px) */
@media (max-width: 1024px) {
    .content-side {
        padding: 40px 40px;
        max-width: calc(100% - 280px);
        margin-left: 280px;
    }
    
    .nav-side {
        width: 280px;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Mobile and Small Tablet (≤768px) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .nav-side {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
        order: -1;
        overflow-y: visible;
    }
    
    .content-side {
        max-width: 100%;
        margin-left: 0;
        padding: 25px 20px;
        order: 1;
        height: auto;
        overflow-y: visible;
    }
    
    .nav-content {
        padding: 15px 20px;
    }
    
    .nav-header {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .nav-logo {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .nav-link {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .nav-link:hover {
        transform: translateX(0);
        transform: scale(1.05);
    }
    
    .main-title {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .contact-me-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .project-back-btn {
        left: 20px;
        top: 10px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
        margin-bottom: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .timeline-item {
        padding: 20px 20px;
    }
    
    .award-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .award-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    .award-icon img {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .content-side {
        padding: 20px 15px;
    }
    
    .nav-content {
        padding: 12px 15px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        gap: 6px;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    .timeline-item,
    .course-card,
    .award-item {
        padding: 15px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .theme-toggle {
        padding: 8px 12px;
        font-size: 1rem;
    }
}

/* Extra Small (≤360px) */
@media (max-width: 360px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .nav-link {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}
