html {
    scroll-behavior: smooth;
}

.gradient-text {
    background: linear-gradient(45deg, #4285F4, #34A853);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-sticky {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

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

.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-item {
    border-left: 2px solid #4285F4;
    position: relative;
    padding-left: 20px;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4285F4;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.modal-content {
    max-height: calc(100vh - 5rem); /* limit modal height below navbar */
    overflow-y: auto;
    padding: 4rem 1.5rem 1.5rem 1.5rem;
    position: relative;
    margin-top: 5rem; /* push it below navbar */
}

#modal button[aria-label="Close"],
#workshopGalleryModal button[aria-label="Close"] {
    position: sticky;
    top: 1rem;
    right: 1rem;
    z-index: 100004;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 9999px;
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
    align-self: flex-end;
    margin-left: auto;
}

#modal button[aria-label="Close"]:hover,
#workshopGalleryModal button[aria-label="Close"]:hover {
    background-color: #f3f4f6;
    color: #ef4444;
}

#workshopGalleryTitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    max-height: 5.5rem;
    overflow-y: auto;
}

#workshopGalleryModal {
    display: none;
    align-items: flex-start;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100002;
    padding-top: 5rem; /* hard limit start below navbar */
}

#workshopGalleryModal.show {
    display: flex;
}

#workshopGalleryModal h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

#workshopGalleryModal p {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

#workshopGalleryImages img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#modal.show {
    display: flex !important;
}

/* Scrollable images in modal */
#modalImage {
    max-height: 60vh;
    overflow-y: auto;
    object-fit: contain;
}

#workshopGalleryImages {
    overflow-y: auto;
    max-height: 60vh;
}

#research-projects .project-item {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#research-projects .project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
