/* ========== Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
  color: #3d3d3a;
  background: #faf9f5;
  line-height: 1.65;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

a { color: #c6613f; text-decoration: none; transition: color 0.2s; }
a:hover { color: #d97757; text-decoration: underline; }

/* ========== Masthead (Top Nav) ========== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 249, 245, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8e6dc;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.masthead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1em;
}

.greedy-nav {
  display: flex;
  align-items: center;
  min-height: 52px;
  gap: 0;
}

.greedy-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: #5e5d59;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.greedy-nav a:hover {
  color: #c6613f;
  background: rgba(198, 97, 63, 0.06);
  text-decoration: none;
}

.greedy-nav .site-title {
  font-weight: 700;
  padding-right: 2em;
  color: #141413;
  font-size: 15px;
}

/* ========== Page Layout ========== */
.page-wrapper {
  max-width: 1280px;
  margin: 1.5em auto 0;
  padding: 0 1.5em;
  display: flex;
  align-items: flex-start;
}

/* ========== Sidebar ========== */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  margin-right: 30px;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

.author-avatar {
  width: 180px;
  height: 180px;
  overflow: hidden;
  text-align: center;
  margin: 0 auto 14px;
  border: 2px solid #e8e6dc;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
  transform: scale(1.25);
  transform-origin: 50% 34%;
  transition: transform 0.3s, box-shadow 0.3s;
}

.author-avatar img:hover {
  transform: scale(1.3);
}

.avatar-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f0eee6, #e8e6dc);
  border: 2px dashed #d1cfc5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

.author-content {
  text-align: center;
  margin-bottom: 14px;
}

.author-name {
  font-size: 18px;
  font-weight: 700;
  color: #141413;
  margin: 0;
}

.author-bio {
  font-size: 14px;
  color: #5e5d59;
  margin-top: 4px;
}

.author-urls ul {
  list-style: none;
}

.author-urls li {
  margin-bottom: 6px;
}

.author-urls a {
  font-size: 13px;
  color: #5e5d59;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.author-urls a:hover {
  color: #c6613f;
  background: rgba(198, 97, 63, 0.08);
  text-decoration: none;
}

.author-urls i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

/* ========== Content ========== */
.page {
  flex: 1;
  min-width: 0;
  padding-left: 4%;
}

.page-content section {
  margin-bottom: 2em;
}

.page-content h1 {
  font-size: 1.45em;
  color: #141413;
  margin-bottom: 0.6em;
  border-bottom: 2px solid #e8e6dc;
  padding-bottom: 0.35em;
}

.page-content p {
  margin-bottom: 0.8em;
}

.page-content ul {
  padding-left: 1.2em;
  margin-bottom: 0.8em;
}

.page-content ul li {
  margin-bottom: 0.5em;
  font-size: 15px;
  line-height: 1.65;
}

.page-content em {
  font-style: italic;
  color: #3d3d3a;
}

/* ========== Publications ========== */
.pub-note {
  font-size: 13px;
  color: #87867f;
  margin-bottom: 1em;
}

/* Featured paper box */
.paper-box {
  display: flex;
  gap: 20px;
  margin-bottom: 1.5em;
  padding: 18px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e8e6dc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s, transform 0.25s;
}

.paper-box:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

.paper-box-image {
  width: 260px;
  flex-shrink: 0;
}

.paper-box-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.08);
}

.image-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f0eee6, #e8e6dc);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
}

.paper-box-text {
  flex: 1;
}

/* Text-only paper */
.paper-item {
  margin-bottom: 1.2em;
  padding-left: 14px;
  border-left: 3px solid #c6613f;
  transition: border-color 0.2s;
}

.paper-item:hover {
  border-left-color: #d97757;
}

.paper-title {
  font-size: 15px;
  margin-bottom: 2px;
}

.paper-title a {
  font-weight: 600;
  color: #141413;
}
.paper-title a:hover { color: #c6613f; }

.paper-authors {
  font-size: 14px;
  color: #5e5d59;
  margin-bottom: 2px;
}

.paper-authors strong {
  color: #141413;
}

.paper-venue {
  font-size: 14px;
  color: #5e5d59;
  margin-bottom: 4px;
}

.paper-links {
  font-size: 13px;
  display: flex;
  gap: 8px;
}

.paper-links a {
  color: #c6613f;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(198, 97, 63, 0.08);
  transition: background 0.2s;
}

.paper-links a:hover {
  background: rgba(198, 97, 63, 0.16);
  text-decoration: none;
}

/* ========== Footer ========== */
footer {
  margin-top: 2.5em;
  padding-top: 1.2em;
  border-top: 1px solid #e8e6dc;
  text-align: center;
  font-size: 13px;
  color: #87867f;
  padding-bottom: 2em;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-right: 0;
    margin-bottom: 24px;
    position: static;
  }

  .author-urls ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .page {
    padding-left: 0;
  }

  .paper-box {
    flex-direction: column;
  }

  .paper-box-image { width: 100%; }

  .greedy-nav {
    flex-wrap: wrap;
  }

  .greedy-nav a {
    padding: 0.4rem 0.6rem;
    font-size: 13px;
  }
}
