/* ===========================
   Google Font
=========================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");

/* ===========================
   Variables
=========================== */

:root {
  --primary: #12355b;
  --primary-dark: #0b2540;
  --accent: #d4a017;
  --accent-light: #f8d76b;

  --background: #f4f7fb;
  --card: #ffffff;

  --text: #1f2937;
  --muted: #6b7280;

  --border: #dce4ee;

  --shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

/* ===========================
   Global
=========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.65;
}

.container {
  width: 90%;
  margin: auto;
}

/* ===========================
   Header
=========================== */

.hero {
  background: linear-gradient(135deg, #12355b, #1b4c7a);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.course-title h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.semester h2 {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
}

/* ===========================
   Cards
=========================== */

.card {
  background: white;
  margin: 28px 0;
  padding: 28px;
  border-radius: 14px;
  border: 1px solid #e8edf3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: none;
}

.card h2 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.45rem;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  letter-spacing: 0.3px;
}

/* ===========================
   Tables
=========================== */

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--primary);
  color: white;
}

th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  transition: 0.2s;
}

/* Instructor */

tbody td:nth-child(3) {
  font-weight: 600;
}

tbody td:nth-child(3) a {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  background: #eef5ff;
  border: 1px solid #d6e5f5;
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s ease;
}

tbody td:nth-child(3) a:hover {
  background: var(--primary);
  color: white;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: #edf5ff;
}

/* Teaching Assistants */

tbody td:last-child {
  color: #4b5563;
  font-size: 0.93rem;
  line-height: 1.8;
  font-weight: 500;
  max-width: 420px;
}

.ta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ta-list span {
  background: #f4f7fb;
  border: 1px solid #dde7f1;
  border-radius: 16px;
  padding: 4px 10px;
  transition: 0.2s;
}

.ta-list a {
  color: #445268;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
}

.ta-list span:hover {
  background: #12355b;
  border-color: #12355b;
}

.ta-list span:hover a {
  color: white;
}

/* ===========================
   Links
=========================== */

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.slides-table td a,
.tests-table td a {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  transition: 0.25s;
}

.slides-table td a:hover,
.tests-table td a:hover {
  background: var(--accent);
  color: #222;
}

/* ===========================
   Timing
=========================== */

.timing {
  margin-top: 22px;
  background: #eef6ff;
  border-left: 5px solid var(--accent);
  padding: 16px 20px;
  border-radius: 10px;
  color: var(--primary-dark);
  font-size: 1.03rem;
}

.timing strong {
  color: var(--primary);
}

.timing-box {
  margin-top: 20px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.timing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.timing-row:not(:last-child) {
  border-bottom: 1px solid #dfe8f2;
}

.label {
  font-weight: 700;
  color: var(--primary);
}

.value {
  font-weight: 500;
  color: #374151;
}

/* ===========================
   Marks Distribution
=========================== */

.marks-box {
  margin-top: 20px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.marks-box h3 {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
}

.marks-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.marks-row:not(:last-child) {
  border-bottom: 1px solid #dfe8f2;
}

.marks-component {
  color: #374151;
  font-weight: 500;
}

.marks-weight {
  min-width: 60px;
  text-align: center;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Back to top */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;

  width: 52px;
  height: 52px;

  border: none;
  border-radius: 50%;

  background: var(--primary);
  color: #fff;

  font-size: 1.4rem;
  font-weight: bold;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);

  opacity: 0;
  visibility: hidden;

  transition: 0.25s;

  z-index: 999;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

@media(max-width:800px){

.back-to-top{
    width:46px;
    height:46px;
    right:18px;
    bottom:18px;
}

}

/* Hamburger menu */

.menu-toggle {
  display: none;

  width: 46px;
  height: 46px;

  border: none;

  border-radius: 12px;

  background: var(--primary);

  color: white;

  font-size: 1.5rem;

  cursor: pointer;

  justify-content: center;

  align-items: center;
}

.menu-toggle:hover {
  background: var(--primary-dark);
}

.overlay {
  display: none;
}

/* Mobile */

@media (max-width: 800px) {
  .marks-box {
    padding: 16px;
  }

  .marks-row {
    gap: 12px;
  }

  .marks-component {
    font-size: 0.92rem;
  }

  .marks-weight {
    font-size: 0.85rem;
    min-width: 54px;
  }
}

/* ===========================
   Reference Books
=========================== */

.book-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.book-item {
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  border-bottom: 1px solid var(--border);
}

.book-item:last-child {
  border-bottom: none;
}

.book-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.book-author {
  display: inline;
  color: #374151;
  font-weight: 500;
}

.book-publisher {
  display: inline;
  color: var(--muted);
  font-size: 0.92rem;
}

.book-publisher::before {
  content: " • ";
}

/* ===========================
   Coming Soon
=========================== */

.coming-soon {
  text-align: center;
  padding: 45px 20px;
  background: linear-gradient(135deg, #12355b, #245f92);
  color: white;
  border-radius: 14px;
}

.coming-soon h3 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--accent-light);
}

.coming-soon p {
  font-size: 1.08rem;
  color: #f4f4f4;
}

/* ===========================
   Tests
=========================== */
td a {
  margin-right: 8px;
}

td a:last-child {
  margin-right: 0;
}

.test-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===========================
   Footer
=========================== */

footer {
  margin-top: 50px;
  background: #0f2237;
}

.footer-content {
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 0;
}

footer a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  color: var(--accent);
}

/* ===========================
   Scrollbar
=========================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #e8edf3;
}

::-webkit-scrollbar-thumb {
  background: #9caec7;
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b89a7;
}

/* ===========================
   Responsive
=========================== */

@media (max-width: 800px) {
  .container {
    width: 95%;
  }

  /* Header */

  .hero {
    padding: 16px 0;
  }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .course-title h1 {
    font-size: 1.45rem;
    line-height: 1.3;
  }

  .semester h2 {
    font-size: 0.95rem;
  }

  /* Cards */

  .card {
    padding: 18px;
    margin: 20px 0;
  }

  .card h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  /* Tables */

  .table-wrapper {
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    background: white !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  td {
    border: none;
    padding: 8px 0;
    font-size: 0.95rem;
  }

  td:nth-child(1)::before {
    content: "Section";
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 2px;
  }

  td:nth-child(2)::before {
    content: "Classroom";
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 2px;
  }

  td:nth-child(3)::before {
    content: "Instructor";
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
  }

  td:nth-child(4)::before {
    content: "Teaching Assistants";
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
  }

  .ta-list {
    gap: 5px;
  }

  .ta-list span {
    padding: 4px 8px;
  }

  .ta-list a {
    font-size: 0.82rem;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  /* Timing */

  .timing {
    font-size: 0.95rem;
    padding: 12px 14px;
  }

  /* Coming Soon */

  .coming-soon {
    padding: 30px 18px;
  }

  .coming-soon h3 {
    font-size: 1.6rem;
  }

  .coming-soon p {
    font-size: 0.95rem;
  }

  /* Footer */

  .footer-content {
    justify-content: center;
    text-align: center;
    padding: 14px 0;
  }
}

/* ===== Sidebar Layout ===== */
.layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  align-items: start;

  /* margin-top: 24px; */
}
.side-nav {
  position: sticky;
  top: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);

  margin-top: 24px;
}
.side-nav h3 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 1.05rem;
}
.side-nav a {
  display: block;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  transition: 0.2s;
}
.side-nav a:hover {
  background: #eef5ff;
  color: var(--primary);
}
.side-nav a.active {
  background: var(--primary);
  color: #fff;
  border-left: 4px solid var(--accent);
}
.content {
  min-width: 0;
}
#class-timing,
#marks-distribution {
  scroll-margin-top: 90px;
}
#schedule,
#slides,
#books,
#tests {
  scroll-margin-top: 90px;
}
@media (max-width: 1000px) {
  .layout {
    display: block;
  }

  .menu-toggle {
    display: flex;
  }

  .side-nav {
    position: fixed;

    left: -280px;
    top: 0;

    width: 260px;
    height: 100vh;

    overflow-y: auto;

    background: white;

    z-index: 1001;

    transition: left 0.3s ease;

    border-radius: 0;

    padding-top: 90px;

    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
  }

  .side-nav.open {
    left: 0;
  }

  .overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.45);

    opacity: 0;

    visibility: hidden;

    transition: 0.25s;

    z-index: 1000;
  }

  .overlay.show {
    opacity: 1;

    visibility: visible;
  }
}
