/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS変数 */
:root {
    --primary-color: #00ff41;
    --secondary-color: #00d4ff;
    --bg-dark: #0a0e27;
    --bg-darker: #030615;
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --card-bg: rgba(10, 25, 47, 0.9);
    --border-color: rgba(0, 255, 65, 0.3);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Noto Sans JP', sans-serif;
}

/* ベーススタイル */
body {
    font-family: var(--font-sans);
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

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

/* ナビゲーションバー */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(3, 6, 21, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo-text {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-color);
    margin-left: 2px;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* ヒーローセクション */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.terminal-window {
    width: 90%;
    max-width: 800px;
    background: rgba(10, 25, 47, 0.95);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 255, 65, 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 10;
    position: relative;
}

.terminal-header {
    background: linear-gradient(90deg, #1e3a5f 0%, #0a1628 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.terminal-content {
    padding: 40px;
}

.typing-container {
    margin-bottom: 30px;
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: 1rem;
}

.prompt {
    color: var(--secondary-color);
    margin-right: 10px;
}

.typing-cursor {
    animation: blink 1s infinite;
}

.hero-content {
    text-align: center;
    margin-top: 30px;
}

.glitch {
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--text-primary);
    letter-spacing: 3px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary-color);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translateX(2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translateX(-2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translateX(1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translateX(-1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translateX(-2px); }
    40% { clip-path: inset(20% 0 60% 0); transform: translateX(2px); }
    60% { clip-path: inset(30% 0 40% 0); transform: translateX(-1px); }
    80% { clip-path: inset(10% 0 80% 0); transform: translateX(1px); }
}

.hero-subtitle {
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-darker);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
}

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

.cta-button:hover .button-arrow {
    transform: translateX(5px);
}

/* Matrix背景エフェクト */
.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0.05;
}

/* サービスセクション */
.service {
    padding: 100px 0;
    background: var(--bg-darker);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-family: var(--font-mono);
}

.code-tag {
    color: var(--primary-color);
}

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

.service-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-weight: 700;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.tech-stack {
    list-style: none;
}

.tech-stack li {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.tech-stack li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* 会社概要セクション */
.company {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.company-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.company-info h3,
.ceo-profile h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-family: var(--font-mono);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
}

.info-table td {
    padding: 15px 0;
}

.info-label {
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-mono);
    width: 30%;
}

.profile-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.8;
}

.profile-content h4 {
    color: var(--secondary-color);
    margin: 30px 0 20px;
    font-family: var(--font-mono);
}

.experience-list {
    list-style: none;
}

.experience-list li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.experience-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

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

.oss-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.oss-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.2);
}

.oss-name {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-weight: 700;
    margin-bottom: 5px;
}

.oss-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* スキルセクション */
.skills {
    padding: 80px 0;
    background: var(--bg-darker);
}

.skills-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--primary-color);
    font-family: var(--font-mono);
}

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

.skill-category h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-family: var(--font-mono);
}

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

.skill-tag {
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(0, 255, 65, 0.2);
    transform: scale(1.05);
}

/* お問い合わせセクション */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.contact-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 50px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.required {
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-darker);
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: var(--font-mono);
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* フッター */
.footer {
    padding: 30px 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ポートフォリオグリッド */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.portfolio-card {
    background: rgba(10, 25, 47, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.2);
}

.portfolio-name {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.portfolio-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* プロフィールリンク */
.profile-links {
    margin-top: 30px;
    text-align: center;
}

.profile-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.profile-link:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

/* 信頼性セクション */
.credibility {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.9), rgba(3, 6, 21, 0.9));
}

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

.credibility-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(10, 25, 47, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.credibility-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.2);
}

.credibility-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: var(--font-mono);
    margin-bottom: 10px;
}

.credibility-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 信頼バッジ */
.trust-badges {
    margin-top: 60px;
    text-align: center;
}

.trust-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.company-experience {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.company-badge {
    padding: 15px 30px;
    background: rgba(10, 25, 47, 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    color: var(--text-primary);
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

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

.company-badge:hover::before {
    left: 100%;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(3, 6, 21, 0.98);
        width: 100%;
        text-align: center;
        padding: 20px 0;
        transition: 0.3s;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .glitch {
        font-size: 2.5rem;
    }

    .company-content {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

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

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

    .credibility-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .company-experience {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .glitch {
        font-size: 2rem;
    }

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

    .terminal-content {
        padding: 20px;
    }
}