/* css/common.css */
/* --- ① Webフォント読み込み --- */
@font-face {
  font-family: 'Source Han Code JP';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-han-code-jp/SourceHanCodeJP-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Han Code JP';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/source-han-code-jp/SourceHanCodeJP-Bold.woff2') format('woff2');
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Meiryo', 'メイリオ', sans-serif !important;
  background-color: #121212;
  color: #eeeeee;
  line-height: 1.6;
  scroll-behavior: smooth;
}

header,
footer,
.site-title,
nav a,
.footer-logo,
.footer-links a,
.footer-text,
.social-links a {
  font-family: 'Meiryo', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
}

a {
  color: #00ff88;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #00cc66;
}

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

/* コンテナ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header === */
header {
  padding: 40px 0 20px;
  border-bottom: 1px solid #333;
}

.site-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.site-title a {
  color: #eeeeee;
}

/* === Navigation (if used) === */
nav {
  margin: 20px 0;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-left: 0;
}

nav li {
  margin-right: 20px;
  margin-bottom: 10px;
}

nav a {
  position: relative;
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #eeeeee;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #00ff88;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease, transform-origin 0s;
}

nav a:hover::after,
nav a:focus::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* === Footer === */
footer {
  padding: 60px 0;
  border-top: 1px solid #333;
  background-color: #1e1e1e;
  color: #eeeeee;
  margin-top: auto;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
  gap: 20px;
}

.footer-links a {
  font-size: 14px;
  color: #00ff88;
  font-weight: 600;
}

.footer-text {
  font-size: 14px;
  color: #aaaaaa;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
}

.social-links {
  text-align: center;
}

.social-links a {
  font-size: 14px;
  color: #00ff88;
  margin: 0 10px;
  font-weight: 600;
}

.copyright {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 20px;
}

/* === Typing / Spinner === */
.console-typing::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background-color: #cfcfcf;
  animation: blink-caret 1s step-end infinite;
  margin-left: 2px;
  vertical-align: bottom;
}

.console-caret {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background-color: #cfcfcf;
  margin-left: 2px;
  vertical-align: bottom;
}

.blink {
  animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {

  0%,
  100% {
    background-color: transparent;
  }

  50% {
    background-color: #cfcfcf;
  }
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid #ccc;
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background-color: #00ff88;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

button:hover {
  background-color: #00cc66;
}

select,
input {
  background-color: #1e1e1e;
  color: #eeeeee;
  border: 1px solid #00ff88;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 1em;
  max-width: 220px;
  width: 100%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* レスポンシブ */
@media (max-width: 768px) {
  header {
    padding: 30px 0 15px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .personal-info {
    grid-template-columns: 1fr;
  }
}

main ul,
main ol,
.article-item ul,
.article-item ol,
.section ul,
.section ol {
  padding-left: 2em !important;
  margin-left: 0 !important;
}

main li,
.article-item li,
.section li {
  margin-bottom: 0.3em;
}


/* スムーズスクロール */
html {
  scroll-behavior: smooth;
}