/* ==========================================================================
   Minimalist Theme (kan.blog)
   Pure simplicity, high legibility, zero noise.
   ========================================================================== */

:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --text-muted: #767676;
  --border-color: #e4e4e4;
  --link-color: #0066cc; /* 最も一般的な王道リンク青 */
  --link-hover: #004499;
  --box-bg: rgba(250, 250, 250, 0.6);
  --box-border: rgba(228, 228, 228, 0.87);
  --container-width: 680px;
  --font-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --timeline-dot: #c8c8c8;
  --timestamp-color: #a5a5a5; /* mblog.com マナブ完全一致の日付カラー */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-muted: #9e9e9e;
    --border-color: #333333;
    --link-color: #64b5f6;
    --link-hover: #90caf9;
    --box-bg: rgba(35, 35, 35, 0.6);
    --box-border: rgba(60, 60, 60, 0.87);
    --timeline-dot: #555555;
    --timestamp-color: #888888;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1; /* 日本語のプロポーショナル文字詰め（マス目感を消し、引き締まったタイポグラフィを実現） */
  letter-spacing: -0.015em;
  scrollbar-gutter: stable; /* ページ遷移時のスクロールバーによる横ズレを完全防止 */
  overflow-y: scroll; /* スクロールバー領域を全ページで常に固定 */
}

body {
  font-family: var(--font-base);
  line-height: 2;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 30px 20px 100px 20px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
}

/* Header */
header.site-header {
  margin-top: 15px;
  margin-bottom: 50px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.site-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
}

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

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  margin: -4px -6px;
  cursor: pointer;
}

.nav-icon svg {
  display: block;
  pointer-events: none;
}

/* Content Area (Indented from header for elegant balance) */
main {
  padding: 0 28px;
}

/* Year Sections */
.year-section {
  margin-bottom: 48px;
}

.year-section:last-child {
  margin-bottom: 0;
}

.year-heading {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--timestamp-color);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

/* Post List (PC: Horizontal Timeline) */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px; /* タイトルごとの上下スペース（前のまま） */
}

.post-list-item {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 22px; /* 日付とタイトルのスペース（前のまま） */
}

.timestamp {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--timestamp-color);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  width: 55px; /* 日付の幅を固定し、タイトルの開始位置を美しく揃える */
}

.post-link {
  color: var(--link-color); /* リンクとわかる青色 */
  text-decoration: none;
  font-size: 16px;
  line-height: 1.6;
}

.post-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Article View (Easlo-inspired Minimal Typography) */
.article {
  margin-top: 25px;
}

.article-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--timestamp-color);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  color: var(--text-color);
}

.article-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-color);
}

.article-content p {
  margin-top: 0;
  margin-bottom: 28px;
}

.article-content h2 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-top: 50px;
  margin-bottom: 18px;
  color: var(--text-color);
}

.article-content h3 {
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.015em;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-color);
}

/* manablog Characteristic: Boxed lists */
.article-content ul,
.article-content ol {
  background-color: var(--box-bg);
  outline: 1px solid var(--box-border);
  padding: 20px 25px 20px 40px;
  margin: 30px 0;
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  line-height: 1.75;
  margin-bottom: 8px;
}

.article-content li:last-child {
  margin-bottom: 0;
}

.article-content blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 20px;
  margin: 32px 0;
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.8;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 40px 0;
}

.article-content a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--box-bg);
  border: 1px solid var(--box-border);
  padding: 2px 6px;
  border-radius: 3px;
}

.article-content pre {
  background-color: var(--box-bg);
  outline: 1px solid var(--box-border);
  padding: 20px;
  overflow-x: auto;
  margin: 30px 0;
  line-height: 1.6;
}

.article-content pre code {
  background-color: transparent;
  border: none;
  padding: 0;
}

/* Eyecatch & Article Images (Full Width Matching Content) */
.article-eyecatch {
  margin: 28px 0 40px 0;
}

.article-eyecatch img,
.article-content img:not(.tweet-card img) {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.article-content img:not(.tweet-card img) {
  margin: 36px 0;
}

/* Post Navigation / Footer */
.post-footer-nav {
  margin-top: 60px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.post-footer-nav a {
  font-size: 0.95rem;
  color: var(--link-color);
  text-decoration: none;
}

.post-footer-nav a:hover {
  text-decoration: underline;
}

footer.site-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Mobile Adjustments */
@media (max-width: 600px) {
  body {
    padding: 20px 16px 60px 16px;
  }

  header.site-header {
    margin-top: 5px;
    margin-bottom: 35px;
    padding-bottom: 15px;
  }

  main {
    padding: 0 10px;
  }

  .year-section {
    margin-bottom: 38px;
  }

  .year-heading {
    font-size: 16px;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
  }

  .post-list {
    gap: 22px;
  }

  .post-list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .timestamp {
    width: auto;
    font-size: 13px;
    line-height: 1.4;
    color: var(--timestamp-color);
    letter-spacing: -0.01em;
  }

  .post-link {
    font-size: 16px;
    line-height: 1.55;
    color: var(--link-color);
  }

  .post-link:active {
    color: var(--link-hover);
  }

  .article-time {
    font-size: 12.5px;
    margin-bottom: 10px;
  }

  .article-title {
    font-size: 24px;
    line-height: 1.34;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
  }

  .article-content {
    font-size: 16px;
    line-height: 1.82;
  }

  .article-content p {
    margin-top: 0;
    margin-bottom: 22px;
  }

  .article-content h2 {
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.015em;
    margin-top: 38px;
    margin-bottom: 14px;
  }

  .article-content h3 {
    font-size: 17.5px;
    line-height: 1.38;
    letter-spacing: -0.01em;
    margin-top: 30px;
    margin-bottom: 12px;
  }

  .article-content ul,
  .article-content ol {
    padding: 16px 18px 16px 32px;
    margin: 22px 0;
  }

  .article-content blockquote {
    padding-left: 15px;
    margin: 22px 0;
  }

  .article-eyecatch {
    margin: 18px 0 26px 0;
  }
}

/* Twitter / X Embed Styling */
.twitter-tweet {
  margin: 36px auto !important;
}

/* ==========================================================================
   Pure CSS Tweet Card (Zero-JS, perfectly identical to X native embed)
   ========================================================================== */
.tweet-card {
  max-width: 550px;
  margin: 36px auto;
  border: 1px solid #cfd9de;
  border-radius: 16px;
  padding: 16px 20px;
  background-color: #ffffff;
  color: #0f1419;
  font-family: var(--font-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tweet-card a {
  text-decoration: none;
}

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

.tweet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tweet-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tweet-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  margin: 0 !important;
  display: block !important;
  flex-shrink: 0 !important;
  background-color: #f7f9f9;
}

.tweet-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.tweet-user-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tweet-display-name {
  font-weight: 700;
  font-size: 15px;
  color: #0f1419;
}

.tweet-badge {
  display: inline-flex;
  align-items: center;
}

.tweet-badge svg {
  width: 18px;
  height: 18px;
  fill: #1d9bf0;
}

.tweet-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #536471;
}

.tweet-follow-btn {
  color: #1d9bf0;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}

.tweet-follow-btn:hover {
  text-decoration: underline;
}

.tweet-x-logo svg {
  width: 20px;
  height: 20px;
  fill: #0f1419;
}

.tweet-body {
  font-size: 16px;
  line-height: 1.5;
  color: #0f1419;
  margin-bottom: 14px;
  white-space: pre-line;
}

.tweet-more-link {
  color: #1d9bf0;
  text-decoration: none;
}

.tweet-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #536471;
  padding-bottom: 12px;
  border-bottom: 1px solid #eff3f4;
}

.tweet-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 0 14px 0;
  font-size: 13px;
  color: #536471;
}

.tweet-action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #536471;
}

.tweet-action-item svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tweet-action-like {
  color: #536471;
}

.tweet-action-like svg {
  fill: #f91880;
}

.tweet-reply-banner {
  display: block;
  width: 100%;
  border: 1px solid #cfd9de;
  border-radius: 9999px;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #1d9bf0;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.tweet-reply-banner:hover {
  background-color: rgba(29, 155, 240, 0.08);
}

@media (prefers-color-scheme: dark) {
  .tweet-card {
    background-color: #000000;
    border-color: #333333;
    color: #e7e9ea;
  }
  .tweet-display-name {
    color: #e7e9ea;
  }
  .tweet-body {
    color: #e7e9ea;
  }
  .tweet-x-logo svg {
    fill: #e7e9ea;
  }
  .tweet-meta {
    border-color: #2f3336;
    color: #71767b;
  }
  .tweet-actions {
    color: #71767b;
  }
  .tweet-action-item {
    color: #71767b;
  }
  .tweet-reply-banner {
    border-color: #536471;
    color: #1d9bf0;
  }
}
