:root {
    --font-sans: "Inter", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
    --font-japanese: "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
    --portfolio-primary: #1e3c5a;
    --portfolio-primary-dark: #102334;
    --portfolio-secondary: #4f7892;
    --portfolio-border: #d9e1e7;
    --portfolio-muted: #667580;
    --portfolio-surface: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    color: #26323b;
    font-family: var(--font-sans);
    font-feature-settings: "kern" 1, "liga" 1;
    font-synthesis: none;
    line-height: 1.8;
    text-rendering: optimizeLegibility;
}

a {
    text-underline-offset: 0.2em;
}

.navbar {
    background: rgb(16 35 52 / 96%);
    backdrop-filter: blur(12px);
}

.hero {
    min-height: 88vh;
    padding-top: 76px;
    color: #ffffff;
    background:
        radial-gradient(circle at 88% 20%, rgb(141 198 232 / 16%), transparent 32%),
        linear-gradient(120deg, rgb(16 35 52 / 99%), rgb(30 60 90 / 94%));
}

.hero-label,
.section-label,
.software-type {
    margin-bottom: 0.5rem;
    color: var(--portfolio-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-label {
    color: #abd4ed;
}

.hero-description {
    max-width: 760px;
    color: #e4edf3;
}

.profile-image {
    max-width: 100%;
    height: auto;
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 50%;
    box-shadow: 0 2rem 4rem rgb(0 0 0 / 22%);
}

.section-padding {
    padding: 5.5rem 0;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 2.75rem;
}

.section-heading h2 {
    position: relative;
    margin-bottom: 0;
    padding-bottom: 0.9rem;
    font-weight: 700;
}

.section-heading h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--portfolio-primary);
    content: "";
}

.light-heading h2,
.light-heading .section-label {
    color: #ffffff;
}

.light-heading h2::after {
    background: #9ccce8;
}

.profile-table {
    margin: 0;
    border-top: 1px solid var(--portfolio-border);
}

.profile-table div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--portfolio-border);
}

.profile-table dt,
.profile-table dd {
    margin: 0;
}

.research-card,
.software-panel,
.skill-group {
    border: 1px solid var(--portfolio-border);
    border-radius: 0.85rem;
    background: var(--portfolio-surface);
}

.research-card {
    padding: 2rem;
}

.research-number {
    margin-bottom: 1rem;
    color: var(--portfolio-secondary);
    font-weight: 700;
}

.research-card h3 {
    margin-bottom: 1rem;
    font-size: 1.45rem;
}

.research-card ul,
.software-features,
.skill-group ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.software-panel {
    padding: 2.25rem;
    border-color: #b8ccd8;
    box-shadow: 0 1rem 2.5rem rgb(16 35 52 / 7%);
}

.output-group+.output-group {
    margin-top: 3.5rem;
}

.output-heading {
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--portfolio-border);
    font-size: 1.35rem;
}

.bibliography-year {
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    color: var(--portfolio-primary);
    font-size: 1rem;
    font-weight: 700;
}

.bibliography-year:first-child {
    margin-top: 0;
}

.output-entry {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--portfolio-border);
}

.output-entry:last-child {
    border-bottom: 0;
}

.output-badges {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.35rem;
    min-width: 5.5rem;
}

.output-citation {
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.75;
    text-indent: -1.5rem;
}

.output-citation a {
    color: inherit;
    font-weight: 600;
    text-decoration-thickness: 1px;
}

.output-citation a:hover {
    color: var(--portfolio-primary);
}

.output-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    color: #315064;
    background: #e8f0f5;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.output-badge.secondary {
    color: #5a4a26;
    background: #f3ead1;
}

.education-list {
    max-width: 900px;
}

.education-item {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--portfolio-border);
}

.education-item:first-child {
    border-top: 1px solid var(--portfolio-border);
}

.education-period {
    margin: 0;
    color: var(--portfolio-primary);
    font-weight: 700;
}

.skill-group {
    padding: 1.5rem;
}

.profile-section {
    color: #ffffff;
    background: linear-gradient(120deg, var(--portfolio-primary-dark), var(--portfolio-primary));
}

.profile-link {
    display: flex;
    min-height: 125px;
    flex-direction: column;
    justify-content: center;
    padding: 1.4rem;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 0.8rem;
    color: #ffffff;
    background: rgb(255 255 255 / 7%);
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.profile-link:hover {
    transform: translateY(-3px);
    color: #ffffff;
    background: rgb(255 255 255 / 12%);
}

.profile-link span {
    margin-top: 0.35rem;
    color: #dce8ef;
}

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

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--portfolio-primary-dark);
    background-color: var(--portfolio-primary-dark);
}

.site-footer {
    padding: 1.7rem 0;
    color: #dce6ec;
    background: #0a1822;
}

@media (max-width: 991.98px) {
    .hero {
        min-height: auto;
        padding-top: 8.5rem;
        padding-bottom: 5rem;
    }
}

@media (max-width: 767.98px) {
    .section-padding {
        padding: 4rem 0;
    }

    .profile-table div,
    .education-item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .output-entry {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .output-badges {
        min-width: 0;
    }
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.btn,
.hero-label,
.section-label,
.software-type,
.output-badge,
.education-period {
    font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.018em;
}

.hero-description,
.research-card p,
.software-panel p,
.profile-table,
.education-item,
.skill-group,
.output-citation {
    font-family: var(--font-sans);
}

.output-citation em {
    font-style: normal;
    font-weight: 600;
}

.output-citation a {
    font-weight: 500;
}

html[lang="ja"] body {
    font-family: var(--font-sans);
    font-weight: 400;
}

html[lang="ja"] .hero-description,
html[lang="ja"] .research-card,
html[lang="ja"] .software-panel,
html[lang="ja"] .profile-table,
html[lang="ja"] .education-item,
html[lang="ja"] .skill-group,
html[lang="ja"] .output-citation {
    letter-spacing: 0.01em;
}

html[lang="en"] .output-citation,
html[lang="en"] .hero-description {
    letter-spacing: -0.005em;
}


.contact-section {
    background: #ffffff;
}

.contact-intro {
    max-width: 760px;
    margin-bottom: 2rem;
    color: #52616b;
}

.contact-card {
    display: flex;
    min-height: 120px;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    border: 1px solid var(--portfolio-border);
    border-radius: 0.8rem;
    color: #26323b;
    background: #f8fafb;
    box-shadow: 0 0.3rem 1rem rgb(16 35 52 / 6%);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--portfolio-secondary);
    color: var(--portfolio-primary);
    box-shadow: 0 0.8rem 1.8rem rgb(16 35 52 / 10%);
}

.contact-card-label {
    margin-bottom: 0.35rem;
    color: var(--portfolio-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-card-value {
    font-size: 1.05rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}