/* =========================================================
   Base & Reset
========================================================= */
:root {
    /* 高級感のあるダークテーマの色設定 */
    --bg-color: #0f172a;
    /* 深いネイビーブルー */
    --text-color: #f8fafc;
    /* 真っ白ではない、落ち着いた白 */
    --accent-color: #38bdf8;
    /* アクセントの明るいブルー */
    --secondary-bg: #1e293b;
    /* コンテンツ背景 */
    --font-main: 'Noto Sans JP', sans-serif;
    --font-heading: 'Playfair Display', serif;
    /* 見出し用のおしゃれな英字フォント */
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   Hamburger Menu (常に画面右上に固定)
========================================================= */
.hamburger {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    /* 全てのものより上に表示 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.4s ease;
    transform-origin: left center;
}

/* ハンバーガーが「✕」になるアニメーション */
.hamburger.open .bar:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger.open .bar:nth-child(2) {
    opacity: 0;
    /* 真ん中の線を消す */
}

.hamburger.open .bar:nth-child(3) {
    transform: rotate(-45deg);
}

/* =========================================================
   Overlay Menu (ボタンを押すと出てくる全画面メニュー)
========================================================= */
.overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    /* 背景を少しぼかす効果(すりガラス風) */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    z-index: 999;
}

.overlay-menu.active {
    opacity: 1;
    visibility: visible;
}

.menu-list {
    list-style: none;
    text-align: center;
}

.menu-list li {
    margin: 30px 0;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.overlay-menu.active .menu-list li {
    transform: translateY(0);
    opacity: 1;
}

.overlay-menu.active .menu-list li:nth-child(1) {
    transition-delay: 0.2s;
}

.overlay-menu.active .menu-list li:nth-child(2) {
    transition-delay: 0.3s;
}

.menu-list a {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding: 10px;
}

/* リンクの下に線が引かれるアニメーション */
.menu-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-list a:hover::after {
    width: 100%;
}

/* =========================================================
   Hero Section (TOPの最初の画面)
========================================================= */
.hero {
    height: 100vh;
    /* 画面いっぱいの高さ */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-logo {
    width: 250px;
    max-width: 80%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--accent-color);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
    opacity: 0.7;
}

/* スクロールを促す縦揺れアニメーション */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-15px) translateX(-50%);
    }

    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}

/* =========================================================
   Common Main Layout
========================================================= */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    margin: 20px auto 0;
}

/* =========================================================
   Profile Section (Home)
========================================================= */
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

@media (min-width: 768px) {
    .profile-content {
        flex-direction: row;
        justify-content: center;
    }
}

.profile-image-wrapper {
    flex-shrink: 0;
}

.profile-image {
    width: 4cm;
    height: 4cm;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.4s ease;
    display: block;
}

.profile-image:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(56, 189, 248, 0.25), 0 0 20px rgba(56, 189, 248, 0.15);
    border-color: var(--accent-color);
}

.profile-info {
    max-width: 500px;
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #e2e8f0;
}

.profile-info p {
    color: #cbd5e1;
}

/* =========================================================
   Page Header (Career)
========================================================= */
.page-header {
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: 2px;
}

/* =========================================================
   Timeline (Career) - タイムライン風の職歴
========================================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 中央の線 */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .timeline-item {
        justify-content: space-between;
    }

    .timeline-item:nth-child(even) {
        flex-direction: row-reverse;
    }
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    z-index: 10;
}

@media (min-width: 768px) {
    .timeline-dot {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-content {
    width: calc(100% - 60px);
    background: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

@media (min-width: 768px) {
    .timeline-content {
        width: calc(50% - 40px);
    }
}

.timeline-date {
    display: inline-block;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fff;
}

/* =========================================================
   Skills Section
========================================================= */
.skills-section {
    margin-top: 100px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent-color);
    color: #0f172a;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* =========================================================
   Animations (ふわっと出てくるアニメーション)
========================================================= */
/* =========================================================
   Interactive Particle Background
   ========================================================= */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: transparent;
}

/* =========================================================
   Scroll Reveal Animations
   ========================================================= */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-up.visible {
    animation: fadeInUp 1s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Company Section (Home)
========================================================= */
.company-section {
    margin-top: 100px;
}

.company-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 900px) {
    .company-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.company-card {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 40px 30px;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

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

.company-table th,
.company-table td {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    vertical-align: top;
}

.company-table th {
    width: 35%;
    font-weight: 500;
    color: #94a3b8;
}

.company-table td {
    width: 65%;
    color: #e2e8f0;
}

.company-table a {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.company-table a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

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

/* =========================================================
   Footer
========================================================= */
footer {
    text-align: center;
    padding: 40px 20px;
    background: #020617;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================================
   Biography & Activities (Career Page)
========================================================= */
.biography-section {
    margin-bottom: 60px;
}

.jp-title {
    font-family: var(--font-main);
    letter-spacing: 2px;
}

.en-title {
    font-family: var(--font-heading);
}

.bio-content p {
    margin-bottom: 25px;
    font-size: 1.05rem;
    color: #cbd5e1;
    line-height: 2.2;
    text-align: justify;
}

.activities-section {
    margin-bottom: 80px;
}

.activity-list {
    list-style: none;
    padding-left: 0;
}

.activity-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    color: #e2e8f0;
    line-height: 1.6;
}

.activity-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.activity-list a {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.activity-list a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.section-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 80px 0;
}