/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --secondary-color: #a78bfa;
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --bg-color: #111827;
    --bg-light: #1f2937;
    --card-bg: #1f2937;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    padding-top: 80px;
}

/* グローバルナビゲーション */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo a:hover {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-link:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px 10px;
    margin-left: 20px;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

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

/* セクション共通 */
.section {
    padding: 20px 0;
}

.section-alt {
    background: var(--bg-light);
    border-radius: 20px;
    margin: 40px 0;
    padding: 20px 40px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* ヒーローセクション */
.hero-section {
    width: 100%;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero-image-container {
    width: 100%;
    height: 60vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--card-bg) 100%);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 10s ease;
}

.hero-section:hover .hero-image {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    pointer-events: none;
}

.hero-content {
    width: 100%;
    background: var(--bg-color);
    padding: 40px 40px;
    position: relative;
}

.hero-text-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--text-color);
    letter-spacing: 0.05em;
    animation: fadeInUp 0.8s ease;
    font-family: 'Times New Roman', serif;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-divider {
    width: 80px;
    height: 2px;
    background: var(--primary-color);
    margin: 0 auto 30px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 50px;
    color: var(--text-light);
    line-height: 1.8;
    font-weight: 300;
    font-style: italic;
    animation: fadeInUp 0.8s ease 0.4s both;
}


/* 自己紹介セクション */
.about-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

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

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* スキルセクション */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 年表セクション */
.timeline-container {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    padding-left: 85px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 25px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -55px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 0 1.5px var(--primary-color);
}

.timeline-year {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 70px;
    text-align: right;
    line-height: 1.3;
    font-family: 'Courier New', monospace;
}

.timeline-content {
    flex: 1;
}

.timeline-content h3 {
    font-size: 1rem;
    margin-bottom: 3px;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.3;
}

.timeline-content h3 a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: inherit;
    transition: var(--transition);
}

.timeline-content h3 a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.timeline-location {
    color: var(--text-light);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 4px;
    line-height: 1.3;
}

.timeline-description {
    color: var(--text-light);
    font-size: 0.7rem;
    line-height: 1.4;
    margin-top: 3px;
    opacity: 0.8;
}

.timeline-content p:not(.timeline-location):not(.timeline-description) {
    color: var(--text-light);
    font-size: 0.7rem;
    line-height: 1.4;
    margin-top: 3px;
    opacity: 0.8;
}

.timeline-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: var(--transition);
}

.timeline-content a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.timeline-note {
    display: none;
}

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

.work-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.work-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.work-image {
    width: 100%;
    height: 250px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.work-item:hover .work-image::after {
    opacity: 1;
}

.work-content {
    padding: 25px;
}

.work-content h3 a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: inherit;
    transition: var(--transition);
}

.work-content h3 a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.work-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
}

.work-year {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-style: italic;
}

.work-content p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-tag {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.work-link {
    margin-top: 15px;
}

.work-link a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
    transition: var(--transition);
}

.work-link a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* 写真ギャラリーセクション */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.photo-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.photo-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
}

.photo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.photo-caption {
    padding: 20px;
}

.photo-caption h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.photo-caption h4 a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: inherit;
    transition: var(--transition);
}

.photo-caption h4 a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.work-status {
    color: var(--primary-color);
    font-size: 0.9em;
}

.photo-caption p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.photo-caption a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: var(--transition);
    word-break: break-all;
}

.photo-caption a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

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

.contact-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: underline;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-weight: 500;
}

.contact-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    font-size: 1.1rem;
}

/* 掲示板 */
.board-container {
    max-width: 800px;
    margin: 0 auto;
}

.board-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.board-form input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    transition: var(--transition);
}

.board-name-input {
    flex: 0 0 150px;
    max-width: 150px;
}

.board-form input[id="board-msg"] {
    flex: 1;
}

.board-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.board-submit-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.board-submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.board-submit-btn:active {
    transform: translateY(0);
}

.board-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.board-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.3s ease;
}

.board-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.board-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.board-time {
    color: var(--text-light);
    font-size: 0.875rem;
}

.board-message {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.board-empty,
.board-error {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.board-error {
    color: #ef4444;
}

/* アクセス統計 */
.stats-container {
    max-width: 1000px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
}


/* フッター */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-light);
    border-radius: 20px 20px 0 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-light);
}

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

/* レスポンシブデザイン */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-image-container {
        height: 50vh;
    }

    .hero-content {
        padding: 50px 20px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-alt {
        padding: 60px 20px;
        margin: 20px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .timeline-container {
        padding-left: 50px;
    }

    .timeline-item {
        flex-direction: column;
        padding-left: 18px;
        gap: 6px;
        margin-bottom: 18px;
    }

    .timeline-container::before {
        left: 18px;
    }

    .timeline-item::before {
        left: -32px;
        width: 8px;
        height: 8px;
    }

    .timeline-year {
        min-width: auto;
        text-align: left;
        font-size: 0.75rem;
    }

    .timeline-content h3 {
        font-size: 0.95rem;
    }

    .timeline-location {
        font-size: 0.75rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-link {
        justify-content: center;
    }

    .board-form {
        flex-direction: column;
    }

    .board-name-input {
        flex: 1;
        max-width: 100%;
    }

    .board-submit-btn {
        width: 100%;
    }

    .board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2rem;
    }

}