/* --- レイアウトの根幹 --- */
:root {
  --color-accent: #ff3333;
  --color-bg: #ffffff;
  --color-text-on-red: #ffffff;
  --color-text-primary: #1a1a1a;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
}

/* 上半分の赤いセクション */
.hero-top {
  background-color: var(--color-accent);
  height: 50vh; /* 画面の半分を赤に */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-text-on-red);
  position: relative;
}

/* 下半分の白いセクション */
.profile-bottom {
  background-color: var(--color-bg);
  min-height: 50vh;
  padding-top: 80px; /* 画像の半分が食い込むための余白 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- コンテンツ要素 --- */

/* メインタイトル：白抜きで大きく */
.hero-name {
  font-size: clamp(3rem, 10vw, 6rem); /* レスポンシブな巨大文字 */
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 1rem;
}

/* 境界線に配置するプロフィール画像 */
.avatar-overlap {
  position: absolute;
  bottom: -75px; /* 下半分に半分突き出す */
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 6px solid var(--color-bg); /* 白い縁取りで境界をはっきりさせる */
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  background-color: #fff;
}

/* 下半分のテキストエリア */
.profile-content {
  max-width: 800px;
  width: 90%;
  text-align: center;
}

.bio-text {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--color-text-primary);
  margin-bottom: 3rem;
  font-weight: 500;
}

/* ソーシャルボタン：赤のアクセント */
.social-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-social {
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-weight: bold;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-social:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* ナビゲーションを赤セクションの中に浮かせる */
.top-nav {
  position: absolute;
  top: 2rem;
  width: 100%;
}

.top-nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
}

.top-nav a {
  color: #fff;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  opacity: 0.8;
}

.top-nav a:hover { opacity: 1; }

/* 下層ページ専用のヘッダー（赤い帯） */
.page-header {
    background-color: var(--color-accent);
    color: #ffffff;
    padding: 6rem 0 3rem; /* ナビ分を考慮して上を広く */
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
}

/* 記事本文のエリア */
.site-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 20px;
}

/* リンク等のアクセント */
.site-main a {
    color: var(--color-accent);
    font-weight: bold;
    text-decoration: underline;
}

.site-main h2 {
    border-left: 8px solid var(--color-accent);
    padding-left: 1rem;
    margin-top: 3rem;
    font-size: 1.8rem;
}

/* Recent Posts Section */
.recent-posts {
    margin-top: 6rem;
    text-align: left; /* リストは左寄せが見やすい */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

/* タイトルの下に短い赤い線を引く */
.section-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 0.8rem auto 0;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-item {
    display: flex;
    align-items: baseline;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    gap: 1.5rem;
}

.post-date {
    font-family: 'Courier New', Courier, monospace; /* 日付を等幅に */
    font-size: 0.9rem;
    color: var(--color-accent); /* 日付にあなたの赤を */
    font-weight: bold;
    flex-shrink: 0;
}

.post-link {
    flex-grow: 1;
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* ホバー演出：背景をわずかにグレーにし、左端に赤いアクセント */
.post-item:hover {
    background-color: #f9f9f9;
    padding-left: 1.5rem; /* 左側に少しずれる */
    border-left: 4px solid var(--color-accent);
}

.post-item:hover .post-title {
    color: var(--color-accent);
}

.view-more {
    margin-top: 2.5rem;
    text-align: center;
}

.text-link {
    color: var(--color-text-secondary);
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.text-link:hover {
    color: var(--color-accent);
}

/* モバイル対応 */
@media (max-width: 600px) {
    .post-item {
        flex-direction: column;
        gap: 0.2rem;
    }
}

/* リストページ全体のコンテナ */
.list-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-item-full {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.post-category {
    background-color: var(--color-accent);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.post-title-list {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.post-title-list a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

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

.post-summary {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

/* ページネーションの簡易スタイル */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    list-style: none;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

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

/* ページネーションのスタイリング */
.pagination-wrapper {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    padding: 0;
}

.page-item .page-link {
    display: block;
    padding: 0.6rem 1rem;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 現在のページとホバー時：赤背景に白抜き */
.page-item.active .page-link,
.page-item .page-link:hover {
    background-color: var(--color-accent);
    color: #ffffff;
}

.post-header-meta {
    margin-bottom: 3rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.category-tag {
    margin-left: 1rem;
    color: var(--color-accent);
    font-weight: bold;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-footer-nav {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.back-to-list {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
}
/* Aboutページ 記事本文のスタイリング */
.content-article h2 {
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.4rem;
    display: inline-block;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.content-article h3 {
    margin-top: 2.5rem;
    color: var(--color-text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    border-left: 5px solid var(--color-accent);
    padding-left: 1rem;
}

/* 経歴・スキルリストの調整 */
.content-article ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
}

.content-article li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.7;
}

/* リストのドットを赤い四角形に */
.content-article li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
}

/* 強調マーカー */
.content-article strong {
    color: var(--color-text-primary);
    background: linear-gradient(transparent 70%, rgba(255, 51, 51, 0.15) 0%);
}

/* 水平線 */
.content-article hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 3rem 0;
}

/* フッターのセンター配置 */
.site-footer {
    padding: 4rem 0;
    background-color: #f9f9f9;
    border-top: 1px solid var(--color-border);
    text-align: center; /* テキストを中央寄せ */
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center; /* 子要素を中央に */
    gap: 1.5rem;
}

.copyright {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}