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

:root {
  --bg: #0d1117;
  --card: #161b22;
  --accent: #58a6ff;
  --text: #c9d1d9;
  --heading: #f0f6fc;
  --border: #30363d;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--heading);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* ── Layout ── */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding-top: 60px;
}

section {
  padding: 64px 0;
}

h2 {
  color: var(--heading);
  font-size: 1.5rem;
  margin-bottom: 24px;
}

h3 {
  color: var(--heading);
  font-size: 1.1rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

/* ── Hero ── */

.hero {
  display: flex;
  justify-content: center;
  padding: 100px 24px 64px;
}

.hero-content {
  text-align: center;
  max-width: 600px;
}

.photo-wrapper {
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.15);
  background: var(--card);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  color: var(--heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.contact-links a {
  color: var(--text);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
}

.contact-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* ── Biography ── */

.biography {
  border-top: 1px solid var(--border);
}

.biography p {
  font-size: 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent);
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.tag:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent);
}

/* ── Publications ── */

.publications {
  border-top: 1px solid var(--border);
}

.year-heading {
  color: var(--heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.year-heading:first-child {
  margin-top: 0;
}

.pub-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.pub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.pub-thumb {
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 1 / 1.4142;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-thumb img,
.pub-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-thumb-placeholder {
  color: var(--border);
  font-size: 0.75rem;
  text-align: center;
}

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-title {
  color: var(--heading);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
}

.pub-venue {
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 12px;
}

.pub-links {
  display: flex;
  gap: 10px;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.pub-link:hover {
  background: rgba(88, 166, 255, 0.15);
}

.pub-link svg {
  width: 14px;
  height: 14px;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #8b949e;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero {
    padding: 80px 24px 48px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .photo-wrapper {
    width: 130px;
    height: 130px;
  }

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

  .pub-thumb {
    width: 100%;
    aspect-ratio: 1 / 1.4142;
    height: auto;
  }

  section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }
}
