:root {
    --color-bg: #000000;
    --color-indigo: #1d2a3b;
    /* ネオングリーン: マトリックス/ターミナル風の美学のために以前のシアンを置換 */
    --color-cyan: #39ff14;
    --color-gunmetal: #2a3439;
    --color-text: #e0e0e0;
    --font-mono: 'Orbitron', sans-serif;
    --font-sans: 'Zen Kaku Gothic New', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 
   ----------------------------------------
   背景エフェクト (p5.js コンテナ)
   ----------------------------------------
*/
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.8;
    /* 奥行きを出すためのわずかな透明度 */
}

/* 放射状のビネット（四隅を暗くする）オーバーレイ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000 90%);
    z-index: -1;
    pointer-events: none;
}

/* CRTスキャンラインエフェクト */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.3;
}

/* 
   ----------------------------------------
   タイポグラフィ（文字設定）
   ----------------------------------------
*/
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    position: relative;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.highlight-cyan {
    color: var(--color-cyan);
    text-shadow: 0 0 5px var(--color-cyan);
}

/* 
   ----------------------------------------
   ヘッダー & ナビゲーション
   ----------------------------------------
*/
.tactical-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999;
    border-bottom: 1px solid var(--color-cyan);
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* border: 1px solid var(--color-cyan); Removed per user request */
    vertical-align: middle;
    transition: all 0.3s ease;
}

.header-icon:hover {
    /* box-shadow: 0 0 10px var(--color-cyan); Removed per user request */
    transform: scale(1.1);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-item {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    color: #888;
    transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--color-cyan);
    transform: scale(1.2);
    /* Added scale effect */
}

/* data属性を使用したホバー時のグリッチテキストエフェクト */
.nav-item::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--color-cyan);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s;
}

.nav-item:hover::before {
    opacity: 0.5;
    transform: translateX(0) scale(1.2);
    /* Match scale */
}

/* 
   ----------------------------------------
   HEROセクション
   ----------------------------------------
*/
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-sub {
    font-family: var(--font-mono);
    color: var(--color-cyan);
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-logo-center {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    }

    to {
        box-shadow: 0 0 50px rgba(0, 255, 255, 0.4);
    }
}

.hero-title-main {
    font-size: 6rem;
    /* Increased size (was 4.5rem) */
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 20px;

    /* Darker Green, Stronger Glow */
    color: #1a5c20;
    /* Dark Forest Green */
    -webkit-text-stroke: 0;
    text-shadow: 0 0 15px rgba(50, 205, 50, 0.6), 0 0 30px rgba(50, 205, 50, 0.3);
    /* Stronger lime green glow */

    font-family: 'Black Ops One', sans-serif;
    text-align: center;
    position: relative;
    /* For glitch effect */
    transition: all 0.3s;
}

/* Glitch Effect on Hover */
.hero-title-main:hover {
    color: #2e8b57;
    /* Slightly lighter on hover */
    text-shadow: 2px 2px 0px #ff0000, -2px -2px 0px #0000ff;
    /* Noise color split */
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.hero-title-main:hover::before,
.hero-title-main:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.hero-title-main:hover::before {
    left: 2px;
    text-shadow: -1px 0 #ff0080;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.hero-title-main:hover::after {
    left: -2px;
    text-shadow: -1px 0 #00ffff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    33% {
        clip: rect(80px, 9999px, 90px, 0);
    }

    66% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(110px, 9999px, 130px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    33% {
        clip: rect(120px, 9999px, 100px, 0);
    }

    66% {
        clip: rect(50px, 9999px, 70px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 20px, 0);
    }
}

/* Scroll Animation Classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    /* Ease-out-cubic */
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-delay-1 {
    transition-delay: 0.1s;
}

.scroll-reveal-delay-2 {
    transition-delay: 0.2s;
}

.scroll-reveal-delay-3 {
    transition-delay: 0.3s;
}

.hero-sub-copy {
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    color: #e0e0e0;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: var(--color-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 
   ----------------------------------------
   セクションスタイル
   ----------------------------------------
*/
.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--color-text);
    border-left: 5px solid var(--color-cyan);
    padding-left: 20px;
    position: relative;
}

/* セクションタイトルの背後に表示されるゴーストテキスト */
.section-title::after {
    content: attr(data-text);
    position: absolute;
    left: 20px;
    top: 2px;
    color: var(--color-cyan);
    opacity: 0.3;
    z-index: -1;
    filter: blur(2px);
}

.subsection-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-cyan);
}

.content-box {
    background: rgba(29, 42, 59, 0.4);
    border: 1px solid var(--color-indigo);
    padding: 40px;
    backdrop-filter: blur(5px);
}

.text-body {
    font-size: 1.1rem;
    line-height: 2;
}

/* 
   ----------------------------------------
   カード (Service一覧)
   ----------------------------------------
*/
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--color-gunmetal);
    padding: 30px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--color-cyan);
    background: rgba(29, 42, 59, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.card-icon {
    display: block;
    font-family: var(--font-mono);
    color: var(--color-cyan);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* 
   ----------------------------------------
   プロフィールセクション
   ----------------------------------------
*/
.profile-container {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-image {
    width: 300px;
    height: auto;
    /* Changed to auto to respect aspect ratio */
    position: relative;
    /* clip-path removed */
}

.hex-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* show full logo/title */
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 255, 0.2));
    pointer-events: none;
}

.profile-info {
    flex: 1;
}

.role {
    color: var(--color-cyan);
    font-family: var(--font-mono);
    margin-bottom: 20px;
}

.spec-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.spec-table th,
.spec-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.spec-table th {
    color: #888;
    font-family: var(--font-mono);
    width: 30%;
}

/* 
   ----------------------------------------
   ユーティリティ & フッター
   ----------------------------------------
*/
/* 警告 / グリッチ（未使用だが将来用） */
.warning-box {
    border: 1px solid red;
    background: rgba(50, 0, 0, 0.3);
}

.warning-box .subsection-title {
    color: red;
}

.blur-text {
    filter: blur(4px);
    user-select: none;
    opacity: 0.7;
}

/* フッター */
footer {
    padding: 40px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #333;
}

/* 
   ----------------------------------------
   レスポンシブデザイン（スマホ対応）
   ----------------------------------------
*/
@media (max-width: 768px) {
    .tactical-header {
        padding: 10px 20px;
        flex-direction: column;
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .profile-container {
        flex-direction: column;
        text-align: center;
    }

    .spec-table th,
    .spec-table td {
        display: block;
        width: 100%;
    }
}