/* =====================================================
   Kyoto University Laboratory Website
   Style Ver.3
   ===================================================== */

:root{
    /* Kyoto University Color */
    --primary:#00205B;        /* PANTONE 281C 相当の濃青 */
    --primary-dark:#001741;   /* より濃い青 */
    --primary-light:#234A8A;  /* アクセント */

    --text:#222222;
    --text-light:#666666;

    --bg:#FFFFFF;
    --bg-light:#F7F8FA;

    --border:#D9DEE7;

    --max-width:1100px;
    --radius:10px;
}

/* Reset */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:
      "Yu Gothic",
      "Hiragino Sans",
      Meiryo,
      sans-serif;

    color:var(--text);
    background:#fff;
    line-height:1.9;
    letter-spacing:.02em;
}

img{
    width:100%;
    display:block;
}

a{
    text-decoration:none;
    color:inherit;
}

/* Layout */

.container{
    width:100%;
    max-width:1600px;
    margin:0 auto;
    padding:0 40px;
}

.narrow{
    max-width:820px;
    margin:auto;
}

.section{
    padding:90px 0;
}

.bg-light{
    background:var(--bg-soft);
}

/* Header */

.site-header{
    position:sticky;
    top:0;
    z-index:1000;

    backdrop-filter:blur(12px);
    background:rgba(255,255,255,.92);
    border-bottom:1px solid rgba(0,0,0,.06);
}

.header-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:78px;
}

.logo{
    display:flex;
    align-items:center;
    gap:14px;
}

.logo-mark{
    width:52px;
    height:52px;
    border-radius:50%;
    background:var(--primary);
    color:white;

    display:grid;
    place-items:center;

    font-weight:bold;
    letter-spacing:1px;
}

.logo-text{
    display:flex;
    flex-direction:column;
}

.logo-text .jp{
    font-size:1.05rem;
    font-weight:700;
}

.logo-text .en{
    color:var(--light);
    font-size:.8rem;
}

/* Navigation */

.global-nav{
    flex:1;
    display:flex;
    justify-content:flex-end;
    min-width:0;
}

.global-nav ul{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:30px;
    list-style:none;
    flex-wrap:nowrap;
    white-space:nowrap;
}

.global-nav a{
    position:relative;
    padding:10px 0;
    font-size:1.05rem;
    font-weight:600;
}

.global-nav a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:0;

    width:0;
    height:2px;

    background:var(--primary);
    transition:.3s;
}

.global-nav a:hover::after,
.global-nav .active::after{
    width:100%;
}

.menu-toggle{
    display:none;
    border:none;
    background:none;
    font-size:28px;
    color:var(--primary);
}

/* Hero */

.hero{
    position:relative;
    overflow:hidden;
}

.hero-image{
    position:relative;
    height:50vh;          /* 横長バナー */
    min-height:360px;
    max-height:540px;
    overflow:hidden;      /* はみ出した上下を隠す */
}

.hero-image img{
    width:100%;
    height:100%;
    object-fit:cover;     /* 画面いっぱい */
    object-position:center center;  /* 中央を見せる */
}

.hero-content{
    position:absolute;
    inset:0;

    display:flex;
    flex-direction:column;
    justify-content:center;

    color:white;
}

.hero-subtitle{
    text-transform:uppercase;
    letter-spacing:3px;
    margin-bottom:14px;
    opacity:.9;
}

.hero h1{
    font-size:clamp(2.6rem, 5vw, 3rem);
    font-weight:700;
    line-height:1.1;
    color:var(--primary);
    margin-bottom:16px;
}

.hero-title-en{
    font-size:1.35rem;      /* 少し大きく */
    font-weight:500;
    color:var(--primary);   /* 京都大学 濃青 */
    letter-spacing:0.03em;
    margin-bottom:24px;
}

.hero-description{
    font-size:1.15rem;
    line-height:1.9;
    color:var(--primary);   /* 京都大学の濃青 */
    font-weight:500;
    max-width:760px;
}

/* Buttons */

.btn{
    display:inline-block;
    padding:14px 28px;
    border-radius:999px;
    font-weight:700;
    transition:.3s;
}

.hero-buttons{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.btn.primary{
    background:var(--primary);
    color:white;
}

.btn.primary:hover{
    background:var(--primary-dark);
    transform:translateY(-2px);
}

.btn.secondary{
    border:2px solid white;
    color:white;
}

.btn.secondary:hover{
    background:white;
    color:var(--primary);
}

.btn.white{
    background:white;
    color:var(--primary);
}

/* Titles */

h2{
    color:var(--primary);
    font-size:2.1rem;
    margin-bottom:28px;
    position:relative;
}

h2::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--primary);
    margin-top:10px;
}

/* Split */

.split{
    display:grid;
    grid-template-columns:1.1fr .9fr;
    gap:60px;
    align-items:center;
}

.split-image img{
    border-radius:16px;
    box-shadow:var(--shadow);
}

/* Cards */

.card-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
}

@media (max-width:900px){
    .card-grid{
        grid-template-columns:1fr;
    }
}

.card{
    background:white;
    padding:28px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    transition:.35s;
}

.card:hover{
    transform:translateY(-6px);
}

.card h3{
    color:var(--primary);
    margin-bottom:12px;
}

/* News */

.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:24px;
}

.more-link{
    color:var(--primary);
    font-weight:bold;
}

.news-list{
    display:flex;
    flex-direction:column;
    gap:22px;
}


.news-item{
    display:flex;
    align-items:flex-start;
    gap:18px;
    padding:18px 0;
    border-bottom:1px solid #E5E7EB;
}

.news-item time{
    flex:0 0 86px;
    color:#64748B;
    font-weight:600;
}

.news-body{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
}

.news-tag,
.news-category{
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    font-size:.72rem;
    font-weight:700;
    margin:0;
}

.news-body p{
    margin:0;
    line-height:1.75;
}

/* Members */

.member-card{
    display:flex;
    gap:22px;
    background:white;
    border-radius:16px;
    box-shadow:var(--shadow);
    padding:24px;
}

.member-photo{
    width:110px;
    height:110px;
    border-radius:50%;
    object-fit:cover;
}

/* Gallery */

.gallery{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:18px;
}

.gallery img{
    height:240px;
    object-fit:cover;
    border-radius:12px;
    transition:.35s;
}

.gallery img:hover{
    transform:scale(1.02);
}

/* CTA */

.cta{
    background:linear-gradient(135deg,var(--primary),#5F0E28);
    color:white;
    text-align:center;
}

.cta h2{
    color:white;
}

.cta h2::after{
    background:white;
    margin-inline:auto;
}

/* Footer */

/* ===== Footer ===== */

.site-footer{
  background: linear-gradient(180deg, #222222 0%, #1A1A1A 100%);
  color:#fff;
  padding:42px 0;
}

.footer-inner{
  display:flex;
  align-items:center;
}

.footer-left,
.footer-right{
  flex:1;
}

.footer-left{
  display:flex;
  justify-content:center;
  padding-right:40px;
}

.footer-right{
  border-left:1px solid rgba(255,255,255,.2);
  padding-left:40px;
}

.footer-logo{
  max-width:260px;
  width:100%;
  height:auto;
}

.footer-right p{
  margin:0 0 12px;
  line-height:1.8;
  color:rgba(255,255,255,.9);
}

.footer-email{
  margin-top:18px;
}

.footer-note{
  font-size:.85rem;
  color:rgba(255,255,255,.65);
  margin-bottom:0;
}

/* Mobile */
@media (max-width:768px){
  .footer-inner{
    flex-direction:column;
    text-align:center;
    gap:28px;
  }

  .footer-left{
    padding-right:0;
  }

  .footer-right{
    border-left:none;
    border-top:1px solid rgba(255,255,255,.2);
    padding-left:0;
    padding-top:24px;
  }

  .footer-logo{
    max-width:220px;
  }
}

/* Scroll Animation */

.fade-up{
    opacity:0;
    transform:translateY(28px);
    transition:all .8s ease;
}

.fade-up.show{
    opacity:1;
    transform:none;
}

/* Responsive */

@media(max-width:900px){

.split,
.footer-grid,
.card-grid{
grid-template-columns:1fr;
}

.gallery{
grid-template-columns:1fr;
}

.hero-image{
height:60vh;
min-height:420px;
}

.hero-description{
font-size:1rem;
}

}

@media (max-width:900px){

    .menu-toggle{
        display:block;
    }

    .global-nav{
        display:none;
        position:absolute;
        top:92px;
        left:0;
        width:100%;
        background:#fff;
        border-top:1px solid var(--border);
        padding:18px 0;
    }

    .global-nav.open{
        display:block;
    }

    .global-nav ul{
        flex-direction:column;
        align-items:flex-start;
        gap:16px;
        padding:0 28px;
    }
}

.member-card{
flex-direction:column;
align-items:center;
text-align:center;
}

.section{
padding:70px 0;
}

}
/* =====================================
   Image Lightbox
===================================== */

.gallery img{
    cursor:pointer;
}

.lightbox{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.88);

    display:none;
    justify-content:center;
    align-items:center;

    z-index:5000;

    padding:40px;
}

.lightbox.show{
    display:flex;
}

.lightbox img{
    max-width:90%;
    max-height:90%;
    border-radius:10px;
    box-shadow:0 20px 50px rgba(0,0,0,.4);
}

.lightbox-close{
    position:absolute;
    top:20px;
    right:30px;

    color:white;
    font-size:42px;
    cursor:pointer;
    user-select:none;
}

@media(max-width:768px){

.lightbox{
padding:20px;
}

.lightbox-close{
font-size:34px;
right:18px;
}

}
/* ====================================
   Publications Search
==================================== */

.search-box{
    margin:35px 0;
}

.search-box input{
    width:100%;
    padding:16px 20px;

    border:1px solid #ddd;
    border-radius:999px;

    font-size:16px;
    outline:none;

    transition:.3s;
}

.search-box input:focus{
    border-color:#8A1538;
    box-shadow:0 0 0 4px rgba(138,21,56,.12);
}

.search-count{
    color:#666;
    margin-top:12px;
    font-size:14px;
}
/* Language Switch */

.lang-switch{
    border:1px solid #8A1538;
    color:#8A1538;
    padding:6px 12px;
    border-radius:999px;
    font-size:.85rem;
    font-weight:700;
    transition:.3s;
}

.lang-switch:hover{
    background:#8A1538;
    color:#fff;
}
/* ===== Laboratory Logo ===== */

.site-logo{
    height:56px;
    width:auto;
    display:block;
}

@media (max-width:768px){
    .site-logo{
        height:46px;
    }
}
/* ===== Header Layout ===== */

.header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:92px;
}

.logo{
    display:flex;
    align-items:center;
}

.site-logo{
    height:72px;
    width:auto;
    display:block;
    object-fit:contain;
}

/* JP / EN ボタン */
.lang-switch{
    border:1.5px solid #8A1538;
    color:#8A1538;
    border-radius:999px;
    padding:6px 12px;
    font-weight:700;
    font-size:.85rem;
    transition:.25s;
}

.lang-switch:hover{
    background:#8A1538;
    color:#fff;
}

@media (max-width:768px){

  .site-logo{
      height:56px;
  }

  .header-inner{
      min-height:78px;
  }

}
/* ===================================
   Final Header (Ver.8)
=================================== */

.site-header{
    position:sticky;
    top:0;
    background:#fff;
    border-bottom:1px solid #e6e6e6;
    z-index:999;
}

.header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:92px;
}

.logo{
    display:flex;
    align-items:center;
}

.site-logo{
    height:72px;
    width:auto;
    display:block;
}

.global-nav ul{
    display:flex;
    align-items:center;
    gap:26px;
list-style:none;
    flex-wrap:nowrap;
}

.global-nav a{
    font-size:0.95rem;
    color:#333;
    font-weight:500;
    transition:.25s;
}

.global-nav a:hover,
.global-nav a.active{
    color:#8A1538;
}

.lang-switch{
    border:1.5px solid #8A1538;
    color:#8A1538 !important;
    border-radius:999px;
    padding:7px 13px;
    font-weight:700;
}

.lang-switch:hover{
    background:#8A1538;
    color:#fff !important;
}

@media (max-width:768px){

  .site-logo{
      height:54px;
  }

  .header-inner{
      min-height:78px;
  }

}
@media (max-width:768px){

    .container{
        padding:0 20px;
    }

}

/* ===== Desktop → Mobile Navigation ===== */
@media (max-width:900px){

    .header-inner{
        display:flex;
        align-items:center;
        justify-content:space-between;
    }

    .menu-toggle{
        display:block;
        margin-left:auto;
        font-size:38px;
        padding:8px;
        color:var(--primary);
        cursor:pointer;
    }

    .global-nav{
        display:none;
        position:absolute;
        top:92px;
        left:0;
        width:100%;
        background:#fff;
        border-top:1px solid var(--border);
        padding:18px 0;
    }

    .global-nav.open{
        display:block;
    }

.global-nav ul{
    flex-direction:column;
    align-items:flex-end;   /* 右寄せ */
    gap:16px;
    padding:0 28px;
}

.global-nav li{
    width:100%;
    text-align:right;
    }
}
/* ===== Access Page ===== */

.info-box{
    background:#fff;
    border:1px solid #E5E7EB;
    border-radius:14px;
    padding:28px;
}

.info-box table{
    width:100%;
    border-collapse:collapse;
}

.info-box th{
    width:140px;
    text-align:left;
    color:var(--primary);
    padding:18px 0;
    vertical-align:top;
    border-bottom:1px solid #E5E7EB;
}

.info-box td{
    padding:18px 0;
    border-bottom:1px solid #E5E7EB;
}

.info-box tr:last-child th,
.info-box tr:last-child td{
    border-bottom:none;
}

.map-container{
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.map-container iframe{
    width:100%;
    height:420px;
    border:0;
    display:block;
}

.map-link {
    color: inherit;
    text-decoration: none;
}

.map-link:hover {
    text-decoration: underline;
}

/* ===== Members ===== */

.member-category{
    color:var(--primary);
    font-size:1.35rem;
    margin-bottom:18px;
}

/* Current Students */

.member-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:18px;
}

.member-row{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:14px 18px;
    background:#fff;
    border:1px solid #E5E7EB;
    border-radius:10px;

    transition:.2s ease;
}

.member-name{
    font-weight:600;
    color:#111827;
    font-size:1rem;
}

.member-year{
    color:#64748B;
    font-size:.9rem;
    font-variant-numeric:tabular-nums;
}
/* ===== PI Profile ===== */

.member-profile{
    display:flex;
    align-items:flex-start;
    gap:32px;
    padding:28px 0;
}

.member-photo{
    width:180px;
    height:220px;
    object-fit:cover;
    border-radius:14px;
    flex-shrink:0;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.member-profile-info{
    flex:1;
}

.member-title{
    color:var(--primary);
    font-weight:600;
    margin:6px 0 16px;
}

.member-specialty{
    color:#4B5563;
    line-height:1.9;
}

@media (max-width:768px){
    .member-profile{
        flex-direction:column;
        align-items:center;
        text-align:center;
    }

    .member-photo{
        width:160px;
        height:200px;
    }
}
.footer-title::after{
    display:none;
}
.publication-item em{
    font-style: italic;
    font-weight: normal;
}

/* ===== External Profiles ===== */

.profile-links{
    display:flex;
    gap:12px;
    margin-top:12px;
    flex-wrap:wrap;
}

.profile-btn{
    display:inline-block;
    padding:8px 18px;
    border:1.5px solid #00205B;
    border-radius:999px;
    color:#00205B;
    background:#fff;
    text-decoration:none;
    font-weight:600;
    font-size:0.95rem;
    transition:all .2s ease;
}

.profile-btn:hover{
    background:#00205B;
    color:#fff;
}

/* ===== PI profile spacing ===== */

.member-profile-info{
    display:flex;
    flex-direction:column;
    gap:16px;              /* 各項目の行間 */
}

.member-name{
    margin:0;
}

.profile-links{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin:0;
}

.member-heading{
    margin:8px 0 0;
    color:#00205B;
}

.member-specialty{
    margin:0;
    line-height:1.9;
}

.access-grid{
    grid-template-columns:repeat(2,1fr);
}


/* Access cards */
.access-grid .card{
  text-align: center;
  align-items: center;
  justify-content: center;
}

.access-grid .card h3{
  width: 100%;
  text-align: center;
  color: #00205B;
  margin-bottom: 16px;
  line-height: 1.5;
}

.access-grid .card p{
  width: 100%;
  text-align: center;
  line-height: 1.9;
  margin: 0;
}

@media (max-width:900px){
    .access-grid{
        grid-template-columns:1fr;
    }
}
.more-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 16px;
  border:1.5px solid #00205B;
  border-radius:999px;
  color:#00205B;
  font-weight:600;
  font-size:0.95rem;
  text-decoration:none;
  transition:.25s;
}

.more-btn::after{
  content:"→";
  font-size:0.9rem;
}

.more-btn:hover{
  background:#00205B;
  color:#fff;
}


.card h3{
  text-align:center;
  margin-bottom:14px;
}

.research-image{
  width:96px;
  height:96px;
  object-fit:contain;
  display:block;
  margin:0 auto 18px;
}

/* ===== Research Topics ===== */

.section-header.center{
  text-align:center;
  margin-bottom:42px;
}

.section-subtitle{
  color:#6b7280;
  margin-top:8px;
}

.topics-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:28px;
}

.topic-card{
  background:#fff;
  border:1px solid #e8edf3;
  border-radius:18px;
  padding:32px 28px;
  text-align:center;
  transition:.25s ease;
}


.topic-icon{
  width:88px;
  height:88px;
  object-fit:contain;
  margin:0 auto 18px;
}

.topic-card h3{
  color:#00205B;
  font-size:1.18rem;
  margin-bottom:14px;
  line-height:1.5;
}

.topic-card p{
  text-align:left;
  color:#374151;
  line-height:1.9;
  font-size:.96rem;
  min-height:110px;
}

.topic-paper{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #e5e7eb;
  color:#64748b;
  font-size:.85rem;
}

@media (max-width:768px){
  .topics-grid{
    grid-template-columns:1fr;
  }

  .topic-card{
    padding:28px 22px;
  }

  .topic-icon{
    width:72px;
    height:72px;
  }

  .topic-card p{
    min-height:auto;
  }
}

/* Brand Button */

.brand-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:10px 18px;
  border:1.5px solid #00205B;
  border-radius:999px;

  background:#fff;          /* 白背景 */
  color:#00205B;            /* 青文字 */
  text-decoration:none;
  font-weight:600;

  transition:all .25s ease;
}

.brand-btn:hover{
  background:#00205B;       /* 青 */
  color:#fff;               /* 白文字 */
}


.news-tag.publication,
.news-category.publication{
  background:#EAF1FF;
  color:#1D4ED8;
}

.news-tag.conference,
.news-category.conference{
  background:#FCE7F3;
  color:#9D174D;
}

.news-tag.grant,
.news-category.grant{
  background:#DCFCE7;
  color:#166534;
}

.news-tag.visit,
.news-category.visit{
  background:#F3F4F6;
  color:#374151;
}

.news-tag.member,
.news-category.member{
  background:#FEF3C7;
  color:#92400E;
}

.news-tag.appointment,
.news-category.appointment{
  background:#F3E8FF;
  color:#6D28D9;
}
}

/* ========================================
   PUBLICATIONS
======================================== */

.publication-year{
    font-size:1.8rem;
    font-weight:700;
    color:#00205B;

    margin:56px 0 22px;
    padding-bottom:10px;

    border-bottom:2px solid #00205B;
    letter-spacing:.02em;
}
/* Publication Cards */

.publication-list{
    list-style:none;
    padding:0;
    margin:0;
}

/* ===== Publication Card ===== */

.publication-item{
    display:flex;
    justify-content:space-between;
    align-items:center;      /* ← 上下中央揃え */
    gap:24px;

    background:#fff;
    border:1px solid #E5E7EB;
    border-radius:14px;
    padding:22px 24px;
    margin-bottom:16px;
}

.publication-content{
    flex:1;
    line-height:1.85;
}

.pubmed-link{
    flex:0 0 auto;
    align-self:center;       /* ← ボタンを中央に固定 */

    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:92px;
    height:36px;

    border:1.5px solid #00205B;
    border-radius:999px;
    background:#fff;
    color:#00205B;

    text-decoration:none;
    font-size:.82rem;
    font-weight:600;
    transition:.2s;
}

.pubmed-link:hover{
    background:#00205B;
    color:#fff;
}

@media (max-width:768px){
    .publication-item{
        flex-direction:column;
        align-items:flex-start;
    }

    .pubmed-link{
        align-self:flex-end;
    }
}


.publication-item em{
    color:#111827;
    font-style:italic;
    font-weight:600;
}

/* Search Box */

.search-box{
    position:relative;
    max-width:560px;
    margin:0 0 36px;
}

.search-icon{
    position:absolute;
    left:18px;
    top:50%;
    transform:translateY(-50%);
    color:#94A3B8;
    font-size:1rem;
    pointer-events:none;
}

.search-box input{
    width:100%;
    padding:14px 18px 14px 46px;

    border:1px solid #D1D5DB;
    border-radius:999px;

    background:#fff;
    font-size:1rem;

    transition:all .2s ease;
}

.search-box input:focus{
    outline:none;
    border-color:#00205B;
    box-shadow:0 0 0 4px rgba(0,32,91,.08);
}