/* ========================================
   研究室個人ページ — Modern Ivory Theme
   ======================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* Ivory / warm palette */
  --bg:          #FAF8F5;
  --bg-alt:      #F3F0EB;
  --surface:     #FFFFFF;
  --border:      #E8E4DE;
  --border-light:#F0ECE6;

  --text:        #3D3833;
  --text-sub:    #7A746B;
  --text-muted:  #A9A29A;

  --accent:      #B08D6E;   /* warm brown */
  --accent-soft: #D4BFA8;
  --accent-bg:   #F5EFE7;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-lg:   0 2px 8px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);

  --font-sans:   'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #8B6B4F; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-name h1 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.3;
}

.header-name-en {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.header-nav {
  display: flex;
  gap: 0.15rem;
}

.header-nav a {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sub);
  border-radius: 999px;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.header-nav a:hover {
  color: var(--text);
  background: var(--accent-bg);
  text-decoration: none;
}

/* ---------- Section ---------- */
.section {
  padding: 4rem 1.5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

.section-inner {
  max-width: 800px;
  margin: 0 auto;
}

.section-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}

/* ---------- About Card ---------- */
.about-card {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

@media (max-width: 640px) {
  .about-card {
    flex-direction: column;
    align-items: center;
  }
  .profile-photo {
    width: 100px;
    height: 100px;
  }
}

/* ---------- Info List (dl) ---------- */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-row {
  display: flex;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
  align-items: baseline;
}

.info-row:last-child { border-bottom: none; }

.info-row dt {
  min-width: 110px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.info-row dd {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
}

.icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
  color: var(--accent-soft);
  flex-shrink: 0;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 74px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0.75rem 0;
  position: relative;
}

.timeline-year {
  flex-shrink: 0;
  width: 52px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  padding-top: 0.1rem;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 70px;
  top: 1.05rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}

.timeline-body {
  padding-left: 0.75rem;
}

.timeline-title {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.timeline-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ---------- Project Hero ---------- */
.project-hero {
  margin-bottom: 2rem;
}

.project-hero h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-hero p {
  font-size: 0.9rem;
  color: var(--text-sub);
  background: var(--accent-bg);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-soft);
  line-height: 1.85;
}

.sp-only { display: none; }

/* ---------- Swiper Overrides ---------- */
.swiper-container.card {
  padding: 0;
  overflow: hidden;
}

.swiper {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #2A2723;
  border-radius: var(--radius);
  overflow: hidden;
}

.swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.swiper-slide img {
  max-height: 78%;
  max-width: 92%;
  object-fit: contain;
  border-radius: 6px;
}

.slide-caption {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  margin-top: 0.6rem;
  text-align: center;
}

/* Swiper nav arrows — warm style */
.swiper-button-prev,
.swiper-button-next {
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
  color: rgba(255,255,255,0.85);
}
.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 1.1rem;
  font-weight: 700;
}

.swiper-pagination-bullet {
  background: rgba(255,255,255,0.35);
  opacity: 1;
}
.swiper-pagination-bullet-active {
  background: rgba(255,255,255,0.9);
}

/* ---------- Details Grid ---------- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.detail-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.detail-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.detail-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.detail-card ul {
  padding-left: 1.1rem;
}

.detail-card li {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 0.3rem;
  line-height: 1.65;
}

.detail-card li::marker {
  color: var(--accent-soft);
}

/* ---------- Sub Heading ---------- */
.sub-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-heading .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ---------- Video ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.video-card.card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.video-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}

.video-embed {
  position: relative;
  width: calc(100% - 1.5rem);
  margin: 0.75rem;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

/* ---------- Note Box ---------- */
.note-box {
  margin-top: 2rem;
  padding: 1.1rem 1.35rem;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.note-box p {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.85;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
  }

  .header-nav {
    gap: 0;
  }

  .header-nav a {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }

  .section {
    padding: 2.5rem 1.25rem;
  }

  .card {
    padding: 1.15rem 1.25rem;
  }

  .info-row {
    flex-direction: column;
    gap: 0.2rem;
  }

  .info-row dt {
    min-width: unset;
  }

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

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

  .swiper {
    aspect-ratio: 4 / 3;
  }

  .sp-only { display: inline; }

  .timeline::before {
    left: 68px;
  }
  .timeline-item::after {
    left: 64px;
  }
}
