:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --border: #d9dee7;
  --border-soft: #e9edf3;
  --text: #2b2f36;
  --muted: #5f6b7a;
  --heading: #1f2937;
  --accent: #2f6fb3;
  --accent-soft: #eff5fb;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

body.dark-mode {
  --bg: #111827;
  --panel: #182232;
  --border: #344154;
  --border-soft: #2a3546;
  --text: #d8e0eb;
  --muted: #a7b4c4;
  --heading: #f4f7fb;
  --accent: #76b6f3;
  --accent-soft: #1c334b;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8f9fb 0%, #f3f5f8 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

body.dark-mode {
  background: linear-gradient(180deg, #101722 0%, #141d2a 100%);
}

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

p {
  margin: 0;
}

.layout {
  width: calc(100% - clamp(32px, 5vw, 96px));
  margin: clamp(24px, 3vw, 48px) auto;
  display: grid;
  grid-template-columns: clamp(240px, 20vw, 320px) minmax(0, 1fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 24px;
}

.profile-card {
  padding: 8px 0 0;
  text-align: center;
}

.avatar {
  width: 144px;
  height: 176px;
  display: block;
  margin: 0 auto 18px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.profile-card h1 {
  font-size: 2rem;
  line-height: 1.1;
}

.role {
  margin-top: 10px;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 600;
}

.tagline {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  text-align: left;
}

.profile-meta,
.sidebar-nav,
.bullet-list,
.publication-list,
.interest-row {
  padding: 0;
  margin: 0;
}

.profile-meta {
  list-style: none;
  margin-top: 22px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.profile-links {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  width: 104px;
  height: 38px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  overflow: hidden;
}

.theme-switch-row{display:flex;justify-content:center;margin-top:26px}.theme-switch{width:82px;height:32px}.theme-switch-knob{width:24px;height:24px}.theme-switch-option{font-size:13px}body.dark-mode .theme-switch-knob{transform:translateX(52px)}

.theme-switch:hover {
  background: #e4eef8;
}

body.dark-mode .theme-switch:hover {
  background: #27445f;
}

.theme-switch-option {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.theme-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transition: transform 220ms ease;
}

body.dark-mode .theme-switch-knob {
  transform: translateX(68px);
}

.profile-links a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.sidebar-nav {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: grid;
  gap: 10px;
  text-align: left;
}

.sidebar-nav a {
  color: var(--muted);
  font-size: 0.98rem;
}

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

.content {
  min-width: 0;
}

.content-section {
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--border-soft);
}

.content-section:first-child {
  padding-top: 6px;
}

.section-label {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#about h2 {
  max-width: 880px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

#about p + p {
  margin-top: 14px;
}

.interest-row {
  list-style: none;
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.interest-row span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.about-list {
  margin: 14px 0 0;
  padding-left: 1.2rem;
}

.about-list li + li {
  margin-top: 10px;
}

.about-note {
  margin-top: 18px;
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.news-date {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.news-item p {
  margin: 0;
}

.entry-list {
  display: grid;
  gap: 26px;
}

.entry {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
}

.entry-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.entry-date {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.entry-body h3 {
  font-size: 1.4rem;
  line-height: 1.25;
}

.entry-logo {
  flex: 0 0 auto;
  display: block;
  max-width: 170px;
  width: auto;
  height: 52px;
  object-fit: contain;
}

.school-logo {
  height: 88px;
}

.company-logo {
  height: 56px;
}

.entry-logo.large {
  max-width: 176px;
}

.sony-logo {
  width: 86px;
  height: auto;
}

.gac-logo {
  width: 125px;
  height: auto;
}

.entry-subtitle {
  margin-top: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.bullet-list {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--text);
}

.bullet-list li + li {
  margin-top: 8px;
}

.bullet-list.compact li + li {
  margin-top: 6px;
}

.publication-list {
  padding-left: 1.4rem;
}

.publication-list li + li {
  margin-top: 16px;
}

.publication-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.publication-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.publication-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.publication-figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef3f8;
}

.publication-figure img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pub-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #35557a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.publication-cover-plain {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #d7e4f3 0%, #b9cce3 100%);
  color: #35557a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 14px 16px 16px;
}

.publication-title {
  color: var(--heading);
  font-size: 0.96rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.publication-authors {
  margin-top: 8px;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.publication-meta {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.publication-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publication-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.publication-links a:hover {
  text-decoration: none;
  background: #e4eef8;
}

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.subheading {
  margin-bottom: 12px;
  font-size: 1.24rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.skill-card {
  min-height: 142px;
  padding: 15px 12px 13px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: #b7cbe2;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.skills-intro {
  max-width: 700px;
  color: var(--muted);
}

.skill-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 11px;
  background: linear-gradient(135deg, #edf5fc, #d6e7f7);
  color: #275f99;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.skill-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.skill-icon--ai {
  background: linear-gradient(135deg, #fdf0ec, #f9d9cf);
  color: #bf563d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 3px;
  line-height: 1.25;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.page-footer {
  padding: 24px 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    position: static;
  }

  .entry,
  .news-item,
  .two-column {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .layout {
    width: calc(100% - 24px);
    margin: 20px auto 28px;
  }

  .profile-card {
    padding-top: 0;
  }

  #about h2 {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }

  .content-section {
    padding: 24px 0 28px;
  }

  .publication-stack {
    grid-template-columns: 1fr;
  }

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