/* =====================================================
   Supplementary styles for Tailwind CSS
   Kazuya Nishimura's personal website
   ===================================================== */

html {
  scroll-behavior: smooth;
}

/* Offset anchor targets to account for fixed nav */
section[id] {
  scroll-margin-top: 4rem;
}

/* ---- Typography ---- */
body {
  font-family: 'Inter', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

p {
  line-height: 1.8;
}

.font-heading {
  font-family: 'Playfair Display', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

/* ---- Section headings ---- */
section h2 {
  font-size: 1.5rem;        /* 24px */
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.6rem;   /* h2 → section-divider の間隔 */
}

.section-heading-group {
  margin-bottom: 1.75rem;  /* section-divider 後からコンテンツまでの間隔 */
}

/* ---- Nav active state ---- */
.nav-link.active {
  color: #85C79A;
  border-bottom: 2px solid #85C79A;
}

/* ---- Section divider ---- */
.section-divider {
  height: 3px;
  background: linear-gradient(to right, #281C59, #4E8D9C, #85C79A, #EDF7BD);
  border-radius: 2px;
  margin-top: 0.5rem;
  margin-bottom: 1.75rem;
}

/* ---- Hero profile photo ---- */
.profile-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #4E8D9C;
  box-shadow: 0 8px 32px rgba(40, 28, 89, 0.25);
}

/* ---- Social icon buttons ---- */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1.5px solid #4E8D9C;
  color: #4E8D9C;
  background: transparent;
}

.social-btn:hover {
  background: #4E8D9C;
  color: #ffffff;
}

.social-btn.cv {
  border-color: #85C79A;
  color: #281C59;
  background: #EDF7BD;
}

.social-btn.cv:hover {
  background: #85C79A;
  color: #fff;
}

/* ---- News timeline ---- */
.news-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.news-date {
  color: #4E8D9C;
  font-size: 0.85rem;
  font-weight: 600;
  padding-top: 0.1rem;
}

/* ---- Research cards ---- */
.research-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.research-card:hover {
  box-shadow: 0 4px 20px rgba(78, 141, 156, 0.15);
  border-color: #4E8D9C;
}

/* ---- Publication list ---- */
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.7;
}

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

.pub-item u {
  text-decoration: underline;
  font-weight: 600;
}

.pub-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #EDF7BD;
  color: #281C59;
  margin-left: 0.4rem;
}

/* ---- Tab navigation (award.html) ---- */
.tab-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem 0.5rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  transition: all 0.2s;
}

.tab-btn.active {
  background: #281C59;
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---- Mobile menu ---- */
#mobile-menu {
  display: none;
}

#mobile-menu.open {
  display: flex;
}

/* ---- Footer ---- */
footer a:hover {
  color: #85C79A;
}

/* ---- Link style ---- */
.content-link {
  color: #4E8D9C;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.content-link:hover {
  border-bottom-color: #4E8D9C;
}

/* ---- Responsive adjustments ---- */
@media (max-width: 640px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .profile-photo {
    width: 140px;
    height: 140px;
  }
}
