* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --card: #ffffff;
  --border: #e8e8e8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}

.role {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.contact {
  margin-top: 32px;
}

.contact h2 {
  font-size: 0.7rem;
  font-weight: 600;
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact h2:first-child {
  margin-top: 0;
}

.contact p {
  color: var(--text);
  font-size: 0.95rem;
}

.links {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.15s ease;
}

.links a:hover {
  background: #333;
  color: #fff;
  transform: translateY(-1px);
}

.link-sep {
  display: none;
}

/* Photo - larger size */
.hero-photo {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  max-width: 280px;
  max-height: 280px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  display: block;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Main Content */
main {
  margin-top: 0;
}

.section {
  margin-bottom: 48px;
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Section navigation - cleaner pill style */
.section-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.section-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-note {
  color: var(--muted);
  max-width: 600px;
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* Paper Cards */
.paper-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.paper:hover {
  box-shadow: var(--shadow);
  border-color: #d0d0d0;
}

.paper h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Paper title links - underlined to show they're clickable */
.paper h4 a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.paper h4 a:hover {
  text-decoration-color: var(--accent);
}

.paper-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* Extra links - plain blue underlined text */
.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0;
}

.paper-links a {
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.paper-links a:hover {
  text-decoration-color: var(--accent);
}

/* Abstract - with arrow, blue underline */
details.abstract {
  margin-top: 12px;
}

details.abstract summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.3);
  text-underline-offset: 2px;
  user-select: none;
  display: list-item;
  list-style: disclosure-closed inside;
  padding: 4px 0;
  transition: text-decoration-color 0.15s ease;
}

details.abstract summary:hover {
  text-decoration-color: var(--accent);
}

details.abstract[open] summary {
  list-style-type: disclosure-open;
  margin-bottom: 8px;
}

details.abstract p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

/* BibTeX actions - just copy button */
.paper-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.paper-actions button {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.3);
  text-underline-offset: 2px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: text-decoration-color 0.15s ease;
}

.paper-actions button:hover {
  text-decoration-color: var(--accent);
}

/* Footer */
footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Noscript */
.noscript {
  text-align: center;
  color: var(--muted);
  margin: 40px 20px;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 700px) {
  .container {
    padding: 48px 20px 40px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 48px;
    margin-bottom: 48px;
  }

  .hero-photo {
    order: -1;
    width: 180px;
    height: 180px;
  }

  .hero-photo img {
    max-width: 180px;
    max-height: 180px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .links {
    flex-direction: column;
    gap: 10px;
  }

  .links a {
    justify-content: center;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .section-nav {
    gap: 8px;
  }

  .paper {
    padding: 20px;
  }

  .paper h4 {
    font-size: 1rem;
  }

  .paper-actions {
    display: flex;
    margin-top: 12px;
  }
}

/* Print styles */
@media print {
  .container {
    max-width: none;
    padding: 0;
  }

  .hero {
    border: none;
    box-shadow: none;
  }

  .paper {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .paper-actions button {
    display: none;
  }
}
