/* /* KADOMA フォント - 日本語用 */ */
/* @font-face { */
/*   font-family: "KADOMA"; */
/*   src: url("https://d3w0x7oesq9q1.cloudfront.net/KADOMA-R-fixed.woff2") */
/*     format("woff2"); */
/*   font-display: swap; */
/*   font-weight: 400; */
/*   font-style: normal; */
/*   unicode-range: U+3000-9FFF, U+FF00-FFEF; */
/* } */

/* IBM Ples Sans JP */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+JP&display=swap');

/* /* Monaspace Neon フォント */
*/
/* @font-face { */
/*   font-family: "Monaspace Neon"; */
/*   src: url("https://cdn.jsdelivr.net/npm/monaspace-font@1.0.0/fonts/variable/MonaspaceNeon[wght].woff2") format("woff2-variations"); */
/*   font-weight: 100 900; */
/*   font-display: swap; */
/* } */

/* Berkeley Mono フォント */
/* Regular (400) */
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Regular.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Oblique.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: oblique;
}

/* Medium (500) */
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Medium.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Medium-Oblique.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 500;
  font-style: oblique;
}

/* SemiBold (600) */
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-SemiBold.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-SemiBold-Oblique.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 600;
  font-style: oblique;
}

/* Bold (700) */
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Bold.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Bold-Oblique.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 700;
  font-style: oblique;
}

/* ExtraBold (800) */
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-ExtraBold.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-ExtraBold-Oblique.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 800;
  font-style: oblique;
}

/* Black (900) */
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Black.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 900;
  font-style: normal;
}
@font-face {
  font-family: "BerkeleyMono";
  src: url("https://d3w0x7oesq9q1.cloudfront.net/BerkeleyMono-Black-Oblique.woff2")
    format("woff2");
  font-display: swap;
  font-weight: 900;
  font-style: oblique;
}

/* ヘッダー・ナビゲーション */
header {
  font-family: var(--sans-serif-font);
}

/* サイトタイトル */
.home-title {
  font-family: "BerkeleyMono", sans-serif;
  font-weight: 900;
}

.page-header,
.section-title,
.article-title {
  font-size: 1.5em;
  font-weight: 700;
}

:root {
  --sans-serif-font:
    "BerkeleyMono", "IBM Plex Sans JP", "Helvetica Neue", Arial,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --serif-font: var(--sans-serif-font);
  --code-font: "BerkeleyMono", "Cascadia Code", monospace;
}

/* 一般的な日本語ブログに合わせたフォントサイズ */
@media all and (min-width: 600px) {
  html {
    font-size: 16px;
  }
}

@media all and (min-width: 960px) {
  html {
    font-size: 18px;
  }
}

/* 目次のフォントサイズを小さく */
.toc-container {
  font-size: 0.9em;
}

.toc-container h3 {
  font-size: 1.1em;
}

#banner-container-home #image-container-home {
  max-width: 7rem;
}

/* トップページのヘッダー文の行間調整 */
#banner-container-home #home-banner-text #banner-home-subtitle p {
  font-size: 0.85rem !important;
  line-height: 1.5rem !important;
  margin-bottom: 0.3em !important;
}

#banner-container-home #image-container-home #banner-home-img {
  border-radius: 1rem;
  transform: rotate(3deg);
}

/* Zenn風の見出しスタイル */
article h1 {
  font-weight: 700;
  font-size: 1.7em;
}

article h1::before {
  content: "# ";
  color: #d1d5db;
}

article h2 {
  font-weight: 700;
  font-size: 1.2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #d1d5db;
}

article h2::before {
  content: "## ";
  color: #d1d5db;
}

article h3 {
  font-weight: 700;
  font-size: 1em;
}

article h3::before {
  content: "### ";
  color: #d1d5db;
}

/* テーブルのフォントサイズ */
article table th,
article table td {
  font-size: 0.85em;
}

/* パラグラフ間の余白 */
article p {
  margin-bottom: 0.8em;
}

/* 脚注 */
.footnotes {
  font-size: 0.7em;
  border-top: 1px solid #d1d5db;
  padding-top: 1em;
  margin-top: 2em;
}

.footnotes::before {
  content: "Footnotes";
  display: block;
  font-weight: 700;
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

.footnotes p,
.footnotes li {
  margin-bottom: 0.3em;
  line-height: 1.4;
}

/* Tagsページの行間 */
#tag-cloud .tags-item {
  margin-block-end: 0.3rem;
}

/* Blogページの記事間の余白を詰める */
.bloglist-container .bloglist-meta {
  padding-block: 1rem;
  font-weight: 400;
}

.bloglist-container .bloglist-content {
  padding: 1rem 0;
}

/* レスポンシブ時の日付とタイトル間の余白を詰める */
@media only screen and (max-width: 1100px) {
  .bloglist-container .bloglist-meta {
    padding-bottom: 0;
  }

  .bloglist-container .bloglist-content {
    padding-top: 0.3rem;
  }
}

/* Blogページの記事内要素の行間を詰める */
.bloglist-content div .bloglist-tags {
  margin-top: -0.2rem;
}

.bloglist-content div .description p {
  margin: 0.3rem 0 0.5rem;
  font-weight: 400;
}

/* Definition List スタイル */
article dt {
  font-weight: 500;
  margin-top: 1em;
}

article dd {
  font-size: 0.95em;
  line-height: 1.5;
  margin-left: 1.5em;
  margin-bottom: 0.5em;
}

/* NEXT/PREVIOUS 記事タイトル */
.article-navigation div p {
  font-weight: 400;
}

/* コードブロックのリガチャ有効化 */
code,
pre,
.code-font {
  font-feature-settings:
    "liga" 1,
    "calt" 1;
  font-variant-ligatures: common-ligatures contextual;
}

/* リンクカード（tabi テーマのリンクスタイルを上書き） */
a.linkcard,
a.linkcard:visited,
a.linkcard:hover,
a.linkcard:active {
  display: block;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: none;
  background-image: none;
  margin: 1em 0;
  padding: 12px 16px;
  transition: background-color 0.2s;
  text-shadow: none;
  box-shadow: none;
}

a.linkcard:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.linkcard-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.linkcard-title {
  display: block;
  font-weight: 600;
  font-size: 0.95em;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.linkcard-description {
  display: block;
  font-size: 0.8em;
  color: #6b7280;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.linkcard-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75em;
  color: #9ca3af;
}

.linkcard-favicon {
  display: inline;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 2px;
  vertical-align: middle;
}

/* リンクカード ダークモード */
[data-theme="dark"] a.linkcard,
[data-theme="dark"] a.linkcard:visited,
[data-theme="dark"] a.linkcard:hover,
[data-theme="dark"] a.linkcard:active {
  border-color: #4b5563;
  color: inherit;
  background: none;
  background-image: none;
  text-shadow: none;
}

[data-theme="dark"] a.linkcard:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .linkcard-description {
  color: #9ca3af;
}

[data-theme="dark"] .linkcard-meta {
  color: #6b7280;
}

/* GitHub リンクカード */
.linkcard-gh-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.linkcard-gh-icon {
  display: inline;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  color: #57606a;
}

[data-theme="dark"] .linkcard-gh-icon {
  color: #9ca3af;
}

.linkcard-gh-name {
  font-size: 1em;
  color: #0969da;
}

[data-theme="dark"] .linkcard-gh-name {
  color: #58a6ff;
}

.linkcard-gh-lang {
  display: block;
  font-size: 0.75em;
  color: #6b7280;
}

/* はてなブログカード */
.hatenablogcard {
  display: block;
  margin: 1em 0;
  max-width: 100%;
  border: none;
}
