/* =========================================
   1. 基本設定 & 変数
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
    --primary-color: #4a90e2;    /* 鮮やかな青 */
    --secondary-color: #f7b731;  /* アクセントの黄/オレンジ */
    --light-bg: #f5f7fa;         /* 薄いグレー */
    --dark-bg: #e3f2fd;          /* 薄い水色 */
    --text-color: #333;
    --card-bg: #ffffff;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--light-bg);
    scroll-behavior: smooth;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. ヘッダー (ナビゲーション)
   ========================================= */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.site-title:hover {
    transform: scale(1.05);
}

header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

header ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

header ul li a:hover {
    color: var(--secondary-color);
}

/* =========================================
   3. ヒーローセクション (カルーセル)
   ========================================= */
.carousel-container {
    position: relative;
    height: 60vh;
    width: 100%;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.8em;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero-subheading {
    font-size: 1.5em;
    font-weight: 300;
    opacity: 0.8;
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--secondary-color);
    border: 2px solid white;
}

/* =========================================
   4. セクション共通設定
   ========================================= */
section {
    padding: 80px 0;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-bg-light { background-color: var(--light-bg); }
.section-bg-dark { background-color: var(--dark-bg); }

/* =========================================
   5. カードデザイン (共通)
   ========================================= */
.profile-card, .career-item, .skill-item, .hobby-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 25px; /* カード間の余白 */
}

.profile-card:hover, .career-item:hover, .skill-item:hover, .hobby-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* =========================================
   6. 各セクション固有の調整
   ========================================= */

/* About */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* Career */
.career-item h3 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 1.4em;
}

.career-date {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: block;
}

.career-item a {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
    transition: opacity 0.3s;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-item h3 {
    color: var(--secondary-color);
    font-size: 1.5em;
    margin: 0 0 15px 0;
    text-align: center;
}

.skill-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-item ul li {
    background-color: var(--light-bg);
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 4px;
}

/* Works Button (Skillsセクションの下) */
.works-link-container {
    text-align: center;
    margin-top: 20px;
}

.works-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    padding: 12px 35px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.works-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px) scale(1.05);
}

/* Hobbies */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.hobby-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

/* Links */
.links-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.link-card {
    background-color: var(--card-bg);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.link-card:hover {
    transform: translateY(-5px);
    background-color: var(--dark-bg);
}

.link-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.link-card span {
    font-weight: 600;
    color: var(--primary-color);
}

/* =========================================
   7. フッター & アニメーション
   ========================================= */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hero-heading { font-size: 2.5em; }
    header .container { flex-direction: column; }
    header ul { margin-top: 15px; gap: 15px; }
}

/* Works セクション */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.work-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05); /* slightly visible border */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.works-image {
    width: 100%;
    height: 200px; /* fixed height for images */
    object-fit: cover;
    border-bottom: 3px solid var(--secondary-color);
}

.work-card .card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.work-card h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.4em;
    font-family: 'Montserrat', sans-serif;
}

.work-card p {
    margin: 0 0 25px 0;
    color: var(--text-color);
    flex-grow: 1;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s;
    font-size: 0.9em;
}

.card-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}