/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    animation: modalFadeIn 0.3s ease-out forwards;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    position: relative;
    transform: scale(0.9) translateY(20px);
    animation: modalSlideIn 0.3s ease-out forwards;
    overflow-y: auto;
    margin: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    color: #5B497E;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    color: #7384CD;
    transform: scale(1.1);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    color: #471A4F;
    margin: 0;
    text-align: left;
    font-size: 2rem;
}

.modal-divider {
    border: none;
    border-top: 2px solid #471A4F;
    margin: 8px 0 0 0;
    width: 100%;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
}

.modal-left {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel {
    position: relative;
    background: #FFFFFF;
    border: 2px solid #565F99;
    border-radius: 12px;
    overflow: hidden;
}

.carousel-track {
    position: relative;
    height: 260px;
    transition: transform 0.3s ease;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 260px;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(91,73,126,0.9);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-nav.prev { left: 10px; }
.carousel-nav.next { right: 10px; }

.carousel-nav:hover {
    background: rgba(91,73,126,1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 0 0;
    margin-top: 8px;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #5B497E;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-dots .dot.active {
    background: #5B497E;
}

.carousel-dots .dot:hover {
    transform: scale(1.2);
}

.modal-right p {
    font-family: "Inria Sans", sans-serif;
    color: #471A4F;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-right li {
    font-family: "Inria Sans", sans-serif;
    color: #471A4F;
    font-weight: 700;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.modal-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 1rem;
}

.star-bullet {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.modal-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #5B497E;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-family: "Inria Sans", sans-serif;
    font-weight: 600;
    transition: background-color 0.2s ease;
    align-self: flex-start;
    border: #5B497E 2px solid;
}

.modal-button:hover {
    background: #7384CD;

}

.modal-button svg {
    width: 20px;
    height: 20px;
}

/* Expanded Modal Content */
.modal-expanded-content {
    margin-top: 0;
    padding-top: 24px;
    border-top: 2px solid #471A4F;
}

.features-section {
    margin-bottom: 24px;
}

.features-section h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    color: #471A4F;
    font-size: 1.5rem;
    margin-bottom: 12px;
    margin-top: 0;
}

.features-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.features-list li {
    font-family: "Inria Sans", sans-serif;
    color: #471A4F;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 8px;
    padding-left: 0;
    position: relative;
}

/* Responsive Modal Styles */
@media (max-width: 900px) {
    .modal-body { 
        grid-template-columns: 1fr; 
        gap: 16px;
    }
    
    .modal-content {
        width: 95%;
        padding: 16px;
        max-height: 95vh;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .carousel-track {
        height: 200px;
    }
    
    .carousel-item {
        height: 200px;
    }
}

@media (max-width: 600px) {
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 100%;
        padding: 12px;
        margin-top: 20px;
        border-radius: 12px;
        max-height: calc(100vh - 40px);
    }
    
    .modal-header {
        margin-bottom: 16px;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
        padding-right: 40px;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
    }
    
    .modal-close svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel {
        border-width: 1px;
    }
    
    .carousel-track {
        height: 160px;
    }
    
    .carousel-item {
        height: 160px;
    }
    
    .carousel-nav {
        width: 32px;
        height: 32px;
    }
    
    .modal-body {
        gap: 12px;
    }
    
    .modal-list li {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .modal-button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .features-section h3 {
        font-size: 1.1rem;
    }
    
    .features-list li {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

@media (max-width: 400px) {
    .modal-content {
        padding: 8px;
        margin-top: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .carousel-track {
        height: 120px;
    }
    
    .carousel-item {
        height: 120px;
    }
    
    .modal-right p {
        font-size: 1rem;
    }
    
    .modal-list li {
        font-size: 1rem;
    }
    
    .features-section h3 {
        font-size: 1rem;
    }
    
    .features-list li {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

/* Education & Skills Section */
.skills-title {
    font-family: "Inria Serif", serif;
    font-weight: 400;
    color: #5B497E;
    font-size: 3rem !important;
    line-height: 1.2;
    display: block;
    position: relative;
    margin: 8px 0 26px;
    text-decoration: none !important;
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    margin-top: -40px;
}

.skills-title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Skills stars position */
.skills-title .star-motif.top-left {
    position: absolute;
    top: -30px;
    left: calc(50% - 230px);
}

.skills-title .star-motif.bottom-right {
    position: absolute;
    bottom: -20px;
    right: calc(50% - 235px);
}

/* Remove circles from Skills title stars */
.skills-title .custom-star .star-decoration {
    display: none;
}

/* Make stars smaller for Skills title */
.skills-title .custom-star {
    width: 0.5em;
    height: 0.5em;
}

.skills-title .custom-star svg path {
    stroke-width: 0.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.skills-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.0s ease-out, transform 1.0s ease-out;
}

.skills-content.animate {
    opacity: 1;
    transform: translateY(0);
}

.education-section {
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
}

/* Connecting line running through education items */
.education-section::before {
    content: '';
    position: absolute;
    left: 20px; /* Center of larger star icon */
    top: 20px; /* Start from center of first star */
    height: calc(100% - 10px); /* Run through both stars with shorter extension */
    width: 3px;
    background-color: #7384CD;
    z-index: 2; /* Behind stars but visible through them */
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 2; /* Ensure items appear above connecting lines */
}

.education-item:last-child {
    align-items: flex-start; /* Back to original alignment */
}

.education-item:last-child .education-icon {
    margin-top: -30px; /* Move the bottom star up more */
}

.education-item:last-child .education-details {
    margin-top: -30px; /* Move the text up to align with the star */
}

.education-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
}

.education-star {
    width: 100%;
    height: 100%;
    fill: #7384CD;
    stroke: #212561;
    stroke-width: 1.5;
}

.education-details h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #471A4F;
    margin: 0 0 12px 0;
    text-align: left;
}

.education-period {
    font-family: "Inria Sans", sans-serif;
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 8px 0;
    text-align: left;
}

.education-qualification {
    font-family: "Inria Sans", sans-serif;
    font-size: 1.2rem;
    color: #471A4F;
    margin: 0;
    text-align: left;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.skill-category {
    padding: 32px 20px;
    border-radius: 12px;
    background-color: #565F99 !important;
    color: white;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.skill-category h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 16px 0;
    color: white;
}

.skill-category ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.skill-category li {
    font-family: "Inria Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 8px;
    color: white;
}

/* Responsive Skills */
@media (max-width: 768px) {
    .skills-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .skills-title {
        font-size: 4rem;
    }
    
    .education-section {
        gap: 50px; /* Larger gap on mobile */
    }

    .education-item {
        gap: 16px;
    }
    
    .education-icon {
        width: 32px;
        height: 32px;
    }

    .education-details h3 {
        font-size: 1.3rem;
    }

    .education-period {
        font-size: 1rem;
    }

    .education-qualification {
        font-size: 1.1rem;
    }

    /* Adjust connecting line for mobile */
    .education-section::before {
        left: 16px; /* Adjust for mobile star center */
        top: 16px; /* Adjust for mobile star center */
        width: 2.5px;
        height: calc(100% + 0px); /* Adjust extension for mobile */
    }
}

@media (max-width: 480px) {
    
    .skills-content {
        gap: 30px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .skill-category {
        padding: 24px 16px;
        min-height: 140px;
    }
    
    .skill-category h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .skill-category li {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .education-section {
        gap: 40px;
    }

    .education-icon {
        width: 28px;
        height: 28px;
    }

    .education-details h3 {
        font-size: 1.2rem;
    }

    .education-period {
        font-size: 0.95rem;
    }

    .education-qualification {
        font-size: 1rem;
    }

    .education-section::before {
        left: 14px;
        top: 14px;
        width: 2px;
    }

    .education-item:last-child .education-icon {
        margin-top: -25px;
    }
    
    .education-item:last-child .education-details {
        margin-top: -25px;
    }
}

body {
    background-color: #CCE0EA;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    padding-top: 60px;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

html {
    scroll-padding-top: 60px;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #FAFAFA;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateY(0);
}

nav a {
    font-family: "Inria Sans", sans-serif;
    font-style: normal;
    text-decoration: none;
    color: #471A4F;
    padding: 10px 15px;
    transition: color 0.3s ease-in-out;
    position: relative;
}

nav a::after {
    content: none;
}

nav a:hover {
    color: #471A4F;
}

nav a:hover::after {
    transform: none;
}

.hamburger-nav {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background-color: transparent;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #471A4F;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.hamburger-icon span:nth-child(1) {
    top: 0;
}

.hamburger-icon span:nth-child(2) {
    top: 9px;
}

.hamburger-icon span:nth-child(3) {
    top: 18px;
}

.hamburger-icon.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100vh;
    background-color: #FAFAFA;
    padding: 60px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    font-family: "Inria Sans", sans-serif;
    font-style: normal;
    text-decoration: none;
    color: #471A4F;
    border-bottom: 1px solid rgba(71, 26, 79, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    color: #8A2BE2;
    padding-left: 5px;
}

.mobile-menu.show {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(228, 241, 248, 0.9);
    z-index: 1000;
    display: none;
}

.mobile-menu-overlay.show {
    display: block;
}

.close-menu-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.close-menu-icon svg {
    width: 100%;
    height: 100%;
}

.close-menu-icon:hover svg path {
    stroke: #8A2BE2;
}

nav.scrolled {
    padding: 10px 0;
    background-color: rgba(250, 250, 250, 0.95);
}

nav.scrolled .hamburger-nav {
    display: block;
}

/* About Section */
#about {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    padding: 40px;
    width: 100%;
    background-color: #FFFFFF;
}

.about-content {
    margin-top: -20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.profile-frame {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 450px;
    height: 450px;
    border: 4px solid #7384CD;
    border-radius: 500px;
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.8);
    background-color: #E4F1F8;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-position: 80%;
    object-fit: cover;
}

.name-container {
    position: relative;
    display: inline-block;
    margin: 40px 0;
}

h1 {
    font-family: "Imperial Script", cursive;
    font-weight: 400;
    color: #471A4F;
    font-size: 9rem !important;
    margin-bottom: 10px;
    line-height: 0.9;
    display: block;
    width: 100%;
    text-align: left;
    position: relative;
}

h1 .star-motif {
    color: #8A2BE2;
    margin: 0 8px;
    font-size: 3rem;
    display: inline-block;
    vertical-align: middle;
}

.star-motif {
    position: relative;
    display: inline-block;
    color: #8A2BE2;
    margin: 0 8px;
    font-size: 3rem;
    vertical-align: middle;
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.8);
}

.star-motif.top-left {
    position: absolute;
    top: -25px;
    left: -20px;
}

.star-motif.bottom-right {
    position: absolute;
    bottom: -20px;
    right: -55px;
}

.custom-star {
    width: 0.7em;
    height: 0.7em;
    display: inline-block;
    position: relative;
}

.custom-star svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}


.star-decoration {
    position: absolute;
    width: 0.3em;
    height: 0.3em;
    background-color: #7384CD;
    border-radius: 50%;
    border: 1.5px solid #212561;
}

.star-decoration.top-left {
    top: -0.1em;
    left: -0.2em;
    width: 0.2em;
    height: 0.2em;
}

.star-decoration.bottom-right {
    bottom: -0.1em;
    right: -0.2em;
    width: 0.15em;
    height: 0.15em;
}

h2 {
    font-family: "Inria Sans", sans-serif;
    font-weight: bold !important;
    font-style: italic !important;
    font-size: 1.4rem !important;
    color: #5B497E;
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
    margin-bottom: 20px;
    margin-top: 5px;
    text-align: left;
}

.bio-description p {
    font-family: "Inria Sans", sans-serif;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    color: #471A4F;
}


p {
    font-family: "Inria Serif", serif;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    color: #471A4F;
}

.about-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* MODIFIED - Projects title styling */
.projects-title {
    font-family: "Inria Serif", serif;
    font-weight: 400;
    color: #5B497E;
    font-size: 3rem !important;
    line-height: 1.2;
    display: block;
    position: relative;
    margin: 8px 0 26px;
    text-decoration: none !important;
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    margin-top: -40px;
}

.projects-title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* MODIFIED - Projects stars position */
.name-container.text-center {
    display: block;
    position: relative;
    width: 100%;
}

/* MODIFIED - Adjust position of the stars for Projects title */
.projects-title .star-motif.top-left {
    position: absolute;
    top: -30px;
    left: calc(50% - 120px);
}

.projects-title .star-motif.bottom-right {
    position: absolute;
    bottom: -20px;
    right: calc(50% - 130px);
}

/* MODIFIED - Remove circles from Projects title stars */
.projects-title .custom-star .star-decoration {
    display: none;
}

/* MODIFIED - Make stars smaller for Projects title */
.projects-title .custom-star {
    width: 0.5em;
    height: 0.5em;
}

.projects-title .custom-star svg path {
    stroke-width: 0.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* Activities title styling - matching projects title */
.activities-title {
    font-family: "Inria Serif", serif;
    font-weight: 400;
    color: #5B497E;
    font-size: 3rem !important;
    line-height: 1.2;
    display: block;
    position: relative;
    margin: 8px 0 26px;
    text-decoration: none !important;
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    margin-top: -40px;
}

.activities-title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Activities title stars positioning */
.activities-title .star-motif.top-left {
    position: absolute;
    top: -30px;
    left: calc(50% - 130px);
}

.activities-title .star-motif.bottom-right {
    position: absolute;
    bottom: -20px;
    right: calc(50% - 140px);
}

/* Remove circles from Activities title stars */
.activities-title .custom-star .star-decoration {
    display: none;
}

/* Make stars smaller for Activities title */
.activities-title .custom-star {
    width: 0.5em;
    height: 0.5em;
}

.activities-title .custom-star svg path {
    stroke-width: 0.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* Contact title styling - matching other section headers */
.contact-title {
    font-family: "Inria Serif", serif;
    font-weight: 400;
    color: #5B497E;
    font-size: 3rem !important;
    line-height: 1.2;
    display: block;
    position: relative;
    margin: 8px 0 26px;
    text-decoration: none !important;
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    margin-top: -40px;
}

.contact-title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Contact title stars positioning */
.contact-title .star-motif.top-left {
    position: absolute;
    top: -30px;
    left: calc(50% - 150px);
}

.contact-title .star-motif.bottom-right {
    position: absolute;
    bottom: -20px;
    right: calc(50% - 160px);
}

/* Remove circles from Contact title stars */
.contact-title .custom-star .star-decoration {
    display: none;
}

/* Make stars smaller for Contact title */
.contact-title .custom-star {
    width: 0.5em;
    height: 0.5em;
}

.contact-title .custom-star svg path {
    stroke-width: 0.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* Contact Section Content */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.0s ease-out, transform 1.0s ease-out;
}

.contact-content.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Left Column - Contact Info Card */
.contact-left {
    width: 100%;
}

.contact-info-card {
    background: #565F99;
    color: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.contact-info-card h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0 0 16px 0;
    color: white;
}

.contact-info-card h4 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 32px 0 0px 0;
    color: white;
}

.contact-name {
    font-family: "Inria Sans", sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 0px 0;
    color: white;
}

.contact-details {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-family: "Inria Sans", sans-serif;
    font-size: 1rem;
    color: white;
}

.contact-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}


/* SVG contact icons */
.contact-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.contact-item a {
    color: #CCE0EA;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: white;
}

.location-info p, .resume-section p {
    font-family: "Inria Sans", sans-serif;
    font-size: 1rem;
    /* margin: 0 0 8px 0; */
    color: white;
}

.singapore-time, .singapore-date {
    font-family: "Inria Sans", sans-serif;
    font-size: 0.95rem;
    /* margin: 0 0 6px 0; */
    color: white;
}

#singapore-time, #singapore-date {
    /* font-weight: 600; */
    color: white;
}

.download-btn {
    display: inline-block;
    background: white;
    color: #565F99;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Inria Sans", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.download-btn:hover {
    background: #CCE0EA;
    transform: translateY(-2px);
}

/* Right Column - Contact Form */
.contact-right {
    width: 100%;
}

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

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

.form-group label {
    font-family: "Inria Sans", sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #471A4F;
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
    background: #F5F5F5;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    padding: 12px;
    font-family: "Inria Sans", sans-serif;
    font-size: 1rem;
    color: #471A4F;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5B497E;
    background: white;
    box-shadow: 0 0 0 3px rgba(91, 73, 126, 0.1);
}

.form-group textarea {
    min-height: 10px;
    font-family: "Inria Sans", sans-serif;
}

.submit-btn {
    background: #5B497E;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-family: "Inria Sans", sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    background: #7384CD;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(91, 73, 126, 0.4);
    scale: 1.02;
}

.submit-btn:active {
    transform: translateY(-1px);
    scale: 1.01;
    box-shadow: 0 2px 8px rgba(91, 73, 126, 0.3);
}

/* Submit button loading state */
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn:disabled:hover {
    background: #5B497E;
    transform: none;
    box-shadow: none;
    scale: 1;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    font-family: "Inria Sans", sans-serif;
}

/* Error messages */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
    font-family: "Inria Sans", sans-serif;
    font-weight: 500;
}

.error-message:not(:empty) {
    display: block;
}

/* Error message container */
.error-message-container {
    text-align: center;
    padding: 40px;
    background: #fdf2f2;
    border-radius: 12px;
    border: 2px solid #e74c3c;
}

.error-message-container h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #c0392b;
    margin: 0 0 12px 0;
}

.error-message-container p {
    font-family: "Inria Sans", sans-serif;
    font-size: 1rem;
    color: #7f8c8d;
    margin: 0 0 20px 0;
}

.retry-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Inria Sans", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Form field validation states */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.form-group input.success,
.form-group textarea.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1);
}

/* Thank you message */
.thank-you-message {
    text-align: center;
    padding: 40px;
    background: #E4F1F8;
    border-radius: 12px;
    border: 2px solid #7384CD;
}

.thank-you-message h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #471A4F;
    margin: 0 0 12px 0;
}

.thank-you-message p {
    font-family: "Inria Sans", sans-serif;
    font-size: 1rem;
    color: #5B497E;
    margin: 0;
}


/* Responsive Design for Contact Section */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 15px;
    }
    
    /* Keep contact title centered on mobile */
    .contact-title {
        text-align: center;
        font-size: 2rem !important;
    }
    
    /* Responsive star positioning for centered title */
    .contact-title .star-motif.top-left {
        top: -15px;
        left: calc(50% - 155px);
    }
    
    .contact-title .star-motif.bottom-right {
        bottom: -10px;
        right: calc(50% - 165px);
    }
    
    .contact-info-card {
        padding: 30px 24px;
    }
    
    .contact-info-card h3 {
        font-size: 1.5rem;
        text-align: left;
    }
    
    .contact-info-card h4 {
        font-size: 1.2rem;
        margin-top: 24px;
        text-align: left;
    }
    
    /* Left-align all contact info text */
    .contact-info-card p {
        text-align: left;
    }
    
    /* Left-align form labels */
    .form-group label {
        text-align: left;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    .submit-btn {
        width: 100%;
        align-self: stretch;
    }
}

@media (max-width: 480px) {
    .contact-info-card {
        padding: 24px 20px;
    }
    
    .contact-info-card h3 {
        font-size: 1.3rem;
        text-align: left;
    }
    
    .contact-info-card h4 {
        text-align: left;
    }
    
    .contact-info-card p {
        text-align: left;
    }
    
    .contact-item {
        font-size: 0.95rem;
    }
    
    .form-group label {
        font-size: 1rem;
        text-align: left;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 8px;
        font-size: 0.95rem;
    }
    
    /* Smaller screen title adjustments - keep centered */
    .contact-title {
        text-align: center;
        font-size: 1.7rem !important;
    }
    
    .contact-title .star-motif.top-left {
        top: -15px;
        left: calc(50% - 80px);
    }
    
    .contact-title .star-motif.bottom-right {
        bottom: -15px;
        right: calc(50% - 80px);
    }
}

/* Activities content styling - Two Column Layout */
.activities-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.0s ease-out, transform 1.0s ease-out;
}

.activities-content.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Left Column Styling */
.activities-left {
    width: 100%;
}

.activity-section {
    margin-bottom: 40px;
}

.activity-subheader {
    font-family: "Inria Sans", sans-serif;
    font-weight: bold;
    font-style: italic;
    font-size: 1.5rem;
    color: #471A4F;
    margin-bottom: 16px;
    text-align: left;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.activity-text {
    margin-bottom: 30px;
}

.activity-text p {
    font-family: "Inria Sans", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #471A4F;
    margin: 0 0 16px 0;
    text-align: left;
    max-width: none;
}

/* Activities Table Styling */
.activities-table {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 8px;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Inria Sans", sans-serif;
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #7384CD;
}

.activity-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.activity-table th {
    background-color: #7384CD;
    color: #FFFFFF;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.activity-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #E8E8E8;
    color: #471A4F;
    font-size: 0.9rem;
}

.activity-table tbody tr:hover {
    background-color: #F8F9FA;
}

.activity-table tbody tr:last-child td {
    border-bottom: none;
}

/* Custom scrollbar for activities table */
.activities-table::-webkit-scrollbar {
    width: 8px;
}

.activities-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.activities-table::-webkit-scrollbar-thumb {
    background: #7384CD;
    border-radius: 4px;
}

.activities-table::-webkit-scrollbar-thumb:hover {
    background: #5B497E;
}

/* Right Column - Photo Carousel */
.activities-right {
    width: 100%;
    display: flex;
    justify-content: center;
}

.activities-carousel {
    width: 100%;
    max-width: 500px;
}

/* Activities Carousel Specific Styling */
.activities-carousel .carousel-container {
    position: relative;
    background: #FFFFFF;
    border: 3px solid #565F99;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.activities-carousel .carousel-track {
    position: relative;
    height: 650px;
    overflow: hidden;
}

.activities-carousel .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.activities-carousel .carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.activities-carousel .carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Specific positioning for Event Photos in Activities Carousel */
.activities-carousel .carousel-slide:nth-child(2) .carousel-image {
    object-position: 36% center; /* Move Event Photo 2 (Mic Check) to the right */
}

.activities-carousel .carousel-slide:nth-child(3) .carousel-image {
    object-position: 62% center; /* Move Event Photo 3 more to the right */
}

.activities-carousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    color: #FFFFFF;
}

.activities-carousel .carousel-caption h4 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Modal Carousel Styling (Original sizes) - for project modals */
.modal-left .carousel {
    position: relative;
    background: #FFFFFF;
    border: 2px solid #565F99;
    border-radius: 12px;
    overflow: hidden;
}

.modal-left .carousel-track {
    position: relative;
    height: 260px;
    transition: transform 0.3s ease;
}

.modal-left .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 260px;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.modal-left .carousel-item.active {
    opacity: 1;
    visibility: visible;
}

/* Adjust positioning for first image in Business Analytics Project modal */
#business-analytics-modal .carousel-item:first-child {
    object-position: left center;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(115, 132, 205, 0.9);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 16px;
}

.carousel-nav.prev { left: 15px; }
.carousel-nav.next { right: 15px; }

.carousel-nav:hover {
    background: rgba(115, 132, 205, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    margin-top: 16px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #7384CD;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-dots .dot.active {
    background: #7384CD;
}

.carousel-dots .dot:hover {
    transform: scale(1.2);
}

#projects {
    padding: 40px 0 80px 0;
    background-color: #FAFAFA;
}

#projects h2 {
    text-align: center;
    margin-bottom: 40px;
}

.project-card {
    background-color: #FFFFFF;
    border: 3px solid #565F99;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease-out;
    position: relative;
    padding: 10px; /* uniform frame, slightly increases photo width */
    width: 100%;
    max-width: 711px; /* 1.7x of 418 */
    height: auto;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.project-card.animate:nth-child(1) { transition-delay: 0.12s; }
.project-card.animate:nth-child(2) { transition-delay: 0.24s; }
.project-card.animate:nth-child(3) { transition-delay: 0.36s; }
.project-card.animate:nth-child(4) { transition-delay: 0.48s; }
.project-card.animate:nth-child(5) { transition-delay: 0.60s; }
.project-card.animate:nth-child(6) { transition-delay: 0.72s; }

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.project-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 385.76 / 204.51; /* keep original proportion */
    overflow: hidden;
    display: flex;
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */
    background-color: #FFFFFF;
    border-radius: 10px;
    margin: 0 auto;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill frame */
    object-position: center;
    border-radius: inherit;
}

.project-info {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 12px 44px 12px 16px; /* leave room for arrow on the right */
    background-color: rgba(91, 73, 126, 0.8);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    text-align: left;
    border-radius: 16px;
    pointer-events: none;
}

.project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-info h3 {
    font-family: "Inria Sans", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #FFFFFF;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-info p {
    font-family: "Inria Sans", sans-serif;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #FFFFFF;
    text-align: left;
    font-weight: 400;
    width: 100%;
    margin: 0;
    overflow: hidden;             /* prevent overflow */
    display: -webkit-box;         /* enable 2-line clamp */
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;        /* 1–2 lines max */
}

/* Hide the year line; show only the 1-line description */
.project-info p:first-of-type {
    display: none;
}

.project-link {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-decoration: none;
    background: transparent;
    transition: transform 0.2s ease;
    pointer-events: auto; /* allow clicking while parent is pointer-events: none */
    font-size: 0; /* hide any link text */
}

.project-link::after {
    content: '\2192'; /* right arrow only */
    font-size: 18px;
    line-height: 1;
}

.project-link:hover {
    transform: translateY(-50%) translateX(1px);
}


/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
    .about-content {
        gap: 40px;
        padding: 0 20px;
    }

    .profile-frame {
        width: 450px;
        height: 550px;
    }
    
    h1 {
        font-size: 8rem !important;
    }

    /* Section titles follow h1 scaling pattern */
    .projects-title, .activities-title, .skills-title, .contact-title {
        font-size: 2.7rem !important;
    }
    
    .star-motif.top-left {
        top: -22px;
        left: -18px;
    }
    
    .star-motif.bottom-right {
        bottom: -20px;
        right: -60px;
    }
    
    h2 {
        font-size: 2.8rem;
    }

    p {
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    .about-content {
        gap: 30px;
    }
    
    .profile-frame {
        width: 350px;
        height: 450px;
    }
    
    h1 {
        font-size: 7rem !important;
    }

    /* Section titles follow h1 scaling pattern */
    .projects-title, .activities-title, .skills-title, .contact-title {
        font-size: 2.3rem !important;
    }
    
    .star-motif.top-left {
        top: -20px;
        left: -15px;
    }
    
    .star-motif.bottom-right {
        bottom: -20px;
        right: -50px;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    #about {
        height: auto;
        min-height: 100vh;
        padding: 60px 20px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .about-text {
        align-items: center; /* Center the text elements */
        width: 100%;
    }
    
    .profile-frame {
        width: 320px;
        height: 320px;
        margin: 0 auto; /* Center the profile photo */
    }
    
    .name-container {
        margin: 30px 0; /* Reduce margin for smaller screens */
    }
    
    h1 {
        font-size: 6rem !important;
        margin-top: 20px;
        text-align: center; /* Center the name */
        margin-left: auto;
        margin-right: auto;
    }

    /* Section titles follow h1 scaling pattern */
    .projects-title, .activities-title, .skills-title, .contact-title {
        font-size: 2rem !important;
    }
    
    .star-motif {
        font-size: 2.5rem;
    }

    .star-motif.top-left {
        top: -18px;
        left: -22px;
    }
    
    .star-motif.bottom-right {
        bottom: -18px;
        right: -55px;
    }

    .star-decoration.top-left {
        width: 0.2em;
        height: 0.2em;
    }

    .star-decoration.bottom-right {
        width: 0.15em;
        height: 0.15em;
    }
    
    h2 {
        font-size: 1.3rem !important;
        text-align: center; /* Center the "About Me" text */
        margin-left: auto;
        margin-right: auto;
    }
    
    p {
        margin: 0 auto;
        text-align: center; /* Center the description text */
        max-width: 100%;
    }

    .project-image {
        height: 160px;
    }
    
    .project-info h3 {
        font-size: 1.2rem;
        margin: 0 0 8px 0;
    }
    
    .project-info p {
        font-size: 0.85rem;
        line-height: 1.3;
        margin: 0;
    }

    .regular-menu {
        display: none !important;
    }
    
    .hamburger-nav {
        display: block !important;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(71, 26, 79, 0.2);
    }
    
    .hamburger-icon {
        width: 24px;
        height: 18px;
    }
    
    .hamburger-icon span {
        background-color: #471A4F !important;
        height: 3px;
    }
    
    nav {
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    nav.scrolled {
        background-color: transparent;
        box-shadow: none;
    }
    
    body {
        padding-top: 0; /* Remove top padding in mobile view */
    }

    /* MODIFIED - Inline star positioning for Projects title */
    .projects-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 110px);
    }
    
    .projects-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 110px);
    }

    /* Inline star positioning for Activities title */
    .activities-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 125px);
    }
    
    .activities-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 125px);
    }

    /* Inline star positioning for Skills title */
    .skills-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 180px);
    }
    
    .skills-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 180px);
    }

    /* Inline star positioning for Contact title */
    .contact-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 135px);
    }
    
    .contact-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 135px);
    }

    /* Responsive activities content */
    .activities-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 15px;
    }

    .activities-right {
        order: -1; /* Put carousel above content on mobile */
    }

    .activities-carousel .carousel-container {
        max-width: 100%;
    }

    .activities-carousel .carousel-track {
        height: 630px;
    }
}

@media (max-width: 480px) {
    .profile-frame {
        width: 280px;
        height: 280px;
        margin: 0 auto; /* Center the profile photo */
    }
    
    .name-container {
        margin: 25px 0; /* Further reduce margin for the smallest screens */
    }
    
    h1 {
        font-size: 5rem !important;
        text-align: center; /* Center the name */
        margin-left: auto;
        margin-right: auto;
    }

    /* Section titles follow h1 scaling pattern */
    .projects-title, .activities-title, .skills-title, .contact-title {
        font-size: 1.7rem !important;
    }
    
    h1 .star-motif, .star-motif {
        font-size: 2rem;
    }

    .star-motif.top-left {
        top: -15px;
        left: -10px;
    }
    
    .star-motif.bottom-right {
        bottom: -15px;
        right: -25px;
    }
    
    h2 {
        font-size: 1.2rem !important;
    }
    
    p {
        font-size: 1rem;
    }
    
    nav a {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    nav a::after {
        left: 8px;
        right: 8px;
    }

    #projects {
        padding: 40px 15px;
    }
    
    .project-card {
        margin: 0 auto 30px;
    }

    #projects .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .project-image {
        height: 160px;
    }
    
    /* MODIFIED - Smallest screen inline star positioning for Projects title */
    .projects-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 90px);
    }
    
    .projects-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 90px);
    }

    /* Smallest screen inline star positioning for Activities title */
    .activities-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 100px);
    }
    
    .activities-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 100px);
    }

    /* Smallest screen inline star positioning for Skills title */
    .skills-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 140px);
    }
    
    .skills-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 140px);
    }

    /* Smallest screen inline star positioning for Contact title */
    .contact-title .star-motif.top-left {
        top: 50%;
        transform: translateY(-50%);
        left: calc(50% - 110px);
    }
    
    .contact-title .star-motif.bottom-right {
        top: 50%;
        transform: translateY(-50%);
        right: calc(50% - 110px);
    }

    /* Smallest screen activities content */
    .activities-content {
        padding: 0 10px;
        gap: 30px;
    }

    .activity-subheader {
        font-size: 1.3rem;
    }

    .activity-text p {
        font-size: 0.9rem;
    }

    .activity-table th,
    .activity-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .activities-carousel .carousel-track {
        height: 540px;
    }

    .activities-carousel .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .activities-carousel .carousel-caption h4 {
        font-size: 1.5rem;
    }
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  
@media (min-width: 768px) and (max-width: 900px) {
#about,
#projects,
#activities,
#skills,
#contact {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    border-radius: 0;            
}

.about-content {
    flex-wrap: wrap;             
    gap: 32px;
    padding-left: 20px;
    padding-right: 20px;
}
.about-text { max-width: 700px; min-width: 0; }
.profile-frame { flex: 0 0 auto; }
}
  
@media screen and (width: 820px) and (height: 1180px), 
        screen and (min-width: 810px) and (max-width: 834px) and (orientation: portrait) {
#about,
#projects,
#activities,
#skills,
#contact {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
}

@media (min-width: 768px) and (max-width: 900px) {
    .skills-content {
      grid-template-columns: 1fr;   
      gap: 40px;
    }
  
    .skills-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)); 
      gap: 20px;
    }
  
    .skill-category {
      padding: 24px 18px;
    }
  }

.project-card .project-image {
    aspect-ratio: 16 / 9;                 
  }
  
  .project-card .project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;                   
    object-position: center;
    display: block;
  }
  
  .modal-content .carousel-track {
    width: 100%;
    aspect-ratio: 16 / 9;                  
    height: auto;                          
    max-height: min(70vh, 720px);
    margin: 0 auto;
  }
  
  .modal-content .carousel-item {
    position: absolute;
    inset: 0;                              
    width: 100%;
    height: 100%;
    object-fit: contain;                   
    object-position: center;
  }
  
  .modal-content .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .modal-content .carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  @media (min-width: 768px) and (max-width: 900px) {
    .modal-content .carousel-track { max-height: 60vh; }
  }

@media (max-width: 440px) {
  .projects-section { padding-left: 14px; padding-right: 14px; }
  .projects-grid { gap: 18px; }

  .project-card {
    width: 92.5%;
    padding: 10px;                 
    border-radius: 14px;
  }

  .project-card .project-image {
    aspect-ratio: 16 / 9;         
    width: 100%;
  }
  .project-card .project-image img {
    height: 100%;
    object-position: center;
    display: block;
  }
}

@media (max-width: 480px) {
  .skills-title .star-motif.top-left {
    top: 19.2px;               
    left: clamp(6px, 10%, 14%);
  }

  .skills-title .star-motif.bottom-right {
    bottom: -15px;           
    right: clamp(5px, 10%, 14%);
  }
}



