/* ============================================================
   Yuichiro Lab — Brain-inspired Integrated System Laboratory
   Modern & Pop theme / brand color from logo2026: #896CAD
   ============================================================ */

:root {
  --purple: #896cad;
  --purple-dark: #6d5391;
  --purple-deep: #46375e;
  --lav-bg: #f6f2fb;
  --lav-card: #ece5f6;
  --ink: #3b3346;
  --ink-soft: #6d6479;
  --accent: #ff8a5c;
  --accent-dark: #e96f41;
  --white: #ffffff;
  --radius-l: 28px;
  --radius-m: 18px;
  --shadow: 0 10px 30px rgba(109, 83, 145, 0.14);
  --shadow-s: 0 4px 14px rgba(109, 83, 145, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: "Quicksand", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.9;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: var(--purple-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4vw;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(109, 83, 145, 0.10);
}
.site-header .brand img { height: 44px; display: block; }

.site-nav ul { display: flex; gap: 6px; list-style: none; align-items: center; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: 0.92rem; color: var(--ink);
}
.site-nav a:hover { background: var(--lav-card); text-decoration: none; color: var(--purple-dark); }
.site-nav a.nav-cta {
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-s);
}
.site-nav a.nav-cta:hover { background: var(--accent-dark); color: #fff; }
.site-nav a.nav-lang { border: 2px solid var(--lav-card); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  font-size: 1.6rem; color: var(--purple-dark); line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 6vw 90px;
  background:
    radial-gradient(circle at 85% 15%, rgba(137, 108, 173, 0.20), transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(255, 138, 92, 0.16), transparent 40%),
    linear-gradient(160deg, #faf7ff 0%, var(--lav-bg) 60%, #f1eaf9 100%);
  overflow: hidden;
  text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(137, 108, 173, 0.10);
  animation: floaty 7s ease-in-out infinite;
}
.hero::before { width: 260px; height: 260px; top: -70px; left: -70px; }
.hero::after  { width: 340px; height: 340px; bottom: -120px; right: -100px; animation-delay: 3s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(18px); } }

.hero-mark {
  width: 150px; margin: 0 auto 18px; display: block;
  animation: pop-in 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes pop-in { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.hero h1 {
  font-size: clamp(1.5rem, 4.2vw, 2.6rem);
  color: var(--purple-deep); letter-spacing: 0.04em; font-weight: 800;
}
.hero .tagline {
  margin-top: 8px; color: var(--purple); font-weight: 700;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}
.hero .hero-lead {
  max-width: 640px; margin: 22px auto 0; color: var(--ink-soft); font-weight: 500;
}
.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

.btn {
  display: inline-block; padding: 14px 30px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-3px) scale(1.02); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(233, 111, 65, 0.35); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: var(--purple); color: #fff; box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--purple-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--purple-dark); border: 2px solid var(--purple); }

/* ---------- Sections ---------- */
section { padding: 76px 6vw; }
.section-inner { max-width: 1060px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: 44px; }
.section-head .en {
  display: inline-block; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.18em;
  color: var(--purple); text-transform: uppercase;
  background: var(--lav-card); padding: 4px 16px; border-radius: 999px;
}
.section-head h2 {
  margin-top: 12px; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--purple-deep); font-weight: 800;
}
.section-head .desc { margin-top: 10px; color: var(--ink-soft); }

.alt-bg { background: var(--lav-bg); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }
.card {
  background: #fff; border-radius: var(--radius-l); padding: 30px 26px;
  box-shadow: var(--shadow-s);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .icon { font-size: 2.1rem; line-height: 1; margin-bottom: 14px; display: block; }
.card h3 { color: var(--purple-dark); font-size: 1.12rem; margin-bottom: 10px; font-weight: 800; }
.card p { font-size: 0.95rem; color: var(--ink-soft); }

.link-list { list-style: none; margin-top: 18px; }
.link-list li { margin: 6px 0; padding-left: 1.3em; position: relative; }
.link-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* ---------- Feature points (なぜこの研究室？) ---------- */
.point-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.point {
  background: #fff; border-radius: var(--radius-m); padding: 24px;
  border-top: 6px solid var(--purple); box-shadow: var(--shadow-s);
}
.point:nth-child(2) { border-top-color: var(--accent); }
.point:nth-child(3) { border-top-color: #b39ddb; }
.point:nth-child(4) { border-top-color: var(--purple-dark); }
.point h3 { font-size: 1.02rem; color: var(--purple-deep); margin-bottom: 8px; font-weight: 800; }
.point p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Members ---------- */
.pi-card {
  display: grid; grid-template-columns: 240px 1fr; gap: 34px;
  background: #fff; border-radius: var(--radius-l); padding: 36px;
  box-shadow: var(--shadow-s); align-items: start;
}
.pi-card .photo img { width: 100%; border-radius: var(--radius-m); box-shadow: var(--shadow-s); }
.pi-card h3 { color: var(--purple-deep); font-size: 1.3rem; font-weight: 800; }
.pi-card .role { color: var(--purple); font-weight: 700; margin: 4px 0 14px; font-size: 0.95rem; }
.pi-card dl { font-size: 0.92rem; }
.pi-card dt {
  font-weight: 800; color: var(--purple-dark); margin-top: 14px;
  display: inline-block; background: var(--lav-card); border-radius: 999px; padding: 1px 14px; font-size: 0.85rem;
}
.pi-card dd { margin-top: 4px; color: var(--ink-soft); }
.sns-row { margin-top: 16px; display: flex; gap: 12px; }
.sns-row img { width: 30px; transition: transform 0.15s; }
.sns-row a:hover img { transform: scale(1.15); }

.member-group { margin-top: 26px; }
.member-group h3 {
  display: inline-block; font-size: 0.95rem; color: #fff; background: var(--purple);
  border-radius: 999px; padding: 3px 18px; margin-bottom: 12px; font-weight: 800;
}
.member-chips { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.member-chip {
  width: 100%; background: #fff; border: 2px solid var(--lav-card); border-radius: 16px;
  padding: 10px 20px; font-size: 0.92rem; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow-s);
}
.member-chip small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 0.78rem; line-height: 1.4; }

.student-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.student-card {
  display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 18px;
  min-height: 188px; padding: 18px; background: #fff;
  border: 2px solid var(--lav-card); border-radius: var(--radius-m);
  box-shadow: var(--shadow-s); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.student-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.student-photo, .student-photo-placeholder {
  width: 124px; aspect-ratio: 4 / 5; align-self: start;
  border-radius: 14px;
}
.student-photo { display: block; object-fit: cover; box-shadow: var(--shadow-s); }
.student-photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(145deg, var(--lav-bg), var(--lav-card));
  border: 2px dashed rgba(137, 108, 173, 0.35);
  color: var(--purple-dark); text-align: center;
}
.student-photo-placeholder img { width: 48px; opacity: 0.58; }
.student-photo-placeholder span { font-size: 0.72rem; font-weight: 800; line-height: 1.4; }
.student-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.student-info h4 {
  color: var(--purple-deep); font-size: 1.08rem; font-weight: 800; line-height: 1.45;
  margin-bottom: 9px;
}
.student-topic-label {
  display: inline-block; padding: 1px 10px; margin-bottom: 4px;
  background: rgba(255, 138, 92, 0.16); border-radius: 999px;
  color: var(--accent-dark); font-size: 0.7rem; font-weight: 800; line-height: 1.7;
}
.student-topic { color: var(--ink); font-size: 0.86rem; font-weight: 700; line-height: 1.55; }
.student-topic.is-pending { color: var(--ink-soft); font-weight: 500; }
.student-origin {
  margin-top: auto; padding-top: 12px; color: var(--ink-soft);
  font-size: 0.76rem; line-height: 1.5;
}
.student-origin span {
  display: inline-block; margin-right: 7px; padding: 0 8px;
  background: var(--lav-bg); border-radius: 999px;
  color: var(--purple-dark); font-size: 0.68rem; font-weight: 800;
}

/* ---------- Life / Schedule timeline ---------- */
.timeline { list-style: none; position: relative; margin: 0 auto; max-width: 760px; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 4px;
  background: linear-gradient(var(--purple), var(--accent)); border-radius: 2px;
}
.timeline li { position: relative; padding: 0 0 26px 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -29px; top: 8px; width: 16px; height: 16px;
  background: #fff; border: 4px solid var(--purple); border-radius: 50%;
}
.timeline .when { font-weight: 800; color: var(--purple-dark); font-size: 0.95rem; }
.timeline .what { color: var(--ink-soft); font-size: 0.94rem; }

.activity-intro {
  max-width: 680px; margin: -14px auto 22px; color: var(--ink-soft);
  text-align: center; font-size: 0.92rem;
}
.activity-years { display: flex; flex-direction: column; gap: 14px; }
.activity-year {
  padding: 0 20px 20px; background: rgba(255, 255, 255, 0.68);
  border: 2px solid var(--lav-card); border-radius: var(--radius-m);
}
.activity-year summary {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding-right: 38px;
  cursor: pointer; list-style: none; position: relative;
  color: var(--purple-deep); font-size: 1rem; font-weight: 800;
}
.activity-year summary::-webkit-details-marker { display: none; }
.activity-year summary small {
  color: var(--ink-soft); font-size: 0.72rem; font-weight: 500;
}
.activity-year summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--lav-card);
  color: var(--purple-dark); text-align: center; line-height: 28px;
}
.activity-year[open] summary::after { content: "−"; }
.activity-year summary:focus-visible, .activity-scroll:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.activity-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc(33.333% - 12px); gap: 18px;
  overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory;
  padding: 4px 3px 14px; scrollbar-width: thin; scrollbar-color: var(--purple) var(--lav-card);
}
.activity-scroll::-webkit-scrollbar { height: 8px; }
.activity-scroll::-webkit-scrollbar-track { background: var(--lav-card); border-radius: 999px; }
.activity-scroll::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 999px; }
.activity-card {
  min-width: 0; margin: 0; overflow: hidden; scroll-snap-align: start;
  background: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow-s);
}
.activity-photo, .activity-photo-placeholder { display: block; width: 100%; aspect-ratio: 4 / 3; }
.activity-photo { object-fit: cover; }
.activity-photo.is-portrait { object-fit: contain; background: var(--lav-bg); }
.activity-photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(145deg, var(--lav-bg), var(--lav-card));
  border-bottom: 2px dashed rgba(137, 108, 173, 0.3); color: var(--purple-dark);
}
.activity-photo-placeholder > span { font-size: 2rem; line-height: 1; }
.activity-photo-placeholder small { font-size: 0.76rem; font-weight: 800; }
.activity-card figcaption { padding: 16px 18px 18px; }
.activity-type {
  display: inline-block; padding: 1px 10px; margin-bottom: 7px;
  background: rgba(255, 138, 92, 0.16); border-radius: 999px;
  color: var(--accent-dark); font-size: 0.68rem; font-weight: 800;
}
.activity-card h4 { color: var(--purple-deep); font-size: 0.96rem; font-weight: 800; line-height: 1.5; }
.activity-card figcaption p { margin-top: 5px; color: var(--ink-soft); font-size: 0.74rem; line-height: 1.5; }

.life-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 30px; }

/* ---------- Sub heading ---------- */
.sub-head { text-align: center; margin: 50px 0 26px; font-size: 1.25rem; color: var(--purple-deep); font-weight: 800; }
.sub-head .en-small {
  display: block; font-size: 0.75rem; letter-spacing: 0.16em; color: var(--purple);
  text-transform: uppercase; margin-bottom: 4px;
}

/* ---------- Photo gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 30px; }
.gallery-item {
  aspect-ratio: 4 / 3; border-radius: var(--radius-m); overflow: hidden; margin: 0;
  background: #fff; box-shadow: var(--shadow-s);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--lav-bg); border: 3px dashed #cbbde0; box-shadow: none;
  color: var(--ink-soft); font-size: 0.85rem; font-weight: 700;
}
.gallery-item.placeholder .cam { font-size: 2rem; line-height: 1; margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: #fff; border-radius: var(--radius-m); margin-bottom: 14px;
  box-shadow: var(--shadow-s); overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 800; color: var(--purple-deep);
  list-style: none; position: relative; padding-right: 52px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q."; color: var(--accent); margin-right: 10px; font-weight: 800; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--lav-card);
  color: var(--purple-dark); font-weight: 800; text-align: center; line-height: 28px;
  transition: transform 0.2s;
}
.faq details[open] summary::after { content: "−"; transform: translateY(-50%) rotate(180deg); }
.faq .answer { padding: 0 22px 20px 22px; color: var(--ink-soft); font-size: 0.95rem; }
.faq .answer::before { content: "A. "; color: var(--purple); font-weight: 800; }

/* ---------- News ---------- */
.news-list { max-width: 800px; margin: 0 auto; list-style: none; }
.news-list li {
  display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap;
  padding: 14px 6px; border-bottom: 2px dashed var(--lav-card); font-size: 0.95rem;
}
.news-list time { font-weight: 800; color: var(--purple); white-space: nowrap; }
.news-list .tag {
  font-size: 0.75rem; font-weight: 800; color: #fff; background: var(--accent);
  border-radius: 999px; padding: 1px 12px; white-space: nowrap;
}

/* ---------- Publications ---------- */
.pub-card {
  background: #fff; border-radius: var(--radius-m); padding: 20px 24px; margin-bottom: 14px;
  box-shadow: var(--shadow-s); display: flex; gap: 16px; align-items: baseline;
  transition: transform 0.15s;
}
.pub-card:hover { transform: translateX(6px); }
.pub-card .venue {
  font-size: 0.75rem; font-weight: 800; color: var(--purple-dark);
  background: var(--lav-card); border-radius: 999px; padding: 2px 12px; white-space: nowrap;
}
.pub-card a { font-weight: 700; }

.publication-links { margin-top: 32px; }
.publication-links > h3 {
  color: var(--purple-deep); text-align: center; font-size: 1.12rem; font-weight: 800;
}
.publication-links-intro {
  max-width: 680px; margin: 5px auto 20px; color: var(--ink-soft);
  text-align: center; font-size: 0.88rem;
}
.publication-links-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px;
}
.publication-link-card {
  min-height: 174px; display: flex; flex-direction: column; align-items: flex-start;
  padding: 22px; background: #fff; border: 2px solid var(--lav-card);
  border-radius: var(--radius-m); box-shadow: var(--shadow-s);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.publication-link-card h4 {
  color: var(--purple-deep); font-size: 1rem; font-weight: 800; line-height: 1.5;
}
.publication-link-card p {
  margin-top: 7px; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.6;
}
.publication-link-arrow {
  width: 30px; height: 30px; margin-top: auto; align-self: flex-end;
  background: var(--purple); border-radius: 50%; color: #fff;
  text-align: center; line-height: 30px; font-size: 0.9rem; font-weight: 800;
}
.publication-link-card:hover {
  border-color: var(--purple); box-shadow: var(--shadow); text-decoration: none;
  transform: translateY(-4px);
}
.publication-link-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: var(--radius-l); padding: 54px 6vw; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.14), transparent 45%);
}
.cta-band img { width: 90px; margin-bottom: 14px; }
.cta-band h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; position: relative; }
.cta-band p { margin: 12px auto 26px; max-width: 560px; position: relative; }
.cta-band .btn-primary { position: relative; }

/* ---------- Access ---------- */
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.access-grid iframe {
  width: 100%; height: 320px; border: 0; border-radius: var(--radius-m); box-shadow: var(--shadow-s);
}
.access-info { background: #fff; border-radius: var(--radius-m); padding: 28px; box-shadow: var(--shadow-s); font-size: 0.95rem; }
.access-info h3 { color: var(--purple-deep); margin-bottom: 10px; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-deep); color: #cfc4e0; text-align: center; padding: 44px 6vw 30px;
}
.site-footer img { height: 40px; margin-bottom: 14px; opacity: 0.95; }
.site-footer .foot-nav { margin-bottom: 16px; }
.site-footer .foot-nav a { color: #cfc4e0; margin: 0 10px; font-size: 0.88rem; font-weight: 700; }
.site-footer small { font-size: 0.8rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero::after, .hero-mark { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .pi-card { grid-template-columns: 1fr; }
  .pi-card .photo { max-width: 240px; }
  .student-grid { grid-template-columns: 1fr; }
  .activity-scroll { grid-auto-columns: 46%; }
  .access-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; right: 0; left: 0;
    background: rgba(255,255,255,0.97); box-shadow: var(--shadow);
    display: none; padding: 12px 4vw 18px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav a { text-align: center; }
}

@media (max-width: 480px) {
  .student-card { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 14px; min-height: 146px; }
  .student-photo, .student-photo-placeholder { width: 88px; }
  .student-photo-placeholder img { width: 38px; }
  .student-photo-placeholder span { font-size: 0.64rem; }
  .student-info h4 { font-size: 1rem; margin-bottom: 7px; }
  .student-origin { padding-top: 9px; }
  .activity-year { padding: 0 14px 16px; }
  .activity-year summary { align-items: flex-start; flex-direction: column; justify-content: center; gap: 0; }
  .activity-scroll { grid-auto-columns: 82%; gap: 14px; }
}
