:root {
    --dark-navy: #0f172a;
    --accent-blue: #38bdf8;
    --light-gray: #f8fafc;
    --text-color: #333;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--accent-blue);
}

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

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--dark-navy);
}

/* ローディングアニメーション */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-navy);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 新しいローディングアニメーション */
.loading-animation {
    position: relative;
    width: 100px;
    height: 100px;
}

.loading-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: loadingRotate 1.5s linear infinite;
}

.loading-circle:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #64b5f6;
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.loading-circle:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: #90caf9;
    animation-duration: 0.9s;
}

.loading-text {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-blue);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

@keyframes loadingRotate {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: none; /* 古いローディングスピナーを非表示に */
}

/* ヘッダースタイル */
header {
    background-color: var(--dark-navy);
    color: white;
    position: fixed;
    width: 100%;
    z-index: 100;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.social-links a:hover {
    color: var(--accent-blue);
    background-color: rgba(255, 255, 255, 0.2);
}

.social-links img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%; /* 丸型にする */
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
    margin-right: 15px; /* ロゴとの間隔を確保 */
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* モバイル用SNSアイコン - デスクトップでは非表示 */
.mobile-social {
    display: none;
}

/* トップセクションスタイル */
#top {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--dark-navy);
    color: white;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.main-catch {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.sub-catch {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--accent-blue);
}

.intro-brief {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-blue);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #2563eb;
}

/* プロフィールセクションスタイル */
#profile {
    background-color: white;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.skill-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.skill-table th, .skill-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.skill-table th {
    text-align: left;
    width: 30%;
}

/* 実績セクションスタイル */
#works {
    background-color: var(--light-gray);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.work-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
}

.work-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.work-content {
    padding: 20px;
}

.work-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.work-description {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

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

.tech-tag {
    background-color: #e2e8f0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.usage-link {
    display: inline-block;
    margin: 0.5rem 0 1rem 0;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: #2563eb;
    text-decoration: none;
    border: 1px solid #2563eb;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.usage-link:hover {
    background-color: #2563eb;
    color: white;
}

/* コンタクトセクションスタイル */
#contact {
    background-color: white;
    text-align: center;
}

.contact-text {
    max-width: 600px;
    margin: 0 auto 30px;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-blue);
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.contact-button:hover {
    background-color: #2563eb;
}

/* お問い合わせフォームスタイル */
.contact-form {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

.form-label-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.form-label {
    font-weight: 500;
}

.required-badge {
    display: inline-block;
    background-color: #f87171;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.optional-badge {
    display: inline-block;
    background-color: #9ca3af;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
}

textarea.form-input {
    height: 150px;
    resize: vertical;
}

.form-button {
    background-color: #4b5563;
    color: white;
    border: none;
    padding: 15px 60px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
}

.form-button:hover {
    background-color: #374151;
}

.button-container {
    text-align: center;
    margin-top: 30px;
}

/* LINE問い合わせボタン */
.line-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #06c755; /* LINEの色 */
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.line-button:hover {
    background-color: #05a847;
}

.line-qr {
    margin-top: 20px;
}

/* フォーム送信成功メッセージ */
.success-message {
    display: none;
    background-color: #10b981;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.success-message.show {
    display: block;
}

/* フォーム送信エラーメッセージ */
.error-message {
    display: none;
    background-color: #ef4444;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.error-message.show {
    display: block;
}

/* フッタースタイル */
footer {
    background-color: var(--dark-navy);
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}


/* レスポンシブ調整 */
@media (max-width: 768px) {
    .main-catch {
        font-size: 2.0rem;
    }
    
    .sub-catch {
        font-size: 1.2rem;
    }
    
    nav {
        flex-direction: row; /* モバイル時のナビゲーション表示方向 */
    }
    
    .menu-toggle {
        display: flex;
        order: -1; /* ロゴの左側に配置 */
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -320px; /* 少し幅を広げる */
        width: 280px; /* メニューの幅を広げる */
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.98); /* 少し透明度を持たせる */
        flex-direction: column;
        justify-content: flex-start; /* 上揃えに変更 */
        align-items: flex-start; /* 左揃えに変更 */
        padding: 80px 0 0 0; /* 上部に余白を追加 */
        transition: left 0.3s ease;
        z-index: 99;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    /* ナビリンクのスタイル調整 */
    .nav-links li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a {
        padding: 15px 30px;
        display: block;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.3s;
    }
    
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.05);
        padding-left: 35px;
    }

    .social-links {
        display: flex;
        gap: 5px;
    }
    
    .social-links img,
    .mobile-social img {
        width: 35px;
        height: 35px;
        object-fit: cover; /* 縦横比を保ったまま切り抜き */
        border-radius: 50%; /* 丸型にする */
    }
    
    /* モバイルでの SNS アイコンエリア */
    .mobile-social {
        position: absolute;
        bottom: 40px;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 15px;
    }
    
    .mobile-social a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
    }

    
    
    /* オーバーレイ背景 */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 98;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .works-grid, .services-grid {
        grid-template-columns: 1fr;
    }
}