@charset "UTF-8";

/* ============================================================
   ブログ形式・クール・3列
   先頭の「色・文字・形の設定」を書き換えると、全体の見た目をまとめて変えられます。
   ============================================================ */

/* ------------------------------------------------------------
   色・文字・形の設定（クール）
   ここの値を書き換えると、サイト全体の見た目がまとめて変わります。
   ------------------------------------------------------------ */
:root {
  color-scheme: dark;
  --color-bg: #0d1117;
  --color-surface: #161b22;
  --color-surface-alt: #11161d;
  --color-card-bg: #161b22;
  --color-border: #2a3340;
  --color-text: #e6edf3;
  --color-muted: #9aa7b4;
  --color-heading: #ffffff;
  --color-link: #4fd1ea;
  --color-link-hover: #9be8f7;
  --color-button-bg: #33c3e0;
  --color-button-text: #06121a;
  --color-button-hover-bg: #7fdcef;
  --color-header-bg: #0a0e14;
  --color-header-text: #e6edf3;
  --color-header-muted: #9aa7b4;
  --color-header-border: #2a3340;
  --color-nav-marker: #33c3e0;
  --color-footer-bg: #0a0e14;
  --color-footer-text: #9aa7b4;
  --color-footer-link: #e6edf3;
  --color-label-bg: #1f2a36;
  --color-label-text: #7fdcef;
  --color-note-bg: #11202a;
  --color-note-border: #33c3e0;
  --color-warn-bg: #2a1f10;
  --color-warn-border: #f2a93b;
  --color-cta-bg: #33c3e0;
  --color-cta-text: #06121a;
  --color-focus: #f2a93b;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-heading: "Segoe UI", "Helvetica Neue", Arial, var(--font-body);
  --heading-letter-spacing: 0.06em;
  --radius: 0;
  --radius-small: 0;
  --radius-button: 0;
  --header-border-bottom: 1px solid #2a3340;
  --header-shadow: 0 1px 0 rgb(51 195 224 / 35%);
  --nav-font-size: 0.9375rem;
  --nav-letter-spacing: 0.08em;
  --widget-border: 1px solid #2a3340;
  --widget-border-top: 2px solid #33c3e0;
  --shadow: 0 0 0 1px rgb(51 195 224 / 40%), 0 8px 24px rgb(0 0 0 / 50%);

  /* 横幅（ヘッダー・フッターの幅と、本文を含む段組みの幅） */
  --container-width: 80rem;
  --layout-width: 80rem;
}
/* ------------------------------------------------------------
   基本
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--color-link);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-link-hover);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75em;
  color: var(--color-heading);
  font-family: var(--font-heading);
  line-height: 1.45;
  letter-spacing: var(--heading-letter-spacing);
}

h1 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
}

h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}

h3 {
  font-size: 1.1875rem;
}

p,
ul,
ol,
dl,
figure,
blockquote,
table {
  margin: 0 0 1.25em;
}

ul,
ol {
  padding-left: 1.5em;
}

input,
button,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ------------------------------------------------------------
   ヘッダー
   ------------------------------------------------------------ */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  border-bottom: var(--header-border-bottom);
  box-shadow: var(--header-shadow);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
}

.site-branding {
  min-width: 0;
}

.site-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: var(--heading-letter-spacing);
}

.site-title a {
  color: var(--color-header-text);
  text-decoration: none;
}

.site-tagline {
  margin: 0.125rem 0 0;
  color: var(--color-header-muted);
  font-size: 0.8125rem;
}

.global-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--color-header-text);
  font-size: var(--nav-font-size);
  font-weight: 700;
  letter-spacing: var(--nav-letter-spacing);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  border-bottom-color: var(--color-nav-marker);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.375rem 0.875rem;
  background: transparent;
  color: var(--color-header-text);
  border: 1px solid var(--color-header-text);
  border-radius: var(--radius-small);
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: currentcolor;
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.nav-toggle__icon::before {
  top: -6px;
}

.nav-toggle__icon::after {
  top: 6px;
}

@media (max-width: 767px) {
  .site-header__inner {
    gap: 0.75rem 1rem;
  }

  .site-branding {
    flex: 1 1 0;
  }

  .site-title {
    font-size: 1.1875rem;
  }

  .js .nav-toggle {
    display: inline-flex;
    padding-inline: 0.75rem;
    font-size: 0.875rem;
  }

  .js .global-nav {
    display: none;
    width: 100%;
  }

  .js .global-nav.is-open {
    display: block;
  }

  .global-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .global-nav li + li {
    border-top: 1px solid var(--color-header-border);
  }

  .global-nav a {
    padding: 0.75rem 0.25rem;
  }
}

/* ------------------------------------------------------------
   パンくずリスト
   ------------------------------------------------------------ */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 0.5rem;
  content: "/";
}

/* ------------------------------------------------------------
   ボタン・ラベル
   ------------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.875rem;
  padding: 0.625rem 1.5rem;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  border: 2px solid var(--color-button-bg);
  border-radius: var(--radius-button);
}

.button:hover {
  background: var(--color-button-hover-bg);
  color: var(--color-button-text);
  border-color: var(--color-button-hover-bg);
}

.button--outline {
  background: transparent;
  color: var(--color-link);
  border-color: currentcolor;
}

.button--outline:hover {
  background: var(--color-surface);
  color: var(--color-link-hover);
  border-color: currentcolor;
}

.label {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  background: var(--color-label-bg);
  color: var(--color-label-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
  border-radius: var(--radius-small);
}

/* ------------------------------------------------------------
   見出し・本文の部品
   ------------------------------------------------------------ */
.section {
  margin-bottom: 3.5rem;
}

.lead {
  font-size: 1.0625rem;
}

.muted {
  color: var(--color-muted);
}

.table-wrap {
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table caption {
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-align: left;
}

.table th,
.table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--color-border);
}

.table thead th,
.table tbody th {
  background: var(--color-surface);
  color: var(--color-heading);
}

.note {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--color-note-bg);
  border-left: 4px solid var(--color-note-border);
  border-radius: var(--radius-small);
}

.note__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.note p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   サイドバーの部品
   ------------------------------------------------------------ */
.widget {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: var(--widget-border);
  border-top: var(--widget-border-top);
  border-radius: var(--radius);
}

.widget-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-list li + li {
  border-top: 1px solid var(--color-border);
}

.widget-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  text-decoration: none;
}

.widget-list a:hover {
  text-decoration: underline;
}

.widget-list .count {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------
   フッター
   ------------------------------------------------------------ */
.site-footer {
  padding-block: 2.5rem;
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--color-footer-link);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.copyright {
  margin: 0;
}

/* ------------------------------------------------------------
   ページの先頭へ戻るボタン
   ------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-button);
  box-shadow: var(--shadow);
  transition: opacity 0.2s, visibility 0.2s;
}

.back-to-top:hover {
  background: var(--color-button-hover-bg);
  color: var(--color-button-text);
}

.js .back-to-top:not(.is-visible) {
  visibility: hidden;
  opacity: 0;
}
/* ------------------------------------------------------------
   目次
   ------------------------------------------------------------ */
.toc {
  display: flow-root;
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: var(--widget-border);
  border-top: var(--widget-border-top);
  border-radius: var(--radius);
}

.toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* 本文の見出し（.article-body h2 など）の飾りを受けないよう、.toc の中に絞って書く */
.toc .toc__title {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  border: 0;
}

.toc__toggle {
  min-height: 2rem;
  padding: 0.125rem 0.75rem;
  background: transparent;
  color: var(--color-link);
  font-size: 0.8125rem;
  border: 1px solid currentcolor;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.toc__list,
.toc__list ol {
  margin: 0;
  padding-left: 1.5em;
}

.toc__list a {
  text-decoration: none;
}

.toc__list a:hover,
.toc__list a.is-active {
  text-decoration: underline;
}

.toc__list a.is-active {
  font-weight: 700;
}

.toc--sticky {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
/* ------------------------------------------------------------
   記事カードの一覧
   ------------------------------------------------------------ */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow);
}

.post-card:focus-within {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.post-card__image {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.post-card__title {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.post-card__title a {
  color: var(--color-heading);
  text-decoration: none;
}

.post-card__title a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.post-card:hover .post-card__title a {
  text-decoration: underline;
}

.post-card__excerpt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------
   ページ送り
   ------------------------------------------------------------ */
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination a {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  background: var(--color-card-bg);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
}

.pagination a[aria-current="page"] {
  background: var(--color-button-bg);
  color: var(--color-button-text);
  border-color: var(--color-button-bg);
}

/* ------------------------------------------------------------
   記事ページ
   ------------------------------------------------------------ */
.article-header {
  margin: 1.25rem 0 1.5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.article-eyecatch {
  margin: 0 0 2rem;
}

.article-eyecatch img,
.article-body figure img {
  width: 100%;
  border-radius: var(--radius);
}

.article-body h2 {
  margin-top: 2.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.article-body h3 {
  margin-top: 2rem;
}

.article-body blockquote {
  margin-inline: 0;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-left: 4px solid var(--color-border);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body figcaption {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 3rem 0 2rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: var(--widget-border);
  border-radius: var(--radius);
}

.author-box img {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
}

.author-box__name {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.author-box p:last-child {
  margin-bottom: 0;
}

.post-nav {
  display: grid;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 600px) {
  .post-nav {
    grid-template-columns: 1fr 1fr;
  }
}

.post-nav a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--color-card-bg);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.post-nav__label {
  display: block;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.post-nav__next {
  text-align: right;
}

.post-list--small .post-card__body {
  padding: 0.875rem 1rem 1rem;
}

.post-list--small .post-card__title {
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------
   プロフィール・タグ
   ------------------------------------------------------------ */
.profile__image {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
}

.profile__name {
  margin: 0 0 0.5rem;
  font-weight: 700;
  text-align: center;
}

.profile__text {
  margin: 0;
  font-size: 0.9375rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-card-bg);
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
}
/* ------------------------------------------------------------
   レイアウト（3列：本文の左右にサイドバー）
   ------------------------------------------------------------ */
.layout {
  display: grid;
  gap: 2.5rem;
  width: min(100% - 2rem, var(--layout-width));
  margin-inline: auto;
  padding-block: 2.5rem 4rem;
}

.layout > * {
  min-width: 0;
}

/* 768px〜1023px は2列（サイドバーを片側にまとめる） */
@media (min-width: 768px) {
  .layout {
    align-items: start;
    grid-template-areas:
      "main left"
      "main right";
    grid-template-columns: minmax(0, 1fr) 15rem;
    grid-template-rows: auto 1fr;
  }

  .main {
    grid-area: main;
  }

  .sidebar--left {
    grid-area: left;
  }

  .sidebar--right {
    grid-area: right;
  }
}

/* 1024px 以上は3列 */
@media (min-width: 1024px) {
  .layout {
    grid-template-areas: "left main right";
    grid-template-columns: 13.5rem minmax(0, 1fr) 15rem;
    grid-template-rows: auto;
  }
}
/* ------------------------------------------------------------
   飾り（クール）
   ------------------------------------------------------------ */
.site-title a::after {
  color: var(--color-button-bg);
  content: "_";
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-title::before {
  display: block;
  width: 3rem;
  height: 3px;
  margin-bottom: 0.625rem;
  background: linear-gradient(90deg, var(--color-button-bg), transparent);
  content: "";
}

.widget__title {
  margin: 0 0 0.75rem;
  color: var(--color-link);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
}
