/* Compact About tab cards */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.skill-card,
.resume-card {
    position: relative;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-card::before,
.resume-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.skill-card:hover,
.resume-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.2);
}

.skill-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.1);
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.resume-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.resume-company {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

.resume-date {
    font-size: 12px;
    color: #7a8a99;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.resume-role {
    font-weight: 600;
    color: #667eea;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.resume-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.resume-tag {
    background: rgba(118, 75, 162, 0.1);
    border: 1px solid rgba(118, 75, 162, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
    color: #764ba2;
    font-weight: 600;
    font-size: 12.5px;
}

.resume-location {
    color: #5a6c7d;
    font-weight: 500;
    font-size: 13px;
}

.resume-desc {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

.edu-card .resume-role {
    color: #2c3e50;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('Poppins/Poppins-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

body {
    background: #f8f9fa;
    color: #2c3e50;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body.no-scroll {
    overflow: hidden;
}

#header {
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e8ba3 100%);
    background-position: center;
    background-size: cover;
    position: relative;
    padding: 120px 0 30px;
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(115, 132, 155, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(115, 132, 155, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    padding: 10px 6%;
}

.logo {
    padding: 7px;
    width: 300px;
    margin-left: 3%;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 10px 18px;
}

nav ul li a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

nav ul li a::after {
    content: '';
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: #667eea;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6%;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header-text {
    flex: 0 0 60%;
    text-align: left;
    color: #ffffff;
    font-size: 28px;
}

.header-text p {
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

.header-image {
    flex: 0 0 35%;
    min-width: 300px;
    overflow: hidden;
    border-radius: 30px;
    height: 65vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.header-image img {
    width: 140%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin-left: -20%;
}

.header-text h1 {
    color: #ffffff;
    margin-top: 10px;
    font-size: 72px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 30px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.header-text span {
    background: linear-gradient(135deg, #8b9ff7 0%, #a77dd4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 72px;
}


/* -------------ABOUT------------ */
#about {
    padding: 50px 0;
    background: #ffffff;
    color: #2c3e50;
}

.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 60px;
}

.about-col-1 {
    flex: 0 0 35%;
    min-width: 300px;
}

.about-col-2 {
    flex: 1 1 60%;
    min-width: 0;
}

.about-col-2 p {
    font-size: 18px;
    line-height: 1.8;
    color: #5a6c7d;
}

.about-photo {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.about-photo:hover {
    transform: scale(1.02);
}

.subtitle {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.tab-titles {
    display: flex;
    margin: 30px 0px 40px;
    gap: 10px;
    border-bottom: 2px solid #e9ecef;
}

.tab-links {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: #7a8a99;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.tab-links:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab-links::after {
    content: '';
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    left: 0;
    bottom: -2px;
    transition: width 0.3s ease;
}

.tab-links.active-link {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.tab-links.active-link::after {
    width: 100%;
}

.tab-contents ul li {
    list-style: none;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.tab-contents ul li:hover {
    transform: translateX(5px);
}

.tab-contents ul li span {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.tab-contents {
    display: none;
}

.tab-contents.active-tab {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Experience cards */
.experience {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.exp-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 16px 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exp-item:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.15);
}

.exp-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
    justify-content: space-between;
}

.exp-role {
    font-weight: 700;
    color: #2c3e50;
}

.exp-company {
    color: #5a6c7d;
    font-weight: 500;
}

.exp-dates {
    color: #7a8a99;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exp-bullets {
    margin-top: 8px;
    padding-left: 18px;
    color: #5a6c7d;
}

.exp-bullets li {
    margin: 6px 0;
}

/* Technical Internships Section */
#internships {
    padding: 50px 0;
    background: #f8f9fa;
}

#internships .subtitle {
    text-align: center;
    margin-bottom: 40px;
}

/* Featured Internship Boxes */
.featured-internships {
    margin-top: 30px;
}

.featured-internships h4 {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.internship-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.internship-box {
    position: relative;
    display: block;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.internship-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.internship-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.2);
}

.internship-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.internship-company {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.internship-date {
    font-size: 12px;
    color: #7a8a99;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.internship-role {
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 6px;
}

.internship-location {
    font-size: 13px;
    color: #5a6c7d;
    margin-bottom: 12px;
}

.internship-location i {
    margin-right: 6px;
}

.internship-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.internship-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.internship-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.internship-link-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #667eea;
    font-size: 14px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.internship-box:hover .internship-link-icon {
    opacity: 1;
}

@media (max-width: 768px) {
    .internship-boxes {
        grid-template-columns: 1fr;
    }

    #deployed-apps {
        display: none;
    }

    .nav-deployed-apps {
        display: none;
    }
}

/*------------Portfolio---------*/
#portfolio {
    padding: 50px 0;
    background: #f8f9fa;
    color: #2c3e50;
}

#portfolio h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 60px;
}

.top-projects {
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

.top-projects h3 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    color: #7a8a99;
    margin-bottom: 12px;
}

.top-projects-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.top-project-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #2c3e50;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(102, 126, 234, 0.18);
}

/* Project type badges — small pill labels in top-right of timeline cards */
.project-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 3;
    white-space: nowrap;
}

.badge-top {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-personal {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.badge-class {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.top-rank {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    min-width: 34px;
}

.top-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-title {
    font-weight: 700;
    font-size: 16px;
}

.top-desc {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.4;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Timeline vertical line — positioned dynamically by JS based on first/last icon centers.
   Do NOT use ::before with hardcoded top/bottom, that breaks on resize. */
#timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    pointer-events: none;
    z-index: 0;
}

.timeline-item {
    position: relative;
    /* Negative margin creates card overlap for a dense timeline layout.
       Currently ~25-30% vertical overlap between adjacent cards. */
    margin-bottom: -100px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Alternation is driven by JS — .side-left/.side-right classes are assigned
   globally across ALL timeline items (including older-projects) so the
   zig-zag never breaks across container boundaries. */
.timeline-item.side-right {
    justify-content: flex-end;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 0 0 6px #ffffff, 0 8px 20px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

.timeline-content {
    width: 45%;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.15);
}

.timeline-item.side-right .timeline-content {
    text-align: left;
}

/* Timeline Show More Toggle */
.timeline-toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 25px;
    margin: 20px 0 40px 0;
    z-index: 3;
}

.timeline-toggle-line {
    display: none;
}

.timeline-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 0 0 6px #ffffff, 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
}

.timeline-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px #ffffff, 0 12px 30px rgba(102, 126, 234, 0.4);
}

.timeline-toggle-btn i {
    transition: transform 0.3s ease;
}

.timeline-toggle.expanded .timeline-toggle-btn i {
    transform: rotate(180deg);
}

.timeline-toggle.expanded .timeline-toggle-btn,
.timeline-toggle.expanded .timeline-toggle-text {
    display: none;
}

.timeline-toggle-text {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* Older Projects Collapsible */
.older-projects {
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    max-height: 3000px;
    opacity: 1;
}

.older-projects.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Older-projects alternation is now handled by the global JS
   updateTimelineAlternation() function — no manual CSS reverse needed. */

/* Bottom Show Less Toggle */
.timeline-toggle-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    padding-bottom: 20px;
}

.timeline-toggle-bottom .timeline-toggle-text {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.timeline-date {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.project-tagline {
    font-style: normal;
    color: #5a6c7d;
    margin-bottom: 14px;
    line-height: 1.5;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-links a,
.project-links .gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.project-links a:hover,
.project-links .gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.project-links button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border: none;
    cursor: pointer;
    align-self: center;
}

.project-links button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.project-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-bullets li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #5a6c7d;
    line-height: 1.6;
    font-size: 15px;
}

.project-bullets li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 20px;
    font-weight: bold;
}

.collaborator {
    margin-top: 20px;
    font-size: 12px;
    color: #7a8a99;
    font-style: italic;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.gallery-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    padding: 20px;
}

.gallery-modal.open {
    opacity: 1;
    visibility: visible;
}

.gallery-container {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-image-wrapper {
    width: 100%;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-image-wrapper img {
    max-width: 100%;
    max-height: 62vh;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 8px 20px;
    color: #2c3e50;
    font-weight: 600;
    gap: 12px;
}

.gallery-description {
    padding: 0 20px 16px 20px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.gallery-counter {
    font-size: 13px;
    color: #7a8a99;
    font-weight: 500;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 0 0 20px 0;
}

.gallery-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.45);
}

.gallery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #1f2937;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.btn {
    display: block;
    margin: 50px auto;
    width: fit-content;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 50px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}


/*-----------Deployed Apps Section------------*/
#deployed-apps {
    padding: 50px 0;
    background: #ffffff;
}

#deployed-apps .subtitle {
    margin-bottom: 40px;
}

.deployed-layout {
    display: flex;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    /* Consistent height across tabs regardless of content/image size */
    min-height: 420px;
}

/* Responsive YouTube iframe embed for internship panels */
.intern-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    border-radius: 10px;
    overflow: hidden;
}

.intern-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* YouTube video thumbnail with play button overlay */
.intern-video-thumb {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.intern-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.intern-video-thumb:hover img {
    transform: scale(1.03);
}

.intern-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    backdrop-filter: blur(4px);
    transition: background 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.intern-video-thumb:hover .intern-play-btn {
    background: rgba(102, 126, 234, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
}

.deployed-tabs {
    flex: 0 0 auto;
    min-width: 180px;
    background: linear-gradient(180deg, #f8f9ff 0%, #f0f2ff 100%);
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.deployed-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 22px 24px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    position: relative;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.deployed-tab:hover {
    background: rgba(102, 126, 234, 0.06);
}

.deployed-tab.active-deployed-tab {
    background: rgba(102, 126, 234, 0.08);
    border-left-color: #667eea;
}

.deployed-tab.active-deployed-tab::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 2px;
}

.deployed-tab-name {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

.deployed-tab.active-deployed-tab .deployed-tab-name {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.deployed-tab-sub {
    font-size: 12px;
    color: #7a8a99;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.deployed-content {
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.deployed-panel {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.35s ease;
}

.deployed-panel.active-deployed-panel {
    display: flex;
}

/* Horizontal row: info left, gallery right */
.deployed-panel-row {
    display: flex;
    gap: 28px;
    align-items: stretch;
}

/* iOS variant: portrait images are narrow, so give more room to info */
.deployed-panel-row-mobile {
    gap: 24px;
}

.deployed-panel-row-mobile .deployed-section-info {
    flex: 1 1 58%;
}

.deployed-panel-row-mobile .deployed-section-gallery-mobile {
    flex: 0 0 200px;
}

/* Info section — left column */
.deployed-section-info {
    flex: 55;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.deployed-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.deployed-tagline {
    font-size: 14.5px;
    font-weight: 600;
    color: #3a4a5c;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.deployed-section-info p {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.65;
    margin: 0 0 8px 0;
}

.deployed-section-info p:last-of-type {
    margin-bottom: 14px;
}

/* Gallery section — right column */
.deployed-section-gallery {
    flex: 45;
    background: #f0f1ff;
    border-radius: 14px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.deployed-section-gallery-mobile {
    padding: 12px 12px 10px;
}

/* Divider — no longer used in horizontal layout */
.deployed-divider {
    display: none;
}

.deployed-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 10px;
    padding: 14px 16px;
    min-height: 220px;
    width: 100%;
    overflow: hidden;
}

.deployed-gallery-mobile {
    min-height: 300px;
    padding: 14px 16px;
}

.deployed-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.deployed-img-wrap img {
    max-width: 100%;
    max-height: 300px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    transition: opacity 0.15s ease;
}

.deployed-gallery-mobile .deployed-img-wrap img {
    max-height: 345px;
    max-width: 172px;
    border-radius: 16px;
}

/* Caption and description */
.deployed-caption {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 10px;
    text-align: center;
}

.deployed-caption-desc {
    font-size: 11.5px;
    color: #6b7c8d;
    line-height: 1.5;
    text-align: center;
    margin-top: 3px;
    min-height: 18px;
}

/* Indicator bars and play/pause */
.deployed-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.deployed-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.deployed-bar {
    flex: 1;
    height: 3px;
    background: #d0d5e0;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.deployed-bar:hover {
    background: #a0aabe;
}

.deployed-bar.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 4px;
}

.deployed-play-pause {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #d0d5dd;
    background: white;
    color: #7a8a99;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 8px;
    flex-shrink: 0;
    padding: 0;
}

.deployed-play-pause:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f5f6ff;
}

.deployed-info p {
    font-size: 14.5px;
    color: #5a6c7d;
    line-height: 1.7;
    margin: 0 0 16px 0;
}

.deployed-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.deployed-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
}

.deployed-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* Platform Toggle (Web / iOS) */
.platform-toggle {
    display: flex;
    gap: 0;
    background: #f0f2ff;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.platform-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: #7a8a99;
}

.platform-btn.active-platform {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.platform-btn:not(.active-platform):hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.06);
}

.platform-panel {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.35s ease;
}

.platform-panel.active-platform-panel {
    display: flex;
}

/*-----------Contact------------*/
#contact {
    background: #ffffff;
    padding: 80px 0 40px;
}

.contact-left {
    flex-basis: 40%;
}

.contact-right {
    flex-basis: 55%;
}

.contact-left p {
    margin-top: 25px;
    font-size: 18px;
    color: #5a6c7d;
    display: flex;
    align-items: center;
}

.contact-left p i {
    color: #667eea;
    margin-right: 15px;
    font-size: 22px;
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.btn2 {
    color: white;
    font-size: 16px;
    display: inline-block;
    margin-top: 30px;
}

.social-icons {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    text-decoration: none;
    font-size: 24px;
    color: white;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.social-icons a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.contact-right form {
    width: 100%;
}

form input,
form textarea {
    width: 100%;
    border: 2px solid #e9ecef;
    outline: none;
    background: #f8f9fa;
    padding: 18px 20px;
    margin: 15px 0;
    color: #2c3e50;
    font-size: 16px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

form input:focus,
form textarea:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

form input::placeholder,
form textarea::placeholder {
    color: #a0a9b4;
}

form .btn2 {
    padding: 16px 60px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
    width: 100%;
}

.copyright {
    width: 100%;
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 0.5px;
}

/*---------CSS for small screens --------------*/
nav .fa-solid {
    display: none;
}

@media only screen and (max-width:840px) {
    .logo {
        width: 130px;
        padding: 0px;
    }
}

@media only screen and (max-width:665px) {
    #header {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e8ba3 100%);
        overflow-x: hidden;
        padding: 120px 0 60px;
    }

    .header-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 80px 5% 40px 5%;
        gap: 30px;
        height: auto;
        max-height: none;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .container {
        padding: 10px 5%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .header-text {
        flex: 0 0 auto;
        font-size: 16px;
        text-align: center;
        order: 2;
    }

    .header-text p {
        font-size: 12px;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }

    .header-text h1 {
        font-size: 32px;
        margin-top: 0;
        line-height: 1.2;
    }

    .header-text h1 span {
        font-size: 32px;
    }

    .header-image {
        flex: 0 0 auto;
        width: 70%;
        max-width: 280px;
        height: 350px;
        order: 1;
        border-radius: 20px;
        margin: 0;
    }

    .header-image img {
        height: 100%;
        display: block;
    }

    #about,
    #portfolio,
    #contact {
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .top-projects {
        display: none;
    }

    .gallery-container {
        max-width: 100%;
    }

    .gallery-image-wrapper {
        padding: 10px;
    }

    .gallery-description {
        font-size: 13px;
    }

    .subtitle {
        font-size: 36px;
    }

    .tab-titles {
        flex-wrap: wrap;
        gap: 5px;
    }

    .skill-grid {
        grid-template-columns: 1fr;
    }

    .tab-links {
        padding: 12px 20px;
        font-size: 14px;
    }

    #timeline-line {
        left: 30px;
    }

    .timeline-item {
        justify-content: flex-end !important;
        padding-left: 80px;
        margin-bottom: 40px;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }

    .timeline-icon {
        left: 30px;
        top: 30px;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .timeline-content {
        width: 100%;
        padding: 20px;
    }

    .timeline-content h3 {
        font-size: 20px;
    }

    .project-links {
        flex-direction: column;
        gap: 10px;
    }

    .project-links a {
        justify-content: center;
        width: 100%;
    }

    .project-bullets li {
        font-size: 14px;
    }

    .timeline-item.side-left,
    .timeline-item.side-right {
        justify-content: flex-end !important;
    }

    .row {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .row {
        flex-wrap: wrap;
    }

    .about-col-1 {
        flex: 0 0 100%;
        min-width: auto;
        margin-bottom: 30px;
    }

    .about-col-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .contact-left,
    .contact-right {
        flex-basis: 100%;
        max-width: 100%;
    }

    nav .fa-solid {
        display: block;
        font-size: 25px;
        padding: 20px;
    }

    nav ul {
        background: #e9e9e9;
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 2;
        transition: right 0.5s;
    }

    nav ul li {
        display: block;
        margin: 25px;
    }

    nav ul .fa-solid {
        position: absolute;
        top: 25px;
        left: 25px;
        cursor: pointer;
    }

    .subtitle {
        font-size: 40px;
    }

    .about-col-1,
    .about-col-2 {
        flex-basis: 100%;
    }

    .about-col-1 {
        margin-bottom: 30px;
    }

    .about-col-2 {
        font-size: 14px;
    }

    .tab-links {
        font-size: 16px;
        margin-right: 15px;
    }

    .contact-left,
    .contact-right {
        flex-basis: 100%;
    }

    /* ---- Technical Internships mobile layout ---- */
    #internships .deployed-layout {
        flex-direction: column;
        min-height: auto;
        border-radius: 14px;
    }

    #internships .deployed-tabs {
        flex-direction: row;
        min-width: 0;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        background: linear-gradient(90deg, #f8f9ff 0%, #f0f2ff 100%);
        padding: 8px 8px 0;
    }

    #internships .deployed-tab {
        flex: 0 0 auto;
        padding: 10px 18px;
        border-left: none !important;
        border-bottom: 3px solid transparent;
        text-align: center;
        white-space: nowrap;
    }

    #internships .deployed-tab.active-deployed-tab {
        border-left: none !important;
        border-bottom: 3px solid #667eea;
    }

    #internships .deployed-tab.active-deployed-tab::after {
        display: none;
    }

    #internships .deployed-content {
        padding: 16px;
    }

    #internships .deployed-panel-row {
        flex-direction: column;
        gap: 20px;
    }

    #internships .deployed-section-info {
        flex: 0 0 auto;
        max-width: 100%;
    }

    #internships .deployed-section-gallery {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    #internships .deployed-gallery {
        max-height: 280px;
    }

    #internships .deployed-img-wrap img {
        max-height: 260px;
    }

    #internships .deployed-title {
        font-size: 20px;
    }

    #internships .deployed-tagline {
        font-size: 13px;
    }

    #internships .internship-details li {
        font-size: 13px;
        margin-bottom: 6px;
    }

    #internships .deployed-links {
        flex-wrap: wrap;
    }

    /* Video thumbnail play button on mobile */
    .intern-video-thumb .intern-play-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

}