/* ===================================================================
   近藤雪絵ウェブサイト  見た目の設定（デザイン「ブリッジ」）

   ・色を変えたいときは、すぐ下の :root の中の色番号を書き換えます
   ・書体は Google Fonts の Plus Jakarta Sans（英語）と Murecho（日本語）
     明朝体・Serif 体は使っていません
   =================================================================== */

:root {
  --purple:      #7a4f78;   /* イメージカラー（京紫） */
  --deep:        #523351;   /* 見出しの濃い紫 */
  --pale:        #f3ecf2;   /* 薄い紫の下地 */
  --teal:        #8a6288;   /* 小見出しの色＝橋の線 */
  --teal-pale:   #f5eef4;
  --orange:      #9e3d3f;   /* 差し色（蘇芳／すおう） */
  --sand:        #f1e8e2;   /* 生成り＝帯のグラデーション */
  --tagline-line:#c08497;   /* キャッチコピーの下の線（モーブピンク） */

  --ink:        #211c2b;    /* 本文の文字色 */
  --ink-soft:   #575068;    /* 補足の文字色 */
  --ink-faint:  #9891a6;    /* さらに薄い文字色 */
  --paper:      #fffdfa;    /* 背景 */
  --panel:      #ffffff;
  --line:       #e8e1f2;

  --font:    "Plus Jakarta Sans", "Murecho", system-ui, sans-serif;
  --font-ja: "Murecho", "Hiragino Sans", "Yu Gothic", sans-serif;

  --shadow: 0 18px 44px rgba(48, 27, 107, .13);
}

@media (prefers-color-scheme: dark) {
  :root {
    --purple:  #c79ac4;  --deep: #dcbcd9;  --pale: #332432;
    --teal:    #b892b6;  --teal-pale: #2e2130;
    --orange:  #d9727a;  --sand: #2e2822;
    --tagline-line: #d3a0af;
    --ink:     #ece8f2;  --ink-soft: #b6afc0;  --ink-faint: #8a8394;
    --paper:   #1c1720;  --panel: #251e29;  --line: #3d3242;
    --shadow:  0 18px 44px rgba(0, 0, 0, .34);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }   /* height: auto がないと縦横がゆがみます */
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 日本語の文はこの書体で */
[lang="ja"], .ja-text { font-family: var(--font-ja); }

/* ===================================================================
   日本語と英語の切り替え
   =================================================================== */
html[data-lang="ja"] [lang="en"] { display: none !important; }
html[data-lang="en"] [lang="ja"] { display: none !important; }

/* ===================================================================
   画面全体を貫く「橋」の曲線
   スクロールすると線が伸びます（lang.js が動かしています）
   =================================================================== */
.bridge {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}
.bridge path {
  fill: none; stroke: var(--teal); stroke-width: 1.6; opacity: .42;
  stroke-dasharray: 2600; stroke-dashoffset: 2600;
}
.bridge path.p2 { stroke: var(--purple); opacity: .22; stroke-width: 1.2; }
main, header.bar, footer { position: relative; z-index: 1; }

/* ---- 中央にそろえる枠 ---- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 34px; }
.narrow { max-width: 800px; }

/* ===================================================================
   上のメニュー
   =================================================================== */
header.bar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
}
header.bar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 34px; flex-wrap: wrap; gap: 12px;
}
.brand { font-family: var(--font-ja); font-weight: 700; letter-spacing: .14em; font-size: 15px; color: var(--ink); }
.bar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
nav a { font-size: 13px; letter-spacing: .05em; color: var(--ink-soft); margin-left: 18px; font-weight: 600; }
nav a:first-child { margin-left: 0; }
nav a.current { color: var(--purple); }
nav a:hover { text-decoration: none; color: var(--purple); }

.langswitch {
  display: inline-flex; background: var(--pale); border-radius: 999px; padding: 3px; flex: 0 0 auto;
}
.langswitch button {
  appearance: none; border: 0; background: transparent; color: var(--purple);
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 14px; border-radius: 999px; cursor: pointer; line-height: 1.8;
}
.langswitch button[aria-pressed="true"] { background: var(--purple); color: #fff; }

/* ===================================================================
   表紙
   =================================================================== */
.hero { padding: 76px 0 88px; position: relative; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1fr .78fr; gap: 56px; } }
.hero-grid > * { min-width: 0; }

.hero .role {
  font-size: 13.5px; letter-spacing: .2em; color: var(--teal);
  font-weight: 800; text-transform: uppercase; margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px); line-height: 1.04;
  margin: 0 0 10px; font-weight: 800; letter-spacing: -.03em;
}
.hero .name-en {
  font-family: var(--font-ja); font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 700; letter-spacing: .24em; color: var(--ink-soft); margin: 0 0 30px;
}
/* キャッチコピーの下に小さな橋が架かります */
.tagline {
  position: relative; font-family: var(--font-ja);
  font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; line-height: 1.9;
  color: var(--deep); margin: 0 0 40px; padding-bottom: 30px;
}
.tagline::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: min(430px, 100%); height: 26px;
  /* 色つきの四角を、線の形に切り抜いています。
     こうしておくと --orange を変えるだけで線の色も変わります */
  background-color: var(--tagline-line);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 26'%3E%3Cpath d='M4 22 C 110 22, 90 6, 214 6 S 330 12, 426 4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 26'%3E%3Cpath d='M4 22 C 110 22, 90 6, 214 6 S 330 12, 426 4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;        mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;      mask-repeat: no-repeat;
  -webkit-mask-position: left bottom;  mask-position: left bottom;
}
.hero .lead { font-family: var(--font-ja); font-size: 15.5px; color: var(--ink-soft); max-width: 44ch; margin: 0; }

/* 写真は上がアーチ形（橋のアーチ） */
.portrait { position: relative; }
.portrait img {
  width: 100%; max-height: 66vh; object-fit: cover; object-position: 50% 15%;
  border-radius: 200px 200px 14px 14px;
}
.portrait::after {
  content: ""; position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  width: 76%; height: 44px; background: var(--orange); opacity: .26;
  border-radius: 0 0 60px 60px; z-index: -1;
}

/* ===================================================================
   各章
   =================================================================== */
section { padding: 92px 0; }
section.tinted { background: linear-gradient(180deg, transparent, var(--sand) 16%, var(--sand) 84%, transparent); }

h2 {
  font-size: clamp(28px, 4.2vw, 42px); margin: 0 0 6px;
  font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
}
.h2sub {
  font-size: 13.5px; letter-spacing: .2em; color: var(--teal);
  font-weight: 800; text-transform: uppercase; margin: 0 0 34px;
}
h3 { font-size: 17px; margin: 30px 0 8px; font-weight: 800; }
p { margin: 0 0 16px; }
section p, section li, dl.facts dd, .lead { font-family: var(--font-ja); }
section h2 + .h2sub { margin-top: 4px; }

/* ---- 「項目：内容」の並び ---- */
dl.facts { margin: 0; }
dl.facts div {
  display: flex; gap: 20px; padding: 13px 0;
  border-bottom: 1px dashed var(--line); flex-wrap: wrap;
}
dl.facts div:last-child { border-bottom: none; }
dl.facts dt {
  flex: 0 0 9em; color: var(--teal); font-size: 13px;
  letter-spacing: .06em; font-weight: 700; font-family: var(--font-ja);
}
dl.facts dd { margin: 0; flex: 1 1 16em; }

/* ---- 写真と文章を並べる ---- */
.split { display: grid; gap: 34px; align-items: center; }
@media (min-width: 780px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split > * { min-width: 0; }
.split.flip .split-img { order: 2; }
.split-img img { border-radius: 16px; box-shadow: var(--shadow); }
.split-img figcaption {
  font-family: var(--font-ja); font-size: 12.5px; color: var(--ink-faint);
  margin-top: 10px; letter-spacing: .04em;
}
figure { margin: 0; }

/* ---- 研究のカード ---- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; margin-bottom: 16px; transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .meta { font-family: var(--font-ja); font-size: 12.5px; color: var(--teal); margin: 0 0 6px; letter-spacing: .04em; font-weight: 700; }
.card p:last-child { margin-bottom: 0; }

/* ---- 写真のタイル ---- */
.tiles { display: grid; gap: 22px; }
@media (min-width: 700px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .tiles.three { grid-template-columns: repeat(3, 1fr); } }
.tiles > * { min-width: 0; }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); text-decoration: none; }
.tile .ph { aspect-ratio: 16 / 9; overflow: hidden; background: var(--sand); }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile:hover .ph img { transform: scale(1.05); }
.tile .body { padding: 20px 24px 24px; flex: 1; }
.tile h3 { margin: 0 0 8px; font-size: 18px; }
.tile p { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.9; }
.tile .go { font-size: 12px; letter-spacing: .12em; color: var(--purple); font-weight: 800; }

/* ---- 動画 ---- */
.videos { display: grid; gap: 20px; }
@media (min-width: 640px) { .videos { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .videos { grid-template-columns: repeat(3, 1fr); } }
.videos > * { min-width: 0; }
.video { display: block; color: inherit; }
.video:hover { text-decoration: none; }
.video .ph {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; background: var(--sand);
}
.video .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.video:hover .ph img { transform: scale(1.05); }
.video .ph::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 24px; text-shadow: 0 2px 14px rgba(0,0,0,.65);
  background: linear-gradient(transparent 44%, rgba(48,27,107,.5));
}
.video .t { font-family: var(--font-ja); font-size: 13.5px; color: var(--ink-soft); margin-top: 10px; line-height: 1.7; }

/* ---- 一覧 ---- */
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li {
  padding: 14px 0 14px 22px; border-bottom: 1px dashed var(--line); position: relative;
}
ul.plain li:last-child { border-bottom: none; }
ul.plain li::before {
  content: ""; position: absolute; left: 0; top: 23px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--purple); background: var(--paper);
}
ul.plain .year { color: var(--teal); font-size: 13px; margin-right: .7em; letter-spacing: .04em; font-weight: 700; }
ul.plain .src { color: var(--ink-faint); font-size: 13.5px; }

/* ---- 科目 ---- */
.courses { display: grid; gap: 16px; }
@media (min-width: 640px) { .courses { grid-template-columns: 1fr 1fr; } }
.courses > * { min-width: 0; }
.course {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 22px; transition: border-color .3s, transform .3s;
}
.course:hover { border-color: var(--teal); transform: translateY(-3px); }
.course h3 { margin: 0 0 4px; font-size: 16.5px; }
.course .term { font-family: var(--font-ja); font-size: 12.5px; color: var(--teal); letter-spacing: .06em; font-weight: 700; }
.course p { font-size: 14px; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.9; }

/* ---- お知らせ ---- */
.notice {
  background: var(--pale); border-radius: 14px; padding: 20px 24px; font-size: 15px;
  border-left: 3px solid var(--purple);
}
.notice p:last-child { margin-bottom: 0; }

/* ---- 丸いリンク ---- */
.sns { display: flex; flex-wrap: wrap; gap: 10px 12px; padding: 0; margin: 0; list-style: none; }
.sns a {
  display: inline-block; border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 6px 17px; font-size: 13.5px;
  color: var(--ink-soft); letter-spacing: .04em; font-weight: 600;
}
.sns a:hover { border-color: var(--purple); color: var(--purple); text-decoration: none; }

/* ---- 引用 ---- */
.quote {
  font-family: var(--font-ja); font-size: 20px; line-height: 2.1; font-weight: 700;
  color: var(--deep); letter-spacing: .02em;
  border-left: 3px solid var(--orange); padding-left: 22px; margin: 0;
}

/* ===================================================================
   ニュース：橋げたのように縦線でつながります
   =================================================================== */
.news-list { list-style: none; padding: 0 0 0 30px; margin: 0; position: relative; }
.news-list::before {
  content: ""; position: absolute; left: 5px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(var(--teal), var(--purple));
}
.news-item {
  position: relative; padding: 20px 0; border-bottom: 1px dashed var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-item::before {
  content: ""; position: absolute; left: -30px; top: 30px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--purple); transition: background .25s, border-color .25s;
}
.news-item:hover::before { background: var(--orange); border-color: var(--orange); }
.news-head { display: flex; gap: 10px; align-items: center; margin-bottom: 2px; flex-wrap: wrap; }
.news-date { font-size: 13px; color: var(--teal); font-weight: 700; letter-spacing: .05em; }
.news-tag {
  font-family: var(--font-ja); font-size: 11px; padding: 2px 12px; border-radius: 999px;
  background: var(--pale); color: var(--purple); font-weight: 700; letter-spacing: .04em;
}
.news-tag[data-type="award"] { background: #fdeee5; color: var(--orange); }
.news-tag[data-type="paper"] { background: var(--teal-pale); color: var(--teal); }
.news-tag[data-type="book"]  { background: var(--sand); color: #8a6a2f; }
.news-tag[data-type="talk"]  { background: var(--pale); color: var(--purple); }
.news-tag[data-type="media"] { background: var(--pale); color: var(--purple); }
.news-tag[data-type="class"] { background: var(--teal-pale); color: var(--teal); }
.news-body { font-family: var(--font-ja); font-size: 15.5px; line-height: 1.85; }
.news-body a { text-decoration: underline; text-underline-offset: 3px; }
.news-more { margin-top: 26px; font-size: 14.5px; }

/* ---- 下の締め ---- */
footer {
  padding: 56px 0 72px; color: var(--ink-faint); font-size: 12.5px;
  letter-spacing: .08em; border-top: 1px solid var(--line);
}
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- 画面が狭いとき ---- */
@media (max-width: 620px) {
  .hero { padding: 48px 0 60px; }
  section { padding: 64px 0; }
  header.bar .wrap { gap: 10px; }
  .bar-right { width: 100%; justify-content: space-between; }
  nav a { margin-left: 0; margin-right: 14px; }
  .portrait img { max-height: 56vh; border-radius: 150px 150px 12px 12px; }
}

/* ---- ニュースの「くわしく →」リンク ---- */
.news-link {
  display: inline-block; margin-left: .6em; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; color: var(--purple); text-decoration: none; white-space: nowrap;
}
.news-link:hover { text-decoration: underline; }
.news-body a { text-decoration: none; }

/* ---- ニュースに添える発表スライドの画像 ---- */
.news-item.has-image { display: grid; grid-template-columns: 1fr 150px; gap: 4px 20px; }
.news-item.has-image .news-head,
.news-item.has-image .news-body { grid-column: 1; }
.news-thumb {
  grid-column: 2; grid-row: 1 / span 2; align-self: start;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: var(--sand); display: block; transition: transform .3s, box-shadow .3s;
}
.news-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 700px) {
  .news-item.has-image { grid-template-columns: 1fr; }
  .news-thumb { grid-column: 1; grid-row: auto; max-width: 220px; margin-top: 12px; }
}

/* ---- 科目カード（画像つき・リンクつきに対応）---- */
.course { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; }
a.course:hover { text-decoration: none; }
.course .ph { aspect-ratio: 16 / 9; overflow: hidden; background: var(--sand); }
.course .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.course:hover .ph img { transform: scale(1.05); }
.course .in { padding: 18px 22px 20px; flex: 1; }
.course .go {
  display: inline-block; margin-top: 12px; font-size: 12px; letter-spacing: .1em;
  color: var(--purple); font-weight: 800;
}

/* ---- note の記事につけるタグ ---- */
.news-tag[data-type="note"] { background: #e6f4ef; color: #128a6a; }
@media (prefers-color-scheme: dark) { .news-tag[data-type="note"] { background: #16302a; color: #58c8a4; } }

/* ---- ニュースの年の区切り ---- */
.news-year {
  list-style: none; position: relative;
  font-size: 22px; font-weight: 800; letter-spacing: .04em;
  color: var(--purple); margin: 34px 0 6px; padding: 0;
}
.news-list .news-year:first-child { margin-top: 0; }
.news-year::before {
  content: ""; position: absolute; left: -30px; top: 14px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--purple); border: 3px solid var(--paper);
}

/* ---- ニュースを種類でしぼりこむボタン ---- */
.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; }
.news-filter-btn {
  appearance: none; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-soft); border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 700; letter-spacing: .04em;
  transition: border-color .2s, color .2s, background .2s;
}
.news-filter-btn:hover { border-color: var(--purple); color: var(--purple); }
.news-filter-btn[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.news-filter-n {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0;
  background: var(--pale); color: var(--purple);
  border-radius: 999px; padding: 1px 8px; min-width: 24px; text-align: center;
}
.news-filter-btn[aria-pressed="true"] .news-filter-n { background: rgba(255,255,255,.25); color: #fff; }

/* ---- メールアドレスの画像 ---- */
.mail-image { display: inline-block; }
.mail-image:hover { opacity: .75; }
.mail-image:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 3px; }

/* ---- 科目カードの画像がリンクになっている場合 ---- */
a.ph { display: block; position: relative; }
a.ph::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 22px; text-shadow: 0 2px 12px rgba(0,0,0,.6);
  background: linear-gradient(transparent 46%, rgba(48,27,107,.45));
  transition: opacity .3s; opacity: .9;
}
a.ph:hover::after { opacity: 1; }

/* ---- ロゴを収めるカード画像（切り取らず全体を見せる）---- */
.ph.logo { background: #fff; display: grid; place-items: center; }
.ph.logo img { width: auto; height: auto; max-width: 52%; max-height: 78%; object-fit: contain; }
@media (prefers-color-scheme: dark) { .ph.logo { background: #f4f2f7; } }

/* ---- メールアドレスの画像（リンクではありません） ---- */
.mail-image { cursor: default; }
.mail-image:hover { opacity: 1; }
