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

:root {
  /* Greens */
  --g-deep:    #152b1e;   /* 深い森・夜の田んぼ */
  --g-mid:     #1e4530;   /* 水田の深緑 */
  --g-field:   #2d6a4f;   /* 田んぼの緑 */
  --g-sage:    #52b788;   /* 若葉 */
  --g-light:   #95d5b2;   /* 穂の先端 */
  --g-pale:    #d8f3dc;   /* 薄い若草 */

  /* Rice tones */
  --rice-gold: #c9a84c;   /* 稲穂の金色 */
  --rice-straw:#e8d5a3;   /* 藁の色 */
  --cream:     #f8f5ee;   /* 玄米クリーム */
  --white:     #ffffff;

  /* Text */
  --text:      #1a2e1f;
  --text-mid:  #3d5a46;
  --text-light:#7a9e85;

  /* Misc */
  --border:    #ddeede;
  --radius:    4px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Noto Serif JP', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===================================================
   LOADER
=================================================== */
#loader {
  position: fixed; inset: 0;
  background: var(--g-deep);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#loader.done { opacity: 0; visibility: hidden; }

.loader-inner {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--g-sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================
   REVEAL ANIMATION
=================================================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================
   HEADER
=================================================== */
#header {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  padding: 1.4rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition), padding var(--transition);
  mix-blend-mode: normal;
}
#header.scrolled {
  background: rgba(21, 43, 30, 0.96);
  backdrop-filter: blur(12px);
  padding: 0.9rem 2.5rem;
}

nav {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 600;
  color: var(--white);
  letter-spacing: 0.1em;
}

.nav-links {
  list-style: none;
  display: flex; gap: 2.5rem;
}
.nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 0.4rem;
  transition: color 0.2s;
}
.nav-links a span {
  font-size: 0.65rem;
  color: var(--g-sage);
  font-family: 'Cormorant Garamond', serif;
}
.nav-links a:hover { color: var(--white); }

/* 言語切替 */
.lang-switch {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.15em !important;
  color: rgba(255,255,255,0.45) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  padding: 0.25rem 0.6rem !important;
  transition: border-color 0.2s, color 0.2s !important;
}
.lang-switch:hover {
  color: var(--white) !important;
  border-color: rgba(255,255,255,0.6) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--white);
  transition: var(--transition);
}

/* ===================================================
   MOBILE MENU
=================================================== */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--g-deep);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu li { margin: 1.5rem 0; }
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem; font-weight: 300;
  color: var(--white);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--g-sage); }

/* ===================================================
   HERO
=================================================== */
#hero {
  position: relative;
  min-height: 100vh;
  background: var(--g-deep);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* 水田の畝をイメージした背景パターン */
.hero-bg {
  position: absolute; inset: 0;
  overflow: hidden;
}
.rice-field {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(255,255,255,0.025) 59px,
      rgba(255,255,255,0.025) 60px
    );
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(45,106,79,0.4) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(82,183,136,0.15) 0%, transparent 50%);
}

.hero-content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0 2rem;
}

.hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 3rem;
  font-weight: 300;
}

/* メインメッセージ */
.hero-message {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 200;
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin-bottom: 2rem;
}

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.12em;
}

.hero-tagline {
  font-size: 0.85rem;
  color: var(--rice-straw);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* スクロールインジケーター */
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(0.7); opacity: 0.2; }
}

/* 右下のデコレーション文字 */
.hero-deco {
  position: absolute; bottom: 2.5rem; right: 2.5rem;
  writing-mode: vertical-rl;
}
.deco-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.2em;
}

/* ===================================================
   SECTION COMMON
=================================================== */
section { padding: 8rem 0; }
.section-dark { background: var(--g-deep); }
.section-cream { background: var(--cream); }

.section-header {
  padding: 0 2.5rem;
  margin-bottom: 5rem;
  display: flex; align-items: baseline; gap: 1.2rem;
}
.section-header.light h2,
.section-header.light .section-num { color: var(--white); }

.section-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--g-field);
  letter-spacing: 0.1em;
}
.section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--g-deep);
  letter-spacing: 0.05em;
}
.section-header.light .section-num { color: var(--g-sage); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 2.5rem; }

/* ===================================================
   ABOUT
=================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.lead-text {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 300;
  color: var(--g-deep);
  line-height: 1.6;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.body-text {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.contact-row {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.contact-row a {
  font-size: 0.82rem;
  color: var(--g-field);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
  display: inline-block;
  width: fit-content;
}
.contact-row a:hover {
  color: var(--g-deep);
  border-bottom-color: var(--g-field);
}

.sub-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--g-field);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Timeline */
.timeline { list-style: none; }
.timeline li {
  display: flex; gap: 1.8rem;
  padding-bottom: 2rem;
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 68px; top: 8px;
  width: 1px;
  height: calc(100% + 2px);
  background: var(--border);
}
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: '';
  position: absolute;
  left: calc(68px - 3px); top: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--g-sage);
}

.t-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem;
  color: var(--text-light);
  min-width: 60px;
  padding-top: 2px;
  letter-spacing: 0.05em;
}
.t-body { padding-left: 1rem; }
.t-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--g-deep);
  margin-bottom: 0.2rem;
}
.t-body em {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===================================================
   RESEARCH
=================================================== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
}

.r-card {
  padding: 3rem 2.5rem;
  background: var(--g-deep);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition);
  cursor: default;
}
.r-card:hover { background: var(--g-mid); }

.r-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  color: var(--g-sage);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.r-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.r-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}

/* ===================================================
   PUBLICATIONS
=================================================== */
.pub-list {
  border-top: 1px solid var(--border);
}

.pub-item {
  display: grid;
  grid-template-columns: 180px 1fr 24px;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.pub-item:hover { background: var(--cream); }
.pub-item:hover .pub-arrow { transform: translateX(4px); color: var(--g-field); }

.pub-meta {
  display: flex; flex-direction: column; gap: 0.4rem;
}
.pub-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--g-field);
  letter-spacing: 0.05em;
}
.pub-tag {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.pub-title {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.4rem;
  font-weight: 400;
}
.pub-authors {
  font-size: 0.78rem;
  color: var(--text-light);
}
.pub-authors strong { color: var(--g-field); font-weight: 500; }

.pub-arrow {
  font-size: 1rem;
  color: var(--border);
  transition: transform 0.2s, color 0.2s;
}

.pub-footer {
  margin-top: 2.5rem;
  text-align: right;
}
.text-link {
  font-size: 0.82rem;
  color: var(--g-field);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.text-link:hover { color: var(--g-deep); border-color: var(--g-deep); }

/* ===================================================
   AWARDS
=================================================== */
.award-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.award-item {
  display: flex; gap: 3rem; align-items: baseline;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.award-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--rice-gold);
  min-width: 80px;
  letter-spacing: 0.05em;
}
.award-body strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--g-deep);
  margin-bottom: 0.4rem;
}
.award-body p {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}
.award-org {
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

/* ===================================================
   LINKS
=================================================== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
}

.l-card {
  display: flex; flex-direction: column;
  align-items: flex-start;
  padding: 2.5rem 2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
  gap: 0.5rem;
}
.l-card:hover { background: rgba(255,255,255,0.08); }

.l-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--g-sage);
  border: 1px solid rgba(82,183,136,0.35);
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.8rem;
  display: inline-block;
  text-transform: uppercase;
}
.l-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.05em;
}
.l-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
}

/* ===================================================
   FOOTER
=================================================== */
footer {
  background: #0d1f14;
  padding: 4rem 2.5rem;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
}
.footer-affil {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
}
.footer-copy {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  margin-top: 1rem;
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .research-grid { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: repeat(2, 1fr); }

  .pub-item { grid-template-columns: 120px 1fr 20px; gap: 1rem; }

  .hero-deco { display: none; }
  section { padding: 5rem 0; }
  .section-header { margin-bottom: 3rem; }
}

@media (max-width: 600px) {
  .links-grid { grid-template-columns: 1fr; }
  .pub-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .pub-arrow { display: none; }
  .award-item { flex-direction: column; gap: 0.5rem; }
  .timeline li::before { left: 58px; }
  .timeline li::after { left: calc(58px - 3px); }
}
