/*
Theme Name: My Portfolio
Theme URI:
Author: Portfolio Author
Description: シンプルなポートフォリオテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: my-portfolio
*/

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

body {
    font-family: 'Inter', system-ui, -apple-system, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #e2e8f0;
    background: #071510;
    background-image:
        radial-gradient(ellipse 80% 50% at 10% 0%,   rgba(16, 185, 129, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(5,  150, 105, 0.10) 0%, transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
}

a {
    color: #34d399;
    text-decoration: none;
}

a:hover {
    color: #6ee7b7;
    text-decoration: none;
}

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

/* ===== Page Layout ===== */
.page-wrapper {
    display: block;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #040e0b 0%, #061210 100%);
    border-right: 1px solid rgba(16, 185, 129, 0.12);
    color: #64748b;
    overflow: hidden;
    overflow-y: auto;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.is-collapsed {
    transform: translateX(-260px);
}

.sidebar-inner {
    width: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.sidebar-logo {
    padding: 28px 24px 24px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    flex-shrink: 0;
}

.sidebar-logo a {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo a:hover {
    text-decoration: none;
}

/* ===== Sidebar Navigation ===== */
.sidebar-nav {
    padding: 12px 0 16px;
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav ul li a {
    display: block;
    padding: 9px 12px 9px 20px;
    margin: 1px 10px;
    border-radius: 8px;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.sidebar-nav ul li a:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    text-decoration: none;
}

.sidebar-nav ul li.current-menu-item > a,
.sidebar-nav ul li.current_page_item > a {
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    border-left: none;
    padding-left: 20px;
}

/* ===== Sidebar Standard Menu ===== */
.sidebar-section {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section-label {
    padding: 10px 24px 5px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.35);
}

.sidebar-std-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-std-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 9px 20px;
    margin: 1px 10px;
    border-radius: 8px;
    color: #475569;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-std-menu li a:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    text-decoration: none;
}

.sidebar-std-menu li.current_page_item > a {
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    border-left: none;
    padding-left: 20px;
}

.sidebar-menu-icon {
    font-size: 0.35rem;
    color: rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.sidebar-count {
    margin-left: auto;
    font-size: 0.68rem;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    padding: 1px 7px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 600;
}

/* ===== Page Content Wrapper ===== */
.page-content-wrapper {
    margin-left: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar:not(.is-collapsed) ~ .page-content-wrapper {
    margin-left: 260px;
}

/* ===== Header ===== */
.site-header {
    background: rgba(5, 20, 14, 0.75);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-title a {
    color: #475569;
    transition: color 0.15s;
}

.site-title a:hover {
    text-decoration: none;
    color: #94a3b8;
}

/* ===== Hamburger Button ===== */
.sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 1.5px;
    background: #64748b;
    border-radius: 2px;
    transition: background 0.15s;
}

.sidebar-toggle:hover .hamburger-bar {
    background: #6ee7b7;
}

/* ===== Main Content ===== */
.site-main {
    flex: 1;
    padding: 40px 40px 40px;
}

/* ポートフォリオページは padding なし（円筒が viewport を占有） */
/* ※ overflow: hidden は絶対に設定しない → position: sticky が壊れる */
.site-main.is-portfolio {
    padding: 0;
}

/* ===== Cylinder Portfolio ===== */
.cyl-stage {
    position: relative;
}

/* ── 背景：光の縦線アニメーション ── */
/* z-index: 0 かつ DOM 順序が .cyl-scene より前
   → flex スタック規則で .cyl-scene（z-index:auto = 0, 後続）が上になりシーン全体の裏に回る */
.cyl-bg-streaks {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 各ストリーク：vh 単位で確実にコンテナを通過させる */
.cyl-streak {
    position: absolute;
    bottom: -20vh;    /* コンテナ底辺より 20vh 下からスタート */
    width: 2px;
    height: 18vh;
    border-radius: 2px;
    background: linear-gradient(to top,
        transparent 0%,
        rgba(139, 92, 246, 0.4) 20%,
        rgba(167, 139, 250, 0.9) 50%,
        rgba(196, 181, 253, 0.6) 75%,
        transparent 100%);
    animation: streakRise linear infinite;
}

/* bottom:-20vh から上へ (20vh + コンテナ高さ ≈ 90vh + streak高さ 18vh) = 128vh 移動すれば確実に上端を超える */
@keyframes streakRise {
    from { transform: translateY(0); }
    to   { transform: translateY(-130vh); }
}

/*
 * 各ストリーク水平位置：N(μ=50%, σ=22%) の30等分位点を使用
 * left = 50 + 22 * Φ⁻¹((2k−1)/60)  (k=1..30)
 * opacity / width もベル曲線に沿って中央ほど高く・太くする
 */
/* k=1  z≈-2.13  left≈ 3% */ .cyl-streak:nth-child(1)  { left:  3%; animation-duration:5.2s; animation-delay:-1.2s; opacity:0.30; width:1px; height:15vh; }
/* k=2  z≈-1.64  left≈14% */ .cyl-streak:nth-child(2)  { left: 14%; animation-duration:3.8s; animation-delay:-2.9s; opacity:0.38; width:1px; height:18vh; }
/* k=3  z≈-1.38  left≈20% */ .cyl-streak:nth-child(3)  { left: 20%; animation-duration:6.5s; animation-delay:-5.1s; opacity:0.42; width:1px; height:16vh; }
/* k=4  z≈-1.19  left≈24% */ .cyl-streak:nth-child(4)  { left: 24%; animation-duration:4.4s; animation-delay:-0.7s; opacity:0.46; width:1px; height:19vh; }
/* k=5  z≈-1.04  left≈27% */ .cyl-streak:nth-child(5)  { left: 27%; animation-duration:3.6s; animation-delay:-3.4s; opacity:0.50; width:1px; height:20vh; }
/* k=6  z≈-0.90  left≈30% */ .cyl-streak:nth-child(6)  { left: 30%; animation-duration:5.9s; animation-delay:-1.8s; opacity:0.54; width:1px; height:21vh; }
/* k=7  z≈-0.76  left≈33% */ .cyl-streak:nth-child(7)  { left: 33%; animation-duration:4.1s; animation-delay:-4.6s; opacity:0.58; width:2px; height:20vh; }
/* k=8  z≈-0.67  left≈35% */ .cyl-streak:nth-child(8)  { left: 35%; animation-duration:3.3s; animation-delay:-0.5s; opacity:0.62; width:1px; height:22vh; }
/* k=9  z≈-0.57  left≈37% */ .cyl-streak:nth-child(9)  { left: 37%; animation-duration:6.2s; animation-delay:-5.7s; opacity:0.65; width:2px; height:21vh; }
/* k=10 z≈-0.48  left≈40% */ .cyl-streak:nth-child(10) { left: 40%; animation-duration:4.7s; animation-delay:-2.3s; opacity:0.68; width:2px; height:24vh; }
/* k=11 z≈-0.39  left≈41% */ .cyl-streak:nth-child(11) { left: 41%; animation-duration:3.5s; animation-delay:-1.0s; opacity:0.71; width:2px; height:22vh; }
/* k=12 z≈-0.30  left≈43% */ .cyl-streak:nth-child(12) { left: 43%; animation-duration:5.4s; animation-delay:-3.9s; opacity:0.75; width:2px; height:25vh; }
/* k=13 z≈-0.21  left≈45% */ .cyl-streak:nth-child(13) { left: 45%; animation-duration:4.0s; animation-delay:-0.3s; opacity:0.78; width:2px; height:23vh; }
/* k=14 z≈-0.13  left≈47% */ .cyl-streak:nth-child(14) { left: 47%; animation-duration:3.2s; animation-delay:-2.6s; opacity:0.82; width:2px; height:27vh; }
/* k=15 z≈-0.04  left≈49% */ .cyl-streak:nth-child(15) { left: 49%; animation-duration:6.8s; animation-delay:-6.2s; opacity:0.85; width:2px; height:26vh; }
/* k=16 z≈+0.04  left≈51% */ .cyl-streak:nth-child(16) { left: 51%; animation-duration:4.3s; animation-delay:-1.5s; opacity:0.85; width:2px; height:26vh; }
/* k=17 z≈+0.13  left≈53% */ .cyl-streak:nth-child(17) { left: 53%; animation-duration:3.7s; animation-delay:-4.1s; opacity:0.82; width:2px; height:27vh; }
/* k=18 z≈+0.21  left≈55% */ .cyl-streak:nth-child(18) { left: 55%; animation-duration:5.6s; animation-delay:-2.0s; opacity:0.78; width:2px; height:23vh; }
/* k=19 z≈+0.30  left≈57% */ .cyl-streak:nth-child(19) { left: 57%; animation-duration:4.9s; animation-delay:-0.9s; opacity:0.75; width:2px; height:25vh; }
/* k=20 z≈+0.39  left≈59% */ .cyl-streak:nth-child(20) { left: 59%; animation-duration:3.4s; animation-delay:-5.3s; opacity:0.71; width:2px; height:22vh; }
/* k=21 z≈+0.48  left≈61% */ .cyl-streak:nth-child(21) { left: 61%; animation-duration:6.1s; animation-delay:-3.0s; opacity:0.68; width:2px; height:24vh; }
/* k=22 z≈+0.57  left≈63% */ .cyl-streak:nth-child(22) { left: 63%; animation-duration:4.6s; animation-delay:-1.7s; opacity:0.65; width:2px; height:21vh; }
/* k=23 z≈+0.67  left≈65% */ .cyl-streak:nth-child(23) { left: 65%; animation-duration:3.9s; animation-delay:-4.8s; opacity:0.62; width:1px; height:22vh; }
/* k=24 z≈+0.76  left≈67% */ .cyl-streak:nth-child(24) { left: 67%; animation-duration:5.3s; animation-delay:-0.4s; opacity:0.58; width:2px; height:20vh; }
/* k=25 z≈+0.90  left≈70% */ .cyl-streak:nth-child(25) { left: 70%; animation-duration:4.2s; animation-delay:-2.5s; opacity:0.54; width:1px; height:21vh; }
/* k=26 z≈+1.04  left≈73% */ .cyl-streak:nth-child(26) { left: 73%; animation-duration:6.4s; animation-delay:-5.9s; opacity:0.50; width:1px; height:19vh; }
/* k=27 z≈+1.19  left≈76% */ .cyl-streak:nth-child(27) { left: 76%; animation-duration:3.6s; animation-delay:-1.3s; opacity:0.46; width:1px; height:16vh; }
/* k=28 z≈+1.38  left≈80% */ .cyl-streak:nth-child(28) { left: 80%; animation-duration:5.0s; animation-delay:-3.7s; opacity:0.42; width:1px; height:19vh; }
/* k=29 z≈+1.64  left≈86% */ .cyl-streak:nth-child(29) { left: 86%; animation-duration:4.5s; animation-delay:-6.4s; opacity:0.38; width:1px; height:18vh; }
/* k=30 z≈+2.13  left≈97% */ .cyl-streak:nth-child(30) { left: 97%; animation-duration:7.2s; animation-delay:-2.1s; opacity:0.30; width:1px; height:15vh; }

/* sticky wrap：ヘッダー直下に固定（高さ・top は JS が設定） */
/* ※ overflow: hidden は設定しない → preserve-3d の子がクリップされる＋sticky に影響 */
.cyl-sticky-wrap {
    position: sticky;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 3D シーンコンテナ（perspective は JS が設定） */
/* ※ opacity を絶対に設定しない → opacity < 1 は stacking context を生成し preserve-3d を平坦化する */
.cyl-scene {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* フェードインカバー：.cyl-scene の兄弟として配置し、3D 祖先チェーンに入れない */
.cyl-cover {
    position: absolute;
    inset: 0;
    background: #071510;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.5s;
    pointer-events: none;
}
.cyl-stage.is-ready .cyl-cover {
    opacity: 0;
    pointer-events: none;
}

/* 円筒（width・height・transform は JS が設定） */
/* ※ opacity / filter / will-change は preserve-3d を平坦化するので禁止 */
.cylinder {
    position: relative;
    transform-style: preserve-3d;
}

/* ── 二重螺旋：奥側ゴーストサムネイル ── */
/* backface-visibility: visible で裏から見えるようにする（デフォルトは hidden） */
.cyl-ghost {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    border-radius: 14px;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    pointer-events: none;
    border: 1px solid rgba(16, 185, 129, 0.12);
    opacity: 0.5;
}

.cyl-ghost-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* ブラー＋暗化で「奥にある別ストランド」らしく演出 */
    filter: blur(3px) brightness(0.28) saturate(0.5);
}

.cyl-ghost-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(10, 36, 24, 0.45) 0%,
        rgba(15, 61, 38, 0.30) 100%);
}

/* ── 円筒フェイス ── */
.cyl-face {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: rgb(7, 18, 13); /* 完全不透明 → ストリークをフェイスの裏に隠す */
    border: 1px solid rgba(16, 185, 129, 0.12);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    opacity: 0.35;
    transition: opacity 0.4s, box-shadow 0.4s, border-color 0.4s;
    pointer-events: none;
}

.cyl-face.is-active {
    opacity: 1;
    pointer-events: auto;
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow:
        0 0 60px rgba(16, 185, 129, 0.18),
        0 32px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(52, 211, 153, 0.15);
}

/* サムネイル */
.cyl-face-thumb {
    flex-shrink: 0;
    height: 56%;
    overflow: hidden;
    background: #081a13;
}

.cyl-face-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.4s;
}

.cyl-face.is-active .cyl-face-thumb img {
    opacity: 1;
    transform: scale(1.02);
}

/* テキストエリア */
.cyl-face-body {
    flex: 1;
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg, rgba(7,18,13,0.0) 0%, rgba(7,18,13,0.98) 8%);
    overflow: hidden;
}

.cyl-face-date {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #10b981;
}

.cyl-face-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.38;
    color: #f1f5f9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cyl-face-excerpt {
    font-size: 0.78rem;
    line-height: 1.65;
    color: #64748b;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cyl-face-btn {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    pointer-events: none;  /* 常に none → is-active で上書き */
    opacity: 0;
}

.cyl-face.is-active .cyl-face-btn {
    pointer-events: auto;
    opacity: 1;
    transition: box-shadow 0.2s, transform 0.2s, opacity 0.4s 0.1s;
}

.cyl-face-btn:hover {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

/* ── 選択フレーム ── */
.cyl-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 22px;
    pointer-events: none;
    box-shadow:
        inset 0 0 40px rgba(16, 185, 129, 0.04),
        0 0 30px rgba(16, 185, 129, 0.06);
}

/* ── HUD ── */
.cyl-hud {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.cyl-hud-index {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(148, 163, 184, 0.5);
}

/* ── スクロールヒント ── */
.cyl-hint {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(16, 185, 129, 0.55);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.5s;
}

.cyl-hint.is-hidden {
    opacity: 0;
}

/* スクロールトラック（高さは JS が設定） */
.cyl-scroll-track {
    width: 100%;
}

/* ===== Post Card ===== */
.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.post-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.18);
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.18);
}

/* サムネイル */
.post-thumbnail-link {
    display: block;
}

.post-thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0e1f16;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
    opacity: 0.85;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
    opacity: 1;
}

/* サムネイルなし時のプレースホルダー */
.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a2418 0%, #0f3d26 100%);
}

.post-thumbnail-placeholder span {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
}

/* カード本体 */
.post-card-body {
    padding: 14px 16px 16px;
}

.post-card .entry-title {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 5px;
}

.post-card .entry-title a {
    color: #e2e8f0;
}

.post-card .entry-title a:hover {
    color: #6ee7b7;
    text-decoration: none;
}

.entry-meta {
    font-size: 0.72rem;
    color: #334155;
}

/* ===== Single Post ===== */
.single-main {
    padding: 0 0 80px;
}

.single-article {
    max-width: 780px;
    margin: 0 auto;
}


/* コンテンツ本体 */
.single-content-wrap {
    padding: 36px 48px 0;
}

/* カテゴリバッジ */
.single-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.single-cat-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.22);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.single-cat-badge:hover {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
    text-decoration: none;
}

/* ヘッダー */
.entry-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.entry-header .entry-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #f1f5f9;
    margin-bottom: 14px;
}

.entry-meta {
    font-size: 0.78rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-meta-sep {
    color: #334155;
}

.entry-meta a {
    color: #475569;
}

.entry-meta a:hover {
    color: #34d399;
}

/* 本文 */
.entry-content {
    line-height: 1.95;
    color: #94a3b8;
}

.entry-content h2 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 2.2em 0 0.8em;
    color: #e2e8f0;
    padding-left: 14px;
    border-left: 3px solid #10b981;
}

.entry-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.8em 0 0.6em;
    color: #e2e8f0;
}

.entry-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.5em 0 0.5em;
    color: #cbd5e1;
}

.entry-content p  { margin-bottom: 1.4em; }

.entry-content a {
    color: #34d399;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: #6ee7b7;
}

.entry-content ul,
.entry-content ol { margin: 0 0 1.4em 1.5em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-content blockquote {
    margin: 1.8em 0;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid rgba(16, 185, 129, 0.4);
    border-radius: 0 8px 8px 0;
    color: #64748b;
    font-style: italic;
}

.entry-content img {
    border-radius: 10px;
    margin: 1.4em 0;
}

.entry-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 2.4em 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.4em;
    font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
}

.entry-content th {
    background: rgba(16, 185, 129, 0.08);
    color: #cbd5e1;
    font-weight: 700;
}

.entry-content pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    margin-bottom: 1.4em;
    font-size: 0.88rem;
    line-height: 1.7;
}

.entry-content code {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
}

.entry-content pre code {
    background: none;
    color: #94a3b8;
    padding: 0;
}

/* 前後記事ナビ */
.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 60px;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.post-nav-item:hover {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
    text-decoration: none;
}

.post-nav-next {
    text-align: right;
}

.post-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #34d399;
}

.post-nav-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Static Page ===== */
.page-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

/* ===== Post Modal (<dialog> — iframe) ===== */
dialog.post-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    border: none;
    border-radius: 16px;
    padding: 0;
    width: min(960px, 96vw);
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(16, 185, 129, 0.12);
    animation: modalSlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #fff;
}
dialog.post-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    animation: modalFadeIn 0.2s ease;
}
.post-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ツールバー（閉じるボタン + 別タブリンク） */
.post-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    gap: 12px;
}
.post-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.15s;
}
.post-modal-close:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.post-modal-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #10b981;
    padding: 5px 12px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}
.post-modal-link:hover {
    background: rgba(16, 185, 129, 0.08);
    text-decoration: none;
    color: #059669;
}

/* iframe コンテナ */
.post-modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.post-modal-iframe {
    flex: 1;
    width: 100%;
    border: none;
    min-height: 0;
}

/* ===== Footer ===== */
.site-footer {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 20px 40px;
    font-size: 0.8rem;
    color: #1e293b;
    flex-shrink: 0;
}

/* ===== No Posts ===== */
.no-results {
    text-align: center;
    padding: 80px 0;
    color: #334155;
}

/* ===== Pagination ===== */
.pagination {
    margin-top: 40px;
    display: flex;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    font-size: 0.875rem;
    color: #475569;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.15s;
}

.pagination a:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    text-decoration: none;
}

.pagination .current {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    color: #fff;
}

/* ===== Sidebar Overlay (mobile) ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 199;
}

/* ===== Tablet (768px – 1023px) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar,
    .sidebar-inner {
        width: 220px;
    }
    .sidebar.is-collapsed {
        transform: translateX(-220px);
    }
    .sidebar:not(.is-collapsed) ~ .page-content-wrapper {
        margin-left: 220px;
    }
    .site-main {
        padding: 0 24px 32px;
    }
    .site-footer {
        padding: 16px 24px;
    }
}

/* ===== Mobile (〜767px) ===== */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    /* Sidebar: overlay drawer (always off-screen, slides in on toggle) */
    .sidebar {
        z-index: 300;
        /* is-collapsed がデフォルト状態になるので transform は JS で付与 */
    }
    .sidebar-overlay.is-visible {
        display: block;
    }

    /* Content: always full width on mobile */
    .page-content-wrapper {
        margin-left: 0 !important;
        transition: none;
    }

    /* Header */
    .site-header {
        padding: 10px 16px;
    }

    /* Main content */
    .site-main {
        padding: 0 14px 24px;
    }

    /* Cylinder portfolio — adjust frame gutter */
    .cyl-face-body {
        padding: 14px 16px 16px;
        gap: 6px;
    }

    .cyl-face-title {
        font-size: 0.9rem;
    }

    /* Single post / page */
    .single-content-wrap {
        padding: 24px 18px 0;
    }
    .page-content {
        padding: 24px 18px;
        border-radius: 10px;
        max-width: 100%;
    }
    .single-post-nav {
        grid-template-columns: 1fr;
    }
    .post-nav-next {
        text-align: left;
    }

    /* Modal */
    dialog.post-modal {
        width: 100vw;
        height: 100svh;
        border-radius: 0;
        max-width: 100vw;
    }

    /* Footer */
    .site-footer {
        padding: 14px 16px;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }
}

/* ===== Front Page ===== */

/* Floating thumbnail background */
.float-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.front-page-main {
    position: relative;
    z-index: 1;
    padding-bottom: 80px;
}

.hero {
    min-height: calc(100svh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}

.hero-inner {
    max-width: 640px;
}

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #34d399;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #e2e8f0;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn--primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.4);
}

.hero-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.55);
}

/* Recent posts (front page) */
.recent-posts {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.recent-post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recent-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-thumb-link img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 18px 20px;
}

.card-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.card-title a {
    color: #e2e8f0;
    text-decoration: none;
}

.card-title a:hover {
    color: #34d399;
}

.card-excerpt {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* ===== Blog Index (index.php) ===== */
.blog-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.archive-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 36px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.post-list-item {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post-list-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.post-list-thumb {
    flex-shrink: 0;
}

.post-list-thumb img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
}

.post-list-body {
    padding: 18px 20px 18px 0;
    flex: 1;
}

.post-list-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 6px;
}

.post-list-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-list-title a {
    color: #e2e8f0;
    text-decoration: none;
}

.post-list-title a:hover {
    color: #34d399;
}

.post-list-excerpt {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.6;
}

.nav-links {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    justify-content: center;
}

.nav-links a {
    color: #34d399;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.nav-links a:hover {
    color: #6ee7b7;
}

/* ===== Page Transition ===== */
.transition-overlay {
    position: fixed;
    inset: 0;
    background: #071510;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.55s ease;
}

/* 退場：コンテンツが奥に吸い込まれる */
.page-content-wrapper.pt-exiting {
    transform-origin: center center;
    animation: ptExit 0.52s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}

@keyframes ptExit {
    0%   { opacity: 1;   filter: blur(0);     transform: scale(1);    }
    60%  { opacity: 0.6; filter: blur(2px);   transform: scale(1.06); }
    100% { opacity: 0;   filter: blur(10px);  transform: scale(1.16); }
}

/* 登場：ポートフォリオが深みから浮かび上がる */
/* fill-mode: backwards のみ使用（forwards/both は禁止）
   → 終了後に transform が残ると position:sticky + preserve-3d が壊れる */
.page-content-wrapper.pt-entering {
    transform-origin: center center;
    animation: ptEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

@keyframes ptEnter {
    0%   { opacity: 0;   filter: blur(14px); transform: scale(0.88); }
    40%  { opacity: 0.6; filter: blur(4px);  transform: scale(0.96); }
    100% { opacity: 1;   filter: none;       transform: none;        }
}

/* ===== About Me (front page) ===== */
.about-section {
    max-width: 900px;
    margin: 64px auto 0;
    padding: 0 24px;
}

.about-inner {
    display: flex;
    align-items: center;
    gap: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 20px;
    padding: 40px 48px;
}

.about-avatar-wrap {
    flex-shrink: 0;
}

.about-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.about-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #10b981;
    margin-bottom: 8px;
}

.about-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 14px;
    line-height: 1.2;
}

.about-bio {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #94a3b8;
}

@media (max-width: 767px) {
    .hero {
        min-height: auto;
        padding: 48px 20px 56px;
    }

    .about-inner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 24px;
    }

    .blog-main {
        padding: 24px 16px 60px;
    }

    .post-list-item {
        flex-direction: column;
    }

    .post-list-thumb img {
        width: 100%;
        height: 160px;
    }

    .post-list-body {
        padding: 14px 16px 16px;
    }
}
