/* ============================================
   Variables
   ============================================ */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0d1424;
    --bg-card: rgba(19, 28, 53, 0.7);
    --accent-1: #6366f1;
    --accent-2: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(99, 102, 241, 0.15);
    --border-hover: rgba(99, 102, 241, 0.35);
    --glow-hover: 0 0 40px rgba(99, 102, 241, 0.15), 0 0 80px rgba(6, 182, 212, 0.06);
}

/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 3px; }

.mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Header & Nav
   ============================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

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

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gradient);
    transition: width 0.25s ease;
}

nav a:hover { color: var(--text-primary); }
nav a:hover::after { width: 100%; }

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

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

#hero::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 35%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

/* Hero text */
.hero-text {
    flex: 1;
}

.hero-greeting {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 0.75rem;
    background: linear-gradient(160deg, #ffffff 0%, #c7d2fe 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-role .mono {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-desc.ja {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    color: white;
    padding: 0.75rem 1.75rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    padding: 0.75rem 1.75rem;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
}

/* Hero image / avatar */
.hero-image-wrap {
    flex-shrink: 0;
}

.hero-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 0 60px rgba(99, 102, 241, 0.2);
    letter-spacing: 0.05em;
}

.hero-avatar-img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 0 60px rgba(99, 102, 241, 0.2);
    display: block;
}

/* ============================================
   Sections
   ============================================ */
section {
    padding: 6rem 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Alternating section backgrounds */
#about          { background: var(--bg-secondary); }
#skills         { background: var(--bg-primary); }
#certifications { background: var(--bg-secondary); }
#community      { background: var(--bg-primary); }
#interviews     { background: var(--bg-secondary); }
#hobbies        { background: var(--bg-primary); }
#contact        { background: var(--bg-secondary); }

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-hover);
}

/* ============================================
   Bilingual layout
   ============================================ */
.bilingual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.lang-block {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.lang-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.en-block .lang-label {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-1);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.ja-block .lang-label {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-2);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.lang-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.lang-content p:last-child { margin-bottom: 0; }

.lang-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   About — Career timeline
   ============================================ */
.career-timeline {
    border-top: 1px solid var(--border);
    padding-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.career-item {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.career-period {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 110px;
    flex-shrink: 0;
}

.career-detail {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.career-role {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.career-sep {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.career-company {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   Skills
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.skill-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-hover);
    transform: translateY(-4px);
}

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

.skill-icon {
    width: 42px;
    height: 42px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.skill-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tag i {
    font-size: 0.9rem;
    line-height: 1;
}

.tag:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
}

/* ============================================
   Certifications
   ============================================ */
.cert-list-wrap {
    max-width: 760px;
}

.cert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.cert-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}

.cert-list li:last-child { border-bottom: none; }

.cert-year {
    font-size: 0.72rem;
    color: var(--text-muted);
    min-width: 40px;
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.cert-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cert-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.cert-org {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   Community
   ============================================ */
.community-card {
    max-width: 760px;
}

.community-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.community-logo {
    height: 48px;
    width: auto;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    background: #1a2744;
    padding: 6px 10px;
    border: 1px solid var(--border);
}

.community-title {
    flex: 1;
}

.community-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.community-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.community-link {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.community-link:hover { color: var(--accent-2); }

.community-desc {
    margin-bottom: 0;
}

/* ============================================
   Interviews
   ============================================ */
#interviews { background: var(--bg-secondary); }

.interviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 760px;
}

.interview-item {
    text-decoration: none;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.interview-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-hover);
    transform: translateY(-3px);
}

.interview-thumb {
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.interview-body {
    flex: 1;
    position: relative;
    min-width: 0;
}

.interview-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.interview-source {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.interview-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.interview-title-ja {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.2rem;
    padding-right: 1.75rem;
}

.interview-title-en {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    padding-right: 1.75rem;
}

.interview-desc-ja {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.2rem;
}

.interview-desc-en {
    font-size: 0.77rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.interview-arrow {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.interview-item:hover .interview-arrow {
    color: var(--accent-2);
    transform: translateX(3px);
}

@media (max-width: 560px) {
    .interview-item {
        flex-direction: column;
    }
    .interview-thumb {
        width: 100%;
        height: 160px;
    }
}

/* ============================================
   Hobbies (index)
   ============================================ */
#hobbies {
    background: var(--bg-primary);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.hobby-card {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hobby-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-hover);
    transform: translateY(-3px);
}

.hobby-card-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.hobby-card-body {
    flex: 1;
}

.hobby-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.hobby-card-ja {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.hobby-card-en-p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
}

.hobby-card-ja-p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hobby-card-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.hobby-card:hover .hobby-card-arrow {
    color: var(--accent-2);
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .hobbies-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Contact
   ============================================ */
.contact-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.contact-link i { font-size: 1rem; }

.contact-link:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2.5rem;
        padding-top: 6rem;
    }

    .hero-actions { justify-content: center; }

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

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

    .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    nav ul { display: none; }

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

    .hero-avatar {
        width: 160px;
        height: 160px;
        font-size: 2rem;
    }

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

    .career-item { flex-direction: column; gap: 0.25rem; }

    .contact-links { flex-direction: column; }

    .contact-link { justify-content: center; }

    section { padding: 4rem 0; }
}
