:root {
    --ink-0: #f5f8ff;
    --ink-1: #d7e5ff;
    --ink-2: #9bb4dd;
    --panel: rgba(12, 23, 47, 0.55);
    --panel-strong: rgba(7, 14, 31, 0.72);
    --border: rgba(158, 197, 255, 0.28);
    --accent: #7ed6ff;
    --accent-2: #95ffa9;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

body.slick-theme {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-0);
    background: #050912;
    font-family: "Space Grotesk", "Inter", sans-serif;
    position: relative;
}

body.slick-theme .bg-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    filter: saturate(1.16) contrast(1.08) brightness(0.72);
}

body.slick-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 12% 12%, rgba(126, 214, 255, 0.2), transparent 36%),
        radial-gradient(circle at 87% 15%, rgba(149, 255, 169, 0.17), transparent 34%),
        radial-gradient(circle at 50% 100%, rgba(116, 120, 255, 0.16), transparent 42%),
        linear-gradient(160deg, rgba(4, 10, 24, 0.56), rgba(6, 12, 25, 0.62));
    pointer-events: none;
}

body.slick-theme > * {
    position: relative;
    z-index: 2;
}

body.slick-theme .container-fluid,
body.slick-theme .content-area,
body.slick-theme .media_content,
body.slick-theme .teaching_content,
body.slick-theme .research-page,
body.slick-theme #about,
body.slick-theme #service {
    position: relative;
    z-index: 2;
}

body.slick-theme .navbar {
    margin: 1.25rem auto 1.5rem;
    width: min(1200px, 94vw);
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(130deg, rgba(8, 19, 42, 0.84), rgba(10, 29, 52, 0.66));
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

body.slick-theme .navbar .container-fluid {
    justify-content: center;
}

body.slick-theme .navbar-nav,
body.slick-theme ul.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem 0.5rem;
    padding: 0.5rem;
    margin: 0;
}

body.slick-theme .navbar-nav li,
body.slick-theme ul.nav li {
    list-style: none;
    margin: 0;
}

body.slick-theme .name-navitem,
body.slick-theme .hoverable,
body.slick-theme .navbar a {
    color: var(--ink-0);
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.55rem 0.85rem;
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

body.slick-theme .name-navitem:hover,
body.slick-theme .hoverable:hover,
body.slick-theme .navbar a:hover {
    color: #ffffff;
    transform: translateY(-2px);
    background: rgba(126, 214, 255, 0.2);
}

body.slick-theme h1,
body.slick-theme h2,
body.slick-theme h3 {
    color: #f2f7ff;
    letter-spacing: 0.01em;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.slick-theme p,
body.slick-theme li,
body.slick-theme .lead {
    color: var(--ink-1);
}

body.slick-theme .research-page,
body.slick-theme .teaching_content,
body.slick-theme .media_content,
body.slick-theme .content-area-inner,
body.slick-theme .container-mid,
body.slick-theme .Research,
body.slick-theme .Thesis {
    width: min(1200px, 94vw);
    margin-left: auto;
    margin-right: auto;
}

body.slick-theme .Research,
body.slick-theme .Thesis,
body.slick-theme .intro_comment,
body.slick-theme .comsinfo,
body.slick-theme .techinfo,
body.slick-theme #about,
body.slick-theme #service,
body.slick-theme #testimonials {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(150deg, var(--panel), var(--panel-strong));
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: clamp(1rem, 2.4vw, 2rem);
    margin: 1rem auto;
}

body.slick-theme .publication-cards {
    width: min(1240px, 96vw);
    margin: 1.2rem auto 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.1rem;
}

body.slick-theme .publication-cards .card {
    width: auto !important;
    margin: 0 !important;
    background: linear-gradient(155deg, rgba(10, 24, 49, 0.78), rgba(7, 17, 35, 0.9));
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--ink-1);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.slick-theme .publication-cards .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

body.slick-theme .card-title a,
body.slick-theme .paperTitle,
body.slick-theme .referenceWriter,
body.slick-theme .referenceCompany,
body.slick-theme .thesisUrl,
body.slick-theme .notesUrl {
    color: #d8ebff;
    text-decoration: none;
}

body.slick-theme .card-title a:hover,
body.slick-theme .paperTitle:hover,
body.slick-theme .referenceWriter:hover,
body.slick-theme .referenceCompany:hover,
body.slick-theme .thesisUrl:hover,
body.slick-theme .notesUrl:hover {
    color: #ffffff;
}

body.slick-theme .btn,
body.slick-theme .btn-primary,
body.slick-theme .btn-secondary,
body.slick-theme .btn-success {
    border: 1px solid rgba(126, 214, 255, 0.5);
    background: linear-gradient(135deg, rgba(55, 133, 198, 0.7), rgba(30, 84, 156, 0.7));
    color: #f5f8ff;
    border-radius: 12px;
    padding: 0.55rem 1rem;
}

body.slick-theme .btn:hover,
body.slick-theme .btn-primary:hover,
body.slick-theme .btn-secondary:hover,
body.slick-theme .btn-success:hover {
    background: linear-gradient(135deg, rgba(126, 214, 255, 0.7), rgba(64, 185, 152, 0.74));
    color: #061123;
    border-color: rgba(149, 255, 169, 0.8);
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(158, 197, 255, 0.26);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(8, 20, 43, 0.84), rgba(7, 15, 31, 0.92)),
        repeating-linear-gradient(135deg, rgba(126, 214, 255, 0.04) 0 10px, rgba(149, 255, 169, 0.04) 10px 20px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
    margin: 0 auto;
    padding: 1.2rem;
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 0.55rem 1.25rem;
    align-items: start;
    min-height: 276px;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 0 !important;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment)::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(100deg, rgba(126, 214, 255, 0.08), transparent 38%, transparent 62%, rgba(149, 255, 169, 0.08));
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.28;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}

body.slick-theme .teaching_content img {
    width: 100% !important;
    height: 100% !important;
    min-height: 228px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(158, 197, 255, 0.44);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div {
    position: static !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='image'] {
    display: flex;
    align-items: stretch;
    grid-column: 1;
    grid-row: 1 / span 2;
    z-index: 1;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='text'] {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    min-height: 0;
    z-index: 1;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='text'] p {
    margin: 0;
    line-height: 1.62;
    color: #d7e5ff;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='text'] p:last-child {
    margin-top: auto;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) {
    grid-template-columns: minmax(0, 1fr) 252px;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) h3,
body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) > div[class$='text'] {
    grid-column: 1;
}

body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) > div[class$='image'] {
    grid-column: 2;
}

body.slick-theme .teaching_content {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.slick-theme .teaching_content .notesButton {
    margin: 0 !important;
    width: auto !important;
    min-width: 220px;
    padding: 0.66rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(158, 197, 255, 0.6);
    background: linear-gradient(135deg, rgba(126, 214, 255, 0.76), rgba(149, 255, 169, 0.74));
    box-shadow: 0 10px 24px rgba(126, 214, 255, 0.22);
}

body.slick-theme .teaching_content .notesButton .notesUrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #05111f;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.slick-theme .skills-image {
    width: min(560px, 100%);
    border-radius: 14px;
    border: 1px solid rgba(158, 197, 255, 0.48);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

body.slick-theme #testimonials .carousel-item {
    min-height: 430px;
}

body.slick-theme .testimonial-image {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border: 2px solid rgba(158, 197, 255, 0.6);
}

body.slick-theme .media_content {
    padding-bottom: 2rem;
}

body.slick-theme .uoft,
body.slick-theme .aiforgood,
body.slick-theme .podcasts iframe {
    width: min(100%, 920px) !important;
    border-radius: 14px;
    border: 1px solid rgba(158, 197, 255, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36);
    background: rgba(9, 18, 34, 0.7);
}

body.slick-theme hr {
    border: 0;
    height: 1px;
    width: min(840px, 92vw);
    margin: 1.6rem auto;
    background: linear-gradient(to right, transparent, rgba(158, 197, 255, 0.7), transparent);
}

@media (max-width: 900px) {
    body.slick-theme .teaching_content > div[class]:not(.intro_comment) {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        min-height: 0;
    }

    body.slick-theme .teaching_content > div[class]:not(.intro_comment) h3,
    body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='image'],
    body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='text'],
    body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) h3,
    body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) > div[class$='image'],
    body.slick-theme .teaching_content > div[class]:not(.intro_comment):nth-child(even) > div[class$='text'] {
        grid-column: 1;
    }

    body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='image'] {
        grid-row: 2;
    }

    body.slick-theme .teaching_content > div[class]:not(.intro_comment) > div[class$='text'] {
        grid-row: 3;
    }

    body.slick-theme .teaching_content img {
        height: 210px !important;
        min-height: 210px;
    }

    body.slick-theme #testimonials .carousel-item {
        min-height: 560px;
    }
}

@media (max-width: 640px) {
    body.slick-theme .navbar {
        width: 96vw;
        margin-top: 0.7rem;
    }

    body.slick-theme .name-navitem,
    body.slick-theme .hoverable,
    body.slick-theme .navbar a {
        font-size: 0.82rem;
        padding: 0.42rem 0.62rem;
    }

    body.slick-theme .publication-cards {
        grid-template-columns: 1fr;
    }

    body.slick-theme .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.48;
    }
}
