:root {
  --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --color-bg: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #555;
  --color-accent: #1a5276;
  --color-accent-light: #2980b9;
  --color-border: #ddd;
  --color-bg-alt: #f8f9fa;
  --max-width: 820px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ---- Navigation ---- */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

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

nav .nav-name:hover {
  text-decoration: none;
  color: var(--color-accent);
}

nav .nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav .nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ---- Main layout ---- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

section:last-child {
  border-bottom: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
}

h2.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

/* ---- Hero / About ---- */

.hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding-top: 3rem;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.hero-text .subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.hero-text p {
  margin-bottom: 0.75rem;
}

.hero-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.hero-links a {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--color-accent-light);
  border-radius: 4px;
  transition: all 0.2s;
}

.hero-links a:hover {
  background: var(--color-accent-light);
  color: #fff;
  text-decoration: none;
}

/* ---- Publications ---- */

.pub-list {
  list-style: none;
}

.pub-list li {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-border);
}

.pub-list li:hover {
  border-left-color: var(--color-accent-light);
}

.pub-title {
  font-weight: 600;
  font-size: 1rem;
}

.pub-venue {
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

.pub-links {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

.pub-links a {
  margin-right: 0.75rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 0.1rem;
}

.pub-authors .me {
  font-weight: 600;
  color: var(--color-text);
}

.pub-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.15rem;
}

/* ---- Patents ---- */

.patent-list {
  list-style: none;
}

.patent-list li {
  margin-bottom: 0.4rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-border);
}

.patent-list li:hover {
  border-left-color: var(--color-accent-light);
}

.patent-date {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin-left: 0.4rem;
}

/* ---- Blog / article index list ---- */

.blog-list {
  list-style: none;
  padding-left: 0;
}

.blog-list li {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-border);
}

.blog-list li:hover {
  border-left-color: var(--color-accent-light);
}

.blog-list li a {
  font-size: 1.05rem;
  font-weight: 600;
}

.blog-list li p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  margin-top: 0.2rem;
}

/* ---- Content lists (prose ol/ul, not special component lists) ---- */

main ol, main ul {
  padding-left: 1.6rem;
  margin-bottom: 1rem;
}

main ol ol, main ul ul, main ol ul, main ul ol {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

main li {
  margin-bottom: 0.35rem;
}

main .pub-list, main .patent-list, main .award-list, main .blog-list {
  padding-left: 0;
}

main .pub-list li {
  margin-bottom: 1.25rem;
}

main .patent-list li {
  margin-bottom: 0.4rem;
}

main .award-list li {
  margin-bottom: 2rem;
}

main .blog-list li {
  margin-bottom: 1.25rem;
}

/* ---- Figures (uniform image treatment) ---- */

figure.fig {
  margin: 1rem 0;
  max-width: 520px;
}

figure.fig img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  display: block;
}

figure.fig figcaption {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.4rem;
  line-height: 1.4;
}

figure.fig-small {
  max-width: 380px;
}

figure.fig-pair {
  max-width: 100%;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

figure.fig-pair img {
  flex: 1;
  min-width: 200px;
  max-width: 49%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  object-fit: cover;
}

/* ---- Research ---- */

.research-item {
  margin-bottom: 1.5rem;
}

.research-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.research-period {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
}

.research-item p {
  margin-top: 0.35rem;
}

/* ---- Awards ---- */

.award-list {
  list-style: none;
}

.award-list li {
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--color-border);
}

.award-list li:hover {
  border-left-color: var(--color-accent-light);
}

.award-title {
  font-weight: 600;
}

.award-desc {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

/* ---- Activities ---- */

.activity-item {
  margin-bottom: 2rem;
}

.activity-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.activity-item p {
  margin-bottom: 0.4rem;
}

/* ---- Video thumbnails ---- */

.video-thumbnails {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.video-link {
  display: block;
  position: relative;
  width: 320px;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
  border: 1px solid var(--color-border);
}

.video-link img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.2s;
}

.video-link:hover img {
  opacity: 0.8;
}

.video-link .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* ---- Misc items ---- */

.misc-item {
  margin-bottom: 1.25rem;
}

.misc-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

/* ---- Footer ---- */

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
}

footer .email-img {
  height: 1.8em;
  vertical-align: middle;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

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

  nav .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  nav .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  figure.fig,
  figure.fig-small {
    max-width: 100%;
  }

  figure.fig-pair img {
    max-width: 100%;
  }

  .video-link {
    width: 100%;
  }
}
