:root {
    --color-primary: #0073e6;
    --color-primary-dark: #005bb5;
    --color-accent: #42ffff;
    --color-bg: #f5f9ff;
    --color-bg-soft: #eef6ff;
    --color-card: #ffffff;
    --color-card-soft: #f7fbff;
    --color-text: #243444;
    --color-text-light: #4b6075;
    --color-border: #cfe0f2;
    --shadow-soft: 0 10px 30px rgba(0, 60, 120, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --content-width: 1080px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", Arial, sans-serif;
    background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
    color: var(--color-text);
    line-height: 1.8;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    overflow-wrap: anywhere;
}

a:hover,
 a:focus-visible {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
}

p,
ul,
ol {
    margin-top: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 115, 230, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(0, 60, 120, 0.15);
}

.site-header-inner {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
}

.site-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-title:hover,
.site-title:focus-visible {
    color: #fff;
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    text-decoration: none;
}

.container {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 28px auto 56px;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #d9e8f8;
    box-shadow: var(--shadow-soft);
    min-height: 320px;
}

.hero img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    object-position: center 35%;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-text {
    position: absolute;
    inset: auto 24px 24px 24px;
    z-index: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    backdrop-filter: blur(2px);
}

.hero-text h1,
.hero-text p {
    margin: 0;
}

.hero-text h1 {
    font-size: clamp(1.5rem, 3.6vw, 2.4rem);
    line-height: 1.25;
}

.hero-text p {
    margin-top: 6px;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.95;
}

.card {
    margin-top: 28px;
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.card h2,
.card h3 {
    scroll-margin-top: 100px;
}

.intro p,
.section-block p,
.note-box p {
    margin-bottom: 0;
}

.intro p + p,
.section-block p + p,
.note-box p + p {
    margin-top: 1em;
}

.section-title {
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 1.25rem;
    line-height: 1.4;
}

.subsection-title {
    margin: 28px 0 12px;
    color: var(--color-primary-dark);
    font-size: 1.05rem;
    line-height: 1.5;
}

.text-muted {
    color: var(--color-text-light);
}

.page-links {
    padding: 18px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.page-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-links a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    color: var(--color-primary-dark);
    font-size: 0.95rem;
    line-height: 1.4;
}

.page-links a:hover,
.page-links a:focus-visible {
    background: #e1efff;
    text-decoration: none;
}

.news-block {
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-list li {
    display: grid;
    grid-template-columns: 10.5rem 1fr;
    gap: 8px 18px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #e4eef8;
}

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

.news-list strong {
    display: block;
    color: var(--color-primary-dark);
    font-weight: 700;
    line-height: 1.6;
}

.news-list span {
    min-width: 0;
}

.resource-list,
.detail-list,
.compact-list,
.simple-list {
    margin: 0;
    padding-left: 1.25rem;
}

.resource-list li,
.detail-list li,
.compact-list li,
.simple-list li {
    margin-bottom: 12px;
}

.compact-list li:last-child,
.resource-list li:last-child,
.detail-list li:last-child,
.simple-list li:last-child {
    margin-bottom: 0;
}

.definition-list {
    display: grid;
    gap: 14px;
}

.definition-item {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-card-soft);
}

.definition-item dt {
    font-weight: 700;
    color: var(--color-primary-dark);
}

.definition-item dd {
    margin: 6px 0 0;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(160px, 210px) 1fr;
    gap: 24px;
    align-items: start;
}

.profile-photo {
    width: 100%;
    max-width: 180px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.profile-panel {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-card-soft);
}

.profile-name {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.4;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 0 0 18px;
}

.publication-list {
    margin: 0;
    padding-left: 1.4rem;
}

.publication-list li {
    margin-bottom: 14px;
}

.publication-list li:last-child {
    margin-bottom: 0;
}

.schedule-figure {
    margin: 0;
}

.schedule-figure img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.figure-note {
    margin-top: 14px;
}

.student-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.student-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.student-card img {
    width: 120px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius-sm);
    background: #fff;
    flex-shrink: 0;
}

.student-card h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    line-height: 1.5;
}

.student-card p {
    margin: 0;
}

.note-box {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: #eef6ff;
    border: 1px solid var(--color-border);
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.card-soft {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--color-card-soft);
    border: 1px solid var(--color-border);
}

.card-soft h3 {
    margin: 0 0 10px;
    color: var(--color-primary-dark);
    font-size: 1rem;
}

@media (max-width: 900px) {
    .site-header-inner {
        justify-content: center;
        align-items: stretch;
    }

    .site-title {
        width: 100%;
        text-align: center;
        white-space: normal;
    }

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

    .news-list li {
        grid-template-columns: 9rem 1fr;
    }

    .profile-layout,
    .cards-grid,
    .student-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 20px), var(--content-width));
        margin-top: 20px;
        margin-bottom: 40px;
    }

    .site-header-inner {
        width: min(calc(100% - 20px), var(--content-width));
        padding: 12px 0;
        gap: 12px;
    }

    .site-nav {
        gap: 8px;
    }

    .site-nav a {
        padding: 8px 12px;
        font-size: 0.92rem;
    }

    .hero,
    .hero img {
        min-height: 220px;
    }

    .hero-text {
        inset: auto 12px 12px 12px;
        padding: 14px 16px;
    }

    .card {
        margin-top: 20px;
        padding: 18px 16px;
    }

    .page-links {
        padding: 16px;
    }

    .news-list li {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 0;
    }

    .news-list strong {
        font-size: 0.95rem;
    }

    .student-card {
        flex-direction: column;
    }

    .student-card img {
        width: min(100%, 140px);
        height: auto;
        max-height: 180px;
        object-fit: contain;
        object-position: center;
        align-self: center;
    }
}

.map-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 12px;
}

.map-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}