
:root {
    --main-red: #db1e1e;
    --bg-cream: #fdf6e3;
    --text-dark: #444;
    --accent-orange: #f0caa6;
    --accent-orange-hover: #ffe4cc; 
    --icon-color: #e58f67;
}

@font-face {
    font-family: 'BokuFont';
    src: url('../fonts/Boku2-Bold.otf');
}
@font-face {
    font-family: 'YDW'; 
    src: url('../fonts/YDWbananaslipplus.otf'); 
}
@font-face {
    font-family: 'SenobiGothic'; 
    src: url('../fonts/Senobi-Gothic-Regular.ttf') format('truetype'); 
}

/* === Base == */
body {
    font-family: 'YDW', 'BokuFont', "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark); 
    line-height: 1.7; 
    padding: 20px;
}

a, h1, h2, h3, .toggle-trigger {
    color: var(--main-red);
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

.card {
    background-color: #fff;
    border: 2px solid var(--main-red);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 5px 5px 0px var(--accent-orange);
}

/* リンクボタン */
.profile-link,
.url-link,
a[href^="http"] { 
    display: inline-block;       
    padding: 5px 15px;           
    margin: 5px 0;               
    border: 2px solid var(--main-red);   
    border-radius: 50px;         
    background-color: #fff;      
    color: var(--main-red);              
    font-weight: bold;
    text-decoration: none;       
    transition: all 0.3s ease;   
    box-shadow: 2px 2px 0px rgba(239, 175, 123, 0.4); 
}

.profile-link:hover,
.url-link:hover,
a[href^="http"]:hover {
    background-color: var(--main-red);   
    color: #fff;                 
    transform: translateY(-2px); 
    box-shadow: 4px 4px 0px rgba(239, 175, 123, 0.8); 
}




/* === ヘッダー === */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px auto;
    background-color: #fff;
    border: 2px solid var(--main-red);
    border-radius: 50px;
    width: fit-content;
    min-width: 300px;
    padding: 10px 40px;
    box-shadow: 5px 5px 0px var(--accent-orange);
    position: relative;
    z-index: 10;
}

.header h1 {
    font-family: 'YDW', 'SenobiGothic', 'BokuFont', cursive, sans-serif;
    font-size: 2.5em;
    margin: 0;
    color: var(--main-red);
}


/* ==== プロフィール＆スキル ==== */
.top-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.profile-table-card { 
    flex: 3; 
} 

.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* プロフィール表 */
.profile-table-wrapper {
    border: 2px solid var(--main-red); 
    border-radius: 20px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 5px 5px 0px var(--accent-orange); 
}

.profile-table {
    width: 100%;
    border-collapse: collapse; 
}

.profile-table th,
.profile-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--main-red);
}

.profile-table tr:last-child th,
.profile-table tr:last-child td {
    border-bottom: none;
}

.profile-table th {
    width: 120px;
    background-color: var(--accent-orange);
    color: var(--main-red);
    font-weight: bold;
    border-right: 1px solid var(--main-red);
}

.theme-en {
    display: block; 
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;      
    line-height: 1.3;     
}

/* アイコン */
.illustration-card {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 0; 
}

.illustration img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
}

/* スキルリスト */
.skills-card { 
    min-width: 200px;
    flex-grow: 0; 
    margin-bottom: 0;
}

.skills-card h3 {
    margin-top: 0;      
    margin-bottom: 5px; 
}

.skills-list {
    list-style: none;
    padding: 0;
    margin-top: 0;
}

.skills-list i {
    font-size: 1.2em; 
    margin-right: 5px; 
    vertical-align: middle;
    color: var(--icon-color) !important;
}

/* 改行防止設定 */
.csp-skill {
    white-space: nowrap;
}


/* =====Timeline===== */
.timeline-container {
    position: relative;
    padding-left: 50px;
    margin-left: 10px;
    font-family: 'SenobiGothic', 'YDW', 'BokuFont', sans-serif;
    padding-bottom: 40px;
}

/* 縦線 */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 20px; 
    top: 10px;
    bottom: 60px;
    width: 3px;
    background-color: var(--main-red);
}

.timeline-container::after {
    content: '';
    position: absolute;
    left: 20px;   
    bottom: 10px; 
    width: 3px;   
    height: 50px; 
    background-image: linear-gradient(to bottom, var(--main-red) 50%, transparent 50%);
    background-size: 3px 10px; 
    background-repeat: repeat-y;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

/* 年号 */
.timeline-item::before {
    content: attr(data-year);
    position: absolute;
    left: -30px;
    transform: translateX(-50%);
    top: 2px;
    background-color: #ffffff; 
    padding: 0 5px;
    color: var(--main-red);
    font-size: 1.3em;
    font-weight: bold;
    width: max-content;
}

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

/* トグルボタン */
.timeline-item .toggle-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;       
    border: 2px solid var(--main-red);    
    border-radius: 8px;           
    padding: 5px 15px;           
    margin-bottom: 10px;          
    margin-left: 15px;
    cursor: pointer;
    user-select: none;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--main-red);               
    text-decoration: none;        
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.timeline-item .toggle-trigger:hover {
    background-color: var(--accent-orange-hover);    
    transform: translateY(-2px);  
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1); 
}

.timeline-item .toggle-trigger.active {
    background-color: var(--main-red);
    color: #fff;
}

.timeline-item .toggle-trigger::after {
    content: '\f067'; /* ＋ */            
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900;             
    font-size: 0.9em;             
    margin-left: 10px;
    color: var(--main-red);               
    transition: transform 0.3s;   
}

.timeline-item .toggle-trigger.active::after {
    content: '\f068';    /* - */         
    color: #fff;
}

.timeline-item .toggle-content {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-left: 15px;
}

.toggle-content::after {
  content: "";
  display: block;
  clear: both;
}


/* ========================================= */

/* 画像とテキストの横並び */
.content-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.content-row.right-img {
  flex-direction: row-reverse;
}

.content-img {
  width: 30%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

/* 画像横並び用 */
.image-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.image-row .project-image {
    width: 30%;
    object-fit: contain;
    margin: 0;
    max-width: none; /* 親のmax-width指定を解除 */
    border-radius: 5px;
}

/* 単体画像のスタイル */
.project-image {
    display: block;
    margin: 10px auto;
    border-radius: 5px;
    width: 100%;
    max-width: 600px;
    height: auto;
}


/* ==== 背景アニメーション ===== */
.bg-lines-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-line {
    position: absolute;
    background-color: var(--main-red);
    opacity: 0.15;
}

@keyframes growV {
    0%   { height: 0; }
    100% { height: 100vh; } 
}
@keyframes growH {
    0%   { width: 0; }
    100% { width: 100vw; } 
}

.v-line {
    width: 2.5px;
    height: 0; 
    animation: growV 2.0s ease-out forwards;
}
.h-line {
    height: 2.5px;
    width: 0; 
    animation: growH 2.0s ease-out forwards;
}

.from-top    { top: 0; }
.from-bottom { bottom: 0; }
.from-left   { left: 0; }
.from-right  { right: 0; }

/* アニメーション遅延設定 (L-1〜L-16) */
.v-line.L-1 { left: 120px; animation-delay: 0s; }
.h-line.L-1 { top:  120px; animation-delay: 0.5s; }
.v-line.L-2 { left: 240px; animation-delay: 0.2s; }
.h-line.L-2 { top:  240px; animation-delay: 0.1s; }
.v-line.L-3 { left: 360px; animation-delay: 0.4s; }
.h-line.L-3 { top:  360px; animation-delay: 0.3s; }
.v-line.L-4 { left: 480px; animation-delay: 0.1s; }
.h-line.L-4 { top:  480px; animation-delay: 0.6s; }
.v-line.L-5 { left: 600px; animation-delay: 0.5s; }
.h-line.L-5 { top:  600px; animation-delay: 0.2s; }
.v-line.L-6 { left: 720px; animation-delay: 0.3s; }
.h-line.L-6 { top:  720px; animation-delay: 0.4s; }
.v-line.L-7 { left: 840px; animation-delay: 0.2s; }
.h-line.L-7 { top:  840px; animation-delay: 0.1s; }
.v-line.L-8 { left: 960px; animation-delay: 0.6s; }
.h-line.L-8 { top:  960px; animation-delay: 0.3s; }
.v-line.L-9 { left: 1080px; animation-delay: 0.1s; }
.h-line.L-9 { top:  1080px; animation-delay: 0.5s; }
.v-line.L-10 { left: 1200px; animation-delay: 0.4s; }
.h-line.L-10 { top:  1200px; animation-delay: 0.2s; }
.v-line.L-11 { left: 1320px; animation-delay: 0.3s; }
.v-line.L-12 { left: 1440px; animation-delay: 0.5s; }
.v-line.L-13 { left: 1560px; animation-delay: 0.2s; }
.v-line.L-14 { left: 1680px; animation-delay: 0.4s; }
.v-line.L-15 { left: 1800px; animation-delay: 0.1s; }
.v-line.L-16 { left: 1920px; animation-delay: 0.6s; }


/* ===== SP ===== */
@media screen and (max-width: 768px) {
    /* トップセクションの並び替え */
    .top-section {
        flex-direction: column-reverse;
    }
    .profile-table-card,
    .right-column {
        width: 100%;
        flex: auto; 
    }

    /* 画像とテキストの横並び解除 */
    .content-row,
    .content-row.right-img {
        flex-direction: column;
        align-items: flex-start;
    }
  
    .content-img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 15px;
    }

    /* 画像横並びコンテナの解除 */
    .image-row {
        flex-direction: column;
        align-items: center;
    }
    .image-row .project-image {
        height: auto;
        width: 100%;
        max-width: 300px;
    }
}

/* スマホでの文字サイズ調整（CSPなど） */
@media screen and (max-width: 480px) {
    .csp-skill {
        font-size: 0.85em;
    }
}