@charset "UTF-8";

/*
 * Responsive additions for the existing site.
 * Desktop/tablet styles remain unchanged at 768px and above.
 */

.menu-toggle {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --mobile-gutter: 20px;
    --mobile-header-height: 76px;
    --accent: #21ab88;
    --accent-pale: #d1f0e9;
    --ink: #172126;
  }

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

  html,
  body {
    width: 100%;
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
    line-height: 1.75;
    -webkit-text-size-adjust: 100%;
  }

  img,
  iframe {
    max-width: 100%;
  }

  .scaling-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 100svh;
    margin: 0 !important;
    overflow: visible !important;
    container-type: normal !important;
  }

  /* Mobile header and navigation */
  .header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000;
    display: flex;
    width: 100% !important;
    height: var(--mobile-header-height) !important;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 0 14px;
    border-bottom: 1px solid rgba(33, 171, 136, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 20px rgba(6, 35, 43, 0.08);
    container-type: normal !important;
    backdrop-filter: blur(14px);
  }

  .page-home .header {
    border-bottom-color: rgba(126, 211, 255, 0.22);
    background: rgba(0, 6, 13, 0.9);
    box-shadow: none;
  }

  .header > a {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
  }

  .header .symbol {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: flex;
    width: min(72vw, 300px) !important;
    height: 52px !important;
    align-items: center;
    gap: 10px;
  }

  .header .symbol .symbol_img {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 48px;
    object-fit: contain;
  }

  .header .symbol .symbol_str {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: min(54vw, 232px) !important;
    height: auto !important;
    object-fit: contain;
  }

  .menu-toggle {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    padding: 0;
    cursor: pointer;
    place-content: center;
    gap: 6px;
    border: 1px solid var(--accent);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.7);
  }

  .page-home .menu-toggle {
    border-color: #23d8ff;
    background: rgba(1, 22, 38, 0.7);
  }

  .menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .page-home .menu-toggle span {
    background: #23d8ff;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header .navigation {
    position: fixed !important;
    top: var(--mobile-header-height) !important;
    right: 0 !important;
    left: 0 !important;
    display: grid;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 28px rgba(10, 37, 43, 0.15);
    opacity: 0;
    transition: max-height 220ms ease, opacity 180ms ease, visibility 180ms;
  }

  .page-home .header .navigation {
    background: rgba(1, 15, 28, 0.98);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.38);
  }

  .header .navigation.is-open {
    max-height: calc(100svh - var(--mobile-header-height));
    visibility: visible;
    opacity: 1;
  }

  .header .navigation ul {
    display: grid;
    width: 100%;
    padding: 8px var(--mobile-gutter) 18px !important;
  }

  .header .navigation ul a {
    display: block !important;
    margin: 0 !important;
    padding: 13px 4px !important;
    border-bottom: 1px solid rgba(33, 171, 136, 0.17);
    color: var(--ink) !important;
    font-size: 1rem !important;
    line-height: 1.35;
  }

  .page-home .header .navigation ul a {
    border-bottom-color: rgba(143, 211, 238, 0.16);
    color: #def6ff !important;
  }

  .header .navigation ul a[aria-current="page"] {
    color: var(--accent) !important;
  }

  .page-home .header .navigation ul a[aria-current="page"] {
    color: #23d8ff !important;
  }

  .decor {
    display: none;
  }

  /* Shared content and footer */
  .contents {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    container-type: normal !important;
  }

  .footer {
    position: relative !important;
    height: auto !important;
    min-height: 158px;
    padding: 28px var(--mobile-gutter);
    background: #52585b;
    container-type: normal !important;
  }

  .footer .inner {
    position: relative !important;
    inset: auto !important;
    display: flex;
    width: min(100%, 430px) !important;
    height: auto !important;
    flex-direction: column;
    gap: 18px;
    margin-left: auto;
    container-type: normal !important;
  }

  .footer .inner .aist_str {
    position: relative !important;
    inset: auto !important;
    margin: 0;
    font-size: 0.76rem !important;
    line-height: 1.65;
  }

  .footer .inner .aist_logo {
    position: relative !important;
    inset: auto !important;
    width: min(225px, 66vw) !important;
  }

  /* Home */
  .page-home {
    background: #000;
  }

  .page-home .contents {
    position: relative;
    display: flex;
    min-height: calc(100svh - 152px);
    flex-direction: column;
    justify-content: flex-start;
    padding: clamp(42px, 9svh, 72px) var(--mobile-gutter) 18px;
    overflow: hidden;
    isolation: isolate;
  }

  /* .page-home .contents::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
      radial-gradient(circle at 60% 62%, rgba(3, 70, 141, 0.3), transparent 44%),
      linear-gradient(128deg, #020b17 0%, #00172e 58%, #000 100%);
    content: "";
  } */

  .page-home .contents::before {
  background: #000;
  }

  .page-home .contents .main_image {
    position: absolute !important;
    z-index: -1;
    top: auto !important;
    right: 1vw !important;
    bottom: -3vw;
    width: min(82vw, 390px) !important;
    height: auto !important;
    object-fit: contain;
    opacity: 0.96;
  }

  .page-home .contents .main_sentence {
    position: relative !important;
    z-index: 2;
    top: auto !important;
    left: auto !important;
    width: 100%;
    margin: 0 !important;
    color: #fff;
    font-size: clamp(1.8rem, 12.5vw, 2.5rem) !important;
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.2 !important;
    white-space: normal !important;
  }

  /* .page-home .mobile-break { */
  .mobile-break {
    display: block;
  }

  .page-home .contents .sub_sentence {
    position: relative !important;
    z-index: 2;
    top: auto !important;
    left: auto !important;
    max-width: 38rem;
    margin: 10px 0 0 !important;
    color: #dcecf5;
    font-size: clamp(0.9rem, 3.8vw, 1.04rem) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
  }

  .page-home .history {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none;
    padding: 26px var(--mobile-gutter) 38px !important;
    overflow: visible !important;
    border-top: 1px solid #28c9f0;
    background: linear-gradient(125deg, #073044, #031b29 76%);
    container-type: normal !important;
  }

  .page-home .history .history-inner {
    width: min(100%, 760px) !important;
    margin: 0 auto !important;
    container-type: normal !important;
  }

  .page-home .history .history-inner p {
    margin: 0 0 14px !important;
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  .page-home .history .history-inner ul {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.91rem !important;
    line-height: 1.65 !important;
  }

  .page-home .history .history-inner li {
    padding: 10px 0;
    border-top: 1px dashed rgba(183, 223, 239, 0.25);
  }

  .page-home .history .history-inner li:first-child {
    border-top: 0;
  }

  /* Research */
  .page-research .contents {
    padding: 24px 16px 54px;
  }

  .page-research .vision,
  .page-research .theme {
    width: 100% !important;
    height: auto !important;
    margin: 0 0 28px !important;
    padding: 22px 18px;
    border: 1px solid #bac8cd;
    box-shadow: 0 8px 22px rgba(38, 65, 73, 0.12);
    container-type: normal !important;
  }

  .page-research .subtitle {
    position: relative !important;
    top: auto !important;
    width: fit-content !important;
    height: auto !important;
    margin: -22px 0 24px -18px;
    padding: 9px 18px !important;
    font-size: 1.35rem !important;
    line-height: 1.2;
  }

  .page-research .vision .vision_str {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin: 0 !important;
    font-size: 0.96rem !important;
    line-height: 1.9;
  }

  .page-research .theme .project {
    position: relative !important;
    display: flex;
    width: 100%;
    height: auto !important;
    flex-direction: column;
    margin: 0 !important;
    padding: 28px 0;
    border-top: 1px solid #d8e4e5;
    container-type: normal !important;
  }

  .page-research .theme .project:first-of-type {
    padding-top: 0;
    border-top: 0;
  }

  .page-research .theme .project .project_title,
  .page-research .theme .project .fig,
  .page-research .theme .project .str,
  .page-research .theme .project .ref {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }

  .page-research .theme .project .project_title {
    order: 1;
    font-size: 1.2rem !important;
    line-height: 1.55;
  }

  .page-research .theme .project .fig {
    order: 2;
    margin-top: 18px !important;
  }

  .page-research .theme .project .str {
    order: 3;
    margin-top: 20px !important;
    font-size: 0.94rem !important;
    line-height: 1.85 !important;
  }

  .page-research .theme .project .ref {
    order: 4;
    margin-top: 16px !important;
    padding: 14px 16px;
    background: #f0f7f6;
    font-size: 0.84rem !important;
    line-height: 1.65 !important;
  }

  .page-research .theme .project .ref p {
    margin: 0 0 8px !important;
    font-weight: 700;
  }

  .page-research .theme .project .ref ul {
    margin: 0;
    padding-left: 1.3em;
  }

  /* Publications */
  .page-publications .contents {
    padding: 12px var(--mobile-gutter) 58px;
  }

  .page-publications .contents .articles,
  .page-publications .contents .reviews,
  .page-publications .contents .others,
  .page-publications .contents .biography {
    width: 100% !important;
    height: auto !important;
    margin: 34px auto 0 !important;
    font-size: 0.94rem !important;
  }

  .page-publications .contents h2 {
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-pale);
    color: var(--accent);
    font-size: 1.55rem;
    line-height: 1.4;
  }

  .page-publications .contents h2 span,
  .page-publications .contents h2 a,
  .page-publications .contents sup,
  .page-publications .biography[style],
  .page-publications .biography p[style] {
    font-size: 0.78rem !important;
  }

  .page-publications .contents h3 {
    margin-top: 28px;
    font-size: 1.06rem;
  }

  .page-publications .contents ul {
    padding-left: 1.35em;
  }

  .page-publications .contents ul li {
    padding: 0 0 16px !important;
    font-size: 0.88rem !important;
    line-height: 1.75 !important;
    overflow-wrap: anywhere;
  }

  .page-publications .contents .biography_img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin: 16px 0 24px !important;
  }

  .page-publications .biography table {
    display: block;
    width: 100%;
    padding-left: 0 !important;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.55 !important;
  }

  .page-publications .biography td {
    padding: 5px 8px 5px 0;
    vertical-align: top;
  }

  .page-publications .biography td:first-child {
    width: auto !important;
    min-width: 118px;
    white-space: nowrap;
  }

  /* Members */
  .page-members .contents {
    padding: 8px var(--mobile-gutter) 58px;
  }

  .page-members .contents .subtitle {
    width: 100% !important;
    margin: 34px auto 20px !important;
    padding-bottom: 9px;
    font-size: 1.55rem !important;
  }

  .page-members .profiles {
    display: flex;
    width: 100% !important;
    height: auto !important;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin: 0 auto 42px !important;
  }

  .page-members .profiles .ind {
    position: relative !important;
    display: flex !important;
    width: min(100%, 430px) !important;
    height: auto !important;
    flex-direction: column;
    margin: 0 !important;
    padding: 12px 12px 14px;
    border: 1px solid #d7e9e5;
    border-radius: 4px;
    box-shadow: 0 10px 28px rgba(34, 76, 66, 0.1);
  }

  .page-members .profiles .ind .photo {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    padding: 6px !important;
    border: 4px solid var(--accent-pale) !important;
  }

  .page-members .profiles .ind .info {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 14px;
    padding: 3px 0 3px 14px;
    border-left: 5px solid var(--accent);
    text-align: left;
  }

  .page-members .profiles .ind .info p {
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
  }

  .page-members .profiles .ind .info .name_jp {
    font-size: 1.22rem !important;
  }

  .page-members .profiles .ind .info .name_en {
    margin-top: 2px !important;
    color: #7f7f7f;
    font-size: 0.78rem !important;
  }

  .page-members .profiles .ind .info .affiliation {
    margin-top: 4px !important;
    font-size: 0.86rem !important;
  }

  .page-members .profiles .ind .massage {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    padding: 8px 2px 2px !important;
    font-size: 0.9rem !important;
    line-height: 1.75;
  }

  .page-members .profiles .ind .moreinfo {
    position: relative !important;
    inset: auto !important;
    width: 132px !important;
    margin-left: auto;
  }

  .page-members .profiles .short {
    width: 100% !important;
  }

  .page-members .profiles .short ul {
    padding: 0;
  }

  .page-members .profiles .short ul li {
    margin-top: 14px !important;
    padding: 4px 0 4px 12px !important;
    font-size: 0.9rem !important;
    line-height: 1.65;
  }

  .page-members .profiles .ind > a {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  }

  .page-members .profiles .ind .moreinfo {
  display: block;
  margin-left: auto;
  }

  
  /* Contacts */
  .page-contacts .contents {
    padding: 14px var(--mobile-gutter) 64px;
  }

  .page-contacts .message,
  .page-contacts .access,
  .page-contacts .recruit {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    margin: 34px auto 0 !important;
    font-size: 0.94rem !important;
    line-height: 1.85 !important;
  }

  .page-contacts .message {
    text-align: left !important;
  }

  .page-contacts .message p[style] {
    color: var(--accent);
    font-size: 1.35rem !important;
    line-height: 1.55;
  }

  .page-contacts .subheader {
    margin: 0 0 20px;
    padding: 2px 0 2px 12px !important;
    border-left-width: 6px !important;
    font-size: 1.55rem !important;
    line-height: 1.3;
  }

  .page-contacts .access .map {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: min(68vw, 300px) !important;
    border: 0;
  }

  .page-contacts .access ul,
  .page-contacts .recruit ul {
    position: relative !important;
    inset: auto !important;
    margin: 20px 0 0 !important;
    padding: 0 !important;
  }

  .page-contacts .access ul li,
  .page-contacts .recruit ul li {
    padding-top: 6px !important;
    font-size: 0.9rem !important;
    line-height: 1.75 !important;
    overflow-wrap: anywhere;
  }

  .page-contacts .recruit > ul > li[style*="font-weight: bold"] {
    margin-top: 24px;
    padding-left: 0 !important;
    color: #167d65;
    font-size: 1.03rem !important;
  }

  .page-contacts .recruit > ul > li[style*="padding-left"] {
    padding-left: 0 !important;
  }
}

@media (max-width: 420px) {
  .header .symbol {
    width: calc(100vw - 86px) !important;
    gap: 8px;
  }

  .header .symbol .symbol_img {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px;
  }

  .page-home .contents .main_image {
    width: 88vw !important;
    right: -4vw !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
