/* =========================================================
   HARI PRAPAN — SHARED STYLESHEET
   ========================================================= */


/* =========================================================
   1. ROOT VARIABLES
   ========================================================= */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --soft: #eef1f4;

  --ink: #172033;
  --muted: #6d7480;

  --line: #dde2e8;

  --navy: #15233b;

  --accent: #a8733e;
  --accent-soft: #ead8c4;

  --radius: 20px;

  --container: 1180px;

  --body: "DM Sans", sans-serif;
  --display: "Manrope", sans-serif;
}


/* =========================================================
   2. GLOBAL RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);

  color: var(--ink);

  font-family: var(--body);

  line-height: 1.7;
}

img {
  display: block;

  width: 100%;
}

a {
  color: inherit;

  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;

  font-family: var(--display);
}


/* =========================================================
   3. GENERAL LAYOUT
   ========================================================= */

.container {
  width: min(
    var(--container),
    calc(100% - 48px)
  );

  margin: auto;
}

.section {
  padding: 92px 0;
}

.section-soft {
  background: var(--soft);
}


/* =========================================================
   4. NAVIGATION
   ========================================================= */

.site-header {
  position: sticky;

  top: 0;

  z-index: 50;

  background: rgba(246, 245, 241, 0.94);

  backdrop-filter: blur(16px);

  border-bottom: 1px solid var(--line);
}

.nav-shell {
  width: min(
    var(--container),
    calc(100% - 48px)
  );

  min-height: 72px;

  margin: auto;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 24px;
}

.brand {
  font-family: var(--display);

  font-weight: 800;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;

  gap: 24px;
}

.nav-links a {
  color: var(--muted);

  font-size: 0.9rem;

  font-weight: 600;

  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-cta {
  padding: 9px 16px;

  border-radius: 999px;

  background: var(--navy);

  color: #ffffff;

  font-size: 0.86rem;

  font-weight: 700;
}


/* =========================================================
   5. COMMON TYPOGRAPHY
   ========================================================= */

.eyebrow,
.section-index,
.card-label,
.card-number {
  color: var(--accent);

  font-family: var(--display);

  font-size: 0.78rem;

  font-weight: 800;

  letter-spacing: 0.09em;

  text-transform: uppercase;
}

.section-intro {
  color: var(--muted);
}


/* =========================================================
   6. HERO
   ========================================================= */

.hero {
  padding: 78px 0 90px;
}

.hero-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.45fr)
    360px;

  gap: 68px;

  align-items: center;
}

.hero h1 {
  margin-bottom: 16px;

  font-size: clamp(
    4rem,
    8vw,
    7rem
  );

  line-height: 0.95;

  letter-spacing: -0.065em;
}

.hero-role {
  max-width: 780px;

  color: #344158;

  font-family: var(--display);

  font-size: clamp(
    1.2rem,
    2vw,
    1.6rem
  );

  font-weight: 600;
}

.hero-description {
  max-width: 760px;

  color: var(--muted);
}

.hero-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 12px;

  margin-top: 28px;
}


/* =========================================================
   7. BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;

  min-height: 46px;

  padding: 0 19px;

  align-items: center;

  justify-content: center;

  border-radius: 999px;

  font-weight: 700;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy);

  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;

  border: 1px solid var(--line);
}


/* =========================================================
   8. TAGS
   ========================================================= */

.topic-row,
.tag-row,
.course-meta {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;
}

.topic-row {
  margin-top: 28px;
}

.topic-row span,
.tag-row span,
.course-meta span {
  padding: 6px 10px;

  border: 1px solid var(--line);

  border-radius: 999px;

  background: #ffffff;

  color: var(--muted);

  font-size: 0.75rem;

  font-weight: 700;
}


/* =========================================================
   9. PROFILE CARD
   ========================================================= */

.profile-panel {
  overflow: hidden;

  background: #ffffff;

  border: 1px solid var(--line);

  border-radius: 30px;
}

.profile-photo {
  aspect-ratio: 4 / 3.2;

  background: #e8ebef;
}

.profile-photo img {
  width: 100%;

  height: 100%;

  object-fit: cover;
}

.profile-info {
  padding: 22px 24px;

  border-bottom: 1px solid var(--line);
}

.profile-name {
  margin: 0;

  font-family: var(--display);

  font-weight: 800;
}

.profile-location {
  margin: 2px 0 0;

  color: var(--muted);

  font-size: 0.86rem;
}

.profile-stats {
  display: grid;

  grid-template-columns:
    1fr 1fr;
}

.profile-stats div {
  min-height: 105px;

  padding: 18px;

  border-bottom: 1px solid var(--line);
}

.profile-stats div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.profile-stats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats strong {
  color: var(--navy);

  font-family: var(--display);

  font-size: 0.95rem;
}

.profile-stats span {
  color: var(--muted);

  font-size: 0.77rem;
}


/* =========================================================
   10. SECTION HEADINGS
   ========================================================= */

.section-head {
  display: grid;

  grid-template-columns:
    minmax(0, 0.95fr)
    minmax(300px, 0.72fr);

  gap: 64px;

  align-items: end;

  margin-bottom: 48px;
}

.section-head h2,
.contact-panel h2 {
  margin: 0;

  font-size: clamp(
    2.2rem,
    4vw,
    3.8rem
  );

  line-height: 1.08;

  letter-spacing: -0.045em;
}


/* =========================================================
   11. GENERAL CARD GRID
   ========================================================= */

.card-grid {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 20px;
}

.info-card,
.research-card,
.project-card,
.course-card {
  display: flex;

  flex-direction: column;

  min-height: 250px;

  padding: 28px;

  background: #ffffff;

  border: 1px solid var(--line);

  border-radius: var(--radius);
}

.card-label,
.card-number {
  margin-bottom: 34px;
}

.info-card h3,
.research-card h3,
.project-card h3,
.course-card h3 {
  margin-bottom: 12px;

  font-size: 1.35rem;
}

.info-card p,
.research-card p,
.project-card p,
.course-card p {
  color: var(--muted);
}

.tag-row,
.course-meta {
  margin-top: auto;

  padding-top: 22px;
}


/* =========================================================
   12. HOME PAGE
   LATEST UPDATES + TEACHING
   ========================================================= */

.home-dual-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 24px;

  align-items: start;
}


/* Individual panel */

.home-panel {
  min-width: 0;

  padding: 28px;

  border: 1px solid var(--line);

  border-radius: var(--radius);

  background: var(--surface);
}


/* Panel heading */

.home-panel-head {
  margin-bottom: 24px;
}

.home-panel-head .section-index {
  margin-bottom: 8px;
}

.home-panel-head h2 {
  margin: 0 0 10px;

  font-size: 1.75rem;

  line-height: 1.2;

  letter-spacing: -0.035em;
}

.home-panel-head p:last-child {
  max-width: 450px;

  margin: 0;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.6;
}


/* =========================================================
   13. COMPACT LIST
   Used inside Latest Updates and Teaching
   ========================================================= */

.compact-list {
  width: 100%;

  border-top: 1px solid var(--line);
}

.compact-row {
  display: grid;

  grid-template-columns:
    88px
    minmax(0, 1fr);

  gap: 16px;

  padding: 15px 0;

  border-bottom: 1px solid var(--line);
}


/* Date */

.compact-row time {
  padding-top: 2px;

  color: var(--accent);

  font-family: var(--display);

  font-size: 0.68rem;

  font-weight: 800;

  line-height: 1.4;
}


/* Main row title */

.compact-row h3 {
  margin: 0 0 3px;

  font-size: 0.9rem;

  line-height: 1.4;

  letter-spacing: -0.01em;
}


/* Row description */

.compact-row p {
  margin: 0;

  color: var(--muted);

  font-size: 0.77rem;

  line-height: 1.45;
}
.compact-row p a {
  color: var(--navy);
  font-weight: 700;
  border-bottom: 1px solid var(--accent-soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.compact-row p a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer inside teaching panel */

.panel-footer {
  padding-top: 18px;
}

.small-link {
  color: var(--navy);

  font-size: 0.8rem;

  font-weight: 700;

  transition: color 0.2s ease;
}

.small-link:hover {
  color: var(--accent);
}

/* =========================================================
   14. CONTACT — LIGHT THEME
   ========================================================= */

.contact-section {
  padding: 70px 0 60px;

  background: var(--bg);
}


/* Main contact container */

.contact-panel {
  display: grid;

  grid-template-columns:
    1fr 420px;

  gap: 60px;

  padding: 42px;

  border: 1px solid var(--line);

  border-radius: 24px;

  background: var(--surface);

  box-shadow:
    0 8px 24px
    rgba(18, 28, 45, 0.04);
}


/* Contact heading */

.contact-panel h2,
.contact-panel h3 {
  margin-bottom: 12px;

  color: var(--ink);
}


/* Description */

.contact-copy {
  max-width: 620px;

  margin-bottom: 0;

  color: var(--muted);

  font-size: 0.92rem;

  line-height: 1.7;
}


/* =========================================================
   CONTACT LINKS
   ========================================================= */

.contact-links {
  display: grid;

  gap: 9px;
}


.contact-links a {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 14px;

  padding: 13px 15px;

  border: 1px solid var(--line);

  border-radius: 12px;

  background: var(--bg);

  color: var(--ink);

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}


/* Hover */

.contact-links a:hover {
  background: var(--soft);

  border-color: #c8ced6;

  transform: translateY(-1px);
}


/* Small label */

.contact-links span {
  color: var(--muted);

  font-size: 0.74rem;

  font-weight: 600;
}


/* Actual address / link */

.contact-links strong {
  color: var(--navy);

  font-size: 0.82rem;

  font-weight: 700;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 840px) {

  .contact-panel {
    grid-template-columns: 1fr;

    gap: 30px;

    padding: 32px;
  }

}


@media (max-width: 600px) {

  .contact-section {
    padding: 55px 0;
  }


  .contact-panel {
    padding: 24px 20px;

    border-radius: 18px;
  }


  .contact-links a {
    align-items: flex-start;

    flex-direction: column;

    gap: 3px;
  }

}
/* =========================================================
   15. FOOTER
   ========================================================= */

.site-footer {
  padding: 0 0 30px;
}

.footer-row {
  display: flex;

  justify-content: space-between;

  padding-top: 24px;

  border-top: 1px solid var(--line);

  color: var(--muted);

  font-size: 0.82rem;
}


/* =========================================================
   16. SUBPAGE HERO
   ========================================================= */

.page-hero {
  padding: 70px 0 62px;

  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 8px 0 20px;

  font-size: clamp(
    3.2rem,
    7vw,
    6.2rem
  );

  line-height: 0.98;

  letter-spacing: -0.05em;
}

.page-hero p:last-child {
  max-width: 800px;

  color: var(--muted);

  font-size: 1.05rem;
}


/* =========================================================
   17. RESEARCH FEATURE
   ========================================================= */

.research-feature {
  display: grid;

  grid-template-columns:
    200px 1fr;

  gap: 36px;

  padding: 34px;

  margin-bottom: 20px;

  border-radius: var(--radius);

  background: var(--navy);

  color: #ffffff;
}

.research-feature .feature-label {
  color: #e2bc92;

  font-family: var(--display);

  font-size: 0.74rem;

  font-weight: 800;

  text-transform: uppercase;
}

.research-feature h3 {
  color: #ffffff;

  font-size: 1.6rem;
}

.research-feature p {
  margin: 0;

  color: rgba(
    255,
    255,
    255,
    0.72
  );
}


/* =========================================================
   18. EDUCATION GRID
   ========================================================= */

.education-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 24px;
}

.education-card {
  display: flex;

  flex-direction: column;

  overflow: hidden;

  background: #ffffff;

  border: 1px solid var(--line);

  border-radius: var(--radius);
}


/* =========================================================
   19. EDUCATION IMAGE SLIDER
   ========================================================= */

.edu-slider {
  position: relative;

  aspect-ratio: 16 / 8;

  overflow: hidden;

  background: #e5e9ee;
}

.edu-slides,
.edu-slide {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;
}

.edu-slide {
  object-fit: cover;

  object-position: center;

  opacity: 0;

  transition:
    opacity 1.5s ease,
    transform 7s ease;
}

.edu-slide.active {
  opacity: 1;

  transform: scale(1.035);
}


/* Image dark overlay */

.edu-image-overlay {
  position: absolute;

  inset: 0;

  z-index: 2;

  background:
    linear-gradient(
      to top,
      rgba(10, 20, 35, 0.5),
      transparent 65%
    );
}


/* Institution label */

.edu-monogram {
  position: absolute;

  z-index: 3;

  left: 20px;

  bottom: 18px;

  padding: 7px 11px;

  border-radius: 8px;

  background:
    rgba(15, 29, 49, 0.8);

  color: #ffffff;

  font-family: var(--display);

  font-size: 0.78rem;

  font-weight: 800;
}


/* Slider dots */

.edu-dots {
  position: absolute;

  z-index: 4;

  right: 18px;

  bottom: 20px;

  display: flex;

  gap: 6px;
}

.edu-dot {
  width: 6px;

  height: 6px;

  padding: 0;

  border: 0;

  border-radius: 999px;

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

  cursor: pointer;

  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.edu-dot.active {
  width: 18px;

  background: #ffffff;
}


/* =========================================================
   20. EDUCATION CONTENT
   ========================================================= */

.edu-content {
  display: flex;

  flex: 1;

  flex-direction: column;

  padding: 27px 28px 28px;
}

.edu-topline {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 14px;

  margin-bottom: 15px;
}

.edu-topline a {
  color: var(--muted);

  font-size: 0.8rem;

  font-weight: 700;
}

.edu-topline a:hover {
  color: var(--ink);
}

.date-pill {
  padding: 5px 9px;

  border-radius: 999px;

  background: var(--accent-soft);

  color: #7c542d;

  font-size: 0.71rem;

  font-weight: 800;
}

.edu-content h3 {
  margin-bottom: 13px;

  font-size: 1.32rem;

  line-height: 1.35;
}

.edu-content p {
  color: var(--muted);

  font-size: 0.94rem;
}

.edu-content .tag-row {
  margin-top: auto;
}


/* =========================================================
   21. TABLET
   ========================================================= */

@media (max-width: 900px) {

  .home-dual-grid {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 840px) {

  .container,
  .nav-shell {
    width: min(
      100% - 32px,
      var(--container)
    );
  }


  .nav-links {
    display: none;
  }


  .hero-grid,
  .section-head,
  .contact-panel,
  .research-feature {
    grid-template-columns: 1fr;
  }


  .profile-panel {
    max-width: 520px;
  }


  .education-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   22. MOBILE
   ========================================================= */

@media (max-width: 600px) {

  .section {
    padding: 68px 0;
  }


  /* HERO */

  .hero {
    padding:
      52px 0
      68px;
  }


  .hero-actions {
    flex-direction: column;
  }


  .btn {
    width: 100%;
  }


  /* PROFILE */

  .profile-stats {
    grid-template-columns: 1fr;
  }


  .profile-stats div {
    min-height: auto;

    border-right: 0 !important;

    border-bottom:
      1px solid
      var(--line) !important;
  }


  .profile-stats div:last-child {
    border-bottom: 0 !important;
  }


  /* HOME PARALLEL PANELS */

  .home-panel {
    padding: 23px 20px;
  }


  .home-panel-head h2 {
    font-size: 1.5rem;
  }


  .compact-row {
    grid-template-columns: 1fr;

    gap: 4px;

    padding: 14px 0;
  }


  .compact-row time {
    font-size: 0.67rem;
  }


  .compact-row h3 {
    font-size: 0.88rem;
  }


  .compact-row p {
    font-size: 0.76rem;
  }


  /* EDUCATION */

  .edu-slider {
    aspect-ratio: 16 / 9;
  }


  .edu-topline {
    flex-direction: column;

    align-items: flex-start;
  }


  /* CONTACT */

  .contact-panel {
    padding: 34px 22px;
  }


  .contact-links a {
    flex-direction: column;
  }


  /* FOOTER */

  .footer-row {
    flex-direction: column;

    gap: 6px;
  }

}
/* =========================================================
   RESEARCH PAGE — PUBLICATIONS
   ========================================================= */

.paper-list {
  display: grid;

  gap: 24px;
}


/* =========================================================
   PAPER CARD
   ========================================================= */

.paper-card {
  display: grid;

  grid-template-columns:
    65px minmax(0, 1fr);

  gap: 26px;

  padding: 34px;

  border: 1px solid var(--line);

  border-radius: var(--radius);

  background: var(--surface);
}


.paper-number {
  color: var(--accent);

  font-family: var(--display);

  font-size: 0.78rem;

  font-weight: 800;

  letter-spacing: 0.08em;
}


.paper-content {
  min-width: 0;
}


/* =========================================================
   PAPER STATUS
   ========================================================= */

.paper-meta {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 8px;

  margin-bottom: 17px;
}


.paper-status,
.paper-type {
  display: inline-flex;

  align-items: center;

  padding: 5px 9px;

  border-radius: 999px;

  font-size: 0.7rem;

  font-weight: 800;
}


.paper-status {
  background: var(--accent-soft);

  color: #7c542d;
}


.paper-type {
  border: 1px solid var(--line);

  color: var(--muted);

  background: #ffffff;
}


/* =========================================================
   PAPER TITLE
   ========================================================= */

.paper-title {
  max-width: 900px;

  margin: 0 0 12px;

  font-size: clamp(
    1.55rem,
    2.5vw,
    2.15rem
  );

  line-height: 1.28;

  letter-spacing: -0.035em;
}


/* =========================================================
   AUTHORS
   ========================================================= */

.paper-authors {
  margin: 0 0 23px;

  color: var(--muted);

  font-size: 0.92rem;
}


.paper-authors strong {
  color: var(--ink);
}


.paper-authors a {
  color: var(--navy);

  font-weight: 700;

  border-bottom:
    1px solid
    var(--accent-soft);

  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}


.paper-authors a:hover {
  color: var(--accent);

  border-color: var(--accent);
}


/* =========================================================
   ABSTRACT
   ========================================================= */

.paper-abstract {
  max-width: 950px;
}


.paper-abstract p {
  margin: 0 0 14px;

  color: var(--muted);

  font-size: 0.95rem;

  line-height: 1.78;
}


.paper-abstract p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   PAPER TAGS
   ========================================================= */

.paper-content .tag-row {
  margin-top: 22px;

  padding-top: 0;
}


/* =========================================================
   PAPER LINKS
   ========================================================= */

.paper-links {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 22px;
}


.paper-links a {
  display: inline-flex;

  align-items: center;

  padding: 7px 12px;

  border: 1px solid var(--line);

  border-radius: 999px;

  background: #ffffff;

  color: var(--navy);

  font-size: 0.78rem;

  font-weight: 700;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}


.paper-links a:hover {
  border-color: var(--navy);

  background: var(--soft);
}


/* =========================================================
   RESEARCH INTERESTS
   ========================================================= */

.research-interest-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}


.research-interest {
  padding: 27px;

  border: 1px solid var(--line);

  border-radius: var(--radius);

  background: var(--surface);
}


.research-interest > span {
  display: block;

  margin-bottom: 34px;

  color: var(--accent);

  font-family: var(--display);

  font-size: 0.75rem;

  font-weight: 800;
}


.research-interest h3 {
  margin-bottom: 10px;

  font-size: 1.25rem;
}


.research-interest p {
  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;

  line-height: 1.7;
}


/* =========================================================
   RESPONSIVE RESEARCH PAGE
   ========================================================= */

@media (max-width: 700px) {

  .paper-card {
    grid-template-columns: 1fr;

    gap: 10px;

    padding: 25px 21px;
  }


  .paper-number {
    margin-bottom: 4px;
  }


  .paper-title {
    font-size: 1.45rem;
  }


  .paper-abstract p {
    font-size: 0.9rem;
  }


  .research-interest-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   COURSES PAGE
   FIVE INSTITUTIONS IN FIVE COLUMNS
   ========================================================= */


/* ---------------------------------------------------------
   Make the courses page wider than the normal site content
   --------------------------------------------------------- */

.courses-page .container {
  width: min(1760px, calc(100% - 40px));
}


/* =========================================================
   PAGE INTRO
   ========================================================= */

.courses-page {
  padding: 60px 0 90px;
}

.courses-intro {
  max-width: 900px;

  margin: 0 0 35px;

  color: var(--muted);

  font-size: 0.95rem;

  line-height: 1.7;
}


/* =========================================================
   FIVE-COLUMN LAYOUT
   ========================================================= */

.course-groups {
  display: grid;

  /*
    5 equal columns:
    DU | IITM | CUSB | IITGN | NPTEL
  */

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 14px;

  align-items: start;
}


/* =========================================================
   EACH INSTITUTION COLUMN
   ========================================================= */

.course-group {
  min-width: 0;

  overflow: hidden;

  border: 1px solid var(--line);

  border-radius: 16px;

  background: var(--surface);
}


/* =========================================================
   COLUMN HEADER
   ========================================================= */

.course-group-head {
  min-height: 130px;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  justify-content: flex-start;

  gap: 8px;

  padding: 20px 18px;

  border-bottom: 1px solid var(--line);

  background: #ffffff;
}


/* Degree name */

.course-group-head .section-index {
  margin: 0 0 6px;

  color: var(--accent);

  font-size: 0.65rem;

  line-height: 1.4;

  letter-spacing: 0.07em;
}


/* Institution */

.course-group-head h2 {
  margin: 0 0 7px;

  font-size: 1.05rem;

  line-height: 1.3;

  letter-spacing: -0.025em;
}


/* Description */

.course-group-head p {
  margin: 0;

  color: var(--muted);

  font-size: 0.72rem;

  line-height: 1.5;
}


/* Programme / syllabus link */

.course-group-head a {
  margin-top: auto;

  color: var(--accent);

  font-size: 0.7rem;

  font-weight: 700;

  line-height: 1.4;
}


/* =========================================================
   COURSES INSIDE EACH COLUMN
   ========================================================= */

.course-list,
.nptel-grid {
  display: block;

  width: 100%;
}


/* Individual course */

.course-item {
  display: grid;

  grid-template-columns:
    25px minmax(0, 1fr);

  gap: 8px;

  min-height: 58px;

  padding: 12px 13px;

  border-right: 0 !important;

  border-bottom: 1px solid var(--line);

  background: #ffffff;
}


.course-item:last-child {
  border-bottom: 0;
}


/* Course number */

.course-index {
  color: var(--accent);

  font-family: var(--display);

  font-size: 0.62rem;

  font-weight: 800;

  line-height: 1.5;
}


/* Course title */

.course-name {
  min-width: 0;

  color: var(--ink);

  font-size: 0.73rem;

  font-weight: 600;

  line-height: 1.45;

  overflow-wrap: anywhere;
}


/* Linked courses */

.course-name a {
  color: var(--navy);

  border-bottom:
    1px solid
    var(--accent-soft);

  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}


.course-name a:hover {
  color: var(--accent);

  border-color: var(--accent);
}


/* Additional information */

.course-note {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: 0.65rem;

  font-weight: 500;

  line-height: 1.4;
}


/* =========================================================
   SUBTLE HOVER
   ========================================================= */

.course-item {
  transition:
    background 0.2s ease;
}


.course-item:hover {
  background: var(--soft);
}


/* =========================================================
   OPTIONAL DIFFERENT HEADER EMPHASIS
   ========================================================= */

.course-group-head {
  position: relative;
}


.course-group-head::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 3px;

  background: var(--accent);
}


/* =========================================================
   LARGE SCREENS
   ========================================================= */

@media (min-width: 1500px) {

  .courses-page .container {
    width: min(
      1840px,
      calc(100% - 50px)
    );
  }


  .course-groups {
    gap: 16px;
  }


  .course-name {
    font-size: 0.76rem;
  }

}


/* =========================================================
   MEDIUM DESKTOP / SMALL LAPTOP
   Still keep five columns, but allow horizontal scrolling
   instead of crushing them.
   ========================================================= */

@media (max-width: 1250px) {

  .courses-page .container {
    width: calc(100% - 28px);

    overflow-x: auto;

    padding-bottom: 12px;
  }


  .course-groups {
    /*
      Keep 5 columns.
      Each remains readable.
    */

    grid-template-columns:
      repeat(5, 240px);

    width: max-content;
  }

}


/* =========================================================
   TABLET
   Horizontal scrolling keeps the 5-column table concept.
   ========================================================= */

@media (max-width: 900px) {

  .courses-page {
    padding-top: 45px;
  }


  .course-groups {
    grid-template-columns:
      repeat(5, 230px);

    gap: 12px;
  }


  .course-group-head {
    min-height: 180px;
  }

}


/* =========================================================
   MOBILE
   Keep columns horizontally scrollable
   ========================================================= */

@media (max-width: 600px) {

  .courses-page .container {
    width: calc(100% - 20px);
  }


  .course-groups {
    grid-template-columns:
      repeat(5, 220px);

    gap: 10px;
  }


  .course-group-head {
    min-height: 175px;

    padding: 17px 15px;
  }


  .course-group-head h2 {
    font-size: 0.95rem;
  }


  .course-item {
    padding: 11px 12px;
  }


  .course-name {
    font-size: 0.7rem;
  }

}

/* =========================================================
   CONTACT NAV BUTTON
   ========================================================= */

button.nav-cta {
  border: 0;

  font-family: var(--body);

  cursor: pointer;
}


/* =========================================================
   CONTACT MODAL
   ========================================================= */

.contact-modal {
  position: fixed;

  inset: 0;

  z-index: 1000;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 24px;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}


.contact-modal.open {
  opacity: 1;

  visibility: visible;

  pointer-events: auto;
}


/* Dark blurred background */

.contact-modal-backdrop {
  position: absolute;

  inset: 0;

  background:
    rgba(12, 20, 34, 0.55);

  backdrop-filter: blur(6px);
}


/* =========================================================
   POPUP CARD
   ========================================================= */

.contact-modal-card {
  position: relative;

  z-index: 2;

  width: min(
    520px,
    100%
  );

  max-height: calc(100vh - 48px);

  overflow-y: auto;

  padding: 34px;

  border:
    1px solid
    rgba(255, 255, 255, 0.15);

  border-radius: 24px;

  background: var(--surface);

  box-shadow:
    0 30px 80px
    rgba(10, 20, 35, 0.25);

  transform:
    translateY(16px)
    scale(0.98);

  transition:
    transform 0.25s ease;
}


.contact-modal.open
.contact-modal-card {
  transform:
    translateY(0)
    scale(1);
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.contact-modal-close {
  position: absolute;

  top: 17px;

  right: 18px;

  width: 34px;

  height: 34px;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 0;

  border: 1px solid var(--line);

  border-radius: 50%;

  background: var(--soft);

  color: var(--muted);

  font-family: var(--body);

  font-size: 1.4rem;

  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}


.contact-modal-close:hover {
  background: var(--navy);

  color: #ffffff;
}


/* =========================================================
   MODAL TITLE
   ========================================================= */

.contact-modal-card
.section-index {
  margin: 0 0 8px;
}


.contact-modal-card h2 {
  margin: 0 0 10px;

  font-size: 2rem;

  line-height: 1.2;

  letter-spacing: -0.04em;
}


.contact-modal-intro {
  max-width: 430px;

  margin: 0 0 28px;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.65;
}
