/* ========================================
   東京科学大学 中本研究室ホームページ用 スタイルシート
======================================== */

/* ========== ベーススタイル ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto sans', monospace;
    background: #ebebeb;
    color: #000000;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== ヘッダー部品 ========== */
.header {
    background: #ffffff;
    border-bottom: 3px solid #ff0040;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff0040;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo a {
    color: inherit;            /* Use the same color as the parent (.logo) */
    text-decoration: none;     /* Remove underline */
}

.logo a:hover {
    color: inherit;            /* Don’t change on hover */
    text-decoration: none;     /* Still no underline */
}.logo a,
.logo a:visited,
.logo a:hover,
.logo a:active {
    color: inherit;           /* Always same as parent (.logo) */
    text-decoration: none;    /* No underline ever */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    transition: all 0.3s ease;
}

.nav-links a {
    color: #ff0040;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: #ff0040;
    border-bottom-color: #ff0040;
}


/* ========== フッター部品 ========== */
.footer {
    background: #000000;
    border-top: 3px solid #ff0040;
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #ff0040;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-section a {
    color: #cccccc;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: #ff0040;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 20px;
    color: #666666;
}


/* ========== ヒーロー部品 ========== */
.hero {
    background: #e4e3e3;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 1;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 2rem);
    color: #000000;
    margin-bottom: 40px;
}

.hero-content p {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: #333333;
    margin-bottom: 40px;
}

.hero-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #ff0040;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 15px;
}

.hero-btn:hover {
    background: #ffffff;
    color: #ff0040;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 0, 64, 0.3);
    margin-bottom: 15px;
}

.hero-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
  grid-template-rows: repeat(2, auto);   /* 2 rows */
  gap: 5px;                              /* minimal spacing */
  justify-items: stretch;                /* make buttons fill their cell */
  align-items: stretch;
  max-width: 800px;                      /* optional */
  margin: 30px auto;
}

.hero-notification {
    background: rgba(255, 0, 64, 0.1);
    color: #ff0040;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    margin-bottom: 40px;
}

/* ========== ボタン部品 ========== */
.btn {
    display: inline-block;
    padding: 15px 30px;
    background: #ff0040;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: #ffffff;
    color: #ff0040;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 0, 64, 0.3);
}

.btn-outline {
    background: transparent;
    color: #ff0040;
    border: 2px solid #ff0040;
}

.btn-outline:hover {
    background: #ff0040;
    color: #ffffff;
}


/* ========== お知らせ部品 ========== */
.news-container {
    background: #fcfcfc;
    border: 2px solid #ff0000;
    margin: 40px 0;
}

.news-header {
    background: #ff0040;
    color: #ffffff;
    padding: 20px;
    border-bottom: 2px solid #ff0000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-title {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.news-date-filter {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.news-list {
    max-height: 500px;
    overflow-y: auto;
}

.news-item {
    border-bottom: 1px solid #ff0000;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

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

.news-item:hover {
    background: #f8f8f8;
    transform: translateX(5px);
}

.news-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #ff0040;
    transition: width 0.3s;
}

.news-item:hover::before {
    width: 4px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.news-date {
    color: #ff0040;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.news-category {
    background: #747474;
    color: #ffffff;
    padding: 4px 12px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    white-space: nowrap;
}

.news-category.important {
    background: #ff0040;
    color: #ffffff;
}

.news-category.award {
    background: #fbff00;
    color: #000000;
}

.news-category.event {
    background: #00ff40;
    color: #000000;
}

.news-category.publication {
    background: #ff8000;
    color: #ffffff;
}

.news-category.media {
    background: #0004ff;
    color: #ffffff;
}

.news-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #ff0000;
}

.news-content p {
    color: #000000;
    line-height: 1.6;
    margin-bottom: 10px;
}

.news-link {
    color: #ff0040;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.news-link:hover {
    text-decoration: underline;
}


.news-archive {
    background: #ffffff;
    padding: 15px 20px;
    text-align: center;
    border-top: 2px solid #ff0000;
}

.news-archive a {
    color: #ff0000;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
}

.news-archive a:hover {
    text-decoration: underline;
}

/* お知らせアーカイブ */
.news-archive-list {
    overflow-y: auto;
}

/* ========== 年度ナビゲーション ========== */
.year-navigation {
    background: #ffffff;
    border: 2px solid #ff0040;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0 40px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.year-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    max-width: 100%;
}

.year-nav-link {
    display: block;
    padding: 8px 12px;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    text-align: center;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-style: bold;
}

.year-nav-link:hover {
    background: #ff0040;
    color: #ffffff;
    border-color: #ff0040;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(255, 0, 64, 0.3);
}

.year-nav-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(255, 0, 64, 0.3);
}

/* ========== 研究成果・論文・発表一覧部品 ========== */
.publication-list {
    background: #ffffff;
    border: 2px solid #ff0000;
    margin: 40px 0;
}

.publication-header {
    background: #ff0040;
    color: #ffffff;
    padding: 20px;
    border-bottom: 2px solid #ff0000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.publication-item {
    border-bottom: 1px solid #ff0000;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.publication-item:hover {
    background: #f8f8f8;
    transform: translateX(5px);
}

.publication-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #ff0040;
    transition: width 0.3s;
}

.publication-item:hover::before {
    width: 4px;
}

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

.publication-title {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
}

.publication-authors {
    color: #414cad;
    margin-bottom: 8px;
}

.publication-details {
    color: #3b3939;
    font-size: 14px;
    margin-bottom: 15px;
}

.publication-links {
    display: flex;
    gap: 15px;
}

.publication-link {
    color: #ff0000;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.publication-archive {
    background: #ffffff;
    padding: 15px 20px;
    text-align: center;
    border-top: 2px solid #ff0000;
}

.publication-archive a {
    color: #ff0000;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
}

.publication-archive a:hover {
    text-decoration: underline;
}

/* ========== カード部品 ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 80px 0;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fafafa;
    border: 2px solid #ffffff;
    padding: 0;
    transition: all 0.3s;
    position: relative;
}

.card:hover {
    border-color: #ff0040;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #ff0040;
    transform: scaleX(0);
    transition: transform 0.3s;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    text-align: center;
}

.card-description {
    color: #584f4f;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.card-button-container {
    display: flex;
    justify-content: center;
    padding: 0 20px 20px 20px;
    margin-top: auto;
}

.card-button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff0040;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
}



.card-button:hover {
    background: #ffffff;
    color: #ff0040;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 0, 64, 0.3);
}

/* ========== コンタクトセクション ========== */
#contact {
    padding: 40px 20px;
}

#contact h2 {
    color: #ff0040;
    margin-bottom: 20px;
}

#contact p {
    text-align: center;
    margin-bottom: 10px;
}

/* ========== メンバー紹介部品 ========== */
.prof-intro {
    /* background: #f0f0f0; */
    padding: 40px 20px;
    text-align: center;
}

.prof-intro h2 {
    color: #ff0040;
    margin-bottom: 20px;
}

.prof-intro p {
    color: #333333;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.prof-avatar {
    width: 240px;
    height: 240px;
    background: #333333;
    border-radius: 5%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #666666;
    position: relative;
    overflow: hidden;
}

.prof-avatar img {
    width: auto;
    height: 260px;
    position: absolute;
    object-fit: cover;
}

.prof-link {
    color: #ff0040;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
}

.prof-link:hover {
    text-decoration: underline;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.member-card {
    background: #1a1a1a;
    border: 2px solid #333333;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.member-avatar {
    width: 120px;
    height: 120px;
    background: #333333;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #666666;
    position: relative;
    overflow: hidden;
}

.member-avatar img {
    width: 140px;
    height: auto;
    position: absolute;
    object-fit: cover;
}

.member-name {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 8px;
}

.member-role {
    color: #ff0040;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.member-research {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.5;
}

.member-mail {
    display: block;
    margin-top: 15px;
    color: #cccccc;
    text-decoration: none;
}

/* ========== セクション間のスペース ========== */
.section {
    margin: 80px 0;
    padding-top: 80px;
}

.section-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 40px;
    text-align: center;
    color: #ff0040;
    border-bottom: 2px solid #ff0040;
    padding-bottom: 10px;
}


/* ========== Reunion Gallery ========== */
.reunion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* responsive grid */
  gap: 20px;
  margin: 100px auto 60px; /* spacing below the fixed header */
  max-width: 1000px;
}

.reunion-card {
  background: #ffffff;
  border: 2px solid #ff0040;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #000;
  transition: transform 0.2s, box-shadow 0.2s;
}

.reunion-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(255, 0, 64, 0.25);
}

.reunion-card img {
  width: 100%;
  height: 150px;             /* smaller image height */
  object-fit: cover;         /* crop nicely */
  display: block;
}

.reunion-card h2 {
  color: #ff0040;
  font-size: 1.5rem;
  margin: 10px 0 5px;
  text-transform: uppercase;
}

.reunion-card p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 10px;
}

.reunion-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* auto adjusts */
  gap: 15px;
  margin-top: 20px;
}

.reunion-photos img {
  width: 100%;
  height: 160px;           /* small thumbnail height */
  object-fit: cover;       /* crop to fit box */
  border-radius: 5px;
  border: 2px solid #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.reunion-photos img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(255, 0, 64, 0.25);
}

/* ================= Reunion gallery ================ */
.reunion-gallery {
    margin: 120px auto 60px;
    max-width: 1000px;
}

.reunion-gallery .section-title {
    color: #ff0040;
    border-bottom: 2px solid #ff0040;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.reunion-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.reunion-photos a {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reunion-photos a:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 0, 64, 0.25);
}

.reunion-photos img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 2px solid #fff;
    display: block;
}

@media (max-width: 600px) {
    .reunion-photos img {
        height: 130px;
    }
}

/* Responsive tweak */
@media (max-width: 600px) {
  .reunion-photos img {
    height: 120px;
  }
}



/* responsive tweaks */
@media (max-width: 600px) {
  .reunion-card img {
    height: 120px;
  }
}





/* =========== Access section layout (map + contact info side by side) ======== */
.row.access-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* left side: map */
.ggmap {
    flex: 1 1 60%;
    max-width: 60%;
}

/* right side: address / tel */
.access-contents {
    flex: 1 1 40%;
    max-width: 40%;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* ========== レスポンシブ対応 ========== */
@media (max-width: 768px) {
    .header {
        position: relative;
    }
    
    .nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hero {
        height: auto;
        padding: 100px 20px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .member-grid {
        grid-template-columns: 1fr;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .publication-links {
        flex-wrap: wrap;
    }
    
    /* 年度ナビゲーション - モバイル対応 */
    .year-nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .year-nav-link {
        padding: 6px 8px;
        font-size: 12px;
    }
}