/* Global Styles & Variables */
:root {
    --bg-color: #0d0e12;
    --text-primary: #f0f2f5;
    --text-secondary: #a0a5b0;
    --accent-color: #00f2ff;
    /* Cyan Neon */
    --accent-secondary: #7000ff;
    /* Purple Neon */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 10px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Background Glow Effect */
.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.08) 0%, rgba(112, 0, 255, 0.05) 40%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 10s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

.text-gradient {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(0, 242, 255, 0.1);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 0.5rem 0;
    background: rgba(13, 14, 18, 0.8);
    backdrop-filter: blur(20px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.nav-list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-list a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--accent-color);
}

.nav-list .btn-primary {
    color: #fff;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1c24 0%, #000000 100%);
    /* Deep dark gradient */
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind content */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    position: relative;
    /* Ensure above canvas */
}

.hero-content {
    flex: 1;
    z-index: 10;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    min-height: 1.6em;
    /* Reserve space for typing */
    border-right: 2px solid var(--accent-color);
    /* Cursor effect */
    display: inline-block;
    padding-right: 5px;
    animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--accent-color);
    }
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Removed cube for now, relying on particles + tilt, or keep as center piece? 
       Let's keep the cube but maybe make it float more smoothly or add a glow */
}

/* Abstract Cube Animation - Enhanced */
.cube-wrapper {
    perspective: 1000px;
}

.cube {
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
}

/* Enhanced face style for cyber look */
.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(0, 242, 255, 0.05);
    /* Cyan tint */
    border: 1px solid rgba(0, 242, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2) inset, 0 0 20px rgba(0, 242, 255, 0.2);
}

/* ... rotation keyframes same ... */

/* Profile Section */
.profile-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* Advanced Glass with subtle gradient border */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Specialized Fields */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    padding: 2.5rem;
    transition: all 0.1s ease-out;
    /* Faster transition for Tilt */
    transform-style: preserve-3d;
    perspective: 1000px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

/*.card:hover handled by JS now roughly, but keeping basic hover for non-js fallback*/


.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Achievements (Timeline Style) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--glass-border);
    transform: translateX(-50%);
}

.timeline-item {
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    margin-left: auto;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 2.5rem;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    left: -10vw;
    /* Rough adjustment, refined in JS or specific calculation if width fixed */
    left: calc(-5vw - 11px);
    /* Better dynamic calc relative to gap */
}

/* Re-doing timeline connector logic for better CSS only approach */
.timeline-item:nth-child(even) {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item:nth-child(odd) {
    margin-left: auto;
    margin-right: 0;
}

.timeline-item:nth-child(odd)::after {
    left: -42px;
    /* Half of gap roughly */
    left: calc(-1 * (50vw - 100%) - 10px);
    /* Too complex, use media query adjustment or simplified lines */
    left: -58px;
    /* Manual tune for gap */
}

.timeline-item:nth-child(even)::after {
    right: -58px;
}

/* Simplification for timeline line */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline::before {
    display: none;
}

/* Remove center line for simpler stacked cards on mobile, re-add on desktop properly if needed. Let's stick to simple cards for now actually to ensure cleanliness. */
.timeline-item {
    width: 100%;
    margin: 0;
}

.timeline-item::after {
    display: none;
}

/* Let's make it a grid instead for reliability */
.timeline {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}


.project-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

.project-details {
    margin-top: 1rem;
    list-style: disc inside;
    color: var(--text-secondary);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    padding: 2rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags span {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.tags span:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(0, 242, 255, 0.05);
}

/* Services */
.services-list {
    padding: 3rem;
}

.services-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem 3rem;
}

.services-list li i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Contact */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-identity {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-color);
}

.contact-name {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-role-small {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-left: 10px;
}

.contact-org {
    color: var(--accent-color);
    font-size: 1rem;
}

.contact-details {
    margin-top: 0;
    /* Adjusted */
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.detail-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.contact-form {
    flex: 1.5;
    min-width: 300px;
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-visual {
        margin-bottom: 2rem;
    }

    .nav-list {
        display: none;
    }

    /* Mobile Menu would need JS toggle */
    .hamburger {
        display: flex;
    }

    /* Mobile Menu Active State */
    .nav.active .nav-list {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(13, 14, 18, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
}