/* Custom styles for D2D project page */

:root {
  --primary-color: #363636;
  --accent-color: #4a6fa5;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --text-secondary: #4a4a4a;
}

body {
  font-family: 'Noto Sans', sans-serif;
}

/* Hero section */
.hero .hero-body {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.publication-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 700;
}

.publication-subtitle {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
}

.publication-authors {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
}

.publication-authors a {
  color: var(--accent-color);
  text-decoration: none;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

/* Publication links (buttons) */
.publication-links {
  margin-top: 1.2rem;
}

.publication-links .link-block {
  display: inline-block;
  margin: 0.25rem 0.15rem;
}

.publication-links .external-link {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 0.95rem;
}

/* Sticky nav */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
}

.blog-nav a {
  color: var(--primary-color);
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.blog-nav a:hover {
  background: #f0f0f0;
  color: var(--accent-color);
}

.blog-nav .nav-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

/* Table of Contents */
.toc-box {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.toc-item:hover {
  background: #e8f0fe;
  transform: translateX(3px);
}

.toc-number {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  background: #e8f0fe;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}

.toc-item:hover .toc-number {
  background: var(--accent-color);
  color: #fff;
}

.toc-label {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--primary-color);
}

@media screen and (max-width: 768px) {
  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .toc-grid {
    grid-template-columns: 1fr;
  }
}

/* Blog content section */
.blog-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.blog-content {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1a1a1a;
}

.blog-content h2 {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.blog-content h2:first-child {
  margin-top: 0;
}

.blog-content h3 {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

.blog-content p {
  margin-bottom: 1.1rem;
}

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

.blog-content hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 2.5rem 0;
}

/* TL;DR callout */
.tldr-box {
  background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
  border-left: 4px solid var(--accent-color);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.tldr-box strong {
  color: var(--accent-color);
}

/* Figures */
.blog-figure {
  margin: 2rem 0;
  text-align: center;
}

.blog-figure img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.blog-figure figcaption {
  margin-top: 0.8rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
  padding: 0 1rem;
}

/* Ordered list in "How D2D Works" */
.blog-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.blog-content ol li {
  margin-bottom: 0.5rem;
}

/* Unordered list */
.blog-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.2rem;
  list-style-type: disc;
}

.blog-content ul li {
  margin-bottom: 0.5rem;
}

/* Citation block */
.citation-block {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  font-family: 'Castoro', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .blog-content {
    font-size: 1rem;
  }

  .blog-content h2 {
    font-size: 1.4rem;
  }

  .blog-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Section divider */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  margin: 0 auto 2rem;
  border-radius: 2px;
}

/* Abstract styling */
.abstract-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #1a1a1a;
  text-align: justify;
}

/* Footer */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Smooth transitions for interactive elements */
.button, a {
  transition: all 0.2s ease;
}
