body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgb(243, 243, 243);
    margin: 0px;
}

h4,
p {
    overflow-wrap: anywhere;
    white-space: normal;
}

h1,
h2,
h3,
h4 {
    margin: 10px
}

h3,
h4 {
    margin-top: 30px;
}

.video-slideshow {
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 100%);
    /* -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%); */
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 100%);
    /* mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 100%); */
    mask-repeat: no-repeat;
    mask-size: cover;
    z-index: -1;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0;
    transition: opacity 3s ease;
}

.bg-video.active {
    opacity: 1;
}

.video-card {
    background-color: #f1f1f1;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 200px;
    box-sizing: border-box;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-top: 10px;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-card h4 {
    margin: 8px 0 4px 0;
    text-align: center;
}

.video-card .video-date {
    font-size: 0.85em;
    text-align: center;
    color: #555;
}

.video-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.navbar {
    margin: 0 auto;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    position: fixed;
    width: 95%;
    background-color: #26afb986;
    border-radius: 25px;
    /* border-bottom: 2px solid rgba(255, 255, 255, 0.473); */
    box-shadow: 0 2px 8px rgb(255, 255, 255);
    z-index: 1000;
}

.nav-left,
.nav-right {
    display: flex;
    width: 50%;
}

.nav-center {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-center img,
.face-change img {
    position: absolute;
    border-radius: 25px;
    transition: opacity 0.4s ease;

}

.nav-center img {
    width: 50px;
    border: 2px solid white;
    transform: translateY(clamp(26px, calc(40px - 2vw), 45px));
}

.face-change img.base {
    position: relative;
}

.nav-center img.hover,
.face-change img.hover {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-center:hover img.hover,
.face-change:hover img.hover {
    opacity: 1;
}

.nav-center:hover img.hover {
    animation: glowPulse 1s infinite alternate;
}

.nav-center:hover img.base,
.face-change:hover img.base {
    opacity: 0;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 1px 5px rgba(255, 255, 255, 0.6);
    }

    100% {
        box-shadow: 0 0 2px 10px rgba(255, 255, 255, 0.8);
    }
}

.tooltip {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.9em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-center img:hover+.tooltip {
    animation: tooltipPulse 1s infinite alternate;
}

.nav-center img:hover+.tooltip {
    opacity: 1;
}

@keyframes tooltipPulse {
    0% {
        transform: translateX(-50%) translateY(-5px);
    }

    100% {
        transform: translateX(-50%) translateY(0);
    }
}

.face-change {
    display: flex;
    justify-content: center;
    position: relative;
}

.face-change .tooltip {
    position: absolute;
    bottom: 120px;
    left: 100%;
    opacity: 1;
    /* background-color: rgba(72, 165, 194, 0); */
    animation: tooltipPulse 1s infinite alternate;
}

.face-change:hover .tooltip {
    animation: tooltipPulse 1s infinite alternate, bluePulse 1.5s infinite alternate;
}

.face-change .tooltip::after {
    content: attr(data-default);
}

.face-change:hover .tooltip::after {
    content: attr(data-hover);
}

@keyframes bluePulse {
    0% {
        box-shadow: 0 0 5px 5px rgba(72, 165, 194, 0.6);
    }

    100% {
        box-shadow: 0 0 10px 10px rgba(72, 165, 194, 0.8);
    }
}

.nav-link {
    color: white;
    height: 50px;
}

.navbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
    text-decoration: none;
    flex: 1;
    font-weight: 500;
    border-radius: 25px;
    transition: border 0.5s ease, background-color 0.5s ease;
    border: 2px solid transparent;
}

.navbar a:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.container {
    width: clamp(60%, 80vw, 90%);
    margin: auto;
    text-align: left;
    position: relative;
}

.section-title {
    letter-spacing: 4px;
    text-align: center !important;
}

.grey-rule {
    margin: 50px auto;
    width: 10%;
    border-color: #9e9e9e !important;
}

.grey-rule-small {
    margin: 15px auto;
    width: 8%;
    border-color: #9e9e9e !important;
}

.grey-rule-smaller {
    margin: 10px auto;
    width: 5%;
    border-color: #9e9e9e !important;
}

.grey-rule-smallest {
    margin: 5px auto;
    width: 3%;
    border-color: #9e9e9e !important;
}

.profile-box {
    max-width: 800px;
    margin: 0px auto;
    padding: 25px 25px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-box ul {
    padding: 20px;
    width: 100%;
    list-style: none;
}

.profile-box ul li {
    position: relative;
    margin-bottom: 12px;
    line-height: 1.6;
}

.profile-box img {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    float: right;
    transition: 1s ease
}

#projects img:hover,
.pub-box img:hover {
    filter: brightness(70%);
}

.profile-box a {
    color: #0066cc;
    text-decoration: none;
}

.profile-box a:hover {
    text-decoration: underline;
}

.video-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.video-gallery .profile-box {
    flex: 1 1 clamp(250px, 30%, 400px);
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-aspect-ratio: 1/1) {
    .video-gallery .profile-box {
        max-width: 90%;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px
    }
}

.video-container {
    position: relative;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.pub-box {
    box-sizing: border-box;
    margin: 0 -8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    background-color: #f1f1f1;
    display: flex;
    flex-direction: column;
}

.pub-box img {
    max-width: 100px;
    height: auto;
    display: block;
    transition: 1s ease;
}

.pub-box img:hover {
    filter: brightness(70%);
}

.title-img {
    display: flex;
    align-items: center
}

.footer-bar {
    background-color: #333;
    color: #fff;
    padding: 1rem 2rem;
}

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

.footer-content a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: #1e90ff;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-info p {
    margin: 0.2rem 0;
    text-align: right;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px
}

.social-links img {
    width: 50px;
    transition: 1s ease;
}

.social-links img:hover {
    filter: brightness(70%);
}

ul.custom-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

ul.custom-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 1rem;
    line-height: 1.5;
}

ul.custom-list li::before {
    content: '–';
    color: grey;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}