@charset "utf-8";

/* パフォーマンス最適化 */
html {
    font-display: swap;
}

/* プリロード用のクリティカルリソース */
.preload-hidden {
    visibility: hidden;
}

/* ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* html {
    scroll-behavior: smooth; JavaScriptでカスタム制御するためコメントアウト
} */

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.logo a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #007acc;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-item a:hover {
    color: #007acc;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #007acc;
    transition: width 0.3s ease;
}

.nav-item a:hover::after,
.nav-item a.active::after {
    width: 100%;
}

.nav-item a.active {
    color: #007acc;
}

/* ヒーローセクション */
.hero {
    padding: 150px 0 120px;
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%),
        url('../asset/images/pexels-bertellifotografia-16027810.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 3;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 3;
}

.hero-description {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.7;
    animation: fadeInUp 1s ease-out 0.4s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

/* セクション共通スタイル */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: #f8f9fa;
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #007acc;
}

/* Aboutセクション */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-content p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* About - イントロセクション */
.about-intro {
    text-align: center;
    margin-bottom: 60px;
}

.about-subtitle {
    font-size: 28px;
    font-weight: bold;
    color: #007acc;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.about-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.about-description {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* About - フィーチャードプロジェクト */
.featured-project {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.featured-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.project-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
}

.project-name {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-overview {
    font-size: 16px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
}

/* 技術スタック */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.tech-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* CTAボタン */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translate(2px, -2px);
}

/* プロジェクトビジュアル */
.project-visual {
    position: relative;
}

.app-screenshot {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

.app-screenshot:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    transition: all 0.5s ease;
}

.screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: 15px;
}

.app-screenshot:hover .screenshot-overlay {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

.app-screenshot:hover .screenshot-img {
    filter: brightness(1.1) contrast(1.05);
}

@keyframes shimmer {
    0% {
        background: linear-gradient(
            45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%
        );
        transform: translateX(-100%);
    }
    100% {
        background: linear-gradient(
            45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 70%
        );
        transform: translateX(100%);
    }
}

/* ズームヒント */
.zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.app-screenshot:hover .zoom-hint {
    opacity: 1;
}

.app-screenshot {
    cursor: pointer;
}

/* 画像モーダル */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    color: #ccc;
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

/* About - ビジョンセクション */
.vision-section {
    margin-bottom: 60px;
}

.vision-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.vision-card {
    background: white;
    padding: 30px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.vision-card:hover::before {
    transform: scaleX(1);
}

.vision-icon {
    font-size: 48px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.vision-card h4 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.vision-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

/* About - 次のステップセクション */
.next-steps {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.next-steps::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

.next-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.next-description {
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Skillsセクション */
.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-alt .skill-category {
    background-color: white;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.skill-category-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #007acc;
}

.skill-category p {
    font-size: 16px;
    line-height: 1.6;
}

/* Projectsセクション */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.project-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.project-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #666;
}

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

.tech-tag {
    background-color: #007acc;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Contactセクション */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 18px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-method {
    padding: 25px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-alt .contact-method {
    background-color: white;
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.contact-method h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #007acc;
}

.contact-method p {
    font-size: 16px;
    color: #666;
    word-break: break-all;
}

.contact-method a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.contact-method a:hover {
    color: #007acc;
    transform: translateY(-1px);
}

.contact-method a:active {
    color: #005c99;
    transform: translateY(0);
}

/* フッター */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
}

.footer p {
    font-size: 14px;
    opacity: 0.8;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スクロールアニメーション */
.fade-out {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* アクセシビリティ改善 */
/* スキップリンク */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* フォーカス表示の改善 */
a:focus,
button:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .hero {
        background: 
            linear-gradient(135deg, rgba(0, 0, 128, 0.9) 0%, rgba(75, 0, 130, 0.9) 100%),
            url('../asset/images/pexels-bertellifotografia-16027810.jpg');
        background-size: cover;
        background-position: center;
    }
    
    .tech-tag {
        background-color: #000080;
        border: 1px solid #fff;
    }
}

/* アニメーション無効化設定の尊重 */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-out {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブデザイン */
@media screen and (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-list {
        gap: 20px;
    }
    
    .hero {
        padding: 120px 0 80px;
        background-attachment: scroll; /* モバイルで視差効果を無効化 */
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    /* About セクション - タブレット対応 */
    .about-subtitle {
        font-size: 24px;
    }
    
    .featured-project {
        padding: 30px 20px;
        margin-bottom: 40px;
    }
    
    .project-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .project-name {
        font-size: 28px;
    }
    
    .app-screenshot {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .app-screenshot:hover {
        transform: scale(1.02);
    }
    
    .vision-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .vision-card {
        padding: 25px 20px;
    }
    
    .vision-icon {
        font-size: 40px;
    }
    
    .next-steps {
        padding: 30px 20px;
    }
    
    .next-title {
        font-size: 22px;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    /* About セクション - モバイル対応 */
    .about-subtitle {
        font-size: 20px;
    }
    
    .about-description {
        font-size: 16px;
    }
    
    .featured-project {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .project-name {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .project-overview {
        font-size: 15px;
    }
    
    .tech-stack {
        gap: 8px;
        margin-bottom: 25px;
    }
    
    .tech-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 40px;
    }
    
    .app-screenshot {
        max-width: 100%;
        border-radius: 10px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    .app-screenshot:hover {
        transform: scale(1.01);
    }
    
    .vision-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vision-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .vision-icon {
        font-size: 36px;
    }
    
    .vision-card h4 {
        font-size: 18px;
    }
    
    .vision-card p {
        font-size: 14px;
    }
    
    .next-steps {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .next-title {
        font-size: 20px;
    }
    
    .next-description {
        font-size: 15px;
    }
    
    .skill-category,
    .project-card,
    .contact-method {
        padding: 20px;
    }
}