:root {
    /* Colors */
    --bg-color: #0a0a0a;
    --bg-secondary: #111111;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent-primary: #00f7ff;
    --accent-secondary: #7000ff;
    --gradient-main: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(0, 247, 255, 0.3);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-jp);
    line-height: 1.6;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin: 0 auto 3rem;
    position: relative;
    width: fit-content;
    display: block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-main);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: -2rem;
    margin-bottom: 4rem;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: var(--glow);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 247, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    margin-left: 20px;
}

.btn-secondary:hover {
    background: rgba(0, 247, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-main);
    letter-spacing: 1px;
}

.logo .accent {
    color: var(--accent-primary);
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(112, 0, 255, 0.2), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 247, 255, 0.15), transparent 40%);
    animation: rotateBg 20s linear infinite;
    z-index: -1;
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-container {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.role {
    color: var(--accent-primary);
    font-weight: 700;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.about-role {
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-family: var(--font-main);
}

.about-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    text-align: justify;
}

.skills-wrapper h4 {
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-secondary);
    padding-left: 10px;
}

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

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.tag:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 247, 255, 0.1);
}

.about-image {
    width: 70%;
    max-width: 450px;
    display: block;
    margin: 0 auto;
    height: auto;
    border-radius: 20px;
    border: var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: 0.3s;
}

.about-image:hover {
    transform: scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: var(--glow);
}

/* Services Section */
.services {
    padding: 100px 0;
}

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

.service-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    padding: 40px 30px;
    border-radius: 20px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--glow);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background: var(--bg-secondary);
}

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

.portfolio-card {
    display: block;
    background: var(--bg-color);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    border: var(--glass-border);
}

.portfolio-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-secondary);
}

.portfolio-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.portfolio-image-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    background: linear-gradient(to bottom right, #222, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-weight: 700;
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.portfolio-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.view-more {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: var(--glass-border);
    padding: 60px 20px;
    border-radius: 30px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.contact-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-available {
    margin-bottom: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    display: inline-block;
}

.contact-available h4 {
    color: var(--accent-secondary);
    margin-bottom: 10px;
}

.contact-available p {
    margin-bottom: 5px;
    color: var(--text-main);
}

.contact-btn {
    padding: 15px 50px;
    font-size: 1.1rem;
}

.social-links {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: #000;
    border-color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* Footer */
.footer {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

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

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

    .menu-toggle {
        display: block;
        z-index: 1002;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #111;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease;
        z-index: 1001;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nav-link {
        font-size: 1.2rem;
    }

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

    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .about-image {
        width: 100%;
        max-width: 90%;
    }
}

/* Portfolio Categories */
.portfolio-category-title {
    font-size: 1.8rem;
    color: #f0f0f0;
    /* color: var(--text-color); */
    margin-bottom: 24px;
    margin-top: 5rem;
    padding-left: 16px;
    border-left: 4px solid var(--accent-color);
    line-height: 1.2;
    margin-top: 5rem;
}

/* 最初のカテゴリタイトルは上マージンを少し詰める */
.portfolio-category-title:first-of-type {
    margin-top: 24px;
}

/* Page Top Button */
.page-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
}

.page-top.show {
    opacity: 1;
    visibility: visible;
}

.page-top:hover {
    background: var(--accent-primary);
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.5);
}

.page-top svg {
    width: 24px;
    height: 24px;
}