:root {
  --bg: #f2f6ff;
  --paper: #ffffff;
  --ink: #191b1f;
  --muted: #565f6b;
  --soft: #7b8491;
  --rule: #e1ddd4;
  --navy: #182b49;
  --gold: #b68519;
  --teal: #1f6f6b;
  --berry: #8a3344;
  --green: #426734;
  --blue-soft: #edf2f8;
  --gold-soft: #f8f0df;
  --teal-soft: #e7f2ef;
  --berry-soft: #f4e9ec;
  --green-soft: #edf3e7;
  --shadow: 0 16px 45px rgba(24, 43, 73, 0.08);
  --radius: 8px;
  --max: 1040px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 246, 255, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 62px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
  text-decoration: none;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 46px 28px 80px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--rule);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  font-weight: 700;
}

h2 {
  margin-top: 42px;
  margin-bottom: 16px;
  font-size: 1.36rem;
  font-weight: 700;
}

h3 {
  font-size: 1.02rem;
  font-weight: 700;
}

p {
  margin: 0 0 16px;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 28px 0 18px;
}

.profile-photo {
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

.hero-title {
  margin-bottom: 12px;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 1.06rem;
  margin-bottom: 20px;
}

.hero-subtitle strong {
  color: var(--ink);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.pill-link,
.filter-btn,
.pub-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s, transform 0.14s;
}

.pill-link:hover,
.filter-btn:hover,
.pub-link:hover,
.text-button:hover {
  border-color: var(--gold);
  text-decoration: none;
}

.job-callout {
  margin-top: 18px;
  padding: 13px 15px;
  border-left: 4px solid var(--berry);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--berry-soft);
  color: #52202a;
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 34px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 28px rgba(24, 43, 73, 0.05);
}

.news-list,
.clean-list,
.timeline-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.news-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.news-date,
.pub-venue,
.pub-year,
.count-label,
.small-caps {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.news-date {
  color: var(--navy);
}

.news-tag {
  display: inline-flex;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--gold-soft);
  color: #75570e;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.bio-grid {
  display: grid;
  gap: 16px;
}

.education-item,
.timeline-item {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.education-item:last-child,
.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.muted {
  color: var(--muted);
}

.love-rotator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 18px 0 4px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.love-box {
  --love-accent: var(--berry);
  --love-bg: var(--berry-soft);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: min(100%, 29ch);
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--love-accent);
  border-radius: var(--radius);
  background: var(--love-bg);
  box-shadow: 0 8px 22px rgba(24, 43, 73, 0.06);
}

.love-box[data-topic="metamaterial"] {
  --love-accent: var(--navy);
  --love-bg: var(--blue-soft);
}

.love-box[data-topic="smart-health"] {
  --love-accent: var(--berry);
  --love-bg: var(--berry-soft);
}

.love-box[data-topic="iot-sensing"] {
  --love-accent: var(--teal);
  --love-bg: var(--teal-soft);
}

.love-box[data-topic="wireless-networking"] {
  --love-accent: #75570e;
  --love-bg: var(--gold-soft);
}

.love-box[data-topic="ai-llm"] {
  --love-accent: var(--green);
  --love-bg: var(--green-soft);
}

.love-word {
  display: inline-block;
  min-width: 0;
  color: var(--love-accent);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.love-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--love-accent);
  animation: love-cursor-blink 0.95s steps(2, start) infinite;
}

@keyframes love-cursor-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .love-cursor {
    animation: none;
  }
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.topic-card {
  min-width: 0;
  min-height: 164px;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--paper);
}

.topic-card:nth-child(1) { border-top: 4px solid var(--navy); }
.topic-card:nth-child(2) { border-top: 4px solid var(--berry); }
.topic-card:nth-child(3) { border-top: 4px solid var(--teal); }
.topic-card:nth-child(4) { border-top: 4px solid var(--gold); }
.topic-card:nth-child(5) { border-top: 4px solid var(--green); }

.topic-card h3 {
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: normal;
}

.topic-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0;
}

.topic-count {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.featured-list {
  display: grid;
  gap: 14px;
}

.mini-pub {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.mini-pub:last-child {
  border-bottom: 0;
}

.publication-controls {
  display: grid;
  gap: 14px;
  margin: 28px 0 8px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-btn {
  min-height: 32px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-btn.active {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  width: min(100%, 360px);
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.94rem;
  outline: none;
}

.search-box:focus {
  border-color: var(--gold);
}

.count-label {
  color: var(--soft);
}

.pub-group {
  margin-top: 26px;
}

.year-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 8px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.year-heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--rule);
}

.pub-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.pub-card.hidden {
  display: none;
}

.pub-thumb {
  width: 112px;
  height: 78px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.pub-venue {
  color: var(--navy);
}

.pub-year {
  color: var(--soft);
}

.pub-type {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--teal-soft);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.award-badge {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--gold-soft);
  color: #7c5a0d;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.pub-title {
  margin: 0 0 5px;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.42;
}

.pub-authors {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.5;
}

.pub-authors strong {
  color: var(--ink);
}

.pub-summary {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pub-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.pub-link {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 5px;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag[data-topic="smart-health"] { background: var(--berry-soft); color: var(--berry); }
.tag[data-topic="iot-sensing"] { background: var(--teal-soft); color: var(--teal); }
.tag[data-topic="wireless-networking"] { background: var(--gold-soft); color: #75570e; }
.tag[data-topic="ai-llm"] { background: var(--green-soft); color: var(--green); }

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.hobby-hero,
.hobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 30px;
  align-items: center;
}

.hobby-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 28px;
}

.hobby-card {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hobby-gallery {
  display: grid;
  gap: 1px;
  background: var(--rule);
}

.hobby-gallery-single {
  grid-template-columns: 1fr;
}

.hobby-gallery-multi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hobby-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--blue-soft);
}

.hobby-card-body {
  padding: 20px;
}

.hobby-card h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.hobby-subtitle {
  margin-bottom: 12px;
  color: var(--navy);
  font-weight: 700;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 22px 28px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
}

@media (max-width: 880px) {
  .hero,
  .two-column,
  .split-grid,
  .hobby-hero {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-photo {
    width: min(260px, 100%);
  }
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 0 16px;
    gap: 12px;
    align-items: flex-start;
    min-height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-direction: column;
  }

  .brand {
    margin-right: 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-links a {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .page {
    padding: 30px 18px 62px;
  }

  h1 {
    font-size: 2.12rem;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .hobby-grid {
    grid-template-columns: 1fr;
  }

  .news-item,
  .pub-card {
    grid-template-columns: 1fr;
  }

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

  .search-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
