/* Enhanced Dark Theme Portfolio */

:root {
    --bg: #0a0a0a;
    --bg-card: #111;
    --bg-card-hover: #161616;
    --border: #1a1a1a;
    --border-hover: #333;
    --text: #f5f5f5;
    --text-secondary: #999;
    --text-muted: #666;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.2);
    --green: #22c55e;
    --font: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
}

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

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.lang-toggle svg {
    opacity: 0.7;
}

/* Main Content */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Hero */
.hero {
    padding: 160px 0 100px;
    border-bottom: 1px solid var(--border);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 50px;
    font-size: 13px;
    color: var(--green);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero .label {
    font-size: 14px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero .subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-width: 600px;
}

.hero .summary {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Sections */
.section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border);
}

.section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.section-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    align-items: start;
}

.about-text p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    position: sticky;
    top: 120px;
}

.image-frame {
    background: linear-gradient(135deg, var(--accent), var(--accent-glow));
    padding: 4px;
    border-radius: 16px;
}

.profile-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top center;
    border-radius: 12px;
    display: block;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s;
}

.skill-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-card li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
}

.skill-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.job {
    display: flex;
    gap: 32px;
}

.job-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
}

.marker-dot {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.marker-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    margin: 12px 0;
}

.job-content {
    flex: 1;
    padding-bottom: 48px;
}

.job:last-child .job-content {
    padding-bottom: 0;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.job-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.job-header .company {
    font-size: 15px;
    color: var(--accent);
}

.job-header .period {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 6px;
}

.country-flag {
    margin-left: 6px;
    width: 16px;
    height: 12px;
    border-radius: 2px;
    vertical-align: -1px;
    object-fit: cover;
}

.job ul {
    list-style: none;
}

.job li {
    font-size: 15px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
    line-height: 1.6;
}

.job li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.project-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-card > p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-card .project-role {
    margin-bottom: 10px;
}

.project-card .project-role strong {
    color: var(--text);
    font-weight: 600;
}

.project-card ul {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.project-card li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
    margin-bottom: 8px;
}

.project-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.project-subsections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.project-subsection {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--bg);
}

.subsection-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--accent);
}

.subsection-title h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.project-subsection p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.project-live-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-hover);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.project-live-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-card-hover);
}

/* Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
}

.value-card:hover {
    border-color: var(--border-hover);
}

.value-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.value-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact */
.contact-intro {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.contact-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 32px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-name {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-image {
        position: static;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .hero-stats {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 0 20px;
    }

    main {
        padding: 0 20px;
    }

    .nav-links a:not(:last-child):not(.lang-toggle) {
        display: none;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .about-image {
        max-width: 300px;
    }

    .profile-image {
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .stat-value {
        font-size: 28px;
    }

    .section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .skills-grid,
    .projects-grid,
    .values-grid,
    .contact-cards {
        grid-template-columns: 1fr;
    }

    .job {
        gap: 20px;
    }

    .job-header {
        flex-direction: column;
        gap: 8px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .contact-card {
        padding: 16px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
    }

    .about-image {
        max-width: 260px;
    }
}
