@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

body {
  font-family: 'Lato', Helvetica, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 20px;
  background-color: #fff;
}

#container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.blog-page #container {
  max-width: 1000px;
}

h1 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 10px;
}

h2 {
  font-size: 24px;
  margin-top: 10px;
  margin-bottom: 10px;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:hover {
  color: #f09228;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, #fff, #ccc, #fff);
  margin: 20px 0;
}

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

table.bio td {
  vertical-align: middle;
  padding: 10px;
}

td.photo-col {
  width: 25%;
  text-align: center;
}

td.bio-col {
  width: 75%;
}

img.profile {
  width: 100%;
  max-width: 200px;
  border-radius: 10px;
}

.contact-links {
  margin-top: 10px;
  font-size: 13px;
}

.contact-links a {
  margin: 0 4px;
}

.email-line {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.section {
  margin-bottom: 10px;
}

.entry {
  margin-bottom: 15px;
}

.entry .title {
  font-weight: 700;
}

.entry-with-media {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.entry-media {
  flex-shrink: 0;
  width: 250px;
}

.entry-media img,
.entry-media video {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 8px;
}

.entry-content {
  flex: 1;
}

/* ---- Highlighted Work ---- */

.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.highlight-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
  width: 100%;
}

.highlight-card:hover {
  border-color: #e0e0e0;
}

.highlight-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
}

.highlight-thumb video {
  display: block;
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.highlight-info {
  flex: 1;
}

.highlight-title {
  font-weight: 700;
  font-size: 15px;
  color: #333;
}

.highlight-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: #555;
}

/* ---- Blog Page ---- */

.blog-video,
.blog-section video {
  display: block;
  width: 70vw;
  height: auto;
  margin: 24px 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
}

@media (max-width: 900px) {
  .blog-video,
  .blog-section video {
    width: 92vw;
  }
}

@media (max-width: 600px) {
  .blog-video,
  .blog-section video {
    width: 100vw;
    border-radius: 0;
  }
}

.blog-code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 8px;
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

.blog-nav {
  margin-bottom: 4px;
}

.blog-title {
  margin-top: 4px;
  margin-bottom: 4px;
}

.blog-subtitle {
  text-align: center;
  color: #666;
  font-size: 15px;
  margin-top: 0;
  margin-bottom: 16px;
}

.blog-links {
  text-align: center;
  margin-bottom: 10px;
}

.blog-figure {
  margin: 24px 0;
  text-align: center;
}

.blog-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.blog-figure figcaption {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
  font-style: italic;
}

.blog-figure-title {
  font-size: 44px;
  font-weight: 700;
  font-style: normal;
  color: #333;
  margin-bottom: 12px;
}

.blog-figure-pair {
  display: flex;
  gap: 24px;
  width: 56vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 24px 0;
  align-items: center;
}

.blog-figure-pair .blog-figure {
  flex: 1;
  margin: 0;
}

.blog-figure-pair .blog-figure img {
  max-width: 100%;
}

.blog-btn {
  display: inline-block;
  padding: 6px 18px;
  margin: 0 6px;
  border: 1px solid #1772d0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}

.blog-btn:hover {
  background: #1772d0;
  color: #fff;
}

.blog-video-v1 {
  width: 63vw;
}

.blog-video-v2 {
  width: 60vw;
}

.blog-video-hero {
  width: 85%;
  left: auto;
  transform: none;
  margin: 24px auto 8px;
}

.blog-hero-caption {
  text-align: center;
  font-size: 16px;
  color: #666;
  font-style: italic;
  margin-bottom: 16px;
}

.blog-btn-primary {
  background: #1772d0;
  color: #fff;
  animation: glow 2.5s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(23, 114, 208, 0.4); }
  50% { box-shadow: 0 0 30px rgba(23, 114, 208, 0.8); }
}

.blog-btn-primary:hover {
  background: #fff;
  color: #1772d0;
}

.blog-btn-lg {
  padding: 10px 28px;
  font-size: 16px;
}

.blog-author {
  text-align: center;
  font-size: 15px;
  margin-top: 0;
  margin-bottom: 4px;
}

.blog-author a {
  font-weight: 700;
}

.blog-affiliations {
  text-align: center;
  font-size: 14px;
  color: #555;
  margin-top: 0;
  margin-bottom: 12px;
}

.blog-section {
  margin-bottom: 10px;
}

.blog-section > h2 {
  text-align: center;
}

.blog-section p {
  font-size: 16px;
  line-height: 1.7;
}

.blog-media-placeholder {
  width: 100%;
  min-height: 200px;
  background: #f5f5f5;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  font-size: 13px;
  color: #999;
}

.blog-video-placeholder {
  width: 100%;
  min-height: 280px;
  background: #f0f4f8;
  border: 2px dashed #a0b4cc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  font-size: 13px;
  color: #7a8ea3;
}

.blog-references {
  font-size: 13px;
  line-height: 1.7;
  padding-left: 20px;
}

.blog-references li {
  margin-bottom: 6px;
}

.blog-template-credit {
  text-align: center;
  font-size: 13px;
  color: #666;
}

.blog-bibtex {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 12px;
  text-align: left;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #444;
}

.blog-gallery {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}

.blog-gallery-item {
  flex: 1;
}

.blog-gallery-item .blog-media-placeholder {
  min-height: 160px;
}

.blog-caption {
  text-align: center;
  font-size: 12px;
  color: #777;
  margin-top: 6px;
}

.blog-footer {
  text-align: center;
  margin-top: 20px;
}

.blog-footer-name {
  font-weight: 700;
  font-size: 15px;
  color: #333;
  margin-bottom: 6px;
}

.blog-footer-links {
  font-size: 13px;
  margin-bottom: 6px;
}

.blog-footer-links a {
  margin: 0 4px;
}

.blog-footer-email {
  font-size: 13px;
  color: #666;
  margin: 0;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .entry-with-media {
    flex-direction: column;
  }
  .entry-media {
    width: 100%;
    max-width: 300px;
  }
  .highlight-card {
    flex-direction: column;
  }
  .highlight-thumb {
    width: 100%;
    max-width: 200px;
  }
  .blog-gallery {
    flex-direction: column;
  }
  .blog-figure-pair {
    flex-direction: column;
    width: 95vw;
  }
  .blog-figure-title {
    font-size: 24px;
  }
}
