/* ===== Global ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== Navbar ===== */
.navbar-dark .navbar-brand {
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ===== Hero section ===== */
.hero-section {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 55%, #415a77 100%);
  color: #fff;
  padding: 4.5rem 0 3.5rem;
}

.hero-section h1 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-section a:not(.btn) {
  color: #90cdf4;
  text-decoration: none;
}

.hero-section a:not(.btn):hover {
  color: #bee3f8;
  text-decoration: underline;
}

.hero-section .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  font-weight: 500;
}

.hero-section .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ===== Section headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h1 {
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: #007bff;
  border-radius: 2px;
}

.section-header .lead {
  max-width: 620px;
  margin: 0.75rem auto 0;
}

/* ===== Publication cards ===== */
.card {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.14) !important;
}

.card-img-top {
  height: 130px;
  object-fit: contain;
  padding: 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card a.text-decoration-none {
  color: #2d3748;
}

.card a.text-decoration-none:hover {
  color: #007bff;
}

/* ===== Class presentation list ===== */
.list-group-item {
  border-left: 4px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.list-group-item:hover {
  border-left-color: #007bff;
  background-color: #f0f7ff;
}

/* ===== Blog listing on index ===== */
.blog-listing-item {
  border-left: 4px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.blog-listing-item:hover {
  border-left-color: #007bff;
  background-color: #f0f7ff;
}

.blog-listing-item h5 {
  color: #2d3748;
  font-weight: 600;
}

/* ===== Blog reader page ===== */
.blog-meta-bar {
  background: #f0f7ff;
  border-left: 4px solid #007bff;
  padding: 0.85rem 1.25rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 2.25rem;
  font-size: 0.95rem;
}

.blog-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2d3748;
}

.blog-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.blog-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.blog-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content h4 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-top: 1.5rem;
}

.blog-content pre {
  background: #1a1a2e;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.65;
  margin: 1.25rem 0;
}

.blog-content pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  font-size: inherit !important;
}

.blog-content code:not(pre code) {
  background: #edf2f7;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.88em;
  color: #c53030;
}

.blog-content blockquote {
  border-left: 4px solid #007bff;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: #f0f7ff;
  border-radius: 0 4px 4px 0;
  color: #4a5568;
}

.blog-content blockquote p:last-child {
  margin-bottom: 0;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.blog-content table th {
  background: #1b263b;
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
}

.blog-content table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.blog-content table tr:nth-child(even) td {
  background: #f8f9fa;
}

.blog-content .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem 0;
  margin: 1rem 0;
}

.blog-content hr {
  margin: 2.5rem 0;
  border-color: #e2e8f0;
}

/* ===== Footer ===== */
footer {
  padding: 2rem 0;
  background: #f8f9fa;
  border-top: 1px solid #e2e8f0;
  color: #718096;
  margin-top: 3rem;
}
