/* =========================================================
   河並研究室 GitHub Pages メインサイト
   - index.html を中心に、profile.html / activity.html を分離
   ========================================================= */

:root {
    --main: #0b4f9c;
    --main-dark: #083b73;
    --main-soft: #eef7ff;
    --accent: #f0a31a;
    --accent-soft: #fff3d8;
    --green: #0b6b4b;
    --green-soft: #eefaf5;
    --purple: #5d3f9d;
    --purple-soft: #f3effd;
    --bg: #f6f8fb;
    --surface: #ffffff;
    --text: #24323f;
    --muted: #4f5f70;
    --border: #dbe5ef;
    --footer: #0f172a;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 18px 42px rgba(15, 23, 42, 0.14);
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
    line-height: 1.8;
}

/* 固定ヘッダー分だけページ内リンクの位置を下げる */
section[id],
div[id] {
    scroll-margin-top: 92px;
}

#top {
    position: absolute;
    top: 0;
}

/* 通常リンク -------------------------------------------------
   本文中のリンクは、一般的なWebリンクとして青＋下線で表示する。
   ヘッダー、ボタン、カードなどのUI要素は後続の指定で下線を消す。
------------------------------------------------------------ */
a {
    color: #0969da;
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover {
    color: #0550ae;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 1000;
    padding: 8px 12px;
    background: #fff;
    color: var(--main-dark);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ヘッダー --------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

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

.site-logo {
    display: flex;
    flex-direction: column;
    min-width: 260px;
    color: var(--main-dark);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.03em;
    text-decoration: none;
}

.site-logo:hover {
    color: var(--main-dark);
    text-decoration: none;
}

.site-logo span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.global-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    font-size: 0.9rem;
}

.global-nav a {
    padding: 6px 0;
    color: #324354;
    font-weight: 800;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.global-nav a:hover {
    color: var(--main);
    border-bottom-color: var(--main);
    text-decoration: none;
}

/* 共通レイアウト --------------------------------------------- */
.section {
    padding: 72px 0;
}

.section-white {
    background: #fff;
}

.section-inner,
.hero-inner,
.page-hero-inner,
.footer-inner {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.section-heading {
    margin-bottom: 34px;
}

.section-kicker {
    margin-bottom: 8px;
    color: var(--main);
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.35;
}

.section-lead {
    max-width: none;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.grid-2,
.grid-3,
.grid-4,
.split,
.hero-inner {
    display: grid;
    gap: 24px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.content-card {
    padding: 28px;
}

.card h3 {
    margin: 0 0 10px;
    color: var(--main-dark);
    font-size: 1.15rem;
    line-height: 1.5;
}

.card p,
.card li {
    color: #536171;
}

.card-link {
    text-decoration: none;
}

.card-link:hover {
    text-decoration: none;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    text-decoration: none;
}

.button-primary {
    background: var(--main);
    color: #fff;
}

.button-primary:hover {
    color: #fff;
}

.button-secondary {
    background: #fff;
    color: var(--main-dark);
    border: 1px solid var(--border);
}

.button-secondary:hover {
    color: var(--main-dark);
}

.button-light {
    background: #fff;
    color: var(--main-dark);
}

.button-light:hover {
    color: var(--main-dark);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--main-dark);
    background: var(--main-soft);
    font-size: 0.78rem;
    font-weight: 900;
}

.tag-accent {
    color: #845500;
    background: var(--accent-soft);
}

.tag-green {
    color: var(--green);
    background: var(--green-soft);
}

.tag-purple {
    color: var(--purple);
    background: var(--purple-soft);
}

/* 画像：はみ出し対策 ----------------------------------------- */
.image-frame {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.image-frame img {
    width: 100%;
    max-height: 430px;
    object-fit: contain;
    background: #f8fbff;
}

.image-frame.photo img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.figure-caption {
    padding: 14px 18px 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.theme-card {
    overflow: hidden;
}

.theme-card figure {
    margin: 0;
    background: #f8fbff;
}

.theme-card figure img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 10px;
}

.theme-card.photo figure img {
    object-fit: cover;
    padding: 0;
}

.theme-body {
    padding: 24px;
}

.theme-index {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    color: var(--main);
    background: var(--main-soft);
    border-radius: 14px;
    font-weight: 900;
}

/* ヒーロー --------------------------------------------------- */
.hero {
    padding: 76px 0 70px;
    color: #fff;
    background: linear-gradient(135deg, rgba(8,59,115,.98), rgba(11,79,156,.93));
}

.hero-inner {
    grid-template-columns: 1.02fr 0.98fr;
    align-items: center;
}

.hero-label {
    display: inline-flex;
    padding: 6px 12px;
    margin-bottom: 22px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    font-size: .86rem;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 5vw, 3.45rem);
    line-height: 1.25;
    letter-spacing: .03em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255,255,255,.92);
    font-size: 1.05rem;
}

.hero-visual {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 50px rgba(0,0,0,.18);
    background: #fff;
}

.hero-visual img {
    width: 100%;
    max-height: 430px;
    object-fit: contain;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
    width: min(var(--max-width), calc(100% - 32px));
    margin: -30px auto 0;
    position: relative;
    z-index: 2;
}

.stat-card {
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.stat-card strong {
    display: block;
    color: var(--main-dark);
    font-size: 1.22rem;
}

.stat-card span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .88rem;
}

.page-hero {
    padding: 58px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--main-dark), var(--main));
}

.page-hero .breadcrumb {
    margin-bottom: 8px;
    opacity: .82;
    font-size: .86rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.95rem,4vw,2.85rem);
    line-height: 1.3;
}

.page-hero p {
    max-width: 850px;
    margin: 0;
    color: rgba(255,255,255,.92);
}

/* 研究室選択→大学院の流れ ---------------------------------- */
.pathway {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.path-step {
    position: relative;
    padding: 24px;
}

.path-step .step-label {
    color: var(--main);
    font-weight: 900;
    font-size: .86rem;
    letter-spacing: .1em;
}

.path-step h3 {
    margin-top: 6px;
}

/* 活動履歴・業績 -------------------------------------------- */
.news-year {
    margin-top: 42px;
}

.news-year h2 {
    margin: 0 0 14px;
    padding-left: 12px;
    border-left: 5px solid var(--main);
    font-size: 1.45rem;
}

.news-list {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.news-item {
    display: grid;
    grid-template-columns: 106px 110px 1fr;
    gap: 14px;
    align-items: baseline;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

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

.news-date {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 800;
}

.news-title {
    color: #24323f;
    font-weight: 800;
    line-height: 1.6;
    text-decoration: none;
}
.news-title a {
    color: #0969da;
    font-weight: 800;
    line-height: 1.6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.news-title a:hover {
    color: #0550ae;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.publication-list {
    display: grid;
    gap: 16px;
}

.publication-item {
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.publication-item h3 {
    margin: 0 0 8px;
    color: #102a43;
    font-size: 1rem;
    line-height: 1.55;
}

.publication-item p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}

.profile-photo {
    width: min(320px, 100%);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.info-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.info-list div {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e7eef6;
    border-radius: 10px;
}

.info-list strong {
    display: inline-block;
    min-width: 6.5em;
    color: #2b3745;
}

.bullet-list {
    margin: 0;
    padding-left: 1.2em;
}

.bullet-list li + li {
    margin-top: 8px;
}

.cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 26px;
    align-items: center;
    padding: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--main-dark), var(--main));
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 42px rgba(8,59,115,.24);
}

.cta h2 {
    margin: 0 0 10px;
    font-size: 1.65rem;
}

.cta p {
    margin: 0;
    color: rgba(255,255,255,.92);
}

.footer {
    padding: 34px 0;
    color: #cbd5e1;
    background: var(--footer);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.footer strong {
    color: #fff;
}

.footer a {
    color: #fff;
    opacity: .95;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* レスポンシブ ------------------------------------------------ */
@media (max-width: 980px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .global-nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .hero-inner,
    .split,
    .grid-2,
    .grid-3,
    .grid-4,
    .cta,
    .pathway {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .section {
        padding: 56px 0;
    }

    .hero {
        padding: 60px 0 54px;
    }

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

    .news-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .content-card,
    .theme-body,
    .path-step,
    .cta {
        padding: 24px;
    }

    .footer-inner {
        flex-direction: column;
    }
}
