body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f0f2f5; /* A slightly softer grey */
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.page-header {
    padding: 40px 20px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #1a2a4d 0%, #253858 100%);
    color: white;
    border-radius: 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-home-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-home-btn:hover {
    transform: scale(1.05);
}

.logo-home-btn img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1); /* Makes the logo white */
}

.header-text {
    flex: 1;
    text-align: center;
}

.close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0 16px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    overflow: hidden;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    color: #fff;
}

.close-btn .btn-text {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.close-btn .btn-icon {
    font-size: 1.2rem;
    font-weight: 600;
    position: absolute;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

/* States for when header is visible */
.close-btn.header-visible .btn-text {
    opacity: 1;
    transform: scale(1);
}

.close-btn.header-visible .btn-icon {
    opacity: 0;
    transform: scale(0.8);
}

/* States for when header is not visible */
.close-btn.header-hidden .btn-text {
    opacity: 0;
    transform: scale(0.8);
}

.close-btn.header-hidden .btn-icon {
    opacity: 1;
    transform: scale(1);
    color: #1a2a4d;
}

.close-btn.header-hidden {
    width: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(26, 42, 77, 0.2);
}

.page-title {
    margin: 0 0 10px 0;
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.page-subtitle {
    margin: 0;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.main-container {
    display: flex;
    padding: 0 50px 50px 50px;
    gap: 40px;
    max-width: 1500px;
    margin: 0 auto;
}

.contact-card-container {
    flex: 1 1 340px; /* Allow shrinking but base width is 340px */
    max-width: 340px; /* Don't grow larger than 340px */
}

.contact-card {
    background: transparent;
    width: 100%; /* Changed from fixed width to be responsive */
    padding: 30px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    transition: all 0.3s ease;
    height: 100%; /* Make card fill its container */
    box-sizing: border-box; /* Include padding in height calculation */
    /* Added flex properties for centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-card:hover {
    transform: none;
    box-shadow: none;
}

.card-name {
    font-size: 1.5rem;
    color: #1a2a4d;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 25px;
}

.card-typewriter {
    margin: 0 0 25px 0;
    font-size: 1rem;
    color: #555;
    font-weight: 400;
    min-height: 1.2em; /* Prevents layout shift */
}

.profile-image-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1ecbe1;
    margin-bottom: 20px; /* Reduced from 30px to move image higher */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
}

.social-links a {
    color: #1a2a4d;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #1ecbe1;
    transform: scale(1.2);
}

.download-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 24px;
    background-color: #1a2a4d; /* Changed to solid dark blue */
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(26, 42, 77, 0.2);
}

.download-btn:hover {
    transform: translateY(-2px);
    background-color: #253858; /* Slightly lighter blue on hover */
    box-shadow: 0 4px 15px rgba(26, 42, 77, 0.4);
}

.download-btn i {
    margin-right: 8px;
}

.about-section-container {
    flex: 1 1 60%; /* Allow it to grow and shrink */
    min-width: 0; /* Prevents overflow on small screens */
}

/* Remove old about-section styles and animations */

.summary-content {
    flex: 1;
    min-width: 0;
}

/* Responsive Design for smaller screens */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column; /* Stack the columns vertically */
        padding: 20px;
        align-items: center; /* Center the cards */
    }

    .contact-card-container,
    .about-section-container {
        max-width: 600px; /* Give a max-width for tablet view */
        width: 100%;
    }

    .contact-card,
    .about-section {
        height: auto; /* Let height be determined by content again */
    }

    .profile-image-circle {
        width: 200px; /* Reduce image size on smaller screens */
        height: 200px;
    }
}

@media (max-width: 480px) {
    .profile-image-circle {
        width: 150px;
        height: 150px;
    }
}

.full-width-container {
    padding: 0 50px 50px 50px;
    display: flex; /* Use flexbox for spacing */
    flex-direction: column; /* Stack the sections vertically */
    gap: 40px; /* Add a gap between the sections */
    max-width: 1500px;
    margin: 0 auto;
}

.timeline-sections {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.timeline-sections > * {
    flex: 1 1 50%;
    min-width: 0;
    max-width: 50%;
}

.timeline-sections .details-section {
    margin-bottom: 0;
}

.timeline-sections .details-section:first-child {
    padding-top: 20px;
}

.timeline-sections .details-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.timeline-sections .timeline {
    min-height: 0;
}

.details-section {
    background: transparent; /* Changed from #fff */
    padding: 40px;
    border-radius: 16px;
    box-shadow: none; /* Removed shadow */
}

.details-section:first-of-type {
    padding-top: 20px; /* Reduced top padding to move it up */
}

.details-section h2 {
    font-size: 1.8rem;
    color: #1a2a4d;
    border-bottom: 2px solid #1ecbe1;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.details-section h2.section-break {
    margin-top: 40px;
}

.details-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2a4d;
    margin-bottom: 5px;
}

.details-section .meta {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    margin-top: 0;
}

.details-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.details-section li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.details-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: #1ecbe1;
    border-radius: 50%;
}

.timeline {
    position: relative;
    padding-left: 50px; /* Increased padding for logo */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 25px; /* Centered on the 50px icon */
    top: 5px;
    bottom: 5px;
    width: 4px; /* Increased from 2px to make it thicker */
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px; /* Space between icon and text */
}

.timeline-icon {
    position: absolute;
    left: -50px; /* Position icon to the left */
    top: -5px; /* Adjust vertical alignment */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #1ecbe1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden; /* Ensures image stays within the circle */
}

.timeline-icon img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; /* Use contain to prevent distortion */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Skills Section Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (min-width: 1100px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skills-category {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.skills-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.skills-category h3 {
    color: #1a2a4d;
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #1ecbe1;
    padding-bottom: 5px;
    text-align: center;
    font-weight: 600;
}

.skills-text-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-text-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1a2a4d;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.skill-text-card:hover {
    background: #1ecbe1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 203, 225, 0.3);
    border-color: #1ecbe1;
}

/* Projects Section Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: #f8fafc;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(30,60,120,0.06);
    padding: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid #e9ecef;
}

.project-card:hover {
    box-shadow: 0 6px 24px rgba(30,60,120,0.12);
    transform: translateY(-4px) scale(1.01);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f8f8;
    display: block;
    border-radius: 8px;
    margin-bottom: 18px;
}

.project-card h3 {
    font-size: 1.18rem;
    color: #1a2a4d;
    font-weight: 700;
    margin: 0 0 10px 0;
    padding: 0 24px;
}

.project-card p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    padding: 0 24px;
    line-height: 1.5;
}

/* Extracurricular Section Styles */
.extracurricular-content {
    margin-top: 20px;
    max-width: 1200px;
    margin: 20px auto 0 auto;
    position: relative;
    z-index: 3;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 5000px;
    margin: 0 auto;
    overflow: visible;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding-bottom: 0;
    height: 540px;
    min-height: 540px;
    max-height: 540px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    min-height: 350px;
    max-height: 350px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: block;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide.prev,
.carousel-slide.next {
    opacity: 0.3;
    z-index: 1;
}

.carousel-slide:hover {
    opacity: 0.8;
}

.carousel-slide.active:hover {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a2a4d;
}

.carousel-arrow:hover {
    background: #1ecbe1;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow-left {
    left: 10px;
}

.carousel-arrow-right {
    right: 10px;
}

.carousel-description {
    margin-top: 20px;
    text-align: center;
    padding: 0 20px 40px 20px;
    margin-bottom: 0;
    min-height: 0;
    max-height: none;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-description h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    color: #1a2a4d;
    text-align: center;
    line-height: 1.2;
    min-height: 1.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-description p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.5;
    text-align: center;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 32px auto 0 auto;
    padding-top: 0;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(30, 203, 225, 0.3);
    cursor: pointer;
    transition: background 0.3s;
    border: 2px solid transparent;
}

.indicator.active {
    background: #1ecbe1;
    border-color: #1ecbe1;
}

.indicator:hover {
    background: rgba(30, 203, 225, 0.6);
}

/* Contact Section Styles */
.contact-content {
    display: flex;
    gap: 60px;
    align-items: stretch;
    margin-top: 20px;
}

.contact-form-wrapper {
    flex: 1;
    display: flex;
}

.contact-form {
    background: #f8fafc;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(30,60,120,0.08);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1a2a4d;
    font-weight: 600;
    font-size: 1rem;
}

.required {
    color: #e74c3c;
}

.form-note {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
}

.form-note small {
    color: #666;
    font-style: italic;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e3eaf2;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1ecbe1;
    box-shadow: 0 0 0 3px rgba(30, 203, 225, 0.1);
}

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

.send-btn {
    background: #1ecbe1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: auto;
}

.send-btn:hover {
    background: #1a2a4d;
    transform: translateY(-2px);
}

.contact-card-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 40px;
}

.contact-card-new {
    background: #f8fafc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(30,60,120,0.08);
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-card-new img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 24px auto;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(30,60,120,0.15);
    display: block;
}

.contact-card-new .name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2a4d;
    margin-bottom: 8px;
}

.contact-card-new .desc-tags {
    color: #666;
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.contact-info {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #1a2a4d;
    font-size: 1rem;
}

.contact-item i {
    color: #1ecbe1;
    font-size: 1.2rem;
    width: 20px;
}

.contact-card-new .resume-btn {
    background: #1ecbe1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.contact-card-new .resume-btn:hover {
    background: #1a2a4d;
    transform: translateY(-2px);
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .timeline-sections {
        flex-direction: column;
        gap: 30px;
    }
    
    .timeline-sections > * {
        flex: 1 1 auto;
        min-width: auto;
        max-width: none;
    }
    
    .timeline-sections .details-section {
        padding: 20px !important; /* Equal padding for both sections on mobile */
    }
    
    .timeline-sections .details-section:first-child {
        padding-top: 20px !important; /* Override the reduced padding */
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .contact-card-wrapper {
        margin-top: 0;
    }
    
    .contact-card-new {
        max-width: 100%;
    }
    
    .contact-card-new img {
        width: 150px;
        height: 150px;
    }
    
    .skills-category {
        padding: 0.7rem;
    }
    
    .skill-text-card {
        font-size: 0.95rem;
        padding: 0.4rem 0.6rem;
    }
    
    .project-card img {
        height: 160px;
    }
    
    /* Carousel responsive adjustments */
    .carousel-container {
        height: 450px;
        min-height: 450px;
        max-height: 450px;
    }
    
    .carousel-wrapper {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }
    
    .carousel-description h3 {
        font-size: 1.2rem;
    }
    
    .carousel-description p {
        font-size: 0.9rem;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        gap: 15px;
    }
    
    .skills-category {
        padding: 1.2rem;
    }
    
    .skill-text-card {
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem;
    }
    
    .projects-grid {
        gap: 20px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .contact-card-new {
        padding: 30px 20px;
    }
    
    .contact-card-new img {
        width: 120px;
        height: 120px;
    }
    
    /* Carousel responsive adjustments for small screens */
    .carousel-container {
        height: 400px;
        min-height: 400px;
        max-height: 400px;
    }
    
    .carousel-wrapper {
        height: 250px;
        min-height: 250px;
        max-height: 250px;
    }
    
    .carousel-description {
        padding: 0 15px 30px 15px;
    }
    
    .carousel-description h3 {
        font-size: 1.1rem;
    }
    
    .carousel-description p {
        font-size: 0.85rem;
    }
    
    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* BACK TO TOP BUTTON */
.back-to-top {
    position: fixed;
    bottom: 60px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1a2a4d;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(26, 42, 77, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

.back-to-top:hover {
    background: #1ecbe1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 203, 225, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* PROJECT MODAL STYLES */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.project-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 24px 32px 24px 32px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1001;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1ecbe1;
}

.modal-img-wrap {
    width: 100%;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-img-wrap img {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 2px 12px rgba(30,60,120,0.10);
}

.modal-text-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#modal-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a2a4d;
    margin-bottom: 12px;
}

.modal-description {
    font-size: 1.08rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section strong {
    color: #1a2a4d;
    font-size: 1.04rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #e3f7fa;
    color: #1ecbe1;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Modal Carousel Styles */
.modal-carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.modal-carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.modal-carousel-slide {
    display: none;
    width: 100%;
}

.modal-carousel-slide.active {
    display: block;
}

.modal-carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-carousel-prev,
.modal-carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.modal-carousel-prev:hover,
.modal-carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-carousel-prev {
    left: 10px;
}

.modal-carousel-next {
    right: 10px;
}

.modal-carousel-dots {
    text-align: center;
    padding: 10px 0;
}

.modal-carousel-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-carousel-dot.active {
    background: #717171;
}

.modal-single-image {
    width: 100%;
    margin: 20px 0;
    display: none;
}

.modal-single-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 6px;
    object-fit: contain;
}

@media (max-width: 700px) {
    .modal-content {
        padding: 18px 6vw 18px 6vw;
        max-width: 98vw;
    }
    .modal-img-wrap {
        margin-bottom: 18px;
    }
    .modal-img-wrap img {
        max-height: 300px;
        height: 300px;
    }
}

/* Clean Scrollbar with Transparent Track */
::-webkit-scrollbar {
  width: 8px !important;
  background: transparent !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(24, 28, 38, 0.92) !important;
  border-radius: 6px !important;
  border: 2px solid transparent !important;
  background-clip: content-box !important;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(44, 48, 58, 0.92) !important;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 28, 38, 0.92) transparent;
}
