/*
Theme Name: Agemon
Theme URI: https://agemon.club
Author: agemon
Author URI: https://agemon.club
Description: AI開発と山仕事の記録。ミニマルで読みやすいオリジナルテーマ。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: agemon
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
*/

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
  /* Colors */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-code-bg: #f8f9fa;
  --color-code-text: #e83e8c;

  /* Category Colors */
  --color-cat-ai: #2563eb;
  --color-cat-mountain: #16a34a;
  --color-cat-misc: #9333ea;

  /* Typography */
  --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --line-height: 1.8;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --content-width: 720px;
  --site-width: 1200px;
  --sidebar-width: 320px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

/* Dark Mode removed - light mode only */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ========================================
   Layout
   ======================================== */
.site-container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.site-content {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-2xl);
  padding: var(--space-2xl) 0;
}

.main-content {
  min-width: 0;
}

@media (max-width: 900px) {
  .site-content {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Header
   ======================================== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding a {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.site-branding a:hover {
  color: var(--color-accent);
}

.site-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: var(--space-lg);
}

.main-navigation a {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Mobile nav toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
  margin-left: auto;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 600px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
  }

  .main-navigation.is-open ul {
    display: flex;
  }
}

/* ========================================
   Cards (Top Page)
   ======================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.post-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card__thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-border-light);
  position: relative;
}

.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card__thumbnail img {
  transform: scale(1.05);
}

.post-card__link {
  display: block;
  color: inherit;
}

.post-card__link:hover {
  color: inherit;
}

.post-card__no-image {
  width: 100%;
  height: 100%;
  background: var(--color-border-light);
}

.post-card__body {
  padding: var(--space-md);
}

.post-card__category {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  color: #fff;
  background: var(--color-accent);
  z-index: 1;
}

.post-card__category--ai-dev { background: var(--color-cat-ai); }
.post-card__category--mountain-work { background: var(--color-cat-mountain); }
.post-card__category--misc { background: var(--color-cat-misc); }

.post-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
}

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

.post-card__title a:hover {
  color: var(--color-accent);
}

.post-card__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ========================================
   Single Post
   ======================================== */
.single-post__header {
  margin-bottom: var(--space-2xl);
}

.single-post__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
  background: var(--color-accent);
  margin-bottom: var(--space-md);
}

.single-post__title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

@media (max-width: 600px) {
  .single-post__title {
    font-size: var(--font-size-2xl);
  }
}

.single-post__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  display: flex;
  justify-content: flex-end;
}

.single-post__thumbnail {
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.single-post__thumbnail img {
  width: 100%;
}

/* ========================================
   Post Content (article body)
   ======================================== */
.post-content {
  font-size: var(--font-size-lg);
  line-height: var(--line-height);
}

.post-content h2 {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  border: none;
}

.post-content h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
  border-left: 4px solid var(--color-accent);
  color: var(--color-accent);
}

.post-content p {
  margin-bottom: var(--space-lg);
}

.post-content ul, .post-content ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.post-content li {
  margin-bottom: var(--space-sm);
}

.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--color-border-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.post-content img {
  border-radius: var(--radius);
  margin: var(--space-lg) 0;
}

.post-content a:has(img):not(.kanren a),
.aflbnr a {
  display: inline-block;
  border: none;
  outline: none;
  box-shadow: none;
  background: none;
  color: inherit;
  text-decoration: none;
}

.post-content a img,
.aflbnr img {
  border: none;
  outline: none;
  box-shadow: none;
}

.aflbnr {
  margin: var(--space-lg) 0;
  text-align: center;
}

/* Code blocks */
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-content pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: var(--space-lg) 0;
  line-height: 1.5;
}

.post-content pre code {
  background: none;
  color: var(--color-text);
  padding: 0;
  font-size: 0.875rem;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: var(--font-size-sm);
}

.post-content th, .post-content td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  text-align: left;
}

.post-content th {
  background: var(--color-border-light);
  font-weight: 600;
}

/* ========================================
   Table of Contents
   ======================================== */
.toc {
  background: var(--color-border-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.toc__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.toc > ol {
  list-style: none;
  padding: 0;
  counter-reset: toc-circle;
}

.toc > ol > li {
  counter-increment: toc-circle;
  margin-bottom: var(--space-xs);
}

.toc > ol > li::before {
  content: counter(toc-circle, decimal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  margin-right: var(--space-sm);
  vertical-align: middle;
}

.toc a {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.toc a:hover {
  color: var(--color-accent);
}

.toc ol ol {
  list-style: none;
  padding-left: calc(1em + var(--space-sm));
  margin-top: var(--space-xs);
  counter-reset: none;
}

.toc ol ol li {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
}

.toc ol ol li::before {
  content: "・";
  color: var(--color-text-muted);
  margin-right: 2px;
  flex-shrink: 0;
}

/* ========================================
   SNS Share
   ======================================== */
.share-buttons {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-2xl) 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.share-buttons__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  margin-right: var(--space-sm);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #fff;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.85;
  color: #fff;
}

.share-btn--x { background: #000; }
.share-btn--hatena { background: #00a4de; }

/* ========================================
   Shortcodes
   ======================================== */

/* Voice (吹き出し) */
.voice {
  display: flex;
  gap: var(--space-md);
  margin: 1.5em 0;
  font-size: 0.95em;
}

.voice.r {
  flex-direction: row-reverse;
}

.voice__icon {
  flex-shrink: 0;
  width: 60px;
  text-align: center;
}

.voice__icon img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  object-fit: cover;
  margin: 0;
}

.voice__name {
  font-size: 0.65em;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
}

.voice__comment {
  background: var(--color-border-light);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  position: relative;
  max-width: 80%;
}

.voice.l .voice__comment::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 14px;
  border-right: 7px solid var(--color-border-light);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.voice.l .voice__comment::after {
  content: none;
}

.voice.r .voice__comment::before {
  content: '';
  position: absolute;
  right: -7px;
  top: 14px;
  border-left: 7px solid var(--color-border-light);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.voice.r .voice__comment::after {
  content: none;
}

.voice__comment p {
  margin-bottom: 0.5em;
}

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

/* FB風 */
.voice.fb .voice__comment {
  background: #4C5CB0;
  border-color: #4C5CB0;
  color: #fff;
}
.voice.l.fb .voice__comment::before { border-right-color: #4C5CB0; }
.voice.l.fb .voice__comment::after { content: none; }
.voice.r.fb .voice__comment::before { border-left-color: #4C5CB0; }
.voice.r.fb .voice__comment::after { content: none; }

/* LINE風 */
.voice.line .voice__comment {
  background: #7ACC40;
  border-color: #7ACC40;
  color: #fff;
}
.voice.l.line .voice__comment::before { border-right-color: #7ACC40; }
.voice.l.line .voice__comment::after { content: none; }
.voice.r.line .voice__comment::before { border-left-color: #7ACC40; }
.voice.r.line .voice__comment::after { content: none; }

/* Kanren (関連記事) */
.kanren {
  margin: 1.2em 0;
}

.kanren a,
.post-content .kanren a {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md);
  background: #f0f1f3;
  border: none;
  border-radius: var(--radius);
  color: var(--color-text);
  transition: background 0.2s;
}

.kanren a:hover {
  background: #e6e8eb;
}

.kanren__thumb {
  flex-shrink: 0;
  width: 140px;
}

.kanren__thumb img {
  width: 140px;
  height: auto;
  border-radius: var(--radius);
  margin: 0;
  display: block;
}

.kanren__label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.kanren__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kanren__title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

.kanren__excerpt {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 4px 0 0;
}

/* Aside (補足・注意) */
.aside-box {
  padding: var(--space-md) var(--space-lg);
  margin: 1.5em 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 100, 0.05);
  font-size: 0.94em;
}

.aside-box.warning {
  background: rgba(255, 50, 50, 0.08);
  border-color: rgba(255, 100, 100, 0.3);
}

.aside-box.boader,
.aside-box.border {
  background: none;
}

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

/* Box (カラーボックス) */
.c-box {
  padding: var(--space-md) var(--space-lg);
  margin: 1.5em 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
}

.c-box--titled {
  padding-top: 0;
}

.c-box__title span {
  display: inline-block;
  position: relative;
  top: -0.85em;
  padding: 0.1em 0.6em;
  background: #6d6d6d;
  color: #fff;
  font-weight: 600;
  font-size: 0.85em;
  border-radius: 3px;
}

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

.c-box.pink_box { background: rgba(255, 150, 150, 0.08); border-color: rgba(247, 178, 178, 0.5); }
.c-box.pink_box .c-box__title span { background: #f7b2b2; }

.c-box.glay_box { background: rgba(200, 200, 200, 0.08); border-color: rgba(156, 156, 156, 0.4); }
.c-box.glay_box .c-box__title span { background: #9c9c9c; }

.c-box.blue_box { background: rgba(100, 180, 255, 0.08); border-color: rgba(130, 200, 226, 0.5); }
.c-box.blue_box .c-box__title span { background: #82c8e2; }

.c-box.red_box { background: rgba(255, 100, 100, 0.08); border-color: rgba(231, 115, 115, 0.5); }
.c-box.red_box .c-box__title span { background: #e77373; }

.c-box.yellow_box { background: rgba(255, 230, 100, 0.08); border-color: rgba(222, 214, 71, 0.5); }
.c-box.yellow_box .c-box__title span { background: #ded647; }

.c-box.green_box { background: rgba(100, 220, 100, 0.08); border-color: rgba(121, 227, 124, 0.5); }
.c-box.green_box .c-box__title span { background: #79e37c; }

.c-box.black_box { background: rgba(50, 50, 50, 0.3); border-color: rgba(117, 117, 117, 0.5); }
.c-box.black_box .c-box__title span { background: #757575; }

/* Buttons */
.btn-wrap {
  text-align: center;
  margin: 1.5em 0;
}

.btn-wrap a {
  display: inline-block;
  padding: 0.8em 2em;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95em;
  transition: opacity 0.2s;
}

.btn-wrap a:hover {
  opacity: 0.85;
  color: #fff;
}

.btn-wrap--big a {
  font-size: 1.1em;
  padding: 1em 2.5em;
  min-width: 280px;
}

.btn-wrap.lightning a { background: #C81C1C; }
.btn-wrap.lightning a:hover { background: #EC7373; }

.btn-wrap.rich_yellow a { background: #f7cf2e; box-shadow: 0 3px 0 #ecb254; }
.btn-wrap.rich_pink a { background: #ee5656; box-shadow: 0 3px 0 #d34e4e; }
.btn-wrap.rich_orange a { background: #ef9b2f; box-shadow: 0 3px 0 #cc8c23; }
.btn-wrap.rich_green a { background: #39cd75; box-shadow: 0 3px 0 #1eae59; }
.btn-wrap.rich_blue a { background: #19b4ce; box-shadow: 0 3px 0 #07889d; }

.btn-wrap.maru a { border-radius: 2em; }

.btn-wrap.anim a {
  animation: btn-jiggle 3s ease-in infinite;
}

@keyframes btn-jiggle {
  48%, 62% { transform: scale(1) }
  50% { transform: scale(1.1, 0.9) }
  56% { transform: scale(0.9, 1.1) translateY(-5px) }
  59% { transform: scale(1) translateY(-3px) }
}

/* Grid layout */
.col-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 1em 0;
}

.col-half {
  flex: 1 1 calc(50% - var(--space-md));
  min-width: 200px;
}

.col-third {
  flex: 1 1 calc(33.333% - var(--space-md));
  min-width: 150px;
}

/* Accordion */
.accordion {
  margin: 1em 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
}

.accordion__check {
  display: none;
}

.accordion__label {
  display: block;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  margin: 0;
}

.accordion__label::after {
  content: "+";
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  transition: transform 0.3s;
}

.accordion__check:checked + .accordion__label::after {
  transform: translateY(-50%) rotate(45deg);
}

.accordion__content {
  height: 0;
  opacity: 0;
  padding: 0 var(--space-lg);
  overflow: hidden;
  transition: all 0.3s;
}

.accordion__check:checked + .accordion__label + .accordion__content {
  height: auto;
  opacity: 1;
  padding: var(--space-md) var(--space-lg);
}

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

/* CTA */
.cta-inner {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: 2em 0;
  text-align: center;
}

.cta__title {
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.btn-wrap--cta a {
  background: #C81C1C;
  padding: 1em 2.5em;
  font-size: 1.1em;
}

/* border-dashed */
.border-dashed {
  border: 2px dashed var(--color-border);
  padding: var(--space-md) var(--space-lg);
  margin: 1.5em 0;
  border-radius: var(--radius);
}

/* Post movie */
.post-movie {
  margin: var(--space-lg) 0;
}

.post-movie iframe,
.ggmap iframe {
  max-width: 100%;
  border-radius: var(--radius);
}

@media (max-width: 600px) {
  .voice__icon { width: 50px; }
  .voice__icon img { width: 50px; height: 50px; }
  .voice__comment { max-width: 75%; }
  .kanren__thumb { width: 80px; }
  .btn-wrap--big a { min-width: auto; padding: 0.8em 1.5em; font-size: 0.95em; }
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.widget__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-border);
}

/* Profile widget */
.profile-widget {
  text-align: center;
}

.profile-widget__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  background: var(--color-border-light);
  overflow: hidden;
}

.profile-widget__name {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.profile-widget__bio {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.profile-widget__social {
  margin-top: var(--space-md);
}

.profile-widget__x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-surface);
  transition: opacity 0.2s;
}

.profile-widget__x-link:hover {
  color: var(--color-surface);
  opacity: 0.6;
}

/* Category widget */
.category-list {
  list-style: none;
}

.category-list li {
  margin-bottom: var(--space-sm);
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  padding: var(--space-xs) 0;
}

.category-list a:hover {
  color: var(--color-accent);
}

.category-list .count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-border-light);
  padding: 1px 8px;
  border-radius: 10px;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.pagination .current {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ========================================
   Archive Header
   ======================================== */
.archive-header {
  margin-bottom: var(--space-2xl);
}

.archive-header__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
}

.archive-header__description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
}

/* ========================================
   404
   ======================================== */
.error-404 {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.error-404__title {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
}

.error-404__text {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
}

/* ========================================
   Search
   ======================================== */
.search-form {
  display: flex;
  gap: var(--space-sm);
}

.search-form input[type="search"] {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  background: var(--color-surface);
  color: var(--color-text);
}

.search-form button {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.search-form button:hover {
  background: var(--color-accent-hover);
}

/* ========================================
   Utility
   ======================================== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
