/* Super Portfolio Custom Styles */

:root {
    --neon-red: #ff003c;
    --neon-blue: #00f0ff;
    --gold: #ffd700;
    --background-dark: #0a0b10;
}

/* Custom Cursor (Enhanced) */
.cursor-dot {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ffffff, var(--neon-blue));
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--neon-blue);
    will-change: transform, left, top;
    transform: translate(-50%, -50%) translateZ(0);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neon-red);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%) translateZ(0);
    transition: all 0.2s ease-out;
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.6), inset 0 0 20px rgba(255, 0, 60, 0.3);
    will-change: transform, left, top;
    animation: cursor-pulse 2s ease-in-out infinite;
}

@keyframes cursor-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 0, 60, 0.6), inset 0 0 20px rgba(255, 0, 60, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 0, 60, 0.8), inset 0 0 30px rgba(255, 0, 60, 0.5);
    }
}



/* NW Background Animations (Enhanced) */
.scanner-line {
    background: linear-gradient(to right, transparent, rgba(255, 0, 38, 1), rgba(255, 100, 100, 0.8), rgba(255, 0, 38, 1), transparent);
    box-shadow: 0 0 25px rgba(255, 0, 38, 0.8), 0 0 50px rgba(255, 0, 38, 0.5);
    height: 3px;
    position: absolute;
    width: 100%;
    z-index: 20;
    pointer-events: none;
    animation: scan-line 8s linear infinite;
    will-change: top;
    transform: translateZ(0);
}

@keyframes scan-line {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

.kanji-watermark {
    writing-mode: vertical-rl;
    user-select: none;
    pointer-events: none;
    opacity: 0.08;
    position: absolute;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(13, 89, 242, 0.6), 0 0 60px rgba(13, 89, 242, 0.3);
    animation: kanji-pulse 4s ease-in-out infinite;
}

@keyframes kanji-pulse {

    0%,
    100% {
        opacity: 0.08;
    }

    50% {
        opacity: 0.15;
    }
}

.dragon-aura {
    /* Replaced drop-shadow with box-shadow for performance */
    box-shadow: 0 0 60px rgba(255, 0, 38, 0.3) inset, 0 0 100px rgba(255, 0, 38, 0.2);
    border-radius: 50%;
    transition: box-shadow 1s ease, transform 1s ease;
    animation: dragon-breathe 6s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes dragon-breathe {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(255, 0, 38, 0.3) inset, 0 0 100px rgba(255, 0, 38, 0.2);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 80px rgba(255, 0, 38, 0.5) inset, 0 0 140px rgba(255, 0, 38, 0.3);
        transform: scale(1.02);
    }
}

.dragon-eye {
    box-shadow: 0 0 25px #ffd700, 0 0 50px #ff0026, 0 0 75px #ffd700;
    animation: eye-glow 2s ease-in-out infinite;
}

@keyframes eye-glow {

    0%,
    100% {
        box-shadow: 0 0 15px #ffd700, 0 0 30px #ff0026;
    }

    50% {
        box-shadow: 0 0 25px #ffd700, 0 0 50px #ff0026;
    }
}

/* Particles Background (Enhanced) */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    top: 0;
    left: 0;
    pointer-events: auto;
    /* Removed drop-shadow filter for performance */
}


/* Base Styles */
.font-japanese {
    font-family: 'Noto Sans JP', sans-serif;
}

/* Dynamic Header Styles */
header {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease, background 0.3s ease;
}

header.scroll-down {
    transform: translateY(-100%);
}

header.scroll-up {
    transform: translateY(0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(19, 24, 35, 0.95) !important;
    backdrop-filter: blur(10px);
}

header.scroll-up:hover {
    background: rgba(19, 24, 35, 0.9) !important;
    box-shadow: 0 5px 20px rgba(0, 240, 255, 0.2);
}

header nav a {
    position: relative;
    transition: all 0.3s ease;
}

header nav a:nth-child(1) {
    animation-delay: 0s;
}

header nav a:nth-child(2) {
    animation-delay: 0.2s;
}

header nav a:nth-child(3) {
    animation-delay: 0.4s;
}

header nav a:nth-child(4) {
    animation-delay: 0.6s;
}

header nav a:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes bounce-nav {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

header nav a:hover {
    animation: bounce-hover 0.6s ease-in-out infinite;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

header nav a.active {
    color: var(--neon-red) !important;
    text-shadow: 0 0 15px var(--neon-red), 0 0 30px var(--neon-red);
    animation: pulse-active 1.5s ease-in-out infinite, bounce-nav 2s ease-in-out infinite;
    font-weight: 900;
    transform: scale(1.15);
}

@keyframes pulse-active {

    0%,
    100% {
        text-shadow: 0 0 15px var(--neon-red), 0 0 25px var(--neon-red);
    }

    50% {
        text-shadow: 0 0 25px var(--neon-red), 0 0 45px var(--neon-red), 0 0 65px var(--neon-red);
    }
}

header nav a.active::after {
    width: 100%;
    background: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red);
    height: 3px;
}

@keyframes bounce-hover {

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

    25% {
        transform: translateY(-8px) scale(1.1);
    }

    50% {
        transform: translateY(-4px) scale(1.05);
    }

    75% {
        transform: translateY(-8px) scale(1.1);
    }
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--neon-red));
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

header button {
    position: relative;
    overflow: hidden;
}

header button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(13, 89, 242, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

header button:hover::before {
    width: 300px;
    height: 300px;
}

header button span {
    position: relative;
    z-index: 1;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
    transform: translateZ(0);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.japanese-divider {
    text-align: center;
    margin: 4rem 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.japanese-divider::before,
.japanese-divider::after {
    content: "";
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--neon-red), transparent);
}

.japanese-divider span {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--neon-red);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--neon-red);
}

.neon-glow-red {
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
    animation: neon-flicker-red 3s ease-in-out infinite;
}

@keyframes neon-flicker-red {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
    }

    50% {
        text-shadow: 0 0 15px rgba(255, 0, 60, 0.7);
    }
}

.text-glow-blue {
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4), 0 0 16px rgba(0, 240, 255, 0.2);
    animation: none;
    /* Removed flickering for better readability */
}

@keyframes neon-flicker-blue {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.2);
    }

    50% {
        text-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 30px rgba(0, 240, 255, 0.6), 0 0 60px rgba(0, 240, 255, 0.4);
    }
}

/* Card Enhancements (Enhanced with glow) */
.glass-card {
    background: rgba(20, 25, 35, 0.9);
    /* More opaque, no blur */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.2);
    background: rgba(20, 25, 35, 0.85);
}

/* Skills Section */
.skill-item {
    position: relative;
}

.skill-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.skill-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0d59f2, #00f0ff, #ffffff);
    border-radius: 10px;
    position: relative;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.skill-bar::before {
    display: none;
    /* Disabled shimmer */
}

.skill-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #ffffff, #00f0ff);
    border-radius: 50%;
    box-shadow: 0 0 15px #00f0ff, 0 0 30px #00f0ff, 0 0 45px #00f0ff;
    animation: pulse-skill 2s ease-in-out infinite;
    will-change: box-shadow;
    transform: translateY(-50%) translateZ(0);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse-skill {

    0%,
    100% {
        box-shadow: 0 0 15px #00f0ff, 0 0 30px #00f0ff, 0 0 45px #00f0ff;
        transform: translateY(-50%) scale(1);
    }

    50% {
        box-shadow: 0 0 25px #00f0ff, 0 0 50px #00f0ff, 0 0 75px #00f0ff;
        transform: translateY(-50%) scale(1.3);
    }
}

.skill-percentage {
    transition: all 0.3s ease;
}

/* Specialty Cards */
.specialty-card {
    position: relative;
    perspective: 1000px;
}

.specialty-card-inner {
    background: rgba(20, 25, 35, 0.85);
    /* More opaque, no blur */
    border: 2px solid rgba(0, 240, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.specialty-card-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 240, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.specialty-card:hover .specialty-card-inner {
    transform: translateY(-12px) scale(1.03);
    border-color: rgba(0, 240, 255, 0.7);
    box-shadow: 0 15px 60px rgba(0, 240, 255, 0.4), 0 0 100px rgba(0, 240, 255, 0.2);
}

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

.chibi-icon {
    position: relative;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.chibi-icon>div:first-child {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.7)) drop-shadow(0 0 30px rgba(0, 240, 255, 0.4));
    transition: all 0.3s ease;
}

.specialty-card:hover .chibi-icon>div:first-child {
    transform: scale(1.3) rotate(8deg);
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 1)) drop-shadow(0 0 60px rgba(0, 240, 255, 0.8));
}

.chibi-glow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 8px;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.4), transparent);
    border-radius: 50%;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.2);
    }
}

.specialty-card:nth-child(1) .specialty-card-inner {
    border-color: rgba(13, 89, 242, 0.2);
}

.specialty-card:nth-child(1):hover .specialty-card-inner {
    border-color: rgba(13, 89, 242, 0.6);
    box-shadow: 0 10px 40px rgba(13, 89, 242, 0.3);
}

.specialty-card:nth-child(2) .specialty-card-inner {
    border-color: rgba(255, 0, 60, 0.2);
}

.specialty-card:nth-child(2):hover .specialty-card-inner {
    border-color: rgba(255, 0, 60, 0.6);
    box-shadow: 0 10px 40px rgba(255, 0, 60, 0.3);
}

.specialty-card:nth-child(3) .specialty-card-inner {
    border-color: rgba(255, 215, 0, 0.2);
}

.specialty-card:nth-child(3):hover .specialty-card-inner {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
}

.specialty-card:nth-child(4) .specialty-card-inner {
    border-color: rgba(0, 240, 255, 0.2);
}

.specialty-card:nth-child(4):hover .specialty-card-inner {
    border-color: rgba(0, 240, 255, 0.6);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.3);
}

/* Interest Cards */
.interest-card {
    background: rgba(20, 25, 35, 0.8);
    /* More opaque, no blur */
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

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

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

.interest-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 240, 255, 0.6);
    box-shadow: 0 12px 50px rgba(0, 240, 255, 0.4), 0 0 80px rgba(0, 240, 255, 0.2);
    background: rgba(20, 25, 35, 0.8);
}

.interest-icon {
    color: var(--neon-blue);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px var(--neon-blue));
}

.interest-card:hover .interest-icon {
    transform: scale(1.3) rotateY(360deg);
    color: var(--primary);
    filter: drop-shadow(0 0 20px var(--neon-blue)) drop-shadow(0 0 40px var(--neon-blue));
}

.interest-card:nth-child(odd):hover .interest-icon {
    color: var(--neon-red);
    filter: drop-shadow(0 0 20px var(--neon-red)) drop-shadow(0 0 40px var(--neon-red));
}

.interest-card:nth-child(3n):hover .interest-icon {
    color: var(--dragon-gold);
    filter: drop-shadow(0 0 20px var(--dragon-gold)) drop-shadow(0 0 40px var(--dragon-gold));
}

/* Flip Cards for Soft Skills */
.flip-card {
    perspective: 1000px;
    height: 200px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px solid rgba(0, 240, 255, 0.2);
}

.flip-card-front {
    background: rgba(13, 89, 242, 0.2);
}

.flip-card-back {
    background: rgba(255, 0, 60, 0.2);
    transform: rotateY(180deg);
    border-color: rgba(255, 0, 60, 0.3);
}

.flip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.flip-card:hover .flip-card-front {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.flip-card:hover .flip-card-back {
    border-color: rgba(255, 0, 60, 0.5);
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.3);
}

.flip-card-front h4 {
    text-align: center;
    line-height: 1.3;
}

.flip-card-back p {
    text-align: center;
}

/* Contact Form Success Animation */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#success-message {
    transition: all 0.3s ease;
}

.cyber-grid {
    position: relative;
    overflow: hidden;
}

.cyber-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13, 89, 242, 0.1) 2px, transparent 2px),
        linear-gradient(90deg, rgba(13, 89, 242, 0.1) 2px, transparent 2px);
    background-size: 30px 30px;
    animation: grid-fade 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    will-change: opacity;
}

@keyframes grid-fade {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}