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

:root {
  /* Text colors */
  --text-primary: #1a1a1a;
  --text-secondary: #525252;
  --text-tertiary: #737373;
  
  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  
  /* Accent colors - Blue theme */
  --highlight-blue: #f0f7ff;
  --accent-blue: #2563eb;
  --accent-blue-dark: #1e40af;
  --accent-orange: #fb923c;
  
  /* Link colors */
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 24px 0 0 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

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

h2 {
  font-size: 25px;
  font-weight: 700;
  margin: 20px 0 12px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: left;
}

p {
  margin: 0 0 0;
}

.paper-row p {
  margin-top: 12px;
  margin-bottom: 0;
}

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

td {
  vertical-align: top;
}

.name {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  margin: 0 0 12px 0;
  padding-top: 0;
  line-height: 1.2;
}

.papertitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--link-color);
  line-height: 1.4;
  display: block;
  margin-bottom: 4px;
}

papertitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--link-color);
  line-height: 1.4;
  display: block;
  margin-bottom: 4px;
}

.highlight {
  background: rgba(255, 253, 224, 0.5);
  border-bottom: 2px solid #fba524;
  padding: 0 2px;
}

.section-divider {
  border-top: 1px solid #e5e5e5;
  margin: 24px 0;
}

.avatar {
  border-radius: 50%;
  display: block;
  width: 100%;
  max-width: 180px;
  margin-left: auto;
  transition: box-shadow 0.25s ease-in-out;
}

.avatar:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.paper-row {
  padding: 20px;
  margin-bottom: 8px;
  border-radius: 0;
  transition: background-color 0.2s ease-out;
}

.paper-row:hover {
  background-color: #e0f2fe;
}

.paper-row.highlight-paper,
.paper-row[bgcolor="#ffffd0"] {
  background-color: var(--highlight-blue);
}

.paper-thumb {
  width: 100%;
  max-width: 160px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  transition: opacity 0.25s ease-in-out;
}

.paper-links a {
  margin-right: 12px;
}

.one {
  width: 235px;
  height: 235px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  opacity: 1;
  transition: opacity 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.one.swapping {
  opacity: 0;
}

.one > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  z-index: 1;
}

.one.show > img {
  display: block;
}

.two {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  display: none;
  z-index: 2;
}

.two.show {
  display: flex;
}

.two img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Author styling */
.authors {
  margin: 6px 0;
  line-height: 1.4;
}

.author-self {
  font-weight: 700;
  color: var(--text-primary);
}

.contribution-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0;
}

/* Conference/Journal name */
em {
  font-style: italic;
  font-weight: 600;
  color: var(--text-primary);
}

/* Special awards/honors */
.award-tag {
  display: inline;
  margin-left: 4px;
  color: var(--accent-blue);
  font-weight: 700;
}

/* Paper description */
.paper-description {
  margin-top: 8px;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Author links in paper row - display as black text */
.paper-row a {
  color: var(--text-primary);
}

.paper-row a:hover {
  color: var(--accent-orange);
}

/* Override: paper title link should be blue */
.paper-row > td:nth-child(2) > a {
  color: var(--link-color);
}

.paper-row > td:nth-child(2) > a:hover {
  color: var(--accent-orange);
}

/* Paper links (Paper/Project/Code/Bibtex) - blue, not bold */
.paper-links-group a {
  color: var(--link-color);
  font-weight: 400;
}

.paper-links-group a:hover {
  color: var(--accent-orange);
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
  body {
    font-size: 13px;
    line-height: 1.6;
  }

  table {
    display: block;
  }

  table tbody,
  table tr,
  table td {
    display: block;
    width: 100% !important;
  }

  /* Personal info section - stack avatar and text vertically */
  table tr td {
    padding: 16px !important;
  }

  .name {
    font-size: 24px;
    text-align: center;
  }

  /* Avatar */
  .avatar {
    max-width: 200px;
    margin: 0 auto 20px;
  }

  /* Research section headings */
  h2 {
    font-size: 20px;
    margin: 20px 0 10px;
  }

  /* Paper/Project items - stack image and content vertically */
  .one {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 16px;
  }

  .two {
    width: 100%;
    max-width: 280px;
    height: auto;
    position: absolute;
  }

  .one img,
  .two img {
    width: 100%;
    height: auto;
  }

  .papertitle {
    font-size: 15px;
  }

  /* Center text content on mobile */
  table tr td p {
    text-align: left;
  }

  /* Adjust spacing for paper links */
  .paper-links a {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 4px;
  }

  /* Make table widths consistent */
  table[style*="max-width:800px"] {
    max-width: 100% !important;
    padding: 0 12px;
  }
}
