/* ============================
   mamedai's homepage
   - 静的HTML/CSS（Cloudflare Pages 公開用）
   - 1ページスクロール / モバイルファースト
   ============================ */

:root {
  --bg: #fff7d6;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-mute: #6b6b66;
  --border: #e8e6e0;
  --accent: #2c5f5d;
  --accent-soft: #e6efee;
  --radius: 14px;
  --max-w: 880px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: 0.7; }

/* ====== Header / Nav ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 247, 214, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: .9rem;
}
.site-nav a { color: var(--text-mute); }
.site-nav a:hover { color: var(--accent); opacity: 1; }

@media (max-width: 560px) {
  .site-nav { gap: 12px; font-size: .82rem; }
  .site-header { padding: 12px 16px; }
}

/* ====== Hero ====== */
.hero {
  padding: 80px 24px 60px;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
  align-items: center;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c5f5d 0%, #4d8b88 100%);
  color: #fafaf7;
  font-family: Georgia, serif;
  font-size: 4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.hero-text .kicker {
  margin: 0 0 4px;
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--text-mute);
  font-size: .95rem;
}
.hero-text h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
}
.hero-text .role {
  margin: 0 0 18px;
  color: var(--text-mute);
  font-size: .98rem;
}
.hero-text .catch {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

@media (max-width: 640px) {
  .hero { padding: 56px 20px 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .avatar { width: 110px; height: 110px; font-size: 3.2rem; }
  .hero-text h1 { font-size: 2.1rem; }
}

/* ====== Section base ====== */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.section-label {
  margin: 0 0 4px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: .9rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.section h2 {
  margin: 0 0 28px;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.section-lead {
  margin: -16px 0 28px;
  color: var(--text-mute);
  font-size: .95rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ====== About ====== */
.prose p {
  margin: 0 0 1em;
  font-size: 1rem;
}
.prose p:last-child { margin-bottom: 0; }

/* ====== Career timeline ====== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--border);
}
.timeline li:last-child { border-bottom: none; }
.timeline .year {
  font-family: Georgia, serif;
  font-size: .95rem;
  color: var(--accent);
  letter-spacing: .03em;
  padding-top: 2px;
}
.timeline .title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 1rem;
}
.timeline .desc {
  margin: 0;
  color: var(--text-mute);
  font-size: .92rem;
}

@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .timeline .year { padding-top: 0; }
}

/* ====== Hobby ====== */
.hobby-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.hobby-grid li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.hobby-name {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 1rem;
}
.hobby-name span {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
  vertical-align: middle;
}
.hobby-grid li p:last-child {
  margin: 0;
  font-size: .92rem;
  color: var(--text-mute);
  line-height: 1.7;
}

@media (max-width: 560px) {
  .hobby-grid { grid-template-columns: 1fr; }
}

/* ====== Writings (記事リスト・前面) ====== */
.writings-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d6d3cc;
}
.card-meta {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: .82rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.card-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}
.card-excerpt {
  margin: 0 0 16px;
  font-size: .9rem;
  color: var(--text-mute);
  line-height: 1.7;
  flex-grow: 1;
}
.card-link {
  font-size: .9rem;
  font-weight: 500;
  align-self: flex-start;
}

@media (max-width: 640px) {
  .writings-grid { grid-template-columns: 1fr; }
}

/* ====== Links ====== */
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: .98rem;
}
.links-list li:last-child { border-bottom: none; }
.link-key {
  font-family: Georgia, serif;
  font-size: .92rem;
  color: var(--text-mute);
  letter-spacing: .02em;
}
.cta-note {
  margin: 24px 0 0;
  padding: 16px 18px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: .9rem;
}

@media (max-width: 560px) {
  .links-list li { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
}

/* ====== Footer ====== */
.site-footer {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-mute);
  font-size: .85rem;
}
.site-footer p { margin: 0; }

/* ====== Reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card { transition: none; }
}
