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

:root {
    --primary: #FF0000;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --gray: #d1d1d1;
    --accent: #ff3333;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
}

/* Custom Cursor */
body {
    cursor: none;
}

#cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: none;
    opacity: 0;
    will-change: transform;
}

#cursor.active {
    opacity: 1;
}

#cursor.hover {
    transform: scale(1.5);
    border-width: 3px;
}

#cursor-follower {
    width: 40px;
    height: 40px;
    background: var(--primary);
    opacity: 0.15;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

a, button, input, textarea, select {
    cursor: none;
}

/* Show default cursor on interactive elements for better usability */
@media (max-width: 1024px) {
    body, a, button, input, textarea, select {
        cursor: auto !important;
    }
    
    #cursor,
    #cursor-follower {
        display: none !important;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    z-index: 2;
    position: relative;
}

.hero-text h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    color: white;
    letter-spacing: 3px;
    line-height: 0.9;
    margin-bottom: 1rem;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.hero-image {
    position: relative;
    width: 400px;
    height: 500px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    position: relative;
    z-index: 2;
}

.red-frame {
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--primary);
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -10px); }
}

.pixel-accent {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--primary);
    clip-path: polygon(
        0 25%, 25% 25%, 25% 0, 75% 0, 75% 25%, 100% 25%,
        100% 75%, 75% 75%, 75% 100%, 25% 100%, 25% 75%, 0 75%
    );
}

.pixel-accent.top-right {
    top: -40px;
    right: 0;
    animation: pulse 2s ease-in-out infinite;
}

.pixel-accent.bottom-left {
    bottom: -40px;
    left: 0;
    animation: pulse 2s ease-in-out infinite 1s;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Section Styles */
section {
    padding: 8rem 4rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    clip-path: polygon(
        0 0, 20% 0, 20% 100%, 40% 100%, 40% 0, 60% 0,
        60% 100%, 80% 100%, 80% 0, 100% 0, 100% 100%, 0 100%
    );
}

.section-header p {
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Skills Section */
#skill {
    background: white;
}

/* Hexagon Honeycomb Skills - IMPORTANT: High specificity to override theme */
section#skill .hexagon-pyramid {
    position: relative !important;
    width: 100% !important;
    max-width: 900px !important;
    height: 650px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* Individual hexagon positioning for honeycomb */
section#skill .hexagon-pyramid .hexagon {
    width: 120px !important;
    height: 140px !important;
    background: linear-gradient(135deg, #FF0000, #ff3333) !important;
    position: absolute !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* Position hexagons to create tight honeycomb - NO GAPS */
section#skill .hexagon.hex-1 { top: 20px !important; left: 50% !important; transform: translateX(-50%) !important; z-index: 4 !important; }

section#skill .hexagon.hex-2 { top: 125px !important; left: calc(50% - 65px) !important; transform: translateX(-50%) !important; z-index: 3 !important; }
section#skill .hexagon.hex-3 { top: 125px !important; left: calc(50% + 65px) !important; transform: translateX(-50%) !important; z-index: 3 !important; }

section#skill .hexagon.hex-4 { top: 230px !important; left: calc(50% - 130px) !important; transform: translateX(-50%) !important; z-index: 2 !important; }
section#skill .hexagon.hex-5 { top: 230px !important; left: calc(50%) !important; transform: translateX(-50%) !important; z-index: 2 !important; }
section#skill .hexagon.hex-6 { top: 230px !important; left: calc(50% + 130px) !important; transform: translateX(-50%) !important; z-index: 2 !important; }

section#skill .hexagon.hex-7 { top: 335px !important; left: calc(50% - 195px) !important; transform: translateX(-50%) !important; z-index: 1 !important; }
section#skill .hexagon.hex-8 { top: 335px !important; left: calc(50% - 65px) !important; transform: translateX(-50%) !important; z-index: 1 !important; }
section#skill .hexagon.hex-9 { top: 335px !important; left: calc(50% + 65px) !important; transform: translateX(-50%) !important; z-index: 1 !important; }
section#skill .hexagon.hex-10 { top: 335px !important; left: calc(50% + 195px) !important; transform: translateX(-50%) !important; z-index: 1 !important; }

/* Skill Levels - Different Colors */
section#skill .hexagon.expert {
    background: linear-gradient(135deg, #FF0000, #cc0000) !important;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5) !important;
}

section#skill .hexagon.advanced {
    background: linear-gradient(135deg, #ff3333, #ff6666) !important;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.4) !important;
}

section#skill .hexagon.intermediate {
    background: linear-gradient(135deg, #ff6666, #ff9999) !important;
    box-shadow: 0 0 15px rgba(255, 102, 102, 0.3) !important;
}

section#skill .hexagon.learning {
    background: linear-gradient(135deg, #ff9999, #ffcccc) !important;
    box-shadow: 0 0 10px rgba(255, 153, 153, 0.2) !important;
}

/* Hover Effects - Enlarge in place, rise above others */
section#skill .hexagon:hover {
    transform: translateX(-50%) scale(1.2) !important;
    box-shadow: 0 15px 50px rgba(255, 0, 0, 0.7) !important;
    z-index: 100 !important;
}

section#skill .hexagon.expert:hover {
    box-shadow: 0 20px 60px rgba(255, 0, 0, 0.9) !important;
}

/* Text Inside Hexagon */
section#skill .hex-content {
    color: white !important;
    font-weight: 700 !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    letter-spacing: 1px !important;
    z-index: 1 !important;
    position: relative !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.2 !important;
}

section#skill .hexagon.expert .hex-content {
    font-size: 1.1rem !important;
    font-weight: 900 !important;
}

/* Glow animation for expert level */
@keyframes hexGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 0, 0, 0.8);
    }
}

section#skill .hexagon.expert {
    animation: hexGlow 3s ease-in-out infinite !important;
}

/* Responsive Hexagons */
@media (max-width: 768px) {
    section#skill .hexagon-pyramid {
        height: 500px !important;
    }

    section#skill .hexagon-pyramid .hexagon {
        width: 85px !important;
        height: 99px !important;
    }

    /* Tighter positioning for mobile */
    section#skill .hexagon.hex-1 { top: 10px !important; }
    
    section#skill .hexagon.hex-2 { top: 95px !important; left: calc(50% - 46px) !important; }
    section#skill .hexagon.hex-3 { top: 95px !important; left: calc(50% + 46px) !important; }
    
    section#skill .hexagon.hex-4 { top: 180px !important; left: calc(50% - 92px) !important; }
    section#skill .hexagon.hex-5 { top: 180px !important; left: calc(50%) !important; }
    section#skill .hexagon.hex-6 { top: 180px !important; left: calc(50% + 92px) !important; }
    
    section#skill .hexagon.hex-7 { top: 265px !important; left: calc(50% - 138px) !important; }
    section#skill .hexagon.hex-8 { top: 265px !important; left: calc(50% - 46px) !important; }
    section#skill .hexagon.hex-9 { top: 265px !important; left: calc(50% + 46px) !important; }
    section#skill .hexagon.hex-10 { top: 265px !important; left: calc(50% + 138px) !important; }

    section#skill .hexagon:hover {
        transform: translateX(-50%) scale(1.15) !important;
    }

    section#skill .hex-content {
        font-size: 0.7rem !important;
    }

    section#skill .hexagon.expert .hex-content {
        font-size: 0.85rem !important;
    }
}

/* Skill Legend */
.skill-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.legend-hex {
    width: 35px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.legend-hex.expert {
    background: linear-gradient(135deg, #FF0000, #cc0000);
}

.legend-hex.advanced {
    background: linear-gradient(135deg, #ff3333, #ff6666);
}

.legend-hex.intermediate {
    background: linear-gradient(135deg, #ff6666, #ff9999);
}

.legend-hex.learning {
    background: linear-gradient(135deg, #ff9999, #ffcccc);
}

.legend-item span {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--dark);
}

@media (max-width: 768px) {
    .skill-legend {
        gap: 1.5rem;
    }
    
    .legend-hex {
        width: 30px;
        height: 35px;
    }
    
    .legend-item span {
        font-size: 0.85rem;
    }
}

/* Works Section */
#works {
    background: var(--light);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.work-item {
    background: white;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.work-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.work-image {
    width: 100%;
    height: 300px;
    background: var(--gray);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.3), transparent);
    transition: left 0.6s ease;
}

.work-item:hover .work-image::before {
    left: 100%;
}

.device-mockup {
    width: 60%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.work-info {
    padding: 2rem;
}

.work-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.work-info .tag {
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 1px;
}

/* Hello Section */
#hello {
    background: white;
    text-align: center;
}

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

.hello-content h3 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.hello-content h3::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--primary);
    clip-path: polygon(
        0 25%, 25% 25%, 25% 0, 75% 0, 75% 25%, 100% 25%,
        100% 75%, 75% 75%, 75% 100%, 25% 100%, 25% 75%, 0 75%
    );
}

.hello-content p {
    line-height: 1.8;
    color: #666;
    font-size: 1rem;
}

/* Contact Section */
#contact {
    background: var(--light);
}

.alert {
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.work-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: transform 0.3s ease;
}

.work-link:hover {
    transform: translateX(5px);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 3rem;
    color: #666;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray);
    background: white;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--dark);
    color: white;
    border: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.4s ease;
}

.submit-btn span {
    position: relative;
    z-index: 1;
}

.submit-btn:hover {
    transform: translateY(-3px);
}

.submit-btn:hover::before {
    left: 0;
}

/* Footer */
footer {
    background: var(--dark);
    padding: 3rem 4rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1.5rem 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

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

    .hero-text h1 {
        font-size: 3rem;
    }

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

    section {
        padding: 5rem 2rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

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

    footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}