/* ------------------------------------------------------------------
   taiyop.com/resume/（業務経歴書）だけで使う部品
   色・フォント・base などの共通部分は ../styles.css から読む。
   このファイルはその後に読み込み、経歴書の部品と上書きだけを書く。
   /resume/ 以下のすべてのページ（for_<company>/ を含む）と /en/resume/ が読む。
------------------------------------------------------------------- */

/* ---------- 共通の styles.css との差を埋める ---------- */
/* 共通の base は h4 / dl / dd の余白を消していない */
h4, dl, dd { margin: 0; }
/* 同じ名前の部品がトップページ側にもあるので、余白は経歴書のものに戻す */
.rows, .tags, .topics { margin-top: 0; }
/* 経歴は文書として読むので、スクロールで現れる演出はつけない（印刷でも消えない） */
.js .timeline .entry { opacity: 1; transform: none; }

/* ---------- top ---------- */
.top { display: flex; align-items: center; padding-top: 26px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: -8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: .01em;
  text-decoration: none;
}
.brand svg { width: 44px; height: 44px; overflow: visible; transition: transform .6s var(--ease); }
.brand:hover svg { transform: rotate(45deg); }
/* 右上の小さな札（「業務経歴書」「For ◯◯」） */
.pill {
  margin-left: auto;
  padding: 2px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: .04em;
  color: var(--sub);
}
/* 言語の切り替え（札のとなりに置く） */
.lang {
  margin-left: 8px;
  padding: 2px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: .08em;
  color: var(--sub);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.lang:hover { background: var(--tint); border-color: transparent; color: var(--fg); }

/* ---------- page head ---------- */
.page-head { padding-top: clamp(36px, 7vh, 64px); }
.page-head > * { animation: rise .8s var(--ease) both; }
.page-head > :nth-child(2) { animation-delay: .07s; }
.page-head > :nth-child(3) { animation-delay: .14s; }
.page-head > :nth-child(n + 4) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(27px, 6.6vw, 34px);
  line-height: 1.5;
  letter-spacing: .03em;
  font-feature-settings: "palt";
}
.page-head h1 span { display: inline-block; }
.page-head .lead { margin-top: 16px; text-wrap: pretty; }
.page-head .desc { margin-top: 10px; font-size: 15px; font-weight: 400; color: var(--sub); text-wrap: pretty; }
.page-head .tags { margin-top: 20px; }
.page-head .actions { margin-top: 24px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; font-size: 14.5px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px 9px 22px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.7;
  text-decoration: none;
  transition: transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn .go, .btn:hover .go { color: currentColor; }

/* ---------- section head ---------- */
.sec { margin-top: 80px; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 22px;
}
.sec-head h2, .sec > h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: .03em;
}
.sec > h2 { margin-bottom: 14px; }
.sec-head .aside { font-size: 13.5px; line-height: 1.6; color: var(--mute); }
.sec > h2 + .intro, .sec-head + .intro { margin-top: -6px; margin-bottom: 22px; font-size: 14.5px; font-weight: 400; color: var(--sub); text-wrap: pretty; }
.sec-head + .intro { margin-top: -12px; }

/* ---------- 箇条書き ---------- */
.dots li {
  position: relative;
  padding-left: 24px;
  font-size: 15.5px;
  line-height: 1.9;
  text-wrap: pretty;
}
.dots li + li { margin-top: 12px; }
.dots li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .82em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
}

/* ---------- 数字を 3 つ、罫線で区切って置く ---------- */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 30px; }
.facts li { padding: 2px 0 2px 18px; border-left: 1px solid var(--line); }
.facts li:first-child { padding-left: 0; border-left: 0; }
.facts strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.facts span { display: block; margin-top: 2px; padding-right: 12px; font-size: 12.5px; font-weight: 400; line-height: 1.6; color: var(--sub); }

/* ---------- tiles / rows ---------- */
.tile {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
}
.tile svg { width: 26px; height: 26px; }
.tile.iris { background: var(--iris-soft); color: var(--iris-ink); }
.tile.rose { background: var(--rose-soft); color: var(--rose-ink); }
.tile.leaf { background: var(--leaf-soft); color: var(--leaf-ink); }
.tile.sunny { background: var(--sun-soft); color: var(--sun-ink); }
.tile.sky { background: var(--sky-soft); color: var(--sky); }

.rows li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; }
.rows li + li { margin-top: 24px; }
.rows h3 { font-size: 17px; font-weight: 700; line-height: 1.5; letter-spacing: .005em; }
.rows p { margin-top: 4px; font-size: 14.5px; font-weight: 400; line-height: 1.8; color: var(--sub); text-wrap: pretty; }

/* ---------- chips ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 2px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--sub);
}
.rows + .tags { margin-top: 28px; }

/* 相手の技術スタックとの近さ（for_<company> ページ） */
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; font-size: 12.5px; font-weight: 400; line-height: 1.7; color: var(--sub); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; flex: none; border-radius: 50%; }
.legend [data-match="direct"] i { background: var(--leaf-ink); }
.legend [data-match="adjacent"] i { background: var(--sun); }
.legend [data-match="learn"] i { border: 1.5px dashed var(--mute); }
.tags li[data-match="direct"] { background: var(--leaf-soft); color: var(--leaf-ink); }
.tags li[data-match="adjacent"] { background: var(--sun-soft); color: var(--sun-ink); }
.tags li[data-match="learn"] { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--mute); }
.tags + .dots { margin-top: 30px; }

/* ---------- 定義リスト（関われる範囲 / 基本情報） ---------- */
.defs > div {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  column-gap: 16px;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.75;
}
.defs > div:last-child { border-bottom: 1px solid var(--line); }
.defs dt { font-weight: 700; }
.defs dd { font-weight: 400; color: var(--sub); text-wrap: pretty; }
.defs.info dt { font-size: 13.5px; font-weight: 600; color: var(--mute); }
.defs.info dd { font-weight: 500; color: var(--fg); }

/* ---------- 経験と、近そうな領域（for_<company> ページ） ---------- */
.topics { display: grid; gap: 12px; }
.topic { padding: 22px 24px 20px; border-radius: 22px; background: var(--tint); }
.topic small { display: block; font-size: 12px; font-weight: 700; line-height: 1.6; letter-spacing: .06em; color: var(--mute); }
.topic h3 { margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.55; letter-spacing: .03em; text-wrap: pretty; }
.topic p { margin-top: 6px; font-size: 14.5px; font-weight: 400; line-height: 1.85; color: var(--sub); text-wrap: pretty; }
.topic .proof { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; line-height: 1.75; color: var(--leaf-ink); }

/* ---------- 空色の帯 ---------- */
.band {
  margin-top: 96px;
  padding-top: 72px;
  padding-bottom: 128px;
  background: linear-gradient(var(--bg), var(--tint) 160px);
}
.band > .sec:first-child { margin-top: 0; }

/* ---------- 経歴のタイムライン ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}
html:not(.js) .tabs { display: none; }
.tabs button {
  appearance: none;
  border: 0;
  background: none;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--sub);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.tabs button:hover { color: var(--fg); }
.tabs button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(24, 34, 47, .12); }
[data-theme="dark"] .tabs button[aria-pressed="true"] { background: #2b3848; }
.tabs .n { margin-left: 3px; font-size: 11.5px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }

.entry {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 14px;
  padding-bottom: 30px;
}
.entry::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 36px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
/* 表示中の最後の 1 件は線を引かない */
.entry:not(:has(~ .entry:not([hidden])))::before { display: none; }
.entry:not(:has(~ .entry:not([hidden]))) { padding-bottom: 0; }

.dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--leaf-soft);
  color: var(--leaf-ink);
}
.dot svg { width: 15px; height: 15px; }

.entry-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-height: 28px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--sub);
}
.when {
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.job {
  margin-top: 10px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
}
.job h3 { font-size: 16.5px; font-weight: 700; line-height: 1.6; text-wrap: pretty; }
.job .role { margin-top: 3px; font-size: 13.5px; font-weight: 400; line-height: 1.75; color: var(--sub); text-wrap: pretty; }
.job .stack { margin-top: 6px; font-size: 12px; font-weight: 500; line-height: 1.6; letter-spacing: .01em; color: var(--mute); }
.job-part { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.job-part h4 { font-size: 12px; font-weight: 700; line-height: 1.6; letter-spacing: .02em; color: var(--mute); }
.job-part ul { margin-top: 5px; }
.job-part li { position: relative; padding-left: 17px; font-size: 14px; font-weight: 400; line-height: 1.8; color: var(--sub); text-wrap: pretty; }
.job-part li + li { margin-top: 3px; }
.job-part li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .78em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mute);
}
/* 成果は葉の色とチェックで */
.job-part.got li { font-weight: 500; color: var(--leaf-ink); }
.job-part.got li::before {
  left: 2px;
  top: .56em;
  width: 9px;
  height: 5px;
  border-radius: 0;
  background: none;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

/* ---------- 相談（太陽がのぞくカード） ---------- */
.ask {
  position: relative;
  margin-top: 112px;
  padding: 30px 30px 28px;
  border-radius: 26px;
  background: var(--sun-soft);
}
.peek { position: absolute; right: 34px; bottom: 100%; width: 80px; height: auto; overflow: visible; }
.peek .rays { transition: opacity .4s ease; }
[data-theme="dark"] .peek .rays { opacity: 0; }
.ask h2 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.5; letter-spacing: .03em; }
.ask p { margin-top: 10px; font-size: 15.5px; text-wrap: pretty; }
.ask .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.ask .chips li {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}
.ask .actions { margin-top: 22px; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 72px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mute);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { text-decoration: none; transition: color .15s ease; }
.foot a:hover { color: var(--fg); }

/* ---------- dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  transform: translateX(-50%);
}
.dock a { padding: 5px 12px; border-radius: 999px; color: var(--sub); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.dock a:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg); }
.dock button {
  appearance: none;
  border: 0;
  width: 32px;
  height: 32px;
  margin-left: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sun-soft);
  color: var(--sun-ink);
  cursor: pointer;
  transition: transform .3s var(--ease);
}
html:not(.js) .dock button { display: none; }
.dock button:hover { transform: rotate(24deg) scale(1.08); }
.dock button svg { width: 17px; height: 17px; }
.dock .i-moon, [data-theme="dark"] .dock .i-sun { display: none; }
[data-theme="dark"] .dock .i-moon { display: block; }

/* ---------- 英語版（en/）: 行間と字間を欧文向けに ---------- */
body:lang(en) { line-height: 1.75; overflow-wrap: break-word; }
:lang(en) .pill { letter-spacing: .02em; }
:lang(en) .page-head h1 { line-height: 1.3; letter-spacing: 0; font-feature-settings: normal; text-wrap: balance; }
:lang(en) .sec-head h2, :lang(en) .sec > h2, :lang(en) .ask h2 { letter-spacing: 0; }
:lang(en) .dots li { line-height: 1.7; }
:lang(en) .dots li::before { top: .68em; }
:lang(en) .rows p { line-height: 1.7; }
:lang(en) .defs > div { line-height: 1.65; }
:lang(en) .job h3 { line-height: 1.45; }
:lang(en) .job .role { line-height: 1.6; }
:lang(en) .job-part li { line-height: 1.6; }
:lang(en) .job-part li + li { margin-top: 5px; }
:lang(en) .job-part li::before { top: .66em; }
:lang(en) .job-part.got li::before { top: .44em; }

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  body { font-size: 15.5px; }
  .sec { margin-top: 68px; }
  .band { margin-top: 84px; padding-top: 64px; padding-bottom: 112px; }
  .facts strong { font-size: 24px; }
  .facts li { padding-left: 14px; }
  .facts span { padding-right: 8px; font-size: 12px; }
  .tile { width: 46px; height: 46px; border-radius: 14px; }
  .tile svg { width: 23px; height: 23px; }
  .rows li { grid-template-columns: 46px minmax(0, 1fr); column-gap: 14px; }
  .defs > div { grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; }
  .entry { grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; }
  .entry::before { left: 11px; top: 32px; }
  .dot { width: 24px; height: 24px; margin-top: 2px; }
  .dot svg { width: 13px; height: 13px; }
  .job { padding: 15px 16px; border-radius: 16px; }
  .job h3 { font-size: 15.5px; }
  .topic { padding: 18px 20px; border-radius: 20px; }
  .ask { margin-top: 96px; padding: 24px 22px 22px; border-radius: 22px; }
  .peek { right: 24px; width: 68px; }
  .dock a { padding: 5px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 印刷（経歴書として紙や PDF にするとき） ---------- */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #ffffff; --tint: #f4f8fb; --card: #ffffff; --line: #e1e8ee; --line-soft: #ebf0f4;
    --fg: #18222f; --sub: #566575; --mute: #8593a2; --ink: #18222f;
    --sky: #1c84d9; --sky-soft: #e0f0ff; --sun: #ffb81f; --sun-soft: #fff2cf; --sun-ink: #8a5a00;
    --leaf-soft: #dcf3e5; --leaf-ink: #1f7046; --rose-soft: #ffe3eb; --rose-ink: #b9325f;
    --iris-soft: #e6e8ff; --iris-ink: #4a4fc4;
    color-scheme: light;
  }
  body { font-size: 11pt; }
  .dock, .skip, .tabs, .lang, .page-head .actions, .ask { display: none !important; }
  .page-head > * { animation: none; }
  .sec { margin-top: 40px; }
  .band { margin-top: 40px; padding-top: 0; padding-bottom: 0; background: none; }
  .job, .topic, .rows li, .defs > div { break-inside: avoid; }
  .foot { margin-top: 40px; }
}
