:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #0ea5e9;
    --secondary-color: #6366f1;
    --accent-color: #22d3ee;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.35);
    --card-hover-bg: rgba(51, 65, 85, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* スマホでのスクロールパフォーマンス最適化 */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* カスタムカーソル（PCのみ） */
@media (min-width: 769px) {
    body {
        cursor: none;
    }
}

/* Custom Cursor（PCのみ） */
.custom-cursor,
.custom-cursor-follower {
    display: none;
    /* デフォルトは非表示 */
}

@media (min-width: 769px) {

    .custom-cursor,
    .custom-cursor-follower {
        display: block;
        position: fixed;
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: transform 0.1s, opacity 0.2s;
    }

    .custom-cursor {
        width: 8px;
        height: 8px;
        background-color: var(--primary-color);
    }

    .custom-cursor-follower {
        width: 40px;
        height: 40px;
        border: 1px solid var(--primary-color);
        transition: transform 0.15s ease-out, top 0.1s, left 0.1s;
    }
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

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

.nav-list a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.1), transparent 40%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero-subtitle {
    display: block;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;

    /* Gradient Gold Shimmer */
    background: linear-gradient(90deg,
            #b45309 0%,
            #fbbf24 25%,
            #fffbeb 50%,
            #fbbf24 75%,
            #b45309 100%);
    background-size: 200% auto;
    color: #fbbf24;
    /* Fallback */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: shine 2s linear infinite;

    /* Softened Drop Shadow (instead of text-shadow for clipped text) */
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.4));
}

.hero-title-en {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

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

.hero-image-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-bg {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.2;
    filter: blur(50px);
    animation: pulse 5s infinite alternate;
}

.hero-image {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    border: 2px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: transform 0.5s ease;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-indicator .line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.icon-highlight {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

/* Roles Section */
.roles-list {
    display: grid;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.role-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.role-org {
    font-weight: 700;
    color: var(--text-color);
}

.role-title {
    color: var(--primary-color);
    text-align: right;
}

/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.work-card {
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.work-card:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

.work-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.work-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.work-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Qualifications Section */
.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-tag {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

.skill-tag.highlight {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.skill-tag.highlight:hover {
    color: #fff;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        display: none;
        /* Simplify for mobile for now or make hamburger */
    }

    .hero-container {
        flex-direction: column-reverse;
        /* Image on top on mobile usually better, or kept below text? Let's keep image top actually. */
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

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

    .hero-image {
        width: 250px;
        height: 250px;
    }

    .hero-image-bg {
        width: 300px;
        height: 300px;
    }

    .role-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .role-title {
        text-align: center;
    }

    /* Cursor hidden on touch devices */
    .custom-cursor,
    .custom-cursor-follower {
        display: none;
    }
}

/* Social Links in Hero */
.hero-socials {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 769px) {
    .hero-socials {
        justify-content: flex-start;
    }
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link.youtube:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-link.facebook {
    border-color: rgba(66, 103, 178, 0.5);
    background: rgba(66, 103, 178, 0.1);
    color: #4267B2;
    /* Facebook Blue */
    margin-top: 1.5rem;
}

.social-link.facebook:hover {
    background: #4267B2;
    color: white;
    border-color: #4267B2;
    box-shadow: 0 5px 20px rgba(66, 103, 178, 0.4);
    transform: translateY(-2px);
}

/* Contact Section Specifics */
#contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-button-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.social-link i {
    font-size: 1.2rem;
}

/* Featured Works Styling */
a.work-card {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

a.work-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(30, 41, 59, 0.6));
}

.work-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.work-link-text {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

a.work-card:hover .work-link-text {
    opacity: 1;
    transform: translateX(0);
}

a.work-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px rgba(14, 165, 233, 0.15);
}

/* ========================================
   Loading Screen Styles（PCのみ）
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

/* モバイルではローディング画面を表示しない */
@media (max-width: 768px) {
    .loading-screen {
        display: none !important;
    }
}

.loader-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.loader-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.loader-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    position: relative;
}

.glitch {
    position: relative;
    background: linear-gradient(45deg,
            #ff0000 0%,
            #ff4500 20%,
            #ffa500 40%,
            #ffff00 60%,
            #ffa500 80%,
            #ff4500 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 68, 0, 0.8)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.6)) drop-shadow(0 0 60px rgba(255, 255, 0, 0.4));
    animation: fire-glow 2s ease-in-out infinite, fire-flicker 0.1s infinite;
}

@keyframes fire-glow {

    0%,
    100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 20px rgba(255, 68, 0, 0.8)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.6)) drop-shadow(0 0 60px rgba(255, 255, 0, 0.4));
    }

    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 30px rgba(255, 68, 0, 1)) drop-shadow(0 0 60px rgba(255, 165, 0, 0.8)) drop-shadow(0 0 90px rgba(255, 255, 0, 0.6));
    }
}

@keyframes fire-flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.95;
    }
}

.glitch::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            rgba(255, 0, 0, 0.3) 0%,
            rgba(255, 69, 0, 0.3) 50%,
            rgba(255, 255, 0, 0.3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(10px);
    z-index: -1;
    animation: fire-wave 1.5s ease-in-out infinite;
}

@keyframes fire-wave {

    0%,
    100% {
        transform: scale(1) translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05) translateY(-5px);
        opacity: 0.8;
    }
}

.loader-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--accent-color);
    letter-spacing: 0.3em;
    margin-bottom: 3rem;
    font-weight: 300;
    text-transform: uppercase;
    overflow: hidden;
}

.typing-text {
    display: inline-block;
    border-right: 2px solid var(--accent-color);
    animation: typing 2s steps(30) 1s 1 normal both, blink 0.7s infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.progress-bar {
    width: 300px;
    max-width: 80vw;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
            var(--primary-color) 0%,
            var(--accent-color) 50%,
            var(--secondary-color) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow:
        0 0 10px rgba(59, 130, 246, 0.8),
        0 0 20px rgba(59, 130, 246, 0.5);
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        box-shadow:
            0 0 10px rgba(59, 130, 246, 0.8),
            0 0 20px rgba(59, 130, 246, 0.5);
    }

    100% {
        box-shadow:
            0 0 20px rgba(59, 130, 246, 1),
            0 0 30px rgba(59, 130, 246, 0.8),
            0 0 40px rgba(59, 130, 246, 0.6);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .loader-title {
        font-size: 2rem;
    }

    .loader-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

    .progress-bar {
        width: 200px;
    }
}

/* New Product List Responsive Styles */
.product-row {
    padding: 2px 0;
}

.product-date {
    display: inline-block;
    width: 100px;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
    /* PCでのスペース確保 */
}

@media (max-width: 768px) {
    .product-date {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.2rem;
    }

    .product-row {
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .product-row:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}