/* style.css */

/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
}

/* Landing Section */
#section-landing {
    position: relative;
    background: url('media/landing-bg.png') center / cover no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
#section-landing::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 0;
}
#section-landing .home-header {
    position: relative;
    z-index: 1;
}
#section-landing h1 {
    font-size: 128px;
    margin-bottom: 20px;
}
#section-landing h2 {
    font-size: 64px;
    color: white;
    border-bottom: none !important;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; 
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: rgba(0, 129, 177, 0.9);
    color: white;
    padding-top: 40px;
    z-index: 200;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.sidebar.visible {
    transform: translateX(0);
}
.sidebar ul {
    list-style: none;
}
.sidebar ul li {
    margin-bottom: 20px;
}
.sidebar ul li a {
    display: block;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    font-size: 18px;
    border-left: 4px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}
.sidebar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.sidebar ul li a.active {
    border-left-color: #FFD700;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Submenu Styles */
.sidebar ul li .submenu {
    list-style: none;
    margin-top: 8px;
    margin-left: 10px;
}
.sidebar ul li .submenu li {
    margin-bottom: 12px;
}
.sidebar ul li .submenu li a {
    font-size: 16px;
    padding-left: 16px;
}

/* Main Content Area */
.main {
    width: 100%;
    background-color: white;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
    transition: none;
}
.main.with-sidebar {
    margin-left: 250px;
    width: calc(100% - 250px);
}

/* Container to constrain visible content width */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Section Styles */
section {
    min-height: 100vh;
    border-bottom: 1px solid #e0e0e0;
}
section:last-child {
    border-bottom: none;
}
section h2 {
    font-size: 32px;
    margin: 20px 0;
    color: #0081B1;
    border-bottom: 2px solid #0081B1;
    display: inline-block;
    padding-bottom: 5px;
}
.section-content {
    font-size: 16px;
    line-height: 1.6;
    text-align: justify;
    margin: 0 auto;
    padding: 40px 0;
}
.section-content ul,
.section-content ol {
    margin-left: 20px;
    margin-bottom: 16px;
}
.section-content ul li,
.section-content ol li {
    margin-bottom: 8px;
}
.section-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.section-content table th,
.section-content table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}

/* About Section */
#section-about .about-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    row-gap: 24px;
    margin-top: 24px;
}
#section-about .bbki-logo {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    text-align: center;
}
#section-about .bbki-img {
    width: 278px;
    max-width: 100%;
    height: auto;
    display: inline-block;
}
#section-about .about-text {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}
#section-about .about-text p {
    margin-bottom: 16px;
}
#section-about .about-text ul {
    margin-left: 20px;
    margin-bottom: 16px;
}
#section-about .about-text ul li {
    margin-bottom: 8px;
}

#section-about .other-logos {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#section-about .other-logos h3 {
    font-size: 20px;
    color: #0081B1;
    margin-bottom: 10px;
}

#section-about .other-logos img {
    height: auto;           
    display: inline-block;
}

#section-about .funder-img {
    width: 230px;
    max-width: 100%;
    height: auto;
}

#section-about .partner-logos {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

#section-about .partner-img {
    width: 140px;
    max-width: 100%;
    height: auto;
}

/* People Section */
#section-people .people-subheading {
    display: block;
    font-size: 24px;
    color: #0081B1;
    margin: 16px 0;
    padding-bottom: 4px;
}
#section-people .list-note {
    font-size: 16px;
    color: #666;
    margin: 0 0 12px;
    font-style: italic;
}
#section-people .people-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
#section-people .person-card {
    display: flex;
    align-items: flex-start;
    background: #fff;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
#section-people .person-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}
#section-people .person-info {
    display: flex;
    flex-direction: column;
}
#section-people .person-info h4 {
    margin: 0 0 8px;
    font-size: 18px;
}
#section-people .person-info .institution,
#section-people .person-info .supervisor,
#section-people .person-info .topic {
    margin: 0 0 6px;
}

/* Teaching Activities Section */
#section-teaching-activities .teaching-columns {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    flex-wrap: wrap;
}
#section-teaching-activities .teaching-column {
    flex: 1 1 45%;
    min-width: 300px;
}
#section-teaching-activities .teaching-column h3 {
    margin-top: 0;
    color: #0074aa;
}
#section-teaching-activities .teaching-column ul {
    padding-left: 20px;
}
#section-teaching-activities .teaching-column li {
    margin-bottom: 6px;
}

/* Joint Curriculum “Edge AI” Section */
#section-edge-ai-curriculum .curriculum-layout {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
#section-edge-ai-curriculum .curriculum-left {
    flex: 1 1 50%;
    min-width: 300px;
}
#section-edge-ai-curriculum .curriculum-right {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    margin-top: auto;
    margin-bottom: auto;
    align-items: center;
}
#section-edge-ai-curriculum table.curriculum {
    border-collapse: collapse;
    width: 100%;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 20px;
    table-layout: fixed;
}
#section-edge-ai-curriculum table.curriculum th,
#section-edge-ai-curriculum table.curriculum td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
}
#section-edge-ai-curriculum table.curriculum th {
    background-color: #f2f2f2;
}
#section-edge-ai-curriculum table.curriculum th:nth-child(1),
#section-edge-ai-curriculum table.curriculum td:nth-child(1) {
    width: 75%;
}
#section-edge-ai-curriculum table.curriculum th:nth-child(2),
#section-edge-ai-curriculum table.curriculum td:nth-child(2) {
    width: 15%;
}
#section-edge-ai-curriculum table.curriculum th:nth-child(3),
#section-edge-ai-curriculum table.curriculum td:nth-child(3) {
    width: 10%;
}
#section-edge-ai-curriculum table.curriculum caption {
    caption-side: top;
    text-align: left;
    font-style: italic;
    font-size: 14px;
    padding: 6px;
}
#section-edge-ai-curriculum .dot {
    height: 10px;
    width: 10px;
    display: inline-block;
    border-radius: 50%;
}
#section-edge-ai-curriculum .green { background-color: green; }
#section-edge-ai-curriculum .purple { background-color: purple; }
#section-edge-ai-curriculum .red { background-color: red; }
#section-edge-ai-curriculum .black { background-color: black; }
#section-edge-ai-curriculum .category {
    font-style: italic;
    font-weight: bold;
    background-color: #f9f9f9;
}
#section-edge-ai-curriculum figure {
    margin: 10px 0;
    width: 100%;
    text-align: center;
}
#section-edge-ai-curriculum figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
}
#section-edge-ai-curriculum figcaption {
    text-align: center;
    font-style: italic;
    font-size: 13px;
    margin-top: 5px;
    margin-bottom: 30px;
}
#section-edge-ai-curriculum .download-button {
    display: inline-block;
    padding: 10px 16px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: bold;
    background-color: #0074cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}
#section-edge-ai-curriculum .download-button:hover {
    background-color: #005fa3;
}

/* Demonstrations Section */
#section-demonstrations .demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    overflow: visible;
}
#section-demonstrations .demo-item {
    position: relative;
    overflow: visible;
}
#section-demonstrations .demo-media {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
}
#section-demonstrations .demo-item:hover .demo-media {
    position: absolute;
    top: 0; left: 0;
    width: auto;
    max-width: 600px;
    height: auto;
    max-height: 600px;
    z-index: 10;
}
#section-demonstrations .description {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* Events Section */
#section-events .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    overflow: visible;
}
#section-events .thumb {
    position: relative;
    overflow: visible;
}
#section-events .thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: none;
}
#section-events .thumb:hover img {
    position: absolute;
    top: 0; left: 0;
    width: auto;
    max-width: 600px;
    height: auto;
    max-height: 600px;
    z-index: 10;
}
#section-events .event-description {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Responsive: single-column on mobile */
@media (max-width: 768px) {
    #section-landing h1 {
        font-size: 36px !important;
    }
    #section-landing h2 {
        font-size: 20px !important;
    }

    .sidebar {
        transform: translateX(-100%) !important;
    }

    .content-wrapper {
        display: block !important;
        padding: 0 10px !important;
    }

    #section-about .about-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    #section-about .other-logos {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .people-grid,
    .demo-grid,
    .image-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .teaching-columns {
        flex-direction: column !important;
        gap: 24px !important;
    }
    .teaching-column {
        width: 100% !important;
        min-width: auto !important;
    }
    .curriculum-layout {
        flex-direction: column !important;
        gap: 24px !important;
    }
    .curriculum-left,
    .curriculum-right {
        width: 100% !important;
        margin: 0 auto !important;
    }

    
}
