/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / Nav */
header {
  padding: 1rem 0;
  margin-bottom: 2.5rem;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
  text-decoration: none;
}

.site-name:hover {
  text-decoration: none;
  color: #2563eb;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: #555;
  font-size: 0.9rem;
  text-decoration: none;
}

nav a:hover {
  color: #2563eb;
  text-decoration: none;
}

/* About section */
.about-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.about-text h1 {
  margin: 0 0 0.2rem 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.role {
  margin: 0 0 0.8rem 0;
  color: #666;
  font-size: 0.95rem;
}

.about-text p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* Sections */
section {
  padding: 2rem 0;
}

section p,
section li {
  font-size: 0.9rem;
}

section h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  margin: 0 0 1.5rem 0;
}

section h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  margin: 1.5rem 0 0.75rem 0;
}

section h3:first-child {
  margin-top: 0;
}

section h4 {
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  color: #888;
  margin: 1.5rem 0 0.5rem 0;
}

/* Paper entries */
.paper-entry {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  line-height: 1.4;
}

.paper-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.paper-title {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.2rem;
}

.paper-coauthors {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.paper-publication {
  color: #555;
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.3rem;
}

.paper-links {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: flex-start;
}

.paper-links a {
  font-size: 0.85rem;
  color: #2563eb;
}

.paper-links a:hover {
  text-decoration: underline;
}

/* Abstract details/summary */
details.abstract {
  margin-top: 0.3rem;
}

details.abstract summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #2563eb;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  user-select: none;
}

details.abstract summary::-webkit-details-marker {
  display: none;
}

details.abstract summary::before {
  content: "+";
  font-weight: 700;
  font-size: 0.9rem;
}

details.abstract[open] summary::before {
  content: "−";
}

details.abstract p {
  margin: 0.6rem 0 0 0;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.6;
  padding-left: 0.75rem;
}

/* Remove Academic theme wrappers that may appear in content */
.media,
.media-body,
.stream-item,
.article-style {
  display: contents;
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list-item {
  display: flex;
  gap: 1.5rem;
  padding: 0.4rem 0;
}

.post-date {
  color: #666;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: monospace;
}

/* Single post */
article h1 {
  font-size: 1.6rem;
  margin: 0 0 0.3rem 0;
}

.post-meta {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
}

.content {
  line-height: 1.8;
}

.back-link {
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* Footer */
footer {
  padding: 1.5rem 0;
  margin-top: 3rem;
  color: #999;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  .about-section {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  nav {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .post-list-item {
    flex-direction: column;
    gap: 0.1rem;
  }
}
