/* ===== Global Styles ===== */
:root {
  --navy-dark: #000814;
  --navy-mid: #001d3d;
  --navy-light: #003566;
  --gold: #ffc300;
  --light-gold: #ffd60a;
  --white: #ffffff;
  --light-bg: #f9fafb;
  --shadow: rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--navy-dark);
  background-color: var(--white);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

li {
  padding: 4px 5px; /* Top-bottom 5px, left-right 15px */
}

/* ===== Layout Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== Header Section ===== */
header.hero {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  color: var(--white);
  padding: 1rem 1rem;
}

.hero-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.profile-img {
  width: 120px;
  height: 145px;
  border-radius: 50% / 45%;
  object-fit: cover;
  box-shadow: 0 4px 12px var(--shadow);
  border: 3px solid var(--gold);
}

.hero-right h1 {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.hero-right p {
  font-size: 1rem;
  margin: 0.2rem 0;
  color: var(--white);
}

/* ===== Navigation Bar ===== */
.main-nav {
  background: var(--navy-dark);
  box-shadow: 0 2px 4px var(--shadow);
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0.5rem 0;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--light-bg);
}

/* ===== Section Styles ===== */
section {
  padding: 0.2rem 1rem;
}

.text-center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

section h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.5rem;
  color: var(--navy-dark);
  margin-bottom: 0.8rem;
}

/* ===== Cards Section ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
  margin-top: 0.6rem;
}

/* Make entire card clickable */
.cards a.card {
  display: block;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 8px var(--shadow);
  text-align: center;
  padding: 1.1rem;
  transition: var(--transition);
  color: inherit;
  text-decoration: none;
}

.cards a.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px var(--shadow);
}

.card i {
  color: var(--navy-light);
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.card h3 {
  margin-top: 0.4rem;
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
}

.card p {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
}

/* ===== Course Section (for teaching.html) ===== */
.course {
  margin-top: 1.4rem;
  padding: 1rem;
  border-left: 4px solid var(--gold);
  background-color: var(--light-bg);
  border-radius: 6px;
}

.course h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--navy-dark);
  font-family: 'Merriweather', serif;
}

.course p {
  margin: 0.4rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--navy-mid);
  color: var(--white);
  text-align: center;
  padding: 0.35rem 1rem;
}

.contact h2 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.contact p {
  color: var(--white);
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.contact a {
  color: var(--white);
  text-decoration: underline;
  transition: var(--transition);
}

.contact a:hover {
  color: var(--light-bg);
}

.contact .social {
  margin-top: 0.3rem;
}

.contact .social a {
  color: var(--white);
  margin: 0 0.3rem;
  font-size: 1.2rem;
  transition: var(--transition);
}

.contact .social a:hover {
  color: var(--light-bg);
}

/* ===== Footer ===== */
footer {
  background: var(--navy-dark);
  color: var(--white);
  text-align: center;
  padding: 0.3rem 0;
  font-size: 0.8rem;
  line-height: 1.3;
  box-shadow: 0 -2px 4px var(--shadow);
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeUp 0.8s ease-out forwards;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }

  .hero-right h1 {
    font-size: 1.4rem;
  }

  .profile-img {
    width: 110px;
    height: 130px;
  }

  section {
    padding: 0.8rem;
  }

  .cards {
    gap: 0.6rem;
  }

  .card,
  .cards a.card {
    padding: 0.9rem;
  }

  .course {
    margin-top: 1rem;
    padding: 0.8rem;
  }

  .contact {
    padding: 0.4rem;
  }

  footer {
    font-size: 0.75rem;
  }
}

/* ================================
   GLOBAL STYLES
================================ */
html {
  scroll-behavior: smooth;
}

/* Light background section */
.section-light {
  background-color: var(--light-bg);
}

/* Responsive image styles */
.img-responsive {
  max-width: 60%;
  height: auto;
  border-radius: 8px;
}

/* Centered image wrapper */
.image-center {
  text-align: center;
  margin: 1.5rem 0;
}

/* Simple shadow utility */
.shadow {
  box-shadow: 0 4px 12px var(--shadow);
}

/* ================================
   TABLE STYLES
================================ */
.table-container {
  overflow-x: auto;
  margin: 1.5rem auto;
  text-align: center;
}

/* General table layout */
.custom-table {
  width: auto;
  margin: 0 auto;
  border-collapse: collapse;
  min-width: 600px;
}

/* Table cells */
.custom-table th,
.custom-table td {
  border: 1px solid #ddd;
  padding: 0.8rem;
  text-align: left;
  font-size: 0.95rem;
}

/* Table header */
.custom-table th {
  background-color: var(--navy-dark);
  color: var(--white);
  font-family: "Merriweather", serif;
}

/* Alternate row colors */
.custom-table tr:nth-child(even) {
  background-color: var(--light-bg);
}

/* Hover effect */
.custom-table tr:hover {
  background-color: #e0e7ff;
}

/* Table caption */
.custom-table caption {
  caption-side: top;
  text-align: center;
  font-family: "Merriweather", serif;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--navy-dark);
}

.custom-table #degree-column {
      width: 8%;
    }

/* Responsive table adjustments */
@media (max-width: 768px) {
  .custom-table th,
  .custom-table td {
    padding: 0.6rem;
    font-size: 0.85rem;
  }
  .custom-table caption {
    font-size: 1.1rem;
  }
}

/* ================================
   BACK TO TOP BUTTON
================================ */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: var(--navy-dark, #1e293b);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 12px 15px;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 999;
  transition: opacity 0.3s ease-in-out;
}

/* When active */
#backToTop.show {
  display: block;
  opacity: 0.9;
}

/* Hover state */
#backToTop:hover {
  opacity: 1;
  background-color: var(--navy, #0f172a);
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: var(--navy-dark, #1e293b);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 12px 15px;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 999;
  transition: opacity 0.3s ease-in-out;
}

#backToTop.show {
  display: block;
  opacity: 0.9;
}

#backToTop:hover {
  opacity: 1;
  background-color: var(--navy, #0f172a);
}

/* Forcefully remove underline from (Online) links */
a.no-underline,
a.no-underline:link,
a.no-underline:visited,
a.no-underline:hover,
a.no-underline:active,
li a.no-underline {
  text-decoration: none !important;
  /* color: inherit !important; /* keeps same text color */ */
  border-bottom: none !important; /* removes decorative borders */
}

a.no-underline:hover {
  color: #007bff !important; /* light blue hover effect */
}


