/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1e293b;
  background-color: #f1f5f9;
  background-image:
    linear-gradient(rgba(241,245,249,0.9), rgba(241,245,249,0.92)),
    url('../bg-robotics.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: #0284c7; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0ea5e9; text-decoration: underline; }

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

:focus-visible { outline: 2px solid #0ea5e9; outline-offset: 2px; }

/* ===== Layout ===== */
.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* ===== Header — dark tech gradient ===== */
.site-header {
  position: relative;
  background: linear-gradient(135deg, #0c1929 0%, #163050 50%, #0f2847 100%);
  border-radius: 18px;
  padding: 2.2rem 2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(12,25,41,0.25);
}

/* glow orbs */
.site-header::before,
.site-header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.site-header::before {
  top: -80px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(6,182,212,0.18) 0%, transparent 65%);
}
.site-header::after {
  bottom: -100px; left: -40px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 65%);
}

/* circuit-line decoration */
.site-header .circuit {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56,189,248,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 70% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, black 30%, transparent 75%);
  pointer-events: none;
}

.lang-switch {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  font-size: 0.82rem;
  color: #7dd3fc;
  z-index: 2;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(125,211,252,0.3);
  border-radius: 20px;
  transition: all 0.2s;
}
.lang-switch:hover {
  color: #fff;
  border-color: #38bdf8;
  background: rgba(56,189,248,0.1);
  text-decoration: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  position: relative;
  z-index: 1;
}

.avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 0 4px rgba(56,189,248,0.15), 0 0 24px rgba(56,189,248,0.3);
}

.header-text { flex: 1; min-width: 0; }

.header-text h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.header-title {
  font-size: 1.05rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.header-affil {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 0.1rem;
}

.header-loc {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.8rem;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  font-size: 0.88rem;
}
.header-links a {
  color: #7dd3fc;
  position: relative;
}
.header-links a:hover {
  color: #fff;
  text-decoration: none;
}
.header-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: #38bdf8;
  transition: width 0.25s;
}
.header-links a:hover::after { width: 100%; }

/* ===== Content ===== */
.content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  padding-left: 0.8rem;
  border-left: 4px solid #0ea5e9;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.content p { margin-bottom: 0.8rem; }

.content ul {
  margin-bottom: 0.8rem;
  padding-left: 0;
  list-style: none;
}
.content ul li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.4rem;
}
.content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #0ea5e9;
  font-size: 0.85rem;
}
.content ul li > ul { margin-top: 0.3rem; margin-bottom: 0.2rem; }
.content ul li > ul li { padding-left: 1.1rem; font-size: 0.93rem; color: #475569; }
.content ul li > ul li::before { content: '·'; color: #94a3b8; }

.content strong { font-weight: 600; color: #0f172a; }

/* Publications — card style */
.content ol {
  list-style: none;
  counter-reset: pub;
  padding-left: 0;
}
.content ol li {
  counter-increment: pub;
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0ea5e9;
  border-radius: 10px;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  margin-bottom: 0.65rem;
  font-size: 0.93rem;
  line-height: 1.6;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.content ol li:hover {
  border-color: #38bdf8;
  border-left-color: #0284c7;
  box-shadow: 0 6px 18px rgba(14,165,233,0.12);
  transform: translateY(-2px);
}
.content ol li::before {
  content: "[" counter(pub) "]";
  position: absolute;
  left: 0.9rem;
  top: 0.85rem;
  font-weight: 700;
  color: #0ea5e9;
  font-size: 0.82rem;
}

.pub-note { font-size: 0.9rem; color: #475569; margin-bottom: 0.9rem; }

/* ===== Footer ===== */
.site-footer {
  margin-top: 2.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ===== Responsive ===== */
@media (max-width: 620px) {
  body { background-attachment: scroll; }
  .wrapper { padding: 1.2rem 0.9rem 2rem; }
  .site-header { padding: 1.5rem 1.2rem; border-radius: 14px; }
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .avatar { width: 104px; height: 104px; }
  .header-text h1 { font-size: 1.5rem; }
  .header-links {
    justify-content: center;
    gap: 0.2rem 0.9rem;
  }
  .header-links a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.2rem;
  }
  .lang-switch {
    position: static;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0.8rem;
  }
  .content ol li { padding: 0.7rem 0.8rem 0.7rem 2.4rem; }
  .content ol li::before { left: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
