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

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.75;
  color: #1a1a1a;
  background: #fafafa;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 28px 120px;
}

/* ── Profile ── */
.profile {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 64px;
  padding-bottom: 52px;
  border-bottom: 1px solid #e8e8e8;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  border: 3px solid #fff;
}

.profile-info h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  line-height: 1.15;
  color: #111;
}

.profile-info .role {
  color: #555;
  margin: 0 0 20px;
  font-size: 0.95rem;
  font-weight: 400;
}

.profile-info .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-info .links a {
  color: #333;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1.5px solid #d0d0d0;
  border-radius: 20px;
  padding: 4px 14px;
  transition: all 0.15s ease;
  background: #fff;
}

.profile-info .links a:hover {
  border-color: #333;
  background: #111;
  color: #fff;
}

/* ── Section headings ── */
section {
  margin-bottom: 52px;
}

section h2 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #aaa;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

/* ── About ── */
.about-text p {
  color: #333;
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.8;
}

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

.about-text a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #ccc;
  transition: text-decoration-color 0.15s;
}

.about-text a:hover {
  text-decoration-color: #333;
}

.about-text strong {
  font-weight: 600;
  color: #111;
}

/* ── Publications ── */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  display: flex;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid #ebebeb;
  align-items: flex-start;
}

.pub-item:first-child {
  border-top: 1px solid #ebebeb;
}

.pub-thumb {
  width: 148px;
  flex-shrink: 0;
}

.pub-thumb img {
  width: 100%;
  height: 104px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  display: block;
  background: #f8f8f8;
  padding: 6px;
}

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

.pub-title {
  font-weight: 600;
  color: #111;
  margin-bottom: 5px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.pub-authors {
  font-size: 0.86rem;
  color: #666;
  margin-bottom: 3px;
  line-height: 1.4;
}

.pub-authors strong {
  color: #1a1a1a;
  font-weight: 600;
}

.pub-venue {
  font-size: 0.83rem;
  color: #999;
  margin-bottom: 10px;
}

.pub-venue .conf-highlight {
  font-weight: 600;
  color: #555;
}

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

.pub-links a {
  font-size: 0.77rem;
  font-weight: 500;
  color: #444;
  border: 1.5px solid #d0d0d0;
  border-radius: 4px;
  padding: 2px 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  background: #fff;
}

.pub-links a:hover {
  border-color: #333;
  color: #111;
  background: #f5f5f5;
}

/* ── Patents ── */
.patent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: patent-counter;
}

.patent-item {
  display: flex;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #ebebeb;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #444;
  align-items: flex-start;
  counter-increment: patent-counter;
}

.patent-item:first-child {
  border-top: 1px solid #ebebeb;
}

.patent-item::before {
  content: "[" counter(patent-counter) "]";
  font-size: 0.78rem;
  color: #bbb;
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 28px;
}

.patent-item strong {
  color: #1a1a1a;
  font-weight: 600;
}

.patent-item em {
  font-style: italic;
  color: #888;
}

.patent-item .patent-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #666;
  border: 1px solid #d8d8d8;
  border-radius: 3px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Experience ── */
.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.exp-item {
  padding: 16px 0;
  border-bottom: 1px solid #ebebeb;
}

.exp-item:first-child {
  border-top: 1px solid #ebebeb;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
  gap: 12px;
}

.exp-org {
  font-weight: 600;
  font-size: 0.93rem;
  color: #111;
}

.exp-period {
  font-size: 0.8rem;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.exp-role {
  font-size: 0.86rem;
  color: #555;
  margin-bottom: 3px;
  font-weight: 500;
}

.exp-desc {
  font-size: 0.84rem;
  color: #888;
  line-height: 1.55;
}

/* ── Post page ── */
.back-nav {
  margin-bottom: 48px;
}

.back-nav a {
  color: #888;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}

.back-nav a:hover {
  color: #111;
}

.post-header {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e8e8e8;
}

.post-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  line-height: 1.25;
  color: #111;
}

.post-meta {
  font-size: 0.86rem;
  color: #aaa;
}

.post-meta .separator {
  margin: 0 6px;
}

.post-content {
  font-size: 0.97rem;
  line-height: 1.9;
  color: #222;
}

.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2.2em 0 0.65em;
  line-height: 1.3;
  color: #111;
}

.post-content h1 { font-size: 1.45rem; }
.post-content h2 { font-size: 1.2rem; }
.post-content h3 { font-size: 1.05rem; }

.post-content p { margin-bottom: 1.3em; }

.post-content a {
  color: #1a1a1a;
  text-underline-offset: 3px;
}

.post-content ul, .post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.3em;
}

.post-content li { margin-bottom: 0.3em; }

.post-content code {
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.post-content pre {
  background: #f7f7f7;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  padding: 18px 22px;
  overflow-x: auto;
  margin-bottom: 1.4em;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875em;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.post-content blockquote {
  border-left: 3px solid #ddd;
  margin-left: 0;
  padding-left: 18px;
  color: #666;
  font-style: italic;
}

.post-content hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 2em 0;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .container {
    padding: 48px 20px 80px;
  }

  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 44px;
  }

  .profile-info .links {
    justify-content: center;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }

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

  .pub-thumb {
    width: 100%;
  }

  .pub-thumb img {
    height: 140px;
  }

  .exp-header {
    flex-direction: column;
    gap: 2px;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }
}
