@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Roboto, sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    background-color: #f8f9fa;
    width: 100%;
    overflow-x: hidden;
}

a {
    color: #51095d;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #7a1089;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: Roboto, sans-serif;
    font-weight: 300;
    padding: 0;
    margin: 0;
}

h1 {
    font-size: 3em;
}

.main-title {
    font-size: 4em;
    text-align: center;
    display: block;
    width: 100%;
}

@media screen and (max-width: 1280px) {
    h1 {
        font-size: 3em;
    }
}


h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

h3 {
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 0.5em;
}

.subtitle {
    margin-top: 4vw;
    font-size: 2em;
}


.nav {
    width: 100%;
    font-size: 1.1em;
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 600px) {
    h1 {
        font-weight: 400;
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1em;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .nav {
        font-size: 1em;
    }

    .main-title {
        font-size: 2em;
    }
}

.nav-container {
    max-width: 1000px;
    margin: auto;
    padding: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.nav a {
    display: block;
    transition: all 0.3s;
    color: #555;
    margin: 5px 15px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 400;
}

.nav a:hover {
    color: #51095d;
}

.nav a.active {
    color: #51095d;
    font-weight: 500;
    border-bottom: 2px solid #51095d;
}

.nav-logo {
    height: 40px;
    margin-right: 20px;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.title-container {
    width: 100vw;
    min-height: 20vw;
    margin: auto;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.title-image {
    width: 100vw;
    height: 20vw;
    padding: 40px 0;
    color: white;
    background-image: url("static/images/teaser_gemini.png");
    background-size: cover;
    background-position: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.title-text {
    background-image: url("static/images/teaser_gemini.png");
    color: #ffffff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 1000px;
    height: 400px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin: auto;
    object-fit: cover;
}

.title-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background-color: rgba(0, 0, 0, 0.50);
    z-index: 1;
}


.container {
    margin: auto;
    max-width: 1000px;
    padding: 30px 20px;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in h2 {
    animation: slideInLeft 0.5s ease-out forwards;
}

.section {
    margin-top: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: justify;
    text-justify: inter-word;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Instructor Card */
.instructor-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
    flex-wrap: wrap;
}

.instructor-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.instructor-photo:hover {
    transform: scale(1.05);
}

.instructor-info {
    flex: 1;
    min-width: 250px;
}

.instructor-info h3 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 500;
}

.instructor-info p {
    margin: 8px 0;
    color: #555;
}

/* Aims List */
.aims-list {
    list-style: none;
    padding: 0;
}

.aims-list li {
    padding: 12px 0 12px 35px;
    position: relative;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.aims-list li:last-child {
    border-bottom: none;
}

.aims-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.aims-list li:hover {
    background-color: #f8f9fa;
    padding-left: 40px;
}

/* Schedule Table */
.schedule-wrapper {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.9em;
}

.schedule-table thead {
    background: linear-gradient(135deg, #51095d, #7a1089);
}

.schedule-table th {
    background: transparent;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 500;
    border-bottom: 3px solid white;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    text-align: left;
}

.schedule-table tbody tr:hover td {
    background-color: #faf8fb;
}

.schedule-table tbody tr.section-header:hover td {
    background-color: #51095d;
}

.schedule-table tbody tr:not(.section-header) {
    background-color: white;
}

.schedule-table .section-header td {
    background: linear-gradient(135deg, #51095d, #7a1089);
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.schedule-table .highlight-row td {
    background: #fff3cd;
    font-weight: 500;
}

.schedule-table .holiday {
    color: #006600;
    font-style: italic;
}

/* Chapter Links in Schedule Table */
.chapter-link {
    color: #51095d;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.chapter-link:hover {
    color: #888;
}

.schedule-table .project {
    color: #27ae60;
    font-weight: 500;
}

/* Week cell styling */
.week-cell {
    text-align: center;
    font-weight: 500;
    min-width: 140px;
}

.week-date {
    display: block;
    font-size: 0.85em;
    font-weight: 300;
    color: #666;
    margin-top: 5px;
}

.highlight {
    color: #000000;
    font-weight: 700;
}

/* Related Courses */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-card {
    display: block;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-left: 4px solid #51095d;
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.related-title {
    font-size: 1.2em;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

.related-desc {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.related-link {
    color: #51095d;
    font-weight: 500;
    font-size: 0.9em;
}

/* Assignment Cards */
.assignments-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: space-between;
}

.assignment-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    flex: 1;
    min-width: 0;
}

.assignment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #51095d;
}

.assignment-num {
    font-size: 1.8em;
    font-weight: 700;
    color: #51095d;
    margin-bottom: 5px;
}

.assignment-title {
    color: #2c3e50;
    font-size: 0.8em;
    line-height: 1.3;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.book-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-left: 4px solid #51095d;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.book-title {
    font-size: 1.1em;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
}

.book-authors {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.book-edition {
    color: #888;
    font-size: 0.85em;
}

.book-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 500;
}

/* Grading Table */
.grading-container {
    max-width: 500px;
}

.grading-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.grading-table thead {
    background: linear-gradient(135deg, #51095d, #7a1089);
}

.grading-table th {
    background: transparent;
    color: white;
    padding: 15px;
    text-align: left;
}

.grading-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.grading-table tbody tr:hover td {
    background-color: #faf8fb;
    padding-left: 25px;
}

.grading-table tbody tr {
    background-color: white;
}

.grading-table td:last-child {
    font-weight: 500;
    color: #51095d;
    text-align: right;
}

/* People Grid */
.people {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: center;
}

.people>* {
    display: block;
    width: 140px;
    margin: 10px;
    text-decoration: none;
    color: inherit;
}

.people img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
}

.people .aff {
    font-size: 0.8em;
    color: #444;
}

/* Footer */
.foot {
    background: linear-gradient(135deg, #51095d, #7a1089);
    padding: 20px 10%;
    text-align: center;
    color: white;
    border-radius: 15px 15px 0 0;
    margin-top: 40px;
}

.foot a {
    color: white;
    text-decoration: underline;
}

/* Table base styles */
table {
    border-spacing: 0;
}

td,
th {
    border: none;
    padding: 8px;
}

tr:nth-child(even) {
    background-color: white;
}

th {
    text-align: left;
}

#reviewers ul {
    columns: 3;
    -webkit-columns: 3;
    -moz-columns: 3;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .title-text {
        width: 95%;
        height: 300px;
        border-radius: 20px;
    }

    .title-text::before {
        height: 300px;
    }

    .instructor-card {
        flex-direction: column;
        text-align: center;
    }

    .section {
        padding: 20px 15px;
    }

    .schedule-table {
        font-size: 0.85em;
    }
}