/* =========================================
   Variables & Reset
   ========================================= */
:root {
    --primary-color: #0f172a;
    /* Dark Navy Background */
    --secondary-color: #1e293b;
    /* Slightly Lighter Navy */
    --accent-gold: #D4AF37;
    /* Premium Gold */
    --accent-cyan: #0ea5e9;
    /* Tech Cyan */
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-color);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    /* Spotlight Effect */
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(29, 78, 216, 0.15),
            transparent 40%);
    background-attachment: fixed;
    /* Keeps spotlight consistent */
    background-color: var(--primary-color);
    /* Fallback base */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* =========================================
   Utilities & Common
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

.center-text {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #b38f26);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    border: 1px solid var(--text-light);
    color: var(--text-light);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* =========================================
   Header & Nav
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    /* More transparent for effect */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    color: #fff;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-gold);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    overflow: hidden;
    background-color: #020617;
    /* Deep Space */
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Hero Illustration Style */
.hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

.hero-manga-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-top: 0;
    opacity: 0.18;
    /* Increased visibility for full-screen impact */
    filter: grayscale(100%) brightness(0.3) contrast(1.1);
    transition: 0.5s ease;
    mix-blend-mode: luminosity;
}

.hero-manga-img:hover {
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    z-index: 2;
    text-align: center;
    max-width: 800px;
    width: 100%;
    pointer-events: none;
}

.hero-content * {
    pointer-events: auto;
    /* Re-enable pointer events for content */
}

.hero-subtitle {
    color: var(--accent-cyan);
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero-desc {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    margin-bottom: 5px;
    letter-spacing: 2px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* =========================================
   About Section
   ========================================= */
.section-header {
    margin-bottom: 4rem;
}

.section-header.center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    color: var(--accent-gold);
}

.section-subtitle {
    color: var(--text-dim);
}

.about-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    perspective: 1000px;
    /* Enable 3D perspective */
}

.about-card {
    background: rgba(30, 41, 59, 0.4);
    /* Make slightly more transparent for glass effect */
    border-radius: 12px;
    flex: 1;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.about-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
    background: rgba(30, 41, 59, 0.6);
}

.about-card:hover h3 {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Remove the old simple hover transform and use JS controlled one */
/* .about-card:hover { transform: translateY(-10px); } */

.card-visual {
    height: 200px;
    overflow: hidden;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 2rem;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
    transition: 0.3s;
}

.about-card:hover .card-icon {
    color: var(--accent-gold);
    transform: scale(1.1);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: 0.3s;
}

.card-highlight {
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.about-arrow {
    font-size: 2rem;
    color: var(--text-dim);
    align-self: center;
}

/* =========================================
   Skills Section
   ========================================= */
.dark-bg {
    background-color: rgba(30, 41, 59, 0.3);
    /* Let spotlight shine through */
}

.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skill-category h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-gold);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress-line {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.progress-line span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.1, 0.7, 1.0, 0.1);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.skill-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.mini-card {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.mini-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}

.big-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.small-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 5px;
}

/* =========================================
   Works Section
   ========================================= */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.work-item {
    display: block;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-item:hover {
    border-color: var(--accent-gold);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.work-item:hover h3 {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Replaced by JS Tilt */
/* .work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
} */

.work-thumb {
    height: 200px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    opacity: 0.8;
}

.work-item:hover .work-thumb img {
    transform: scale(1.05);
    opacity: 1;
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    z-index: 2;
}

.work-item:hover .thumb-overlay {
    opacity: 1;
}

.thumb-overlay span {
    color: #fff;
    border: 1px solid #fff;
    padding: 8px 20px;
    border-radius: 20px;
}

.work-info {
    padding: 1.5rem;
}

.work-info h3 {
    margin-bottom: 0.5rem;
    color: #fff;
    transition: 0.3s;
}

.work-info .url {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.work-info .desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.tags span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-right: 5px;
    color: var(--accent-gold);
}

/* =========================================
   Footer
   ========================================= */
footer {
    background: #050911;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.copyright {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   Animations
   ========================================= */
.fade-in,
.reveal-left,
.reveal-right,
.reveal-up {
    opacity: 0;
    transition: 1s all ease-out;
}

.fade-in {
    transform: translateY(20px);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-up {
    transform: translateY(30px);
}

.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .about-grid {
        flex-direction: column;
    }

    .about-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }

    .skills-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        gap: 2rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        z-index: 1000;
        cursor: pointer;
        transition: 0.3s;
    }

    .menu-btn.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-btn.active .bar:nth-child(2) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .bar {
        width: 25px;
        height: 2px;
        background-color: #fff;
        transition: 0.3s;
    }
}

/* =========================================
   AI Cases Section
   ========================================= */
.ai-intro {
    background: rgba(30, 41, 59, 0.4);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-left: 4px solid var(--accent-gold);
    text-align: left;
}

.ai-intro p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.ai-intro strong {
    color: var(--accent-cyan);
}

.ai-intro .small-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 0;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.ai-card {
    background: rgba(15, 23, 42, 0.6);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.ai-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
    background: rgba(30, 41, 59, 0.6);
}

.ai-card:hover h3 {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.ai-card:hover .ai-icon {
    transform: scale(1.1);
}

.ai-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.ai-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-family: var(--font-heading);
    transition: 0.3s;
}

.ai-catch {
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: block;
}

.ai-list {
    text-align: left;
    padding-left: 0;
}

.ai-list li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-dim);
    display: flex;
    align-items: flex-start;
}

.ai-list li i {
    color: var(--accent-gold);
    margin-right: 10px;
    margin-top: 5px;
    font-size: 0.8rem;
}