:root {
    --font-sans: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
    --bg: #ffffff;
    --ink: #111111;
    --muted: #555555;
    --quiet: #777777;
    --link-blue: #1d4ed8;
    --line: #d8d8d8;
    --line-strong: #111111;
    --surface: #ffffff;
    --surface-soft: #f6f6f6;
    --surface-softer: #fafafa;
    --radius: 6px;
    --max-width: 980px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ink);
    text-decoration-color: var(--quiet);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-color: var(--ink);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: var(--max-width);
    min-height: 68px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 1.3585rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 1.053rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.nav-item:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-left: 6px;
    background: var(--bg);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
}

.lang-option {
    min-height: 34px;
    min-width: 74px;
    padding: 6px 12px;
    background: var(--bg);
    color: var(--ink);
    border: 0;
    border-right: 1px solid var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.lang-option:last-child {
    border-right: 0;
}

.lang-option:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.lang-option.is-active {
    background: var(--ink);
    color: var(--bg);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 56px 28px 88px;
}

.profile-section {
    position: relative;
    padding: 13px 0 52px;
    margin-bottom: 46px;
    border-bottom: 2px solid var(--line-strong);
    scroll-margin-top: 96px;
}

.profile-text {
    max-width: 820px;
}

.name {
    margin: 0 0 18px;
    font-size: clamp(1.12rem, 3.2vw, 2.36rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
}

.affiliation {
    max-width: 720px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 500;
}

.jp-affiliation-spacer {
    display: none;
}

html[lang="ja"] .jp-affiliation-spacer {
    display: block;
    height: 1.75em;
}

.lab-link,
.contact-email,
.paper-title-link,
.link-arrow {
    color: var(--link-blue);
    font-weight: 750;
    text-decoration-color: currentColor;
}

.profile-links-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.profile-tags {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 28px;
}

.interest-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 20px;
    border-left: 2px solid var(--line);
}

.contact-links {
    display: inline-grid;
    grid-template-columns: max-content;
    max-width: 100%;
    margin: 0;
}

.contact-links > div {
    min-width: 0;
    min-height: 42px;
    padding: 0 14px;
    background: var(--surface-softer);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 0.95rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.contact-links a {
    overflow-wrap: anywhere;
}

.mail-icon {
    color: var(--link-blue);
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1.25rem;
}

.social-icons a {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

.social-icons img {
    width: 1em;
    height: 1em;
    display: block;
}

.social-icons a:hover img {
    filter: invert(1);
}

.social-icons a:hover {
    background: var(--ink);
    color: var(--bg);
}

.social-icons .disabled {
    color: var(--quiet);
    pointer-events: none;
    border-color: var(--line);
}

.section {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
    gap: 28px;
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 96px;
}

.section:last-child {
    border-bottom: 0;
}

.section > h2 {
    grid-column: 1;
    grid-row: 1 / -1;
}

.section > :not(h2) {
    grid-column: 2;
}

h2,
h3,
p {
    overflow-wrap: anywhere;
}

h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.425rem;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.08em;
}

h3 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0;
    background: transparent;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
}

.profile-tags .tag:not(.tag-label)::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: 6px;
    background: var(--ink);
    border-radius: 50%;
}

.tag-label {
    margin-right: 3px;
    color: var(--ink);
    font-size: 1.5rem;
    font-weight: 900;
}

.timeline {
    display: grid;
    gap: 0;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(145px, 0.42fr) minmax(0, 1fr);
    gap: 22px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.timeline-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-date {
    color: var(--quiet);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.45;
}

.timeline-content p {
    margin: 0;
}

.timeline-affiliation {
    color: var(--ink);
    font-weight: 850;
}

.timeline-detail {
    color: var(--muted);
    font-weight: 500;
}

.paper-list,
.skill-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paper-list + h3 {
    margin-top: 34px;
}

.paper-list li,
.skill-list li {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.paper-list li:first-child,
.skill-list li:first-child {
    padding-top: 0;
    border-top: 0;
}

.paper-list li:last-child,
.skill-list li:last-child {
    padding-bottom: 0;
}

.paper-content {
    display: grid;
    gap: 4px;
}

.paper-venue {
    display: block;
    color: var(--quiet);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.5;
}

.paper-title {
    display: block;
    color: var(--ink);
    font-size: 1.1rem;
    font-weight: 850;
    line-height: 1.55;
}

.paper-authors {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.author-affiliation {
    color: var(--ink);
    font-weight: 750;
}

.award-link {
    display: inline-block;
    margin-top: 4px;
}

.skill-list {
    display: grid;
    gap: 0;
}

.skill-list li {
    color: var(--muted);
    font-size: 1rem;
}

.skill-list strong {
    color: var(--ink);
    font-weight: 900;
}

.lang-en {
    display: none;
}

footer {
    padding: 40px 0;
    color: var(--quiet);
    text-align: center;
    font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

@media (max-width: 820px) {
    .nav-container {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 14px 20px;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .container {
        padding: 38px 20px 64px;
    }

    .profile-section {
        padding: 10.5px 0 42px;
        margin-bottom: 30px;
    }

    .section,
    .timeline-item {
        grid-template-columns: 1fr;
    }

    .section {
        gap: 18px;
        padding: 30px 0;
    }

    .section > h2,
    .section > :not(h2) {
        grid-column: 1;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 15px;
    }

    .nav-container {
        padding-inline: 16px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-item {
        min-height: 32px;
        padding: 5px 7px;
        font-size: 0.9594rem;
    }

    .lang-switch {
        margin-left: 2px;
    }

    .lang-option {
        min-height: 30px;
        min-width: 64px;
        padding: 5px 8px;
        font-size: 0.78rem;
    }

    .container {
        padding: 30px 16px 52px;
    }

    .name {
        font-size: clamp(0.92rem, 6vw, 1.6rem);
    }

    .contact-links > div {
        padding: 11px 12px;
        white-space: normal;
    }
}
