/* Adapted from https://jhshin00.github.io/libs/custom/home.css. */
/* Palette from https://seohong.me/stylesheet.css: black text and light blue links. */
:root {
  --ink: #000000;
  --muted: #666666;
  --accent: #598be7;
  --accent-dark: #9bb9f1;
  --accent-soft: #f1f5fd;
  --line: #e8e8e8;
  --surface: #fafafa;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
strong, b { font-weight: 600; }
img { display: block; max-width: 100%; }
p { margin: 0 0 14px; }
figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

.page-shell {
  width: min(1000px, calc(100% - 64px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: 12px; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 60px;
}
.nav-name {
  flex-shrink: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
}
.nav-links a { color: var(--muted); font-size: 12px; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.profile-section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 44px;
  padding: 52px 0 42px;
}
.profile-portrait {
  position: relative;
  align-self: stretch;
}
.profile-photo {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 9px;
}
.profile-section h1 {
  margin: -7px 0 3px;
  font-size: 37px;
  line-height: 1.3;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.profile-role { margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.profile-bio p { line-height: 1.75; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
}
.profile-links .fa { color: var(--muted); font-size: 13px; }
.profile-links a:hover {
  color: var(--accent);
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  text-decoration: none;
}

.home-section { padding: 30px 0; border-top: 1px solid var(--line); }
.section-heading {
  margin: 0 0 22px;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; align-items: first baseline; }
.news-list li + li { margin-top: 12px; }
.news-date { color: var(--muted); font-size: 12px; font-weight: 500; }
.news-content { font-size: 14px; }
.news-emoji { display: inline-flex; position: relative; top: -0.06em; align-items: center; justify-content: center; margin-left: 3px; height: 1em; font-size: 1em; line-height: 1; vertical-align: middle; }
.news-emoji-research { gap: 3px; transform-origin: center bottom; animation: research-greeting 4s ease-in-out infinite; }
.news-emoji-computer { filter: drop-shadow(0 0 3px rgba(56, 189, 248, .25)); }
.news-emoji-computer svg { display: block; width: 1.15em; height: 1.15em; }
.news-emoji-brain { font-size: 1em; }
.news-emoji-robot { top: -0.14em; animation: robot-vibration 4s linear infinite; }
@keyframes research-greeting {
  0%, 15%, 45%, 100% { transform: translateY(0) rotate(0); }
  22%, 36% { transform: translateY(-0.05em) rotate(-6deg); }
  29% { transform: translateY(-0.08em) rotate(6deg); }
}
@keyframes robot-vibration {
  0%, 18%, 34%, 100% { transform: translateX(0); }
  20%, 24%, 28%, 32% { transform: translateX(-0.06em); }
  22%, 26%, 30% { transform: translateX(0.06em); }
}

.publications-section { padding-bottom: 34px; }
.publication { display: grid; grid-template-columns: 1fr; }
.publication-with-media { grid-template-columns: 190px minmax(0, 1fr); gap: 26px; }
.publication + .publication { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.publication-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  align-self: center;
}
.publication-media img { width: 160px; height: auto; border-radius: 7px; }
.publication-title { margin: 0 0 10px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.publication-authors { margin-bottom: 11px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.publication-authors b { color: var(--ink); }
.publication-venues { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.publication-venue {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-soft);
  border-radius: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.publication-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 22px; }
.publication-heading .section-heading { margin: 0; }
.publication-note { margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.publication-links { display: flex; flex-wrap: wrap; gap: 16px; }
.publication-links a { font-size: 13px; font-weight: 500; }
.publication-links .fa { margin-right: 5px; font-size: 11px; }

.background-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; }
.record + .record { margin-top: 24px; }
.record-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.record-title { margin: 0 0 4px; font-size: 13px; line-height: 1.6; font-weight: 600; }
.record-date { flex-shrink: 0; color: var(--muted); font-size: 10.5px; }
.record-detail { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

@media (max-width: 800px) {
  .profile-section { grid-template-columns: 160px minmax(0, 1fr); gap: 30px; }
  .profile-section h1 { font-size: 32px; }
  .nav-links { gap: 17px; }
  .background-grid { grid-template-columns: 1fr; }
  .record-title { font-size: 14px; }
  .record-date { font-size: 12px; }
}

@media (max-width: 580px) {
  html { scroll-padding-top: 108px; }
  body { font-size: 14px; }
  .page-shell { width: calc(100% - 40px); }
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 5px; padding-block: 11px; }
  .nav-links { width: 100%; gap: 20px; overflow-x: auto; padding-block: 3px; }
  .nav-links a { flex-shrink: 0; font-size: 11px; }
  .profile-section { display: flex; flex-direction: column; gap: 25px; padding: 32px 0; }
  .profile-portrait { align-self: flex-start; width: 132px; height: 162px; }
  .profile-section h1 { margin-top: 0; font-size: 31px; }
  .profile-role { margin-bottom: 18px; }
  .profile-bio p { line-height: 1.75; }
  .home-section { padding-block: 26px; }
  .section-heading { font-size: 20px; margin-bottom: 20px; }
  .news-list li { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .news-date { font-size: 11px; }
  .news-content { font-size: 13px; }
  .publication-with-media { grid-template-columns: 1fr; gap: 17px; }
  .publication-media { min-height: 0; }
  .publication-title { font-size: 14px; }
  .publication-authors { font-size: 12px; }
  .record-heading { flex-direction: column; gap: 0; margin-bottom: 5px; }
  .record-title { margin-bottom: 0; }
  .record-date { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .news-emoji-research, .news-emoji-robot { animation: none; }
}

/* All background sections use the full page width. */
.record-list { list-style: none; margin: 0; padding: 0; }
.record-title { font-size: 14px; }
.record-date, .record-detail { font-size: 12px; }
.publication-authors strong { color: var(--ink); }
.publication-title a { color: var(--ink); }
.publication-content { min-width: 0; }
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); text-align: right; font-size: 12px; }
.site-footer p { margin: 0; }

/* Preserve the existing publication previews and video controls. */
.one { width: 160px; min-height: 160px; position: relative; }
.two { width: 160px; height: 160px; transition: opacity .2s ease-in-out; }
.media-frame, .media-frame video, .eigensafe_cell { background: var(--surface); }
.mobile-play-hint {
  display: none; position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: 8px; background: rgba(250,250,250,.88);
  color: var(--muted); font: 600 13px/1.2 "Inter", sans-serif;
  align-items: center; justify-content: center; cursor: pointer; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.profile-links svg, .publication-links svg { width: 14px; height: 14px; flex-shrink: 0; }
.publication-links a { display: inline-flex; align-items: center; gap: 5px; }
@media (hover: none), (pointer: coarse) {
  .mobile-play-hint.is-visible { display: flex; }
}
@media (max-width: 580px) {
  .record-heading { align-items: flex-start; }
  .record-title, .publication-title { overflow-wrap: anywhere; }
}
