@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/npm/lxgw-neo-zhisong-webfont@1.0.0/style.css");
@import url("https://cdn.jsdelivr.net/npm/@typopro/web-linux-libertine@3.7.5/TypoPRO-LinuxLibertine.css");

:root {
  --bg: #f7f4ef;
  --text: #1a1a1a;
  --muted: #6f6a64;
  --accent: #b0302a;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.65;
  padding: 50px 26px;
  font-size: 17px;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: "TypoPRO Linux Libertine", "Linux Libertine", serif;
  font-weight: 500;
  letter-spacing: 0.3px;
}

h1 { font-size: 2rem; margin-bottom: 6px; }

.h1fontwo { font-size: 1.6rem; font-family: "LXGW Neo ZhiSong", "Songti SC", "STSong", serif; }

h2 { font-size: 1.4rem; margin: 38px 0 10px; padding-bottom: 4px; border-bottom: 1px solid #d8d2c8; }

h3 { font-size: 1.2rem; margin: 20px 0 4px; padding-bottom: 4px;}

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

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

a:hover { text-decoration: underline; }

nav {
  margin: 0;
  display: flex;
  
  gap: clamp(8px, 1.05vw, 18px);
  font-size: 0.97rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

nav a { color: var(--accent); opacity: 0.8; }
nav a:hover { opacity: 1; }

header {
  display: flex;
  gap: 14px;
  align-items: stretch;
  height: 200px;
  min-height: 200px;
  margin-right: 5px;
  margin-bottom: 40px;
  border-left: 4px solid var(--accent);
  padding-left: 18px;
}

.photo {
  width: 219px;
  height: 200px;
  flex: 0 0 219px;
  border-radius: 6px;
  background: #ddd;
}

.header-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.header-top,
.header-bottom {
  display: flex;
  justify-content: space-between;
  min-width: 0;
}

.header-top {
  align-items: center;
}

.header-bottom {
  align-items: flex-start;
  gap: 22px;
}

.header-top h1 {
  margin-bottom: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.profile-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: 22px;
}

.profile-links a {
  line-height: 0;
}

.tagline {
  min-width: 0;
  flex: 1 1 auto;
}

.navigation-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.navigation-wrap a {
  text-decoration: none;
  font-size: 0.97rem;
}

.menu-toggle {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.row-container {
  display: flex; 
  gap: 20px;     
}

.column-item {
  flex: 1;       
  padding: 15px;
  border: none;
}

p, li { margin-bottom: 10px; }
ul { list-style: disc !important; padding-left: 17px; }
ol { padding-left: 20px; }

.small { font-size: 0.94rem; }

footer {
  margin-top: 60px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid #d8d2c8;
  padding-top: 12px;
}

@media (max-width: 1120px) {
  
  .header-content {
    min-width: 0;
  }

  .header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 8px;
    row-gap: 4px;
    min-width: 0;
  }

  .header-top h1 {
    width: max-content;
    min-width: max-content;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .profile-links {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    margin-left: auto;
  }

  
  .tagline {
    min-width: 235px;
    flex: 1 0 235px;
  }

  
  .navigation-wrap {
    width: 54px;
    min-width: 54px;
    flex: 0 0 54px;
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
  }

  .navigation-wrap > nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .navigation-wrap > nav.open {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 180px;
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg);
    border: 1px solid #d8d2c8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 900px) {
  html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    padding:
      max(18px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    font-size: 16px;
    line-height: 1.55;
    -webkit-overflow-scrolling: touch;
  }

  
  header {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 30px;
    padding: 0;
    border-left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }

  
  .photo {
    width: 100%;
    height: clamp(175px, 52vw, 225px);
    min-height: 0;
    flex: 0 0 auto;
    padding-left: 11px;
    border-left: 4px solid var(--accent);
    border-radius: 0;
    background: transparent;
    overflow: hidden;
  }

  .photo img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center 36%;
    border-radius: 6px;
  }

  .header-content {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
  }

  
  .header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 6px;
    row-gap: 4px;
    min-width: 0;
  }

  .header-top h1 {
    width: max-content;
    min-width: max-content;
    margin: 0;
    flex: 0 0 auto;
    font-size: clamp(1.2rem, 5.45vw, 1.45rem);
    line-height: 1.05;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .header-top .h1fontwo {
    font-size: 0.84em;
  }

  .profile-links {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    align-self: center;
    justify-content: flex-end;
    gap: 2px;
  }

  .profile-links:empty {
    display: none;
  }

  .profile-links a {
    width: 30px;
    height: 36px;
    display: grid;
    place-items: center;
    line-height: 1;
  }

  .profile-links img {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px;
  }

  .header-bottom {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .tagline {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.86rem;
    line-height: 1.48;
  }

  .navigation-wrap {
    width: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    font-size: 1.85rem;
    line-height: 1;
    touch-action: manipulation;
  }

  .navigation-wrap > nav {
    display: none;
  }

  .navigation-wrap > nav.open {
    display: flex;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    width: min(220px, calc(100vw - 28px));
    min-width: 0;
    margin: 0;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    white-space: normal;
    background: var(--bg);
    border: 1px solid #d8d2c8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  }

  .navigation-wrap > nav.open a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    padding: 7px 9px;
    font-size: 1rem;
    touch-action: manipulation;
  }

  
  .container,
  .wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  body > h1,
  .container > h1 {
    font-size: 1.75rem;
    line-height: 1.12;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 1.32rem;
    line-height: 1.2;
    margin: 30px 0 10px;
  }

  h3 {
    font-size: 1.15rem;
    line-height: 1.25;
    margin-top: 20px;
  }

  p,
  li {
    overflow-wrap: anywhere;
  }

  ul,
  ol {
    padding-left: 21px;
  }

  .row-container {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .row-container > .column-item,
  .column-item {
    width: 100%;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    padding: 6px 0;
  }

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

  
  .column-item figure {
    width: 100% !important;
    max-width: 100% !important;
  }

  iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  
  .research-domain {
    min-height: 46px;
    touch-action: manipulation;
  }

  .research-modal {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    align-items: stretch;
  }

  .research-modal__dialog {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    padding: 1.1rem;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .research-modal__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .research-modal__images {
    width: 100%;
    min-width: 0;
  }

  .research-modal__close {
    width: 44px;
    height: 44px;
    top: 0.25rem;
    right: 0.35rem;
  }

  
  .software-tool {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .software-preview-link,
  .software-description {
    min-width: 0;
  }

  
  a,
  button {
    -webkit-tap-highlight-color: rgba(176, 48, 42, 0.12);
  }
}

@media (max-width: 380px) {
  body {
    padding-left: max(11px, env(safe-area-inset-left));
    padding-right: max(11px, env(safe-area-inset-right));
  }

  .header-top h1 {
    font-size: 1.12rem;
  }

  .tagline {
    font-size: 0.82rem;
  }

  .photo {
    height: 175px;
  }
}

.research-projects-grid > .column-item > h3 {
  white-space: nowrap;
}

.conference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.conference-grid > .column-item {
  width: auto !important;
  min-width: 0 !important;
  padding: 15px;
  flex: none !important;
}

@media (max-width: 1120px) {
  .conference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .conference-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .research-projects-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
  }

  .research-projects-grid > .column-item {
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
  }

  .research-projects-grid > .column-item > h3 {
    white-space: nowrap !important;
    width: max-content;
    max-width: 100%;
  }
}

.responsive-media {
  width: 360px;
  max-width: 360px;
  margin: 1em 0;
}

.responsive-media-frame {
  display: block;
  width: 360px;
  max-width: 360px;
  height: 203px;
  border: 0;
}

@media (max-width: 900px) {
  .responsive-media {
    width: 100% !important;
    max-width: 100% !important;
  }

  .responsive-media-frame {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
}

.radio-player-frame {
  width: 360px;
  max-width: 360px;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8d2c8;
}

.radio-cover-link {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.radio-cover {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.radio-audio {
  width: 100%;
  flex: 0 0 auto;
  display: block;
}

@media (max-width: 900px) {
  .radio-player-frame {
    width: 100%;
    max-width: 100%;
  }
}

.custom-video-shell {
  width: 360px;
  max-width: 360px;
}

.custom-video-poster {
  width: 360px;
  max-width: 360px;
  height: 203px;
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.custom-video-poster img,
.custom-poster-video {
  display: block;
  width: 360px !important;
  max-width: 360px !important;
  height: 203px !important;
  object-fit: cover;
  border: 1px solid #dedede;
  border-radius: 4px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.custom-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(176, 48, 42, 0.92);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

@media (max-width: 900px) {
  .custom-video-shell,
  .custom-video-poster {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .custom-video-poster img,
  .custom-poster-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 1450px) and (min-width: 1121px) {
  nav {
    gap: clamp(8px, 0.9vw, 14px);
  }
}

@media (max-width: 1250px) and (min-width: 1121px) {
  nav {
    gap: 8px;
  }
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 20px;
  align-items: start;
}

.media-grid > .column-item {
  width: 100%;
  min-width: 0;
  padding: 15px;
  flex: none;
}

.media-grid .responsive-media,
.media-grid .custom-video-shell,
.media-grid .custom-video-poster,
.media-grid .radio-player-frame {
  width: 100%;
  max-width: 100%;
}

.media-grid .custom-video-poster {
  height: auto;
  aspect-ratio: 16 / 9;
}

.media-grid .custom-video-poster img,
.media-grid .custom-poster-video,
.media-grid .responsive-media-frame {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}

@media (max-width: 900px) {
  .media-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}