@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --bg: #fff;
  --bg-hover: #fafafa;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --radius: 6px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

.site-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 32px 0 0;
  margin-bottom: 0;
}

nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--text);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-menu a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
  background: var(--bg-hover);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* Intro */
.intro {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}

.intro-content {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

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

.intro-text h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.intro-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 14px;
}

.intro-links {
  display: flex;
  gap: 16px;
}

.intro-links a {
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.2s;
}

.intro-links a:hover {
  color: var(--text);
}

/* Sections */
.section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-compact {
  padding: 20px 0;
}

.section-compact .section-header {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.header-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}

.see-all {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.see-all:hover {
  color: var(--text);
}

/* Project list */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid transparent;
  color: var(--text);
  transition: opacity 0.15s;
}

.project-item:hover {
  opacity: 0.7;
}

.project-year {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 40px;
  font-variant-numeric: tabular-nums;
}

.project-title {
  font-size: 14px;
  flex: 1;
  line-height: 1.5;
}

.project-venue {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
}

.award {
  color: #dc2626;
  font-size: 12px;
  font-weight: 500;
}

/* Post list */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  color: var(--text);
  transition: opacity 0.15s;
}

.post-item:hover {
  opacity: 0.7;
}

.post-date {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 72px;
  font-variant-numeric: tabular-nums;
}

.post-title {
  font-size: 14px;
  flex: 1;
  line-height: 1.5;
}

/* Reading list */
.reading-list {
  display: flex;
  flex-direction: column;
}

.reading-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.reading-icon {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.reading-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.reading-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.reading-author {
  font-size: 13px;
  color: var(--text-muted);
}

.reading-status {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.status-reading {
  color: #2563eb;
  background: #eff6ff;
}

.status-done {
  color: #16a34a;
  background: #f0fdf4;
}

.status-want {
  color: #9333ea;
  background: #faf5ff;
}

/* Footer */
footer {
  padding: 32px 0;
  text-align: center;
}

footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Page-level styles (for about, projects, blog, reading pages) */
.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.page-title::after {
  display: none;
}

.page-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.page-section {
  padding-top: 40px;
}

/* Project rows (projects.html detail page) */
.projects-detail-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.project-row .project-image {
  flex: 0 0 200px;
}

.project-row .project-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.project-row .project-content {
  flex: 1;
}

.project-row .project-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.4;
}

.project-authors {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.contrib-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.conference {
  font-size: 13px;
  color: var(--text-muted);
}

.project-abstract {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
  display: none;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.project-links a {
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-links a:hover {
  color: var(--text);
}

.abs-toggle {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.abs-toggle:hover {
  color: var(--text);
}

/* Blog cards (blog.html) */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.blog-card:last-child {
  border-bottom: none;
}

.blog-card .blog-image {
  flex: 0 0 160px;
  height: 100px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.blog-card .blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card .blog-content {
  flex: 1;
}

.blog-card .blog-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.blog-card .blog-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.blog-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.read-more {
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

/* About page */
.about-content {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.about-image {
  flex: 0 0 120px;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
}

.about-text {
  flex: 1;
}

.about-text p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.about-text h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
}

.education-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
}

.edu-logo {
  flex: 0 0 40px;
}

.edu-logo img {
  width: 100%;
  height: auto;
}

.edu-details h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.edu-details p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 2px;
}

.edu-date {
  color: var(--text-muted);
  font-size: 12px;
}

/* Reading page */
.reading-host {
  color: var(--text-secondary, #888);
  font-style: italic;
}

.reading-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.5rem;
}

.reading-page-list {
  display: flex;
  flex-direction: column;
}

.reading-page-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.reading-page-item:last-child {
  border-bottom: none;
}

.reading-page-item .reading-icon {
  font-size: 18px;
}

.reading-page-item .reading-info {
  flex: 1;
}

.reading-page-item .reading-title {
  font-size: 15px;
}

.reading-page-item .reading-author {
  font-size: 13px;
}

.reading-note {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 4px;
}

.reading-category {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Research flow */
.research-flow {
  display: flex;
  flex-direction: column;
}

.flow-card {
  position: relative;
  padding: 24px 24px 24px 56px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.flow-card:hover {
  border-color: #c8d6e5;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.flow-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.flow-number {
  position: absolute;
  left: 16px;
  top: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.45;
  padding-right: 90px;
}

.flow-authors {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.flow-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 10px;
}

.flow-links {
  display: flex;
  gap: 16px;
}

.flow-links a {
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.flow-links a:hover {
  color: var(--text);
}

.gh-star-link .fa-star {
  font-size: 11px;
}

.flow-connector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 12px 36px;
}

.flow-arrow {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--border), var(--text-muted));
  border-radius: 1px;
  flex-shrink: 0;
}

.flow-connector-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
  .site-wrapper {
    padding: 0 16px;
  }

  header {
    padding: 20px 0 0;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 200px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 60px 24px 24px;
    gap: 4px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    transition: right 0.3s ease;
    z-index: 100;
  }

  .nav-menu.active {
    right: 0;
  }

  .intro-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .intro-avatar {
    width: 64px;
    height: 64px;
  }

  .project-item {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .project-year {
    width: auto;
  }

  .project-venue {
    width: 100%;
    text-align: left;
    padding-left: 52px;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image {
    flex: none;
    width: 80px;
  }

  .project-row {
    flex-direction: column;
  }

  .project-row .project-image {
    flex: none;
    width: 100%;
  }

  .blog-card {
    flex-direction: column;
  }

  .blog-card .blog-image {
    flex: none;
    width: 100%;
    height: 160px;
  }

  .flow-card {
    padding: 20px 16px !important;
  }

  .flow-number {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }

  .flow-connector {
    padding-left: 30px !important;
  }
}
