:root {
  --card-bg: #ffffff;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --text-main: #111827;
  --text-muted: #4b5563;
  --border-subtle: #e5e7eb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.15);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 32px 0 48px;
  font-family: var(--font-sans);
  color: var(--text-main);
  position: relative;
  background: #f5f5f7;
  min-height: 100vh;
}

/* 🔹背景写真を薄く表示 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("images/background.jpg") center/cover no-repeat;
  opacity: 0.22; /* 薄さ調整 (0.15〜0.3あたり推奨) */
  z-index: -1;
  pointer-events: none;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: clamp(0px, 4vw, 32px);
  padding-right: clamp(0px, 4vw, 32px);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0f172a, #111827);
  border-radius: 28px;
  padding: 28px;
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.25),transparent 55%),
    radial-gradient(circle at bottom left, rgba(34,197,94,.18),transparent 55%);
  opacity: .9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: 0.04em;
}

.hero-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
  max-width: 45rem;
}

/* プロフィール写真 */
.profile-photo {
  width: 115px;
  height: 115px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
  margin-left: auto;
}

/* hover効果はそのまま活かす */
.profile-photo:hover {
  transform: scale(1.08);
  filter: brightness(1.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.55);
}

@media(min-width:1000px){
  .profile-photo{
    width:130px;
    height:130px;
  }
}

/* ===== SECTIONS ===== */
.section {
  margin-top: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title span.emoji {
  font-size: 1.2rem;
}

.section-kicker {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== CARD ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
  transition: .18s ease;
  position: relative;
  overflow: hidden;
}


.card-eyebrow {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.card-title {
  font-size: 0.97rem;
  font-weight: 650;
  margin: 0;
  line-height: 1.35;
}

.card-title .main {
  color: #111827;
  transition: .25s;
}

.card:hover .card-title .main {
  background: linear-gradient(135deg,#1e293b,#3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-body {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2px;
}



.pill {
  font-size: 0.75rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: #1d4ed8;
  border: 1px solid rgba(37,99,235,.2);
}

/* ===== STACK (未使用なら消してOK) ===== */
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stack-pill {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(148,163,184,.9);
  background: rgba(249,250,251,.9);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== CONTACT ===== */
.contact {
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 22px;
  padding: 18px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 16px 35px rgba(15,23,42,.5);
}

.contact-main {
  font-size: 0.86rem;
}

.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.contact-mail a {
  font-weight: 600;
  color: #ffffff;  /* ← 確実に見える白 */
  text-decoration: none;
}

.contact-mail a:hover {
  text-decoration: underline;
}

.contact-note {
  font-size: 0.76rem;
  color: #cbd5e1;
  margin-top: 2px;
}


/* --- Contact: extra links (GitHub / LinkedIn) --- */
.contact-links{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}
.contact-links a{
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  padding: 4px 0;
}

.contact-links a:hover{
  text-decoration: underline;
  color: #bfdbfe; /* 薄いブルー */
}

.contact-hint{
  margin-top: 6px;
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.4;
}
.contact-secondary{
  opacity: 0.75;
  font-weight: 500;
}

.contact-main{
  width: 100%;
}

.contact-mail{
  margin: 6px 0 0;
}

.contact-hint{
  margin-top: 6px;
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* ===== Contact divider ===== */
.contact-divider{
  height: 1px;
  width: 100%;
  background: linear-gradient(
    to right,
    rgba(148, 163, 184, 0.6),
    rgba(148, 163, 184, 0.15),
    transparent
  );
  margin: 10px 0 8px;
}


/* =========================
   Skills responsive cards
=========================*/

.skills-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0;
}

.skills-badges {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr; /* mobile default */
}

/* 640px以上 → 2列 */
@media (min-width: 640px) {
  .skills-badges {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1100px以上 → 3列でよりワイドに活用 */
@media (min-width: 1100px) {
  .skills-badges {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skills-group {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skills-group-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
}

.skills-group-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skill-badge {
  font-size: 0.78rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #1f2937;
  white-space: nowrap;
}

/* ===== Skills: learning card + note ===== */

.skills-group--learning{
  /* 既存skills-groupのガラス感は維持しつつ、アクセントを少しだけ足す */
  border-color: rgba(37, 99, 235, 0.28);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(255,255,255,0.92));
}

.skills-group-note{
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.skills-group-note a{
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 2px 6px;
  border-radius: 10px;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.skills-group-note a:hover{
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* キーボード操作時の視認性*/
.skills-group-note a:focus-visible{
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ===== Arrow motion for skills learning link ===== */

.skills-group-note .arrow{
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skills-group-note a:hover .arrow{
  transform: translate(3px, -3px);
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
  .hero {
    padding: 22px;
  }
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .profile-photo {
    align-self: flex-end;
    margin-left: 0;
    margin-bottom: 12px;
  }
  .contact {
    flex-direction: column;
    align-items: flex-start;
  }
}

.card::before {
  display: none;
}



.card-media-populist {
  background-image: url("images/bg_populist.png");
}

.card-media-covid {
  background-image: url("images/bg_covid.png");
}

.card-media-heat {
  background-image: url("images/bg_heat.png");
}

.card-media-sect {
  background-image: url("images/bg_sect.png");
}


/* ===== Card layout: text + thumbnail on the right ===== */

/* カード全体リンクの装飾を消す */
.card-link-wrapper,
.card-link-wrapper * {
  text-decoration: none;
  color: inherit;
}

/* card-main を「左テキスト + 右上サムネ」のグリッドにする */
.card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
    "eyebrow media"
    "title   media"
    "impact  media"
    "body    body";
  column-gap: 16px;
  row-gap: 6px;
  align-items: start;
}


/* 各要素をグリッドエリアに割り当て */
.card-eyebrow {
  grid-area: eyebrow;
}

.card-title {
  grid-area: title;
}

.card-body {
  grid-area: body;
  margin: 0;
}

/* 右上の画像サムネイル（常に正方形） */
.card-media {
  grid-area: media;
  width: 140px;
  height: 140px;      /* ★ 常に正方形 & 固定サイズ */
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  justify-self: end;  /* 右寄せ */
  align-self: start;  /* 常に上揃え（右上） */
}

/* hover / focus 時のカード演出 */
.card:has(.card-link-wrapper:hover),
.card:has(.card-link-wrapper:focus-visible) {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}


/* 900px以下：下段を body のみ（上下2段レイアウト） */
@media (max-width: 900px) {
  .card-main {
    grid-template-columns: minmax(0, 1fr) 140px;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "eyebrow media"
      "title   media"
      "impact  media"
      "body    body";  /* 下段は body だけ */
  }
}
/* 720px以下：上下2段は維持したまま、画像だけ 2/3 に縮小 */
@media (max-width: 720px) {
  .card-main {
    /* 右カラムの幅も 2/3 に合わせる */
    grid-template-columns: minmax(0, 1fr) calc(140px * 2 / 3);
    /* grid-template-areas は 900px ブロックの
       "eyebrow media" / "title media" / "body body" を継承 */
  }

  .card-media {
    width: calc(140px * 2 / 3);
    height: calc(140px * 2 / 3);
  }
}

.card-impact {
  grid-area: impact;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 900px) {
  .hero-inner {
    gap: 12px;         /* お好みで 12px 〜 20px くらいに調整 */
  }

  .profile-photo {
    margin-left: 0;    /* ここで auto を打ち消す */
  }
}

.card-impact::before {
  content: "▸ ";
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero .hero-body {
    margin-bottom: 6px;
  }
}

