/* ===========================
   Modern Academic Portfolio
   =========================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --text: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-subtle: #f3f4f6;
  --border: #e5e7eb;
  --radius-sm: 6px;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Base ---- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* ---- Layout ---- */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ---- Profile Section ---- */
.profile-section {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.profile-text {
  flex: 1;
  min-width: 0;
}

h1.name {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.15;
}

.bio p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-bottom: 10px;
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio a {
  font-weight: 500;
}

/* ---- Social Links ---- */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  padding: 5px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.social-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

/* ---- Profile Photo ---- */
.profile-photo {
  flex-shrink: 0;
}

.profile-photo a {
  display: block;
}

.profile-photo img {
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.profile-photo img:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

/* ---- Publications Section ---- */
.publications-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

h2.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-card {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.pub-card:first-child {
  padding-top: 0;
}

.pub-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ---- Paper Thumbnail ---- */
.pub-thumb {
  flex-shrink: 0;
}

.pub-thumb img {
  width: 148px;
  height: 111px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  border: 1px solid var(--border);
}

/* ---- Paper Details ---- */
.pub-details {
  flex: 1;
  min-width: 0;
}

a.paper-title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.15s;
}

a.paper-title:hover {
  color: var(--primary);
  text-decoration: none;
}

.pub-authors {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.55;
}

.pub-authors a {
  color: var(--text-muted);
  font-weight: 500;
}

.pub-authors a:hover {
  color: var(--primary);
}

.pub-venue {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.venue-name {
  font-size: 13.5px;
  font-style: italic;
  color: var(--text-secondary);
  font-weight: 500;
}

.venue-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
  background: #dbeafe;
  color: #1e40af;
}

.venue-badge.oral {
  background: #fee2e2;
  color: #991b1b;
}

.venue-badge.review {
  background: #f3f4f6;
  color: #6b7280;
}

/* ---- Paper Links ---- */
.pub-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid var(--primary-border);
  border-radius: 4px;
  background: var(--primary-light);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pub-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

.pub-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.pub-note a {
  font-weight: 500;
  color: var(--text-muted);
}

.pub-note a:hover {
  color: var(--primary);
}

/* ---- Footer ---- */
.footer {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-muted);
  font-weight: 500;
}

.footer a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ---- Dark Mode ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --primary-light: rgba(96, 165, 250, 0.1);
    --primary-border: rgba(96, 165, 250, 0.25);
    --text: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg: #111111;
    --bg-subtle: #000000;
    --border: #374151;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
  }

  .venue-badge {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
  }

  .venue-badge.oral {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
  }

  .venue-badge.review {
    background: rgba(156, 163, 175, 0.12);
    color: #9ca3af;
  }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .container {
    padding: 16px 16px 48px;
  }

  .profile-section {
    flex-direction: column-reverse;
    align-items: center;
    padding: 28px 24px;
    gap: 20px;
  }

  .profile-photo img {
    width: 140px;
    height: 140px;
  }

  .profile-text {
    width: 100%;
  }

  h1.name {
    font-size: 1.5rem;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .publications-section {
    padding: 28px 24px;
  }

  .pub-card {
    flex-direction: column;
    gap: 14px;
  }

  .pub-thumb img {
    width: 100%;
    height: 180px;
  }
}
