:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --bg-alt: #151a21;
  --text: #e7eaf0;
  --muted: #a6adbb;
  --accent: #65d1ff;
  --border: #2a3140;
  --card: #161b22;
  --max-width: 980px;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  font-family: "Inter", "Noto Sans JP", system-ui, sans-serif;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  padding: 28px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(101, 209, 255, 0.15), transparent 60%);
  position: relative;
}



.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 48px;
}

.hero-container {
  padding: 0 20px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero h1 {
  font-size: clamp(2rem, 2.8vw, 3rem);
  margin: 0;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card img.card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 6px);
  display: block;
}

.card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.75rem;
  color: var(--text);
}

.tags button.tag {
  appearance: none;
  cursor: pointer;
}

.tag.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.filters {
  margin-top: 20px;
  margin-bottom: 16px;
}

.filters h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.empty-state {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}

.article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.article h1 {
  margin-top: 0;
}

pre {
  background: #0b0f14;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "Fira Code", "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e6eef6;
}

/* inline code styling */
code {
  font-family: "Fira Code", "SFMono-Regular", ui-monospace, monospace;
  background: rgba(255,255,255,0.02);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.95rem;
}

/* make sure code blocks generated by highlight.js take full width */
pre code {
  display: block;
  white-space: pre;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid var(--border);
  padding: 8px 12px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 48px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 600px) {
  header {
    padding: 22px 16px 14px;
  }

  .container {
    padding: 0 16px 40px;
  }

  .hero-container {
    padding: 0 16px;
  }

  .article {
    padding: 24px;
    margin-top: 16px;
  }
}

/* 隠す用のユーティリティ */
.card.is-hidden { display: none !important; }
.empty-state.is-hidden { display: none !important; }