html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}
body {
    font-family: 'M PLUS Rounded 1c', sans-serif; /* 日本語はM PLUS Rounded 1c (ゴシック体) */
    background-color: #fcfafa; /* 非常に明るいオフホワイト */
    color: #2c2c2c; /* 濃いめのダークグレーのテキスト */
    position: relative; /* For background image z-index context */
    overflow-x: hidden; /* 横方向のスライドエフェクトでスクロールバーが出ないようにする */
}
/* Slab Serif for English text */
.font-slab-serif {
    font-family: 'Roboto Slab', serif;
}
/* Custom scrollbar for a cleaner look */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #e9e9e9;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #a0a0a0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #777;
}
/* Subtle fade-in animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-down { animation: fadeInDown 1s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 1s ease-out forwards; }

/* Parallax Image Divider Styles */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}
.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); /* 30% black overlay */
}

/* Portfolio Modal Styles */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.portfolio-modal.open {
    opacity: 1;
    visibility: visible;
}
.portfolio-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.portfolio-modal.open .portfolio-modal-content {
    transform: scale(1);
}
.portfolio-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    border: none;
    background: none;
}
.portfolio-modal-close:hover {
    color: #333;
}
#modal-img.clickable {
    cursor: zoom-in;
}
#image-viewer-modal {
    cursor: zoom-out;
}

/* Sticky Nav styles */
.sticky-nav-placeholder {
    height: 0 !important; /* Ensure placeholder has no height */
}
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* より不透明に */
    backdrop-filter: blur(8px); /* ぼかしを強める */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* 影をより薄く */
    z-index: 999; /* Above other content, below modals */
    transform: translateY(-100%); /* Start hidden above viewport */
    transition: transform 0.3s ease-out;
}
.sticky-nav.visible {
    transform: translateY(0); /* Slide into view */
}

/* Experience Section Timeline Styles */
.timeline-container {
    position: relative;
    padding-left: 3rem; /* 少し広げて確実にスペースを確保 */
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 1.5rem; /* padding-leftの約半分に調整 */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #6EE7B7; /* ライトグリーン */
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2.5rem; /* ドットがラインより右に来るように調整 */
}

.timeline-item:last-child {
    margin-bottom: 0; /* No bottom margin for the last item */
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1.15rem; /* ラインの中心 (1.5rem) からドットの半径 (6px = 0.375rem) を引いた位置 */
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background-color: #059669; /* ダークグリーン */
    border-radius: 50%;
    z-index: 2;
    border: 2px solid #f0fdf4; /* ドットのボーダー色 (bg-emerald-50に合わせる) */
}

/* Adjust the h3 and p inside timeline-item for alignment */
.timeline-item h3 {
    margin-bottom: 0.5rem; /* Reduce space after heading */
}
.timeline-item p {
    margin-bottom: 0; /* Remove bottom margin from paragraph */
}

/* Floating Objects (Adjusted for subtlety) */
.floating-object-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 50;
}

.floating-object {
    position: absolute;
    background-color: rgba(255, 253, 208, 0.4); /* 薄いレモン色、低めの透過度 */
    border-radius: 50%;
    filter: blur(5px);
    animation-duration: 25s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    opacity: 0;
}

/* Specific object sizes and positions */
.floating-object-1 { width: 80px; height: 80px; top: 10%; left: 5%; animation-name: float1; animation-delay: 0s; }
.floating-object-2 { width: 50px; height: 50px; top: 30%; right: 10%; animation-name: float2; animation-delay: 5s; }
.floating-object-3 { width: 100px; height: 100px; bottom: 15%; left: 20%; animation-name: float1; animation-delay: 10s; }
.floating-object-4 { width: 60px; height: 60px; top: 50%; left: 40%; animation-name: float2; animation-delay: 15s; }
.floating-object-5 { width: 70px; height: 70px; bottom: 5%; right: 25%; animation-name: float1; animation-delay: 20s; }

@keyframes float1 {
    0% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0; }
    25% { transform: translateY(-30px) translateX(15px) scale(1.05); opacity: 0.6; }
    50% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0.4; }
    75% { transform: translateY(30px) translateX(-15px) scale(0.95); opacity: 0.2; }
    100% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0; }
}

@keyframes float2 {
    0% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0; }
    25% { transform: translateY(30px) translateX(-15px) scale(0.95); opacity: 0.6; }
    50% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0.4; }
    75% { transform: translateY(-30px) translateX(15px) scale(1.05); opacity: 0.2; }
    100% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0; }
}

/* Scroll-triggered Animations */
.scroll-animate {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform; /* アニメーションのパフォーマンスを最適化 */
}
.scroll-animate.from-left {
    transform: translateX(-50px);
}
.scroll-animate.from-right {
    transform: translateX(50px);
}
.scroll-animate.fade-in {
    transform: translateY(20px); /* 少し下から浮かび上がるように */
}
.scroll-animate.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-menu.open {
    transform: translateX(0);
}

/* etc... Graphic Style */
#portfolio .container,
#partners .container {
    position: relative; /* etc...を配置する基準点にする */
    padding-bottom: 2.5rem; /* etc...のスペースを確保 */
}

.etc-graphic {
    position: absolute;
    bottom: 1.5rem; /* コンテナの下からの位置 */
    right: 1.5rem;  /* コンテナの右からの位置 */
    color: #d1d5db; /* 薄いグレー */
    font-family: 'Roboto Slab', serif;
    font-size: 1.75rem; /* 文字サイズ */
    pointer-events: none; /* マウスイベントを無効化 */
}