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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f6f3;
  --bg-card: #f0eeea;
  --text-primary: #000000;
  --text-body: #222222;
  --text-sub: #555555;
  --text-muted: #888888;
  --accent: #8b6d45;
  --accent-soft: rgba(139, 109, 69, 0.07);
  --border: #e0ddd8;
  --border-hover: #c0bbb3;
  --font-body: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --font-display: 'Cormorant Garamond', serif;
  --max-w: 860px;
  --max-w-narrow: 640px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
  overflow-x: hidden;
}
a { color: inherit; }

/* ═══ NAV ═══ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s;
}
.nav.scrolled { background: rgba(255,255,255,0.96); }
.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 500;
  letter-spacing: 0.25em; text-decoration: none; color: var(--text-primary);
}
.nav-logo em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-sub); text-decoration: none; transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: 0.3s; }

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 8rem 0 6rem; position: relative; overflow: visible;
}
.hero-text {
  flex: 1; padding-left: 10%; padding-right: 4rem;
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center;
}
.hero-label {
  font-family: var(--font-display); font-size: 2rem;
  font-weight: 600; letter-spacing: 0.08em; color: var(--text-primary);
  margin: 0 0 1.5rem;
  opacity: 0; animation: fadeUp 1s ease 0.2s forwards;
}
.hero-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500; color: var(--text-body);
  line-height: 2.2;
  opacity: 0; animation: fadeUp 1s ease 0.5s forwards;
}
/* ── カードフリップ ── */
.hero-card {
  flex: 1;
  perspective: 1200px;
  width: 50%;
  max-width: none;
  padding-right: 4%;
  opacity: 0; animation: fadeIn 1.2s ease 0.4s forwards;
}
.hero-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}
.hero-card:hover .hero-card-inner,
.hero-card-inner.flipped {
  transform: rotateY(180deg);
}
.hero-card-front,
.hero-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
}
.hero-card-front {
  background: var(--bg-card);
}
.hero-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(var(--hero-rotation, 0deg)) scale(1.2);
}
.hero-card-back {
  background: #f5efe6;
  border: 1px solid var(--border);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.hero-card-cite {
  position: absolute;
  bottom: 1.2rem;
  right: 1.5rem;
  font-family: var(--font-serif);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.hero-card-back p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-sub);
  line-height: 1.8;
  text-align: center;
  letter-spacing: 0.02em;
}
.hero-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  margin-top: 3rem; opacity: 0; animation: fadeIn 1.2s ease 1s forwards;
}

/* ═══ SECTIONS ═══ */
section { padding: 6rem 2rem; }
.container { max-width: var(--max-w); margin: 0 auto; }
.container--narrow { max-width: var(--max-w-narrow); margin: 0 auto; }
.section-border {
  border-top: none;
  position: relative;
}
.section-border::before {
  content: '◯';
  display: block;
  text-align: center;
  font-size: 1rem;
  color: var(--border);
  letter-spacing: 1em;
  padding: 0 0 2rem;
}
.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(139, 109, 69, 0.2);
  display: inline-block;
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem; font-weight: 700; color: var(--text-primary);
  letter-spacing: 0.04em; margin-bottom: 2rem;
}
.section-lead {
  font-size: 1rem;
  color: var(--text-body); line-height: 2;
}

/* セクション背景色の交互切り替え */
.bg-cream { background: #f7f5f0; }

/* ═══ ABOUT ═══ */
.about-body { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.about-body p { font-size: 1rem; color: var(--text-body); line-height: 2; }

/* ═══ RESEARCHER ═══ */
.researcher { background: #f7f5f0; }
.researcher-inner { display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem; align-items: start; }
.researcher-photo {
  width: 200px; height: 260px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.researcher-photo img { width: 100%; height: 100%; object-fit: cover; }
.researcher-text { display: flex; flex-direction: column; gap: 0.6rem; }
.researcher-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
.researcher-name-en { font-family: var(--font-display); font-size: 0.9rem; font-style: italic; color: var(--text-muted); }
.researcher-role { font-size: 0.875rem; color: var(--accent); font-weight: 500; }
.researcher-bio { font-size: 0.9375rem; color: var(--text-body); line-height: 2; }
.researcher-links { display: flex; gap: 1.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.researcher-links a {
  font-size: 0.875rem; color: var(--text-sub); text-decoration: none;
  border-bottom: 1px solid var(--border); padding-bottom: 2px; transition: all 0.3s;
}
.researcher-links a:hover { color: var(--accent); border-color: var(--accent); }

/* collaborator */
.collab-section { margin-top: 2.5rem; }
.collab { display: flex; gap: 1.2rem; align-items: flex-start; }
.collab-photo {
  width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border);
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.collab-photo img { width: 100%; height: 100%; object-fit: cover; }
.collab-info { display: flex; flex-direction: column; gap: 0.15rem; }
.collab-name { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.collab-role { font-size: 0.875rem; color: var(--text-sub); }
.collab-desc { font-size: 0.9375rem; color: var(--text-body); line-height: 1.9; margin-top: 0.3rem; }

/* ═══ PROJECT ═══ */
.project-cover {
  width: 100%; max-width: 640px; border-radius: 6px; overflow: hidden;
  margin-bottom: 1.8rem; border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.project-cover img { width: 100%; height: auto; display: block; }
.project-section {
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  transition: box-shadow 0.3s ease;
}
.project-section:hover {
  box-shadow: 0 4px 24px rgba(139, 109, 69, 0.08);
}
.project-section:last-child { margin-bottom: 0; }
.project-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.project-num {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.25em; color: var(--accent);
  background: rgba(139, 109, 69, 0.08);
  padding: 0.25rem 0.8rem; border-radius: 3px;
  display: inline-block;
}
.project-title { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.2rem; }
.project-en { font-family: var(--font-display); font-size: 0.9rem; font-style: italic; color: var(--text-muted); }
.project-body { font-size: 1rem; color: var(--text-body); line-height: 2; max-width: 40em; }
.badge { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-sub); margin-top: 0.5rem; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge .dot--active { background: var(--accent); animation: pulse 2s ease-in-out infinite; }
.badge .dot--soon { background: var(--text-muted); }
.badge .dot--future { background: #ccc; }

.project-links { display: flex; gap: 0.8rem; margin-top: 1.5rem; flex-wrap: wrap; }
.project-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.875rem; color: var(--accent); text-decoration: none; font-weight: 500;
  padding: 0.55rem 1.2rem; border: 1px solid var(--border); border-radius: 4px; transition: all 0.3s;
}
.project-link:hover { background: var(--accent-soft); border-color: var(--border-hover); }
.project-link .arrow { font-family: var(--font-display); }

/* excerpts */
.excerpts { margin-top: 2.5rem; }
.excerpts-title {
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  letter-spacing: 0.15em; color: var(--accent); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.excerpts-title::before,
.excerpts-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.excerpt {
  border-left: 3px solid var(--accent);
  padding: 1.5rem 0 1.5rem 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.excerpt::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(139, 109, 69, 0.12);
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  line-height: 1;
}
.excerpt:last-child { margin-bottom: 0; }
.excerpt-text {
  font-family: var(--font-serif); font-size: 1.1rem;
  font-weight: 400; color: var(--text-primary);
  line-height: 2; letter-spacing: 0.02em;
}
.excerpt-source { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; text-align: right; }
.excerpt-source a { text-decoration: none; border-bottom: 1px solid var(--border); transition: all 0.3s; }
.excerpt-source a:hover { color: var(--accent); border-color: var(--accent); }

/* future */
.future-projects { margin-top: 3.5rem; }
.future-label { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0.12em; color: var(--text-sub); margin-bottom: 1rem; }
.future-list { display: flex; flex-direction: column; gap: 0.5rem; }
.future-item { display: flex; align-items: center; gap: 0.8rem; font-size: 1rem; color: var(--text-sub); }
.future-item::before { content: ''; width: 16px; height: 1px; background: #ccc; flex-shrink: 0; }

/* ═══ CONTACT FORM ═══ */
.contact-form {
  max-width: 600px;
  margin: 2rem auto 0;
  text-align: left;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.form-group .required {
  font-size: 0.75rem;
  font-weight: 400;
  color: #c0392b;
  margin-left: 0.2rem;
}
.form-group .optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.4rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-body);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea {
  min-height: 160px;
  resize: vertical;
}
.form-privacy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
  cursor: pointer;
  justify-content: center;
}
.form-privacy a {
  color: var(--accent);
  text-decoration: underline;
}
.form-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}
.form-submit {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: opacity 0.3s;
}
.form-submit:hover { opacity: 0.85; }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-back {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-sub);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: all 0.3s;
}
.form-back:hover { border-color: var(--border-hover); }

/* 確認表示 */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
.confirm-table th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  width: 30%;
  vertical-align: top;
}
.confirm-table td {
  font-size: 0.9375rem;
  color: var(--text-body);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  white-space: pre-wrap;
}

/* ═══ FOOTER ═══ */
footer {
  background: #f0ece4;
  border-top: none;
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
}
footer::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 2rem;
  opacity: 0.5;
}
footer p { font-size: 0.8rem; color: var(--text-muted); line-height: 2; }
.footer-brand { font-family: var(--font-display); font-style: italic; letter-spacing: 0.15em; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav { padding: 0.9rem 1.2rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--border); padding: 1.2rem 1.5rem; gap: 1rem;
  }
  .nav-toggle { display: block; }
  section { padding: 3.5rem 1.4rem; }
  .researcher-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .researcher-photo { width: 140px; height: 180px; }
  .project-header { flex-direction: column; gap: 0.3rem; }
}
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 6rem 1.5rem 4rem; }
  .hero-text { padding-left: 1.5rem; padding-right: 1.5rem; margin-bottom: 2rem; }
  .hero-card { padding-right: 0; max-width: 100%; width: 90%; margin: 0 auto; }
  .hero-card-inner { aspect-ratio: 1 / 1; }
  .hero-card:hover .hero-card-inner,
  .hero-card-inner.flipped {
    transform: none;
  }
  .hero-card-back {
    display: none;
  }
}
@media (max-width: 480px) {
  .project-links { flex-direction: column; }
  .project-link { justify-content: center; }
}

/* ============================================
   装飾イラストパーツ — 2026-04-03 追加
   ============================================ */

/* --- 共通 --- */
.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.deco img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}

/* --- セクション区切り線 --- */
.deco-divider {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deco-divider::before,
.deco-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0dbd3;
}
.deco-divider .deco-inline {
  width: 36px;
  height: 36px;
  margin: 0 20px;
  opacity: 1;
  flex-shrink: 0;
}
.deco-divider .deco-inline img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- ヘッダー内パーツ --- */
.deco.deco-moon {
  width: 48px;
  height: 48px;
  top: 120px;
  right: 15%;
}
.deco.deco-maru-header {
  width: 32px;
  height: 32px;
  top: 140px;
  left: 12%;
}

/* --- About 猫シルエット --- */
#about .container { position: relative; }
.deco.deco-neko-karada {
  width: 140px;
  height: 160px;
  top: -30px;
  right: -60px;
}

/* --- PROJECT 01 家遠景＋木 --- */
.project-section { position: relative; overflow: visible; }
.deco.deco-ie-enkei {
  width: 200px;
  height: 90px;
  bottom: -20px;
  left: -80px;
}
.deco.deco-ki {
  width: 100px;
  height: 120px;
  top: -30px;
  right: -40px;
}

/* --- PROJECT 02 猫の顔 --- */
.deco.deco-neko-kao {
  width: 110px;
  height: 110px;
  bottom: -25px;
  right: -35px;
}

/* --- フッター 家2つ --- */
.deco.deco-ie-main {
  width: 160px;
  height: 140px;
  bottom: 10px;
  left: -40px;
}
.deco.deco-ie-koushi {
  width: 100px;
  height: 90px;
  bottom: 20px;
  right: -20px;
}

/* --- テキストを装飾の上に表示 --- */
#about .about-body,
#about .section-label,
#about .section-title,
.project-section .project-header,
.project-section .project-title,
.project-section .project-body,
.project-section .project-links,
.project-section .project-cover,
.project-section .badge,
.project-section .excerpts,
footer p,
footer::before {
  position: relative;
  z-index: 1;
}

/* --- タブレット（768px以下） --- */
@media (max-width: 768px) {
  .deco.deco-neko-karada {
    width: 100px; height: 120px;
    right: -20px; top: -20px;
  }
  .deco.deco-ie-enkei {
    width: 140px; height: 60px;
    left: -30px; bottom: -15px;
  }
  .deco.deco-ki {
    width: 70px; height: 80px;
    right: -15px; top: -15px;
  }
  .deco.deco-neko-kao {
    width: 80px; height: 80px;
    right: -10px; bottom: -15px;
  }
  .deco.deco-ie-main {
    width: 120px; height: 100px;
    left: -10px;
  }
  .deco.deco-ie-koushi {
    width: 70px; height: 60px;
    right: 0;
  }
}

/* --- スマホ（480px以下） --- */
@media (max-width: 480px) {
  .deco.deco-moon {
    width: 32px; height: 32px;
    right: 10%; top: 30px;
  }
  .deco.deco-maru-header {
    width: 22px; height: 22px;
    left: 8%; top: 45px;
  }
  .deco.deco-neko-karada {
    width: 70px; height: 80px;
    right: -5px; top: -10px;
  }
  .deco.deco-ie-enkei {
    width: 100px; height: 45px;
    left: -10px; bottom: -10px;
  }
  .deco.deco-ki {
    width: 50px; height: 60px;
    right: -5px; top: -10px;
  }
  .deco.deco-neko-kao {
    width: 60px; height: 60px;
    right: -5px; bottom: -10px;
  }
  .deco.deco-ie-main {
    width: 90px; height: 80px;
    left: 0;
  }
  .deco.deco-ie-koushi {
    display: none;
  }
  .deco-divider .deco-inline {
    width: 28px; height: 28px;
    margin: 0 14px;
  }
}

/* ============================================
   装飾パーツ ここまで
   ============================================ */

/* reCAPTCHA バッジ非表示 */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* reCAPTCHA テキスト帰属 */
.recaptcha-notice {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1.8;
}
.recaptcha-notice a {
  color: var(--text-sub);
  text-decoration: underline;
}
                                                                                                                                                                                                                                                                                                                    