/* ============================================================
   Takumi Matsuba — Researcher Portfolio  (shared stylesheet)
   Palette & typography unchanged from the original design.
   ============================================================ */

:root {
    --bg-color: #fdfdfd;
    --text-color: #333333;
    --accent-color: #888888;
    --soft-gray: #f4f4f4;
    --border-color: #ddd;
    --nav-bg: rgba(253, 253, 253, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Shippori Mincho', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
    text-align: left;
}

/* ---------------- Navigation ---------------- */
nav.top-nav {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    backdrop-filter: blur(5px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
nav.top-nav ul {
    display: flex; justify-content: center; list-style: none;
    gap: 25px; align-items: center; min-width: max-content;
    padding: 0 20px; margin: 0 auto;
}
nav.top-nav a, .lang-switch {
    text-decoration: none; color: var(--text-color); font-size: 0.75rem;
    letter-spacing: 0.05rem; text-transform: uppercase; cursor: pointer;
    background: none; border: none; font-family: inherit; white-space: nowrap;
    padding-bottom: 2px; border-bottom: 1px solid transparent; transition: 0.3s;
}
nav.top-nav a:hover { border-bottom-color: var(--border-color); }
nav.top-nav a.current { border-bottom-color: var(--text-color); }
.lang-switch { border: 1px solid var(--text-color); padding: 2px 8px; display: inline-block; }
.lang-switch:hover { background: var(--text-color); color: #fff; border-bottom-color: var(--text-color); }

/* ---------------- Hero slideshow ---------------- */
.hero-name-area {
    position: relative; width: 100%; height: 450px; margin-top: 45px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background-color: #000;
}
.hero-bg-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.slide-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: grayscale(100%) brightness(45%); opacity: 0;
    transition: opacity 2s ease-in-out, transform 12s linear;
}
.slide-img.active { opacity: 1; transform: scale(1.1); }
.hero-content { position: relative; z-index: 10; text-align: center; color: #fff; padding: 0 40px; pointer-events: none; }
.hero-content h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: 0.3rem; text-transform: uppercase; font-weight: 400; }
.hero-content .name-sub { font-size: 1.5rem; letter-spacing: 0.5rem; opacity: 0.8; margin-top: 5px; }

/* ---------------- Profile ---------------- */
.profile-container { max-width: 1100px; margin: 60px auto; padding: 0 40px; display: flex; gap: 60px; align-items: flex-start; }

/* my-photo.jpgの横長表示に合わせた枠の調整（幅を広げ、高さを抑える） */
.profile-photo-wrapper { 
    flex: 0 0 280px; /* 幅を280pxに拡張 */
}
.profile-photo { 
    width: 280px; 
    height: 210px;       /* 4:3の横長比率に固定 */
    object-fit: cover;   /* 比率を保ったまま、左側の人物が入るよう調整 */
    object-position: 25% center; /* 写真の左側（人物側）に重心を置く設定 */
    border-radius: 1px; 
    border: 1px solid var(--border-color); 
    display: block; 
}

.profile-info { flex: 1; text-align: left; }
.profile-details p { margin-bottom: 12px; display: flex; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; font-size: 0.95rem; }
.profile-details a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--accent-color); transition: 0.3s; }
.profile-details a:hover { color: var(--accent-color); }
.label { width: 110px; color: var(--accent-color); font-size: 0.7rem; text-transform: uppercase; padding-top: 4px; flex-shrink: 0; }
.value-stack { display: flex; flex-direction: column; flex: 1; text-align: left; }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.profile-links a { white-space: nowrap; }

/* ---------------- Interests boxes ---------------- */
.interests-flex-container { display: flex; gap: 20px; margin-top: 20px; }
.interests-box { flex: 1; background: var(--soft-gray); padding: 20px; border-radius: 2px; display: flex; flex-direction: column; text-align: left; }
.interests-box h3 { font-size: 0.85rem; margin-bottom: 12px; letter-spacing: 0.1rem; text-transform: uppercase; color: var(--accent-color); border-bottom: 1px solid var(--border-color); padding-bottom: 5px; }
.interests-content { font-size: 0.88rem; line-height: 1.7; color: var(--text-color); }
.statement-box { border-top: 3px solid var(--text-color); background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.topics-box { border-top: 3px solid var(--accent-color); }
.interests-list { list-style: none; padding-left: 0; }
.interests-list li { margin-bottom: 8px; position: relative; padding-left: 15px; font-size: 0.85rem; text-align: left; }
.interests-list li::before { content: "・"; position: absolute; left: 0; color: var(--accent-color); }

/* ---------------- Main / sections ---------------- */
.main-content { max-width: 1100px; margin: 0 auto; padding: 0 40px 100px; text-align: left; }
.page-top { margin-top: 45px; padding-top: 55px; margin-bottom: 10px; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: 0.2rem; text-transform: uppercase; font-weight: 400; margin-bottom: 14px; }
.page-lead { font-size: 0.95rem; color: var(--text-color); max-width: 840px; margin-bottom: 70px; }
.page-lead a { color: inherit; border-bottom: 1px solid var(--accent-color); text-decoration: none; }
section { margin-bottom: 90px; scroll-margin-top: 80px; }
h2 { font-size: 1.3rem; margin-bottom: 35px; font-weight: 700; letter-spacing: 0.2rem; text-transform: uppercase; display: flex; align-items: center; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--border-color); margin-left: 20px; }
.section-head { display: flex; align-items: center; gap: 20px; margin-bottom: 35px; }
.section-head h2 { margin-bottom: 0; flex: 1; }
.more-link { font-size: 0.72rem; color: var(--accent-color); text-decoration: none; letter-spacing: 0.05rem; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid transparent; transition: 0.3s; }
.more-link:hover { color: var(--text-color); border-bottom-color: var(--text-color); }

/* ---------------- Generic list items (bio / experience / news) ---------------- */
.list-item { display: flex; margin-bottom: 18px; font-size: 0.95rem; text-align: left; }
.date-col { width: 220px; color: var(--accent-color); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.content-col { flex: 1; text-align: left; }
.news-cat { display: inline-block; font-size: 0.65rem; color: var(--accent-color); border: 1px solid var(--border-color); border-radius: 2px; padding: 1px 8px; margin-right: 12px; letter-spacing: 0.05rem; text-transform: uppercase; vertical-align: middle; }

/* ---------------- Publications ---------------- */
.filter-nav { margin-bottom: 30px; display: flex; gap: 15px; flex-wrap: wrap; justify-content: flex-start; }
.filter-btn { background: none; border: none; padding: 0 0 4px 0; cursor: pointer; font-family: inherit; font-size: 0.8rem; color: var(--accent-color); border-bottom: 1px solid transparent; transition: 0.3s; }
.filter-btn.active, .filter-btn:hover { color: var(--text-color); border-bottom: 1px solid var(--text-color); }
.pub-list { list-style: none; }
.achievement-item { padding: 15px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; display: grid; grid-template-columns: 35px 1fr; align-items: start; text-align: left; }
.me { font-weight: bold; text-decoration: underline; }
.serial-no { color: var(--accent-color); font-variant-numeric: tabular-nums; }
.award-tag { font-weight: bold; color: var(--text-color); margin-left: 5px; }
.award-date { color: var(--accent-color); font-size: 0.85rem; margin-left: 10px; font-variant-numeric: tabular-nums; }
.item-link { font-size: 0.75rem; color: var(--accent-color); text-decoration: none; border: 1px solid var(--border-color); padding: 1px 6px; margin-left: 10px; border-radius: 2px; transition: 0.3s; }
.item-link:hover { background: var(--text-color); color: #fff; border-color: var(--text-color); }

/* ---------------- Research topics ---------------- */
.research-topic { margin-bottom: 70px; }
.research-topic h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }
.topic-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.topic-tag { font-size: 0.68rem; color: var(--accent-color); background: var(--soft-gray); border-radius: 2px; padding: 3px 10px; letter-spacing: 0.03rem; }
.topic-desc { font-size: 0.92rem; line-height: 1.9; margin-bottom: 20px; }
.related-head { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08rem; color: var(--accent-color); margin-bottom: 12px; }
.related-pubs { list-style: none; padding-left: 0; counter-reset: rp; }
.related-pubs li { font-size: 0.85rem; line-height: 1.75; margin-bottom: 10px; padding-left: 26px; position: relative; }
.related-pubs li::before { counter-increment: rp; content: counter(rp) "."; position: absolute; left: 0; color: var(--accent-color); font-variant-numeric: tabular-nums; }
.related-pubs a { color: inherit; border-bottom: 1px solid var(--accent-color); text-decoration: none; transition: 0.3s; }
.related-pubs a:hover { color: var(--accent-color); }
.related-pubs .me { font-weight: bold; text-decoration: underline; }

/* ---------------- Research figures (概念図・ポンチ絵) ---------------- */
.research-fig {
    margin: 6px 0 28px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 20px 16px 10px;
}
.research-fig svg { display: block; width: 100%; height: auto; font-family: inherit; }
.research-fig .fig-caption {
    font-size: 0.72rem;
    color: var(--accent-color);
    text-align: center;
    margin: 6px auto 6px;
    max-width: 720px;
    line-height: 1.6;
    letter-spacing: 0.02rem;
}
.concept-fig { margin-top: -42px; margin-bottom: 60px; }

/* ---------------- Categorized lists (Awards / Grants / Teaching) ---------------- */
.cat-group { margin-bottom: 45px; }
.subhead { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06rem; color: var(--text-color); margin-bottom: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--border-color); }
.cat-list { list-style: none; }
.cat-item { padding: 13px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; display: grid; grid-template-columns: 35px 1fr; align-items: start; text-align: left; }
.cat-item .cat-text { line-height: 1.75; }
.cat-name { }
.muted { color: var(--accent-color); font-size: 0.85rem; }
.cat-text a { color: inherit; border-bottom: 1px solid var(--accent-color); text-decoration: none; transition: 0.3s; }
.cat-text a:hover { color: var(--accent-color); }
.cat-note { font-size: 0.8rem; color: var(--accent-color); line-height: 1.7; margin: -4px 0 18px; max-width: 760px; }
.cat-note a { color: inherit; border-bottom: 1px solid var(--accent-color); text-decoration: none; transition: 0.3s; }
.cat-note a:hover { color: var(--text-color); }

/* ---------------- Footer ---------------- */
footer { text-align: center; padding: 60px; font-size: 0.8rem; color: var(--accent-color); }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    nav.top-nav ul { gap: 15px; justify-content: flex-start; }
    nav.top-nav a, .lang-switch { font-size: 0.65rem; }
    .interests-flex-container { flex-direction: column; }
    .profile-container { flex-direction: column; gap: 30px; align-items: flex-start; text-align: left; }
    .profile-photo-wrapper { margin: 0; width: 100%; max-width: 320px; }
    
    /* スマホ画面でも見切れないように横長（4:3）に維持し、画面幅にフィットさせる */
    .profile-photo { 
        width: 100%; 
        height: auto; 
        aspect-ratio: 4 / 3; 
        object-fit: cover;
        object-position: 25% center;
    }
    
    .profile-details p { justify-content: flex-start; }
    .date-col { width: 100%; margin-bottom: 4px; }
    .list-item { flex-direction: column; }
    .section-head { flex-wrap: wrap; gap: 8px; }
}