/* ====== 基本テーマ ====== */
:root{
  --bg: #FFDBE7;          /* 背景（あなた指定の色） */
  --bg-soft: #FFE8F0;     /* 侧栏/面板浅粉 */
  --text: #7A2A3A;        /* 主文字：同系統で濃い色 */
  --text-weak: #9A4A5A;   /* 次級文字 */
  --border: #f3c2d0;      /* 枠線 */
  --accent: #B24763;      /* 強調/リンク色 */
  --card: #fff;           /* カード背景 */
  --radius: 16px;
  --shadow: 0 8px 28px rgba(122,42,58,.15);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans JP",sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}

/* ====== レイアウト ====== */
.layout{
  display:grid;
  grid-template-columns: 240px 1fr;
  min-height: 100svh;
}

/* ====== 左側サイドバー ====== */
.sidebar{
  position: sticky; top:0; align-self:start;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  min-height: 100svh;
}
.brand{
  font-weight: 800; letter-spacing: .5px;
  margin-bottom: 12px;
}
.menu{display:flex; flex-direction:column; gap:10px}
.menu-link{
  display:block;
  padding:10px 12px;
  border-radius: 22px;              /* 丸みを強めてタブ風 */
  color: var(--text);
  text-decoration: none;
  transition: transform .08s ease, background .2s ease;
}
.menu-link:hover{background:#ffd0df; transform: translateX(2px)}
.menu-link.is-active{
  background:#ffc4d7; color:#A13350; font-weight:800;
  box-shadow: inset 0 -2px 0 #eaa6ba;
}
.note{margin-top:18px; color:var(--text-weak); font-size:.9rem}

/* ====== 右側コンテンツ ====== */
.content{
  padding: 28px clamp(16px, 4vw, 40px);
  max-width: 1000px; width:100%;
  margin: 0 auto;
}

/* 見出し（ヒーロー） */
.hero{
  text-align:center;
  margin: 6px 0 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0));
  padding: 16px 8px;
  border-radius: 20px;
}
.hero h1{
  margin:0 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing:.5px;
}
.lead{font-size:clamp(16px, 2.2vw, 22px)}

/* セクション共通 */
.section{margin: 30px 0}
.section h2{
  font-size: clamp(20px, 3.2vw, 28px);
  margin: 0 0 10px;
}
.para{margin:0}
.list{margin:.25rem 0 0 1.2rem}

/* ギャラリー（旧・趣味用） */
.grid{
  display:grid; gap:16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.gallery .card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}
.gallery img{
  width:100%; height:220px; object-fit:cover;
  border-radius: 12px;
}
.gallery figcaption{
  margin-top:8px; color:var(--text-weak); font-size:.95rem; text-align:center;
}

/* フッター */
.footer{
  margin: 40px 0 10px;
  text-align:center;
  color: var(--text-weak);
}

/* リンク色 */
a{color: var(--accent)}
a:hover{text-decoration: underline}

/* ====== レスポンシブ（サイドバー → 上部タブ） ====== */
@media (max-width: 860px){
  .layout{grid-template-columns: 1fr}
  .sidebar{
    position: sticky; min-height:auto; border-right:none; border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  }
  .menu{flex-direction:row; gap:8px; flex-wrap:wrap}
  .menu-link{padding:8px 10px}
}

/* ===== 自己紹介：左文右図レイアウト ===== */
.about-block{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(16px, 3vw, 36px);
  align-items:start;
}
.about-title{
  font-size: clamp(28px, 5vw, 56px);
  margin: 0 0 10px;
  font-weight: 900;
  letter-spacing: .5px;
}

/* 一行：ラベル + 値 */
.profile-row{
  display:grid;
  grid-template-columns: 8.5em 1fr;   /* 左の「名前／出身地／所属」の幅 */
  align-items:start;
  gap: 14px;
  margin: 20px 0;
}
.profile-row .label{
  font-weight: 800;
  font-size: clamp(18px, 2.2vw, 28px);
  color: var(--text);
}
.profile-row .value{ color: var(--text); }

/* 名前（ケイ ユティ／荊楡婷／JING YUTING） */
.name-line{
  display:flex;
  align-items:flex-start;
  gap: clamp(24px, 5vw, 60px);
}
.name-col{
  min-width: 140px;
  margin: 0 0 10px;
  text-align: center;
}
.yomi{
  font-size: clamp(14px, 1.8vw, 18px);
  color: var(--text-weak);
  letter-spacing: .15em;
}
.kanji{
  font-size: clamp(18px, 2.2vw, 28px);   /* ラベルと同じ大きさ */
  font-weight: 900;
  line-height: 1.1;
}
.romaji{
  font-size: clamp(12px, 1.6vw, 16px);
  color: var(--text-weak);
  letter-spacing: .15em;
  margin-top: 2px;
}

/* 出身地・所属の大きな文字 */
.value.big{
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 900;
}

/* 右側の丸い地図 */
.about-map{ justify-self: center; }

.about-map .map-card{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 6px 0 0;
}

.map-circle{
  width: clamp(180px, 28vw, 320px);   /* 丸の直径 */
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid rgba(255,255,255,.65);
  margin: 0 auto;
}

.map-iframe{
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  display: block;
}

.map-link{
  text-align: center;
  margin-top: 8px;
  font-size: .95rem;
}

/* 自己紹介：スマホでは上下配置 */
@media (max-width: 860px){
  .about-block{ grid-template-columns: 1fr; }
}

/* ===== 表格时间线（経歴・保有資格 共用） ===== */
.timeline{
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
  font-size: clamp(14px, 1.9vw, 16px);
}
.timeline thead th{
  background: #ffeef5;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}
.timeline th.y, .timeline td:nth-child(1){
  width: 5.5rem;
  text-align: center;
}
.timeline th.m, .timeline td:nth-child(2){
  width: 3.5rem;
  text-align: center;
}
.timeline td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.timeline tbody tr:last-child td{ border-bottom: none; }
.timeline tbody tr:hover{ background: #fff7fb; }

/* 年・月を強調（窄屏） */
@media (max-width: 520px){
  .timeline th.y, .timeline th.m{ width:auto; }
  .timeline td:nth-child(1),
  .timeline td:nth-child(2){ font-weight: 700; }
}

/* ===== 趣味：双卡片轮播 ===== */
.hobby-wrap .carousels{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}

.carousel{
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 16px 56px; /* 底部留出给caption */
}

.carousel-title{
  text-align: center;
  font-size: clamp(20px, 3vw, 28px);
  margin: 0 0 10px;
  font-weight: 900;
  letter-spacing: .5px;
  text-shadow: 0 2px 0 rgba(0,0,0,.08);
}

/* 视口与轨道 */
.viewport{
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow);
  background: #fff;
}
.track{
  display: flex;
  transition: transform .35s ease-in-out;
}
.track img{
  width: 100%;
  height: clamp(150px, 22vw, 260px);  /* 为横图缩短纵向长度 */
  object-fit: contain;                /* 完整显示图片，不裁切 */
  flex: 0 0 100%;
  display: block;
}

/* 左右按钮 */
.nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  cursor: pointer;
  font-size: 24px;
  line-height: 38px;
  text-align: center;
  color: var(--text);
  transition: background .2s ease, transform .06s ease;
  z-index: 5;
}
.nav:hover{ background:#fff; transform: translateY(-50%) scale(1.05); }
.nav:active{ transform: translateY(-50%) scale(.97); }
.nav.prev{ left: 10px; }
.nav.next{ right: 10px; }

/* 文字说明 */
.caption{
  position: absolute;
  left: 16px; right: 16px; bottom: 12px;
  margin: 0;
  text-align: center;
  color: var(--text);
  background: rgba(255,255,255,.85);
  border-radius: 12px;
  padding: 6px 10px;
  backdrop-filter: blur(4px);
  font-size: clamp(14px, 1.8vw, 16px);
}

/* 趣味：スマホではカード縦並び */
@media (max-width: 860px){
  .hobby-wrap .carousels{ grid-template-columns: 1fr; }
}

/* ===== 研究内容：カードレイアウト ===== */
.research-list{
  display: grid;
  gap: 18px;
  margin-top: 14px;
}
.research-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.research-card h3{
  margin: 0 0 6px;
  font-size: clamp(18px, 2.4vw, 22px);
}
.research-card .meta{
  margin: 0 0 8px;
  font-size: .95rem;
  color: var(--text-weak);
}
.research-card .desc{
  margin: 0 0 8px;
}
.research-card a{
  color: var(--accent);
  text-decoration: underline;
}
.research-card a:hover{
  text-decoration: none;
}

/* 研究カード：PCで2列レイアウト */
@media (min-width: 960px){
  .research-list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
