/* ============================================
   ポートフォリオサイト用スタイルシート
   e-colleague デザインシステム準拠
   ============================================ */

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

:root {
    --bg-color: #ffffff;
    --container-bg: #ffffff;
    --text-color: #1f2937;
    --border-color: #e2e8f0;
    --toc-bg: #f1f5f9;
    --muted-text: #64748b;
    --accent-color: #4a4a4a;
    --gray-bg: #F5F5F7;
    --apple-blue: #0071e3;
    --card-shadow: 0 4px 24px rgba(0,0,0,0.06);
    --radius: 20px;
    --max-width: 1024px;
}

body {
    font-family: 'M PLUS 1p', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    font-weight: 400;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* ===== 共通ブランドヘッダー ===== */
.site-header {
    width: 100%;
    background-color: var(--container-bg);
    border-bottom: 3px solid var(--accent-color);
    z-index: 1000;
    position: relative;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #0f172a;
    text-decoration: none;
}

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

/* ハンバーガーボタン */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* 全幅ナビメニュー */
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--container-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin: 0;
    list-style: none;
    z-index: 999;
}

.nav-menu.show {
    display: block;
}

.nav-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-menu li {
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.2rem 0;
    display: inline-block;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.nav-menu a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.nav-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.75rem 0;
}

/* ===== 目次ナビ ===== */
.product-nav {
    width: 100%;
    height: 52px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    margin: 0;
    border-radius: 0;
}

.product-nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-logo {
    font-weight: 500;
    color: var(--text-color);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.product-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.product-links a {
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--muted-text);
    transition: color 0.2s;
}

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

.btn-cta {
    background-color: var(--apple-blue);
    color: #fff !important;
    padding: 5px 16px;
    border-radius: 980px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-cta:hover {
    background-color: #005bb5;
}

/* ===== メインコンテンツ ===== */
.main-content {
    padding: 0;
    margin: 0;
    border: none;
}

/* ===== ヒーロー ===== */
.hero {
    padding: 120px 1.5rem 100px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: var(--gray-bg);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-text);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #0f172a;
    border-left: none;
    padding-left: 0;
}

.hero-copy {
    font-size: 1.4rem;
    color: var(--muted-text);
    margin-bottom: 36px;
    font-weight: 400;
}

/* ===== セクション共通 ===== */
.section-ec {
    padding: 100px 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-ec-gray {
    background-color: var(--gray-bg);
    max-width: 100%;
    padding: 100px 1.5rem;
}

.section-ec-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--apple-blue);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--muted-text);
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 40px;
}

.main-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: none;
    color: #1d1d1f;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin-bottom: 1rem;
}

/* ===== タイムライン ===== */
.timeline {
    margin: 2rem 0 1rem;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -2.45rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--container-bg);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}

.timeline-year {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--accent-color);
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

/* ===== Apple風 交互レイアウト ===== */
.feature-row {
    display: flex;
    align-items: center;
    gap: 80px;
    width: 100%;
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-row:last-of-type {
    border-bottom: none;
}

.feature-row-reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-title {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: #0f172a;
}

.feature-desc {
    font-size: 1.05rem;
    color: var(--muted-text);
    line-height: 1.8;
    margin-bottom: 16px;
}

.feature-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-screenshot {
    max-width: 320px;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.08));
}

/* ===== レコードリスト ===== */
.record-item {
    padding: 1.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.record-item:first-of-type {
    padding-top: 0;
}

.record-item:last-of-type {
    border-bottom: none;
}

.record-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.3rem;
}

.record-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #0f172a;
}

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

.status-badge {
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    padding: 0.1rem 0.5rem;
    color: var(--muted-text);
    display: inline-block;
    margin-left: 0.5rem;
}

.award-badge {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding-left: 0.6rem;
    border-left: 3px solid var(--accent-color);
    color: var(--accent-color);
}

.github-link {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.8rem;
    font-family: monospace;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

.github-link:hover {
    background: #eef2ff;
    text-decoration: underline;
}

.mail-link {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-color);
}

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

.contact-block {
    background: var(--toc-bg);
    padding: 1.8rem;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

/* ===== フッター ===== */
.main-footer-ec {
    margin-top: 0;
    padding: 40px 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted-text);
    border-top: 1px solid var(--border-color);
    background: var(--gray-bg);
}

.sns-links-ec {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sns-links-ec a {
    color: var(--muted-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.sns-links-ec a:hover {
    color: #1d1d1f;
}

/* ===== フェードイン ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 角丸ゼロ統一 */
.site-header,
.main-content,
.product-nav,
.contact-block {
    border-radius: 0 !important;
}

/* ===== モバイル ===== */
@media (max-width: 768px) {
    .hero {
        padding: 80px 1.2rem 60px;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .hero-copy {
        font-size: 1.1rem;
    }
    .main-content h2 {
        font-size: 2rem;
    }
    .section-ec,
    .section-ec-gray {
        padding: 60px 1.2rem;
    }
    .feature-row,
    .feature-row-reverse {
        flex-direction: column;
        gap: 24px;
        padding: 40px 0;
        text-align: center;
    }
    .feature-title {
        font-size: 1.8rem;
    }
    .feature-screenshot {
        max-width: 240px;
        margin: 0 auto;
    }
    .product-links a:not(.btn-cta) {
        display: none;
    }
    .timeline {
        padding-left: 1.5rem;
    }
    .timeline-item::before {
        left: -1.95rem;
    }
}