:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #a78bfa;
    --background: #ffffff;
    --surface: #f8f9fa;
    --surface-light: #e9ecef;
    --text: #1a1a1a;
    --text-secondary: #6c757d;
    --accent: #f59e0b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.cursor {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.3s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo-accent {
    color: var(--accent);
    font-size: 2rem;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover {
    color: var(--text);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-1);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: var(--gradient-2);
    bottom: -300px;
    right: -300px;
    animation-delay: -5s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: var(--gradient-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-line span {
    display: inline-block;
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.title-line.name {
    color: var(--primary);
    animation-delay: 0.4s;
}

.title-line.role {
    color: var(--accent);
    font-size: 0.8em;
    animation-delay: 0.6s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
    from {
        transform: translateY(100%);
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s forwards;
}

.company-name {
    color: var(--primary);
    font-weight: 600;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--surface-light);
}

.btn-secondary:hover {
    background: var(--surface-light);
    transform: translateY(-2px);
}

/* Floating Code Visual */
.hero-visual {
    position: relative;
}

.floating-code {
    background: #1e1e1e;
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: floatCode 6s ease-in-out infinite;
    overflow: hidden;
}

.terminal-header {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close {
    background: #ff5f56;
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #27c93f;
}

.terminal-title {
    flex: 1;
    text-align: center;
    color: #999;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.terminal-body {
    padding: 1.5rem;
    background: #1e1e1e;
}

@keyframes floatCode {
    0%, 100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }
    50% {
        transform: translateY(-20px) rotateX(5deg) rotateY(5deg);
    }
}

.code-snippet {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #d4d4d4;
}

.code-keyword {
    color: #c678dd;
}

.code-var {
    color: #e06c75;
}

.code-prop {
    color: #56b6c2;
}

.code-string {
    color: #98c379;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.scroll-indicator span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-number {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 400;
}

/* About Section */
.about {
    background: var(--background);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--surface-light);
}

.timeline-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(10px);
    border-color: var(--primary);
}

.timeline-year {
    color: var(--accent);
    font-weight: 600;
    min-width: 60px;
}

.timeline-title {
    color: var(--text);
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--gradient-1);
    opacity: 0.8;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid white;
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.profile-info h3 {
    margin-bottom: 0.5rem;
}

.profile-name-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.facts-list {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.facts-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fact-icon {
    font-size: 1.25rem;
}


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

.skill-card {
    background: var(--background);
    border: 1px solid var(--surface-light);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card[data-category="web"]::before {
    background: var(--gradient-1);
}

.skill-card[data-category="mobile"]::before {
    background: var(--gradient-2);
}

.skill-card[data-category="infra"]::before {
    background: var(--gradient-3);
}

.skill-card[data-category="ai"]::before {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: var(--surface-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skill-tag {
    background: var(--surface-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.skill-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Work Section */
.work {
    background: var(--background);
}

/* Grid Layout for Work Cards */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.work-card {
    background: var(--background);
    border: 1px solid var(--surface-light);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.work-card:hover::before {
    transform: scaleX(1);
}

/* Different gradients for work cards */
.work-card:nth-child(1)::before,
.work-card:nth-child(4)::before {
    background: var(--gradient-1);
}

.work-card:nth-child(2)::before,
.work-card:nth-child(5)::before {
    background: var(--gradient-2);
}

.work-card:nth-child(3)::before,
.work-card:nth-child(6)::before {
    background: var(--gradient-3);
}

.work-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-secondary);
    opacity: 0.4;
    line-height: 1;
}

.work-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    padding-right: 3rem; /* Space for the number */
}

.work-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.work-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-tech span {
    background: var(--surface-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Legacy showcase styles - keeping for backward compatibility */
.work-showcase {
    display: grid;
    gap: 3rem;
}

.showcase-item {
    background: var(--surface);
    border: 1px solid var(--surface-light);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.showcase-item:hover {
    transform: translateX(10px);
    box-shadow: -10px 0 40px rgba(99, 102, 241, 0.2);
}

.showcase-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 5rem;
    font-weight: 800;
    color: var(--surface-light);
    opacity: 0.3;
}

.showcase-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.showcase-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.showcase-tech {
    display: flex;
    gap: 1rem;
}

.showcase-tech span {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
}



/* Contact Section */
.contact {
    background: var(--surface);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--background);
    border: 2px solid var(--surface-light);
    border-radius: 50px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.contact-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.contact-link svg {
    width: 24px;
    height: 24px;
}

/* Footer */
.footer {
    background: var(--background);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--surface-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--surface-light);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .showcase-item {
        padding: 2rem;
    }
    
    .showcase-number {
        font-size: 3rem;
        top: 1rem;
        right: 1rem;
    }
    
    /* Work grid mobile adjustments */
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .work-card {
        padding: 1.5rem;
    }
    
    .work-number {
        font-size: 2rem;
        top: 1rem;
        right: 1rem;
    }
}