:root {
    --primary: #009469;
    --accent: #F39117;
    --text-secondary: #5C5C5C;
}

/* ==========================================================================
   Jekyll Site-Specific Styles
   ========================================================================== */

/* --- Content wrapper (replaces mx-auto max-w-7xl w-85 utility combo) --- */
.content-wrapper {
    max-width: 1180px;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* --- Site header (nav bar) --- */
.site-header {
    background-color: rgba(0, 148, 105, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    height: 56px;
    display: flex;
    align-items: center;
}
@media (min-width: 768px) {
    .site-header {
        height: 48px;
    }
}
.site-header-transparent {
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 50;
    background-color: transparent;
}

/* --- Hero slider (Jekyll implementation) --- */
#lightSlider {
    position: relative;
    overflow: hidden;
}

#lightSlider li {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

#lightSlider li.active {
    position: relative;
    opacity: 1;
    z-index: 1;
}

.slider-pager {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

@media screen and (max-width: 767px) {
    .slider-pager {
        bottom: 7px;
    }
}

.slider-pager button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #fff;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s;
}

.slider-pager button.active {
    background: #fff;
}

.navbar-mobile-background {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* --- Partner logos (homepage) --- */
.partner-logo {
    border: 1px solid #aadac4;
    display: block;
}

.partner-logo img {
    max-width: 100%;
    display: block;
}

/* --- Primary button --- */
.button-primary {
    text-decoration: none;
    text-align: center;
    font-family: Inter;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 19px;
    border: none;
    background: #f39117;
    color: #fff;
    padding: 16px 48px;
    display: block;
    border-radius: 4px;
    transition-duration: 0.4s;
}

@media screen and (max-width: 767px) {
    .button-primary {
        font-size: 14px;
        padding: 11.5px 24px;
    }
}

.button-primary:hover,
.button-primary:focus {
    background-color: #c87004;
    color: #fff;
}

.button-primary:active {
    background-color: #C87004;
}

.button-primary:disabled {
    background-color: #A0A0A0;
}


/* --- Vehicle component cards --- */
.component-card {
    background: #FFFFFF;
    color: #191919;
    box-shadow: 1px 9px 16px 2px rgba(0, 0, 0, 0.1);
}

.component-card img {
    right: 0;
    left: 0;
    margin: auto;
    width: 230px;
    height: 200px;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.component-card-text {
    margin-top: 30px;
    padding-right: 1em;
}

.car-wrapper img {
    display: block;
    width: 1000%;
    max-height: 50%;
    max-width: 100%;
    margin: auto;
}

/* --- Map/tutorial cards --- */
.map-card {
    padding: 20px;
    position: relative;
    border: 1px solid var(--primary);
    border-radius: 4px;
    min-height: 100px;
    color: #191919;
    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.map-card:hover {
    background-color: rgba(170, 218, 196, 0.25);
    border-color: transparent;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15);
}

.map-card i {
    font-size: 30px;
    min-width: 58px;
    text-align: center;
    color: var(--primary);
}

.card-anchor {
    display: block;
    height: 100%;
}

.tutorial-card {
    padding: 20px;
    position: relative;
    border: 1px solid var(--primary);
    border-radius: 4px;
    min-height: 100px;
    height: 100%;
    color: #212529;
}

/* Filter tags: cursor pointer for JS-driven tags */
/* --- Missing Tailwind utilities --- */
.my-6 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.mt-3 {
    margin-top: 0.75rem;
}
.pt-4 {
    padding-top: 1rem;
}
.max-w-full {
    max-width: 100%;
}
.w-3\/4 {
    width: 75%;
}
.align-middle {
    vertical-align: middle;
}
.list-none {
    list-style-type: none;
}
.list-item {
    display: list-item;
}
.m-0 {
    margin: 0;
}
.p-0 {
    padding: 0;
}
.font-extralight {
    font-weight: 200;
}

/* --- Overlane text (small uppercase label, same as h5) --- */
.overlane-text {
    color: #009469;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.menu-tags .menu-link {
    cursor: pointer;
}

/* --- News card overlay link --- */
.news-card {
    position: relative;
}

.card-anchor-absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* --- Publication/thesis/media item rows --- */
.item-row {
    border-bottom: 1px solid var(--primary);
    padding: 2rem 0;
    display: block;
}

.item-row .item-title {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
}

.item-row .item-title:hover {
    text-decoration: underline;
}

.item-row .item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 14px;
    color: #666;
}

.item-row .item-meta .dot {
    margin: 0 6px;
    color: var(--primary);
}

.item-row .item-meta .item-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-row .item-meta .item-links a {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
}

/* --- Thesis topic expandable cards --- */
.topic-card {
    border-bottom: 1px solid var(--primary);
    padding: 2rem 0 1rem;
    overflow: hidden;
}

.topic-card summary {
    padding: 0;
    cursor: pointer;
    list-style: none;
}

.topic-card summary::-webkit-details-marker {
    display: none;
}

.topic-card .topic-details {
    padding: 1rem 0;
}

.topic-card .topic-details .badge-degree {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.topic-card .topic-details .badge-available {
    background-color: #C6E6D8;
    color: var(--primary);
}

.topic-card .topic-details .badge-unavailable {
    background-color: #f0f0f0;
    color: #999;
    text-decoration: line-through;
}

/* --- Video modal --- */
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-modal-overlay.active {
    display: flex;
}

.video-modal-inner {
    position: relative;
    width: 80%;
    max-width: 960px;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.video-modal-inner iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* --- Embedded video card --- */
.embedded-video-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 1em;
}

.embedded-video-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.embedded-video-card .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(64, 145, 108, 0.4), rgba(64, 145, 108, 0.4));
    background-blend-mode: darken, normal;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.embedded-video-card:hover .video-overlay {
    background: linear-gradient(0deg, rgba(64, 145, 108, 0.6), rgba(64, 145, 108, 0.6));
}

.embedded-video-card .video-overlay .play-icon {
    font-size: 3rem;
    color: #fff;
    opacity: 0.9;
}

.embedded-video-card .video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Responsive video container --- */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

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

/* --- Demo ride page --- */
.demo-ride-steps {
    list-style: none;
    counter-reset: step;
    padding-left: 0;
}

.demo-ride-steps li {
    counter-increment: step;
    margin-bottom: 12px;
    padding-left: 36px;
    position: relative;
    line-height: 1.6;
}

.demo-ride-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 24px;
}

.demo-ride-list {
    list-style: none;
    padding-left: 0;
}

.demo-ride-list li {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* --- Demo track --- */
.demo-track span {
    font-size: 16px;
    line-height: 25px;
    font-weight: 400;
    margin-bottom: 12px;
}

.demo-track span div {
    min-width: 40px;
    width: 40px;
    max-width: 40px;
    margin-right: 8px;
}

.demo-track span div img {
    min-height: 20px;
    max-height: 20px;
}

/* --- Course page --- */
.course-header p,
.course-header img,
.course-header h5,
.course-header i {
    padding: 0px;
    margin: 0px;
    display: inline-block;
}

.course-header .fa-car {
    max-width: 16px;
    max-height: 16px;
    font-size: 16px;
    margin-right: 2px;
}

.course-header .fa-graduation-cap {
    max-width: 16px;
    max-height: 16px;
    font-size: 16px;
    margin-right: 2px;
}

.course-header .fa-user {
    max-width: 15px;
    max-height: 15px;
    font-size: 15px;
    margin-right: 2px;
}

.course-header-icon-gap p {
    margin-left: 6px;
    margin-right: 24px;
}

.course-body div {
    margin-top: 12px;
}

/* --- Page heading h1 color --- */
.page-heading h1 {
    color: white;
}

/* --- Misc --- */
.project-page ul {
    padding-left: 24px;
    padding-right: 0px;
}

.research-details a {
    font-weight: 400;
    color: #000;
    display: block;
}

.research-details a:focus,
.research-details a:hover {
    color: #009469;
}

/* --- Voog-style CSS mask icons --- */
.car, .envelope {
    display: flex;
    align-items: center;
}
.car::before, .envelope::before {
    content: "";
    display: block;
    background-color: #009469;
    -webkit-mask: no-repeat center/contain;
    mask: no-repeat center/contain;
}
.car::before { -webkit-mask-image: url(/assets/car.svg); mask-image: url(/assets/car.svg); width: 18px; height: 18px; margin-right: 4px; }
.envelope { font-weight: 400; }
.envelope::before { -webkit-mask-image: url(/assets/envelope.svg); mask-image: url(/assets/envelope.svg); width: 24px; height: 24px; margin-right: 8px; }

.dot {
    display: inline;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    padding-bottom: 0;
    margin-bottom: 0;
    margin-left: 16px;
    margin-right: 16px;
}

/* Shared base for all SVG mask icons */
.icon-link, .icon-github, .icon-video, .icon-download,
.icon-file, .icon-user, .cap {
    display: flex;
    align-items: center;
}
.icon-link::before, .icon-github::before, .icon-video::before,
.icon-download::before, .icon-file::before, .icon-user::before,
.cap::before, .icon-twitter::before, .icon-facebook::before,
.icon-instagram::before {
    content: "";
    display: block;
    background-color: #009469;
    -webkit-mask: no-repeat center/contain;
    mask: no-repeat center/contain;
    width: 18px;
    height: 18px;
}

.icon-link::before { -webkit-mask-image: url(/assets/link.svg); mask-image: url(/assets/link.svg); width: 20px; }
.icon-link.research-area::before { margin-right: 16px; }
.icon-github { margin-left: 16px; }
.icon-github::before { -webkit-mask-image: url(/assets/github.svg); mask-image: url(/assets/github.svg); }
.icon-video { margin-left: 16px; }
.icon-video::before { -webkit-mask-image: url(/assets/video.svg); mask-image: url(/assets/video.svg); }
.icon-download { margin-left: 16px; }
.icon-download::before { -webkit-mask-image: url(/assets/download.svg); mask-image: url(/assets/download.svg); margin-right: 4px; }
.cap::before { -webkit-mask-image: url(/assets/cap.svg); mask-image: url(/assets/cap.svg); margin-right: 8px; }
.icon-user::before { -webkit-mask-image: url(/assets/user.svg); mask-image: url(/assets/user.svg); width: 12px; height: 12px; margin-right: 8px; }
.icon-file { margin-left: 16px; }
.icon-file::before { -webkit-mask-image: url(/assets/file.svg); mask-image: url(/assets/file.svg); margin-right: 4px; }
.icon-file.thesis { margin-left: 0; }
.icon-file.thesis::before { margin-right: 8px; width: 12px; height: 15px; }

.icon-twitter, .icon-facebook, .icon-instagram {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 16px;
}
.icon-twitter::before, .icon-facebook::before, .icon-instagram::before {
    width: 24px;
    height: 24px;
}
.icon-twitter::before { -webkit-mask-image: url(/assets/twitter.svg); mask-image: url(/assets/twitter.svg); }
.icon-facebook::before { -webkit-mask-image: url(/assets/facebook.svg); mask-image: url(/assets/facebook.svg); }
.icon-instagram::before { -webkit-mask-image: url(/assets/instagram.svg); mask-image: url(/assets/instagram.svg); }

/* --- Card slider (research areas / projects bottom carousel) --- */
.content-formatted .card-slider {
    list-style: none;
    padding-left: 0;
}
.card-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding-bottom: 82px;
}

.card-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.card-slider::-webkit-scrollbar {
    display: none;
}

.card-slider li {
    flex: 0 0 calc(33.333% - 14px);
    scroll-snap-align: start;
    min-width: 0;
}

@media screen and (max-width: 1024px) {
    .card-slider li {
        flex: 0 0 calc(50% - 10px);
    }
}

@media screen and (max-width: 480px) {
    .card-slider li {
        flex: 0 0 100%;
    }
}

.card-slider li a {
    height: 100%;
}

.card-slider-prev,
.card-slider-next {
    position: absolute;
    bottom: 21px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: #191919;
    line-height: 1;
}

.card-slider-prev {
    right: 60px;
}

.card-slider-next {
    right: 4px;
}

.card-slider-prev,
.card-slider-next {
    margin: 0;
}

.card-slider-prev:hover,
.card-slider-next:hover {
    background-color: #f3f2f1;
}

/* --- Content formatting defaults --- */
.content-formatted img {
    max-width: 100%;
    height: auto;
}

.content-formatted table {
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 1em;
}
.content-formatted table th,
.content-formatted table td {
    border: 1px solid #9e9e9e;
    padding: 7pt;
}
.content-formatted table th {
    background: var(--primary);
    color: #fff;
}
.content-formatted table tbody tr:nth-child(even) {
    background: #f3f3f3;
}

/* --- Side-by-side images (auto-flex when multiple images share a paragraph) --- */
.content-formatted p:has(> img + img),
.content-formatted p:has(> a > img):has(> a + a) {
    display: flex;
    gap: 8px;
}
.content-formatted p:has(> img + img) > img,
.content-formatted p:has(> a > img):has(> a + a) > a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.content-formatted p:has(> img + img) > img,
.content-formatted p:has(> a > img):has(> a + a) > a > img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.image-row {
    display: flex;
    gap: 8px;
}
.image-row > * {
    flex: 1;
    min-width: 0;
}
.image-row img {
    width: 100%;
    object-fit: cover;
}
