/* ===== Custom Properties ===== */
:root {
  --color-bg: #FFFEF6;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #2c2c2c;
  --color-border: #e0ddd5;
  --color-tag-bg: #f5f3eb;
  --color-nav-bg: rgba(255, 254, 246, 0.85);

  --font-en: "Times New Roman", "Georgia", serif;
  --font-jp: "Noto Serif JP", "Yu Mincho Light", "YuMincho", "游明朝 Light", "游明朝", "Hiragino Mincho ProN", serif;
  --font-body: var(--font-jp);

  --section-padding: 120px;
  --content-max-width: 840px;
  --nav-height: 60px;

  --transition-base: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--transition-base);
}

a:hover {
  border-bottom-color: var(--color-text);
}

ul, ol {
  list-style: none;
}

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

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}

#navbar.scrolled {
  border-bottom-color: var(--color-border);
}

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

.nav-logo {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  border-bottom: none;
}

.nav-logo:hover {
  border-bottom: none;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-en);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  border-bottom: none;
  padding: 4px 0;
  position: relative;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  border-bottom: none;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Language Switch */
.lang-switch {
  font-family: var(--font-en);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--color-border);
}

.lang-switch a {
  color: var(--color-text-muted);
  border-bottom: none;
  transition: color var(--transition-base);
}

.lang-switch a:hover {
  color: var(--color-text);
  border-bottom: none;
}

.lang-active {
  color: var(--color-text);
  font-weight: 400;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  position: absolute;
  left: 0;
  transition: all var(--transition-base);
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; }
.nav-toggle span:nth-child(3) { top: 100%; }

body.nav-open .nav-toggle span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  top: 50%;
  transform: rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  z-index: 999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

body.nav-open .mobile-menu {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  text-align: center;
}

.mobile-menu li {
  margin: 24px 0;
}

.mobile-menu a {
  font-family: var(--font-en);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  border-bottom: none;
  color: var(--color-text);
}

/* ===== Hero Section ===== */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-height) - 80px);
}

.hero-photo {
  overflow: hidden;
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) brightness(0.65);
}

.hero-text {
  display: flex;
  align-items: center;
  padding: 60px 60px 60px 50px;
}

.hero-text-inner {
  max-width: 420px;
}

.hero-name {
  font-family: var(--font-jp);
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.hero-name-en {
  font-family: var(--font-en);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.hero-divider {
  width: 40px;
  height: 1px;
  background: var(--color-border);
  margin-bottom: 24px;
}

.hero-affiliation {
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.6;
}

.hero-affiliation a {
  border-bottom-color: var(--color-border);
}

.hero-notes {
  margin-top: 16px;
  margin-bottom: 20px;
}

.hero-notes p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  background: transparent;
}

.hero-motto {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 40px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
  text-align: right;
}

.hero-motto p {
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ===== Section Common ===== */
section {
  padding: var(--section-padding) 0;
}

.section-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section-heading {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 60px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.heading-en {
  font-family: var(--font-en);
}

.heading-divider {
  color: var(--color-border);
  margin: 0 8px;
  font-weight: 300;
}

.heading-jp {
  font-family: var(--font-jp);
  font-size: 1.1rem;
  font-weight: 300;
}

/* ===== Career Section ===== */
.career-group {
  margin-bottom: 48px;
}

.career-subheading {
  font-family: var(--font-jp);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-accent);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--color-border);
}

.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.7;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-border);
}

.timeline-date {
  flex-shrink: 0;
  width: 100px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.timeline-desc {
  flex: 1;
}

/* Career List */
.career-list {
  padding-left: 24px;
}

.career-list li {
  position: relative;
  margin-bottom: 8px;
  font-size: 0.88rem;
  line-height: 1.7;
  padding-left: 16px;
}

.career-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-border);
}

/* Researchmap link */
.researchmap-link {
  font-family: var(--font-en);
  font-size: 0.82rem;
  margin-top: -48px;
  margin-bottom: 45px;
  color: var(--color-text-muted);
}

.researchmap-link a {
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.researchmap-link a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* ===== Research Section ===== */
.research-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}

.research-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.research-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.research-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.research-item h3 {
  font-size: 0.88rem;
  font-weight: 400;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

.research-item p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Past research */
.research-past {
  margin-top: 8px;
}

.research-past-heading {
  font-family: var(--font-jp);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
}

.research-past-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-past-item {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(224, 221, 213, 0.5);
}

.research-past-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.research-past-item h4 {
  font-size: 0.78rem;
  font-weight: 400;
  margin-bottom: 1px;
}

.research-past-item p {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== Achievements Section ===== */
.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.year-nav a {
  font-family: var(--font-en);
  font-size: 0.82rem;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-muted);
  transition: all var(--transition-base);
}

.year-nav a:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* Accordion */
.accordion {
  margin-bottom: 4px;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  transition: background var(--transition-base);
}

.accordion-header:hover {
  background: var(--color-tag-bg);
}

.accordion-year {
  letter-spacing: 0.06em;
}

.accordion-icon {
  width: 12px;
  height: 12px;
  position: relative;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--color-text-muted);
  transition: transform var(--transition-base);
}

.accordion-icon::before {
  top: 50%;
  left: 0;
  width: 12px;
  height: 1px;
  transform: translateY(-50%);
}

.accordion-icon::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 12px;
  transform: translateX(-50%);
}

.accordion-header[aria-expanded="true"] .accordion-icon::after {
  transform: translateX(-50%) rotate(90deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  padding: 0 20px;
}

.accordion-body.open {
  max-height: none;
  padding: 20px 20px 32px;
}

/* Achievement entries */
.achievement-category {
  margin-bottom: 28px;
}

.achievement-category h4 {
  font-family: var(--font-jp);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.achievement-entry {
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--color-border);
}

.achievement-entry p {
  font-size: 0.85rem;
  line-height: 1.8;
}

.achievement-entry ul {
  padding-left: 20px;
  margin-top: 8px;
}

.achievement-entry li {
  font-size: 0.85rem;
  line-height: 1.8;
  position: relative;
  padding-left: 12px;
  margin-bottom: 4px;
}

.achievement-entry li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-border);
}

.achievement-note {
  font-size: 0.8rem !important;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ===== News Section ===== */
#news {
  padding-top: 0;
}

.news-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

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

.news-item p {
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ===== Message & Contact Section ===== */
.message-block {
  margin-bottom: 48px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.message-label {
  font-family: var(--font-jp);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.message-text {
  font-size: 0.9rem;
  line-height: 2;
  text-align: left;
}

.goals-list {
  text-align: left;
  margin: 16px 0;
  padding-left: 24px;
}

.goals-list li {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 4px;
  list-style: decimal;
}

.goal-detail {
  text-align: left;
  margin-bottom: 16px;
}

.goal-detail p {
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--color-text-muted);
}

.contact-block {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.contact-heading {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.contact-email {
  font-family: var(--font-en);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.social-links a {
  font-family: var(--font-en);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: color var(--transition-base), border-color var(--transition-base);
}

.social-links a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* ===== Footer ===== */
footer {
  padding: 40px 0;
  text-align: center;
}

.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

footer p {
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero stagger animation */
.hero-text-inner.fade-in.visible .hero-name,
.hero-text-inner.fade-in.visible .hero-name-en,
.hero-text-inner.fade-in.visible .hero-title,
.hero-text-inner.fade-in.visible .hero-divider,
.hero-text-inner.fade-in.visible .hero-affiliation,
.hero-text-inner.fade-in.visible .hero-notes,
.hero-text-inner.fade-in.visible .hero-tags {
  animation: fadeUp 0.6s ease both;
}

.hero-text-inner.fade-in.visible .hero-name { animation-delay: 0.1s; }
.hero-text-inner.fade-in.visible .hero-name-en { animation-delay: 0.2s; }
.hero-text-inner.fade-in.visible .hero-title { animation-delay: 0.3s; }
.hero-text-inner.fade-in.visible .hero-divider { animation-delay: 0.4s; }
.hero-text-inner.fade-in.visible .hero-affiliation:nth-of-type(1) { animation-delay: 0.5s; }
.hero-text-inner.fade-in.visible .hero-affiliation:nth-of-type(2) { animation-delay: 0.55s; }
.hero-text-inner.fade-in.visible .hero-notes { animation-delay: 0.6s; }
.hero-text-inner.fade-in.visible .hero-tags { animation-delay: 0.7s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
    --nav-height: 56px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-menu {
    display: flex;
  }

  .nav-inner {
    padding: 0 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-photo {
    height: 50vh;
  }

  .hero-text {
    padding: 40px 24px;
    justify-content: center;
  }

  .hero-text-inner {
    text-align: center;
  }

  .hero-tags {
    justify-content: center;
  }

  .hero-motto {
    padding: 28px 20px;
  }

  .hero-motto p {
    font-size: 1.15rem;
  }

  .section-inner {
    padding: 0 24px;
  }

  .section-heading {
    font-size: 1.4rem;
    margin-bottom: 40px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 2px;
  }

  .timeline-date {
    width: auto;
    font-size: 0.78rem;
  }

  .year-nav {
    gap: 8px;
  }

  .year-nav a {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .accordion-header {
    padding: 12px 16px;
  }

  .accordion-body.open {
    padding: 16px 16px 24px;
  }

  .social-links {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 1.8rem;
  }

  .hero-title {
    font-size: 0.9rem;
  }

  .hero-motto p {
    font-size: 0.95rem;
  }

  .section-heading {
    font-size: 1.2rem;
  }

  .heading-jp {
    font-size: 0.9rem;
  }
}

/* ===== Print ===== */
@media print {
  #navbar, .nav-toggle, .mobile-menu, .year-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero-photo img {
    filter: none;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .accordion-body {
    max-height: none !important;
    padding: 20px !important;
  }

  section {
    page-break-inside: avoid;
  }
}
