/* ==========================================================================
   woodworklab - CSS STYLESHEET
   ========================================================================== */

/* 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

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

html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   ローディング画面
   ========================================================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-size: 24px;
    font-weight: 100;
    letter-spacing: 3px;
    opacity: 0;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ==========================================================================
   カスタムカーソル
   ========================================================================== */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    transform: scale(2);
    background-color: #333;
}

/* ==========================================================================
   パーティクル用キャンバス
   ========================================================================== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

/* ==========================================================================
   プログレスバー
   ========================================================================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #333, #666);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
header {
    padding: 40px 0;
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

header.hidden {
    transform: translateY(-100%);
}

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

.logo {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    letter-spacing: 4px;
}

/* ナビゲーション */
nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

nav a:hover {
    transform: translateY(-2px);
}

nav a::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

nav a:hover::before {
    transform: translateY(0);
}

nav a span {
    display: inline-block;
    transition: transform 0.3s ease;
}

nav a:hover span {
    transform: translateY(100%);
}

/* ==========================================================================
   メインコンテンツ
   ========================================================================== */
main {
    padding-top: 120px;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   ヒーローセクション
   ========================================================================== */
.hero {
    padding: 120px 0;
    text-align: center;
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    animation: fadeInImage 2s ease 0.5s forwards;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.85) 0%, 
        rgba(255, 255, 255, 0.75) 50%, 
        rgba(255, 255, 255, 0.85) 100%
    );
    z-index: 2;
}

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

.hero-content {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
    position: relative;
    z-index: 4;
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-size: 48px;
    font-weight: 100;
    letter-spacing: 3px;
    margin-bottom: 20px;
    line-height: 1.2;
    cursor: default;
    color: #333;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.hero h1 .line {
    display: block;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100px);
    animation: slideUp 1s ease forwards;
}

.hero h1 .line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero h1 .line::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    transition: transform 0.6s ease;
    opacity: 0.7;
}

.hero h1:hover .line::before {
    transform: translateY(0);
}

.hero h1 .line span {
    display: inline-block;
    transition: transform 0.6s ease;
}

.hero h1:hover .line span {
    transform: translateY(100%);
}

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

@keyframes fadeInImage {
    to { 
        opacity: 1; 
    }
}

.hero p {
    font-size: 16px;
    font-weight: 300;
    color: #555;
    letter-spacing: 1px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
    text-shadow: 0 1px 5px rgba(255, 255, 255, 0.8);
}

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

.typing-effect {
    border-right: 2px solid #333;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #333; }
}

/* スクロールインジケーター */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background-color: #ddd;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
    z-index: 5;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #333;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(30px); opacity: 0; }
}

/* ==========================================================================
   ニュースセクション
   ========================================================================== */
.news {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    position: relative;
}

.news-grid {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 60px;
}

.news-item {
    padding: 30px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-date {
    display: inline-block;
    color: #8B4513;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.news-title {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #333;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: #8B4513;
}

.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.news-link {
    display: inline-flex;
    align-items: center;
    color: #8B4513;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.news-link:hover {
    color: #654321;
    transform: translateX(5px);
}

.news-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.news-link:hover::after {
    transform: translateX(3px);
}

.news-more {
    text-align: center;
    margin-top: 40px;
}

.news-more-link {
    display: inline-block;
    padding: 15px 40px;
    border: 2px solid #8B4513;
    color: #8B4513;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 30px;
    transition: all 0.3s ease;
    background: transparent;
}

.news-more-link:hover {
    background: #8B4513;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

/* ==========================================================================
   作品セクション
   ========================================================================== */
.works {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 100;
    letter-spacing: 2px;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-bottom: 80px;
}

.work-item {
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
    cursor: pointer;
    position: relative;
}

.work-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.work-item:hover {
    transform: translateY(-10px);
}

.work-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.work-image-container {
    width: 100%;
    height: 250px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.work-item:hover .work-image-container {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-item:hover .work-image {
    transform: scale(1.05);
}

.work-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f8f8, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 14px;
    letter-spacing: 1px;
    position: relative;
}

.work-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
    z-index: 2;
}

.work-item:hover .work-image-container::before {
    left: 100%;
}

.work-title {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.work-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    color: #666;
}

.work-item:hover .work-title::before {
    transform: translateX(0);
}

.work-title span {
    display: inline-block;
    transition: transform 0.4s ease;
}

.work-item:hover .work-title span {
    transform: translateX(100%);
}

.work-description {
    font-size: 14px;
    color: #666;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.work-item:hover .work-description {
    color: #333;
}

/* ==========================================================================
   アバウトセクション
   ========================================================================== */
.about {
    padding: 100px 0;
    background: linear-gradient(135deg, #fafafa, #f0f0f0);
    position: relative;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about-content p.visible {
    opacity: 1;
    transform: translateY(0);
}

/* スキルセクション */
.skills {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.skill-item {
    padding: 15px 30px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.skill-item.visible {
    opacity: 1;
    transform: scale(1);
}

.skill-item:hover {
    background-color: #333;
    color: #fff;
    transform: scale(1.1);
    text-decoration: none;
}

/* ==========================================================================
   コンタクトセクション
   ========================================================================== */
.contact {
    padding: 100px 0;
    position: relative;
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
}

.contact-item {
    font-size: 14px;
    color: #666;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.contact-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-item a {
    color: #333;
    text-decoration: none;
    position: relative;
    display: inline-block;
    overflow: hidden;
    cursor: pointer;
}

.contact-item a::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.contact-item a:hover::before {
    transform: translateY(0);
}

.contact-item a span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.contact-item a:hover span {
    transform: translateY(100%);
}

/* ==========================================================================
   フッター
   ========================================================================== */
footer {
    padding: 60px 0;
    border-top: 1px solid #eee;
    text-align: center;
    position: relative;
}

footer p {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
}

/* ==========================================================================
   モバイルメニュー
   ========================================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* ==========================================================================
   レスポンシブデザイン
   ========================================================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 30px;
    }

    nav ul {
        gap: 20px;
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .hero {
        padding: 80px 0;
    }

    .hero-bg-image {
        object-position: center center;
    }

    .hero-overlay {
        background: linear-gradient(
            135deg, 
            rgba(255, 255, 255, 0.9) 0%, 
            rgba(255, 255, 255, 0.8) 50%, 
            rgba(255, 255, 255, 0.9) 100%
        );
    }

    .news, .works, .about, .contact {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 60px;
    }

    .news-grid {
        padding: 0 20px;
    }
    
    .news-item {
        padding: 20px 0;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        flex-direction: column;
        gap: 20px;
    }

    .skills {
        gap: 20px;
    }

    .custom-cursor {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
    }

    nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid #eee;
        padding: 20px;
    }

    nav.active ul {
        flex-direction: column;
        gap: 20px;
    }

    .header-content {
        position: relative;
    }
}

/* 教員写真の比率変更 */
.teacher-photo {
    aspect-ratio: 3/6;
    height: auto;
}