/* リセット＆基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ナビゲーション */
nav {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: block;
    padding: 15px 25px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--bg-light);
}

/* メインコンテンツ */
main {
    padding: 40px 20px;
}

.section {
    margin-bottom: 60px;
}

.section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

/* コンテンツボックス */
.content-box {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* 統計グリッド */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* スキルグリッド */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.skill-category {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.skill-category ul {
    list-style: none;
    padding-left: 0;
}

.skill-category li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-light);
}

.skill-category li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 技術スタック */
.tech-stack {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
}

.tech-stack h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.tech-section {
    margin-bottom: 25px;
}

.tech-section h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tag-small {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

/* プロジェクトカード */
.project-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.project-card.highlighted {
    border-left-color: var(--warning-color);
    background: linear-gradient(to right, #fffbeb 0%, var(--bg-white) 10%);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 10px;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.period {
    background-color: var(--bg-light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.badge {
    background-color: var(--warning-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-details {
    color: var(--text-light);
}

.detail-item {
    margin-bottom: 20px;
}

.detail-item strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 8px;
}

.detail-item ul {
    padding-left: 20px;
    margin-top: 10px;
}

.detail-item li {
    margin-bottom: 8px;
}

.achievements {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

/* チャレンジボックス */
.challenge-box {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.challenge-box h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.challenge-box.success {
    border-left-color: var(--success-color);
    background-color: #f0fdf4;
}

.challenge-box ul {
    padding-left: 20px;
    margin-top: 10px;
}

.challenge-box li {
    margin-bottom: 8px;
}

/* 学歴・資格 */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.education-card {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.education-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item .year {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.timeline-item .school {
    color: var(--text-dark);
}

/* AWS構成図 */
.aws-architecture {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

.aws-architecture h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.architecture-diagram {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
}

.architecture-diagram img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.diagram-placeholder {
    color: var(--text-light);
    font-size: 1.1rem;
    font-style: italic;
}

.architecture-description {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.architecture-description h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.architecture-description h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-top: 20px;
    margin-bottom: 10px;
}

.architecture-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 資格 */
.certifications {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.certifications h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.cert-category {
    margin-bottom: 35px;
}

.cert-category h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--bg-light);
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.cert-item.professional {
    border-left: 4px solid #dc2626;
}

.cert-item.specialty {
    border-left: 4px solid #ea580c;
}

.cert-item.associate {
    border-left: 4px solid var(--primary-color);
}

.cert-item.foundational {
    border-left: 4px solid var(--success-color);
}

.cert-item.other {
    border-left: 4px solid var(--text-light);
}

.cert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cert-item strong {
    display: block;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.cert-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 3px;
}

/* 学習ボックス */
.learning-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 5px solid var(--primary-color);
}

.learning-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.learning-box h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* コンタクト */
.contact-box {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.contact-info {
    margin-top: 30px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* フッター */
footer {
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header .subtitle {
        font-size: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links a {
        padding: 12px 20px;
        border-bottom: 1px solid var(--border-color);
        border-left: none;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        border-bottom: 1px solid var(--primary-color);
        border-left: 3px solid var(--primary-color);
    }
    
    .section h2 {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .content-box {
        padding: 20px;
    }
    
    .contact-box {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 40px 0;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .tech-stack {
        padding: 20px;
    }
}