:root {
  --maincolor: rgb(1, 1, 255); /* 例: 通常モードのメインカラーをネイビーに */
  --bordercl: steelblue; /* 例: 区切り線の色をスチールブルーに */
  --callouctcolor: lightcoral; /* 例: コールアウトの背景色をライトコーラルに */
  --hovercolor: darkslateblue; /* 例: ホバー時の背景色をダークスレートブルーに */
  --darkMaincolor: #f1fa8c; /* 例: ダークモードのメインカラーを明るい黄色に */
}
html {
  color: #232333;
  font-family: 'Roboto Mono', monospace;
  font-size: 15px;
  line-height: 1.6em;
}
body{
  display: block;
  margin: 8px;
}
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::selection {
  background: var(--maincolor);
  color: #fff;
}

p {
  font-family: 'Fira Sans', sans-serif;
  line-height: 1.5;
}

hr {
  border: 0;
  border-top: 3px dotted var(--bordercl);
  margin: 1em 0;
}

blockquote {
  border-left: 3px solid var(--bordercl);
  color: #737373;
  margin: 0;
  padding-left: 1em;
}

a {
  border-bottom: 3px solid var(--maincolor);
  color: inherit;
  text-decoration: none;
}
a:hover {
    background-color: var(--hovercolor);
    color: #fff;
}

ul {
  list-style: none;
  padding-left: 2ch;
}
ul li {
  text-indent: -2ch;
}
ul > li::before {
  content: '* ';
  font-weight: bold;
}

/* Images */
img {
  border: 3px solid #ececec;
  max-width: 100%;
}

figure {
  box-sizing: border-box;
  display: inline-block;
  margin: 0;
  max-width: 100%;
}

figure img {
  max-height: 500px;
}

@media screen and (min-width: 600px) {
  figure {
    padding: 0 40px;
  }
}

figure h4 {
  font-size: 1rem;
  margin: 0;
  margin-bottom: 1em;
}
figure h4::before {
  content: '↳ ';
}

/* Code blocks */
code {
  background-color: #f1f1f1;
  padding: .1em .2em;
}

pre {
  background-color: #ececec;
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
}

.highlight pre ::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

pre code {
  background-color: transparent;
  color: inherit;
  font-size: 100%;
  padding: 0;
}

/* Containers */
.content {
  margin-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding: 0 1ch;
  word-wrap: break-word;
}

/* Header */
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 1em 0;
  line-height: 2.5em;
}

header .main {
  font-size: 1.5rem;
}
h1, h2, h3, h4, h5, h6 {
  font-size: 1.2rem;
  margin-top: 2em;
}

h1::before { color: var(--maincolor); content: '# '; }
h2::before { color: var(--maincolor); content: '## '; }
h3::before { color: var(--maincolor); content: '### '; }
h4::before { color: var(--maincolor); content: '#### '; }
h5::before { color: var(--maincolor); content: '##### '; }
h6::before { color: var(--maincolor); content: '###### '; }

.meta {
  color: #999;
  letter-spacing: -0.5px;
}

.post-container {
  align-items: flex-start;
  display: flex;
  gap: 20px;
}

.post-content {
  flex: 3;
  min-width: 0;
}

.toc {
  background-color: #ececec;
  border-radius: 5px;
  color: #232333;
  flex: 0 0 auto;
  height: auto;
  margin-left: 20px;
  max-width: 300px;
  overflow-y: auto;
  padding: 10px;
  position: sticky;
  top: 20px;
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  border-top: 0.4rem dotted var(--bordercl);
  padding: 2rem 0rem;
  margin-top: 2rem;
}
.soc {
  display: flex;
  align-items: center;
  border-bottom: none;
}
.border {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  border: 1px solid;
}
.footer-info {
  padding: var(--footer-padding);
}

/* Common */
.title h1 {
  margin-bottom: 0;
}

time {
  color: grey;
}

/* Posts */
article .title {
  margin-bottom: 1em;
}


/* Callout */
.callout {
  background-color: var(--callouctcolor);
  color: #fff;
  padding: 1em;
}

.callout p {
  font-family: 'IBM Plex Mono', monospace;
  margin: 0;
}

.callout a {
  border-bottom: 3px solid #fff;
}

.callout a:hover {
  background-color: #fff;
  color: var(--callouctcolor);
}

.callout-alert {
  color: #000000;
  background-color: transparent;
  border-width: 3px;
  border-style: solid;
  border-color: #ff6347;
}

.callout-custom {
  color: #000000;
}

.callout-tip {
  color: #000000;
  background-color: transparent;
  border-width: 3px;
  border-style: solid;
  border-color: dodgerblue;
}

.callout-warning {
  color: #000000;
  background-color: transparent;
  border-width: 3px;
  border-style: solid;
  border-color: #ffd700;
}

.site-description {
display: flex;
justify-content: space-between;
}
.tags li::before{
  content: "🏷 ";
}
.tags a{
  border-bottom: 3px solid var(--maincolor); 
}
.tags a:hover{
  color:white;
  background-color: var(--hovercolor); 
}
svg{
  max-height: 15px;
}
.soc:hover{
  color: white;
}
.draft-label{ 
    color: var(--bordercl);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 6px;
    background-color: #f9f2f4;
}
.highlight {
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.highlight pre code[class*="language-"] {
  -webkit-overflow-scrolling: touch;
}
.highlight pre code[class*="language-"]::before {
  background: black;
  border-radius: 0 0 0.25rem 0.25rem;
  color: white;
  font-size: 12px;
  letter-spacing: 0.025rem;
  padding: 0.1rem 0.5rem;
  position: absolute;
  right: 1rem;
  text-align: right;
  text-transform: uppercase;
  top: 0;
}

.highlight pre code[class=language-javaScript]::before,
.highlight pre code[class="language-js"]::before {
content: "js";
background: #f7df1e;
color: black;
}
.highlight pre code[class*='language-yml']::before,
.highlight pre code[class*='language-yaml']::before {
content: 'yaml';
background: #f71e6a;
color: white;
}
.highlight pre code[class*='language-shell']::before,
.highlight pre code[class*='language-bash']::before,
.highlight pre code[class*='language-sh']::before {
content: 'shell';
background: green;
color:white
}
.highlight pre code[class*='language-json']::before{
content: 'json';
background: dodgerblue;
 color: #000000 
}
.highlight pre code[class*='language-python']::before,
.highlight pre code[class*='language-py']::before {
content: 'py';
background: blue;
color: yellow ;
}
.highlight pre code[class*='language-css']::before{
content: 'css';
background: cyan;
color: black ;
}
.highlight pre code[class*='language-go']::before{
content: 'Go';
background: cyan;
color: royalblue ;
}
.highlight pre code[class*='language-md']::before,
.highlight pre code[class*='language-md']::before{
content: 'Markdown';
background: royalblue;
color: whitesmoke ;
}
.highlight pre code[class*='language-ts']::before{
  content: 'TS';
  background: #3178C6;
  color: #fff;
}

/* table */
table {
  border-spacing: 0;
  border-collapse: collapse;
}

table th{
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
  font-size: large;
}

table td{
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.feather {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ========================================
   Section-based color schemes
   ======================================== */

/* Tech section - Blue theme */
body.section-tech {
  --maincolor: #0066cc;
  --bordercl: #4A90E2;
  --callouctcolor: #2196F3;
  --hovercolor: #003d7a;
  --darkMaincolor: #64B5F6;
}

/* Hobby section - Purple theme */
body.section-hobby {
  --maincolor: #9b59b6;
  --bordercl: #8e44ad;
  --callouctcolor: #AB47BC;
  --hovercolor: #6c3483;
  --darkMaincolor: #BA68C8;
}

/* Life section - Orange theme */
body.section-life {
  --maincolor: #e67e22;
  --bordercl: #d35400;
  --callouctcolor: #FF9800;
  --hovercolor: #ba4a00;
  --darkMaincolor: #FFB74D;
}

/* Post section - Keep original theme (for backward compatibility) */
body.section-post {
  --maincolor: rgb(1, 1, 255);
  --bordercl: steelblue;
  --callouctcolor: lightcoral;
  --hovercolor: darkslateblue;
  --darkMaincolor: #f1fa8c;
}

/* ========================================
   Home page: Per-article section colors
   ======================================== */

/* Tech articles on home page */
.list-item-tech .title a {
  border-bottom-color: #0066cc;
}

.list-item-tech .title a:hover {
  background-color: #003d7a;
  color: #fff;
}

.list-item-tech .readmore {
  border-bottom-color: #0066cc;
}

.list-item-tech .readmore:hover {
  background-color: #003d7a;
  color: #fff;
}

/* Hobby articles on home page */
.list-item-hobby .title a {
  border-bottom-color: #9b59b6;
}

.list-item-hobby .title a:hover {
  background-color: #6c3483;
  color: #fff;
}

.list-item-hobby .readmore {
  border-bottom-color: #9b59b6;
}

.list-item-hobby .readmore:hover {
  background-color: #6c3483;
  color: #fff;
}

/* Life articles on home page */
.list-item-life .title a {
  border-bottom-color: #e67e22;
}

.list-item-life .title a:hover {
  background-color: #ba4a00;
  color: #fff;
}

.list-item-life .readmore {
  border-bottom-color: #e67e22;
}

.list-item-life .readmore:hover {
  background-color: #ba4a00;
  color: #fff;
}

/* Post articles on home page */
.list-item-post .title a {
  border-bottom-color: rgb(1, 1, 255);
}

.list-item-post .title a:hover {
  background-color: darkslateblue;
  color: #fff;
}

.list-item-post .readmore {
  border-bottom-color: rgb(1, 1, 255);
}

.list-item-post .readmore:hover {
  background-color: darkslateblue;
  color: #fff;
}

/* Section-specific heading colors on home page */
.list-item-tech h1::before {
  color: #0066cc;
}

.list-item-hobby h1::before {
  color: #9b59b6;
}

.list-item-life h1::before {
  color: #e67e22;
}

.list-item-post h1::before {
  color: rgb(1, 1, 255);
}

/* ========================================
   Header colors for each section
   ======================================== */

/* Tech section header */
body.section-tech header .main a {
  border-bottom-color: #0066cc;
}

body.section-tech header nav a {
  border-bottom-color: #0066cc;
}

body.section-tech header nav a:hover {
  background-color: #003d7a;
}

/* Override About to always be gray in Tech section */
body.section-tech header nav a[href="/about"],
body.section-tech header nav a[href="/about/"] {
  border-bottom-color: #666666 !important;
}

body.section-tech header nav a[href="/about"]:hover,
body.section-tech header nav a[href="/about/"]:hover {
  background-color: #888888 !important;
}

/* Hobby section header */
body.section-hobby header .main a {
  border-bottom-color: #9b59b6;
}

body.section-hobby header nav a {
  border-bottom-color: #9b59b6;
}

body.section-hobby header nav a:hover {
  background-color: #6c3483;
}

/* Override About to always be gray in Hobby section */
body.section-hobby header nav a[href="/about"],
body.section-hobby header nav a[href="/about/"] {
  border-bottom-color: #666666 !important;
}

body.section-hobby header nav a[href="/about"]:hover,
body.section-hobby header nav a[href="/about/"]:hover {
  background-color: #888888 !important;
}

/* Life section header */
body.section-life header .main a {
  border-bottom-color: #e67e22;
}

body.section-life header nav a {
  border-bottom-color: #e67e22;
}

body.section-life header nav a:hover {
  background-color: #ba4a00;
}

/* Override About to always be gray in Life section */
body.section-life header nav a[href="/about"],
body.section-life header nav a[href="/about/"] {
  border-bottom-color: #666666 !important;
}

body.section-life header nav a[href="/about"]:hover,
body.section-life header nav a[href="/about/"]:hover {
  background-color: #888888 !important;
}

/* Post section header */
body.section-post header .main a {
  border-bottom-color: rgb(1, 1, 255);
}

body.section-post header nav a {
  border-bottom-color: rgb(1, 1, 255);
}

body.section-post header nav a:hover {
  background-color: darkslateblue;
}

/* Tags section - Gray theme */
body.section-tags {
  --maincolor: #666666;
  --bordercl: #888888;
  --callouctcolor: #999999;
  --hovercolor: #555555;
  --darkMaincolor: #aaaaaa;
}

body.section-tags header .main a {
  border-bottom-color: #666666;
}

body.section-tags header nav a {
  border-bottom-color: #666666;
}

body.section-tags header nav a:hover {
  background-color: #888888;
}

/* About section - Gray theme */
body.section-about {
  --maincolor: #666666;
  --bordercl: #888888;
  --callouctcolor: #999999;
  --hovercolor: #555555;
  --darkMaincolor: #aaaaaa;
}

body.section-about header .main a {
  border-bottom-color: #666666;
}

body.section-about header nav a {
  border-bottom-color: #666666;
}

body.section-about header nav a:hover {
  background-color: #888888;
}

/* Default (home, etc.) - Gray theme */
body:not(.section-tech):not(.section-hobby):not(.section-life):not(.section-post):not(.section-tags):not(.section-about) header .main a {
  border-bottom-color: #666666;
}

body:not(.section-tech):not(.section-hobby):not(.section-life):not(.section-post):not(.section-tags):not(.section-about) header nav a {
  border-bottom-color: #666666;
}

body:not(.section-tech):not(.section-hobby):not(.section-life):not(.section-post):not(.section-tags):not(.section-about) header nav a:hover {
  background-color: #888888;
}

/* ========================================
   Menu item specific colors (always applied)
   ======================================== */

/* Tech menu item - always blue */
header nav a[href="/tech"],
header nav a[href="/tech/"] {
  border-bottom-color: #0066cc !important;
}

header nav a[href="/tech"]:hover,
header nav a[href="/tech/"]:hover {
  background-color: #003d7a !important;
}

/* Hobby menu item - always purple */
header nav a[href="/hobby"],
header nav a[href="/hobby/"] {
  border-bottom-color: #9b59b6 !important;
}

header nav a[href="/hobby"]:hover,
header nav a[href="/hobby/"]:hover {
  background-color: #6c3483 !important;
}

/* Life menu item - always orange */
header nav a[href="/life"],
header nav a[href="/life/"] {
  border-bottom-color: #e67e22 !important;
}

header nav a[href="/life"]:hover,
header nav a[href="/life/"]:hover {
  background-color: #ba4a00 !important;
}

/* Cross-section menu items - gray */
header nav a[href="/"],
header nav a[href="/post"],
header nav a[href="/post/"],
header nav a[href="/about"],
header nav a[href="/about/"],
header nav a[href="/tags"],
header nav a[href="/tags/"],
header nav a[href^="https://foresuke.com"] {
  border-bottom-color: #666666 !important;
}

header nav a[href="/"]:hover,
header nav a[href="/post"]:hover,
header nav a[href="/post/"]:hover,
header nav a[href="/about"]:hover,
header nav a[href="/about/"]:hover,
header nav a[href="/tags"]:hover,
header nav a[href="/tags/"]:hover,
header nav a[href^="https://foresuke.com"]:hover {
  background-color: #888888 !important;
}

/* External link icon */
header nav a[target="_blank"]::after {
  content: " ⧉";
  font-size: 0.8em;
  vertical-align: super;
}

/* Footer Author info */
.footer-author {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 1em 0;
  margin: 1em 0;
  border-top: 1px solid var(--bordercl);
  border-bottom: 1px solid var(--bordercl);
}

.footer-author-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--bordercl);
  flex-shrink: 0;
}

.footer-author-info {
  flex: 1;
}

.footer-author-name {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 0.2em;
}

.footer-author-bio {
  font-size: 0.85em;
  color: #737373;
  line-height: 1.4;
  margin-bottom: 0.5em;
}

.footer-author-social {
  display: flex;
  gap: 0.8em;
  margin-top: 0.5em;
}

.footer-author-social a {
  color: #737373;
  border: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
}

.footer-author-social a:hover {
  color: var(--maincolor);
  background: none;
}

.footer-author-social svg {
  width: 18px;
  height: 18px;
}

.footer-copyright {
  font-size: 0.75em;
  color: #999;
  text-align: center;
  margin-top: 1em;
  padding-top: 0.5em;
}
