/* ============================================================
   大城一輝 公式プロフィール（誠実版）
   白×墨色・明朝体見出し・罫線モチーフ
   ============================================================ */

:root {
  --paper: #fbfaf7;
  --white: #ffffff;
  --paper-alt: #f4f2ec;
  --ink: #22252b;
  --ink-soft: #43474f;
  --muted: #63686f;
  --line: #e2dfd8;
  --line-strong: #c9c5bb;
  --indigo: #234a6d;
  --indigo-dark: #1a3a56;
  --seal: #b3402a;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-soft);
  background: var(--paper);
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--indigo); }
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

/* ---------------- ヘッダー ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--seal);
  border-radius: 5px;
  color: var(--seal);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}

/* ---------------- ボタン ---------------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
  border: 1px solid var(--indigo);
}

.btn-primary:hover { background: var(--indigo-dark); border-color: var(--indigo-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover { border-color: var(--ink); }

.btn-small { padding: 8px 20px; font-size: 0.85rem; }

/* ---------------- ヒーロー ---------------- */
.hero {
  padding: clamp(56px, 9vh, 120px) clamp(20px, 4vw, 48px) clamp(64px, 10vh, 120px);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero-name {
  font-size: clamp(2.5rem, 5.5vw, 3.7rem);
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.hero-romaji {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-top: 8px;
}

/* 肩書き（部署名が長いため span 単位で折り返す） */
.hero-position {
  margin-top: 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.05em;
  line-height: 1.7;
}

.hero-position span {
  display: inline-block;
  white-space: nowrap;
}

/* 罫線: 描画アニメーションの基本要素 */
.rule {
  height: 1px;
  background: linear-gradient(to right, var(--seal) 48px, var(--line-strong) 48px);
}

.hero-rule { margin: 26px 0; }

.hero-lead { font-size: 1.02rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 18px 14px;
  border-left: 1px solid var(--line);
}

.stat:first-child { border-left: none; }

.stat dt {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.stat dd {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-top: 2px;
}

.stat dd small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 2px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { min-width: 0; }

.portrait-frame {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line-strong);
  padding: 10px;
  box-shadow: 0 14px 40px rgba(34, 37, 43, 0.08);
}

/* 写真の背後に一回り大きい藍の罫線フレームを敷く */
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(35, 74, 109, 0.35);
  transform: translate(14px, 14px);
  z-index: -1;
}

/* ---------------- セクション共通 ---------------- */
.section { padding: clamp(64px, 10vh, 110px) clamp(20px, 4vw, 48px); }

.section-alt { background: var(--paper-alt); }

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

.section-head { margin-bottom: 44px; }

.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: 0.08em;
}

/* 見出し下の罫線（描画演出の対象） */
.section-title::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 18px;
  background: linear-gradient(to right, var(--seal) 48px, var(--line-strong) 48px);
}

.section-lead { margin-top: 20px; font-size: 0.98rem; }

/* ---------------- 強みカード ---------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px 30px 26px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(35, 74, 109, 0.45);
  box-shadow: 0 10px 28px rgba(34, 37, 43, 0.07);
}

.card::before {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--indigo);
  margin-bottom: 20px;
}

.card h3 { font-size: 1.18rem; margin-bottom: 12px; letter-spacing: 0.04em; }

.card p { font-size: 0.95rem; }

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list li {
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px 10px;
}

/* ---------------- 経歴タイムライン ---------------- */
.timeline {
  list-style: none;
  position: relative;
  max-width: 720px;
  padding-left: 34px;
}

/* 縦の罫線（描画演出: 上から下へ伸びる） */
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item { position: relative; padding-bottom: 36px; }

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--indigo);
}

.timeline-item h3 { font-size: 1.15rem; letter-spacing: 0.05em; }

.timeline-item p { font-size: 0.95rem; margin-top: 6px; }

.text-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover { color: var(--indigo-dark); }

/* ---------------- 著書 ---------------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.book-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
  border-color: rgba(35, 74, 109, 0.45);
  box-shadow: 0 10px 28px rgba(34, 37, 43, 0.07);
}

.book-card img {
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(34, 37, 43, 0.1);
}

.book-card h3 { font-size: 1.05rem; line-height: 1.6; }

.book-body p { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

/* ---------------- 登壇 ---------------- */
.talk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.talk-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.talk-card:hover {
  border-color: rgba(35, 74, 109, 0.45);
  box-shadow: 0 10px 28px rgba(34, 37, 43, 0.07);
}

.talk-card > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.talk-body { padding: 22px 24px 24px; }

.talk-body h3 { font-size: 1.02rem; line-height: 1.6; }

.talk-body p { font-size: 0.9rem; margin-top: 8px; }

/* ---------------- 資格 ---------------- */
.cert-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cert-list li {
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--ink);
}

/* ---------------- 連絡 ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px 20px;
  text-decoration: none;
  text-align: center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
  border-color: rgba(35, 74, 109, 0.45);
  box-shadow: 0 10px 28px rgba(34, 37, 43, 0.07);
}

.contact-icon { width: 26px; height: 26px; }

.contact-icon svg { width: 100%; height: 100%; fill: var(--indigo); }

.contact-label {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
}

.contact-detail { font-size: 0.85rem; color: var(--muted); word-break: break-all; }

/* ---------------- フッター ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}

/* ============================================================
   アニメーション
   - html.js が付いたときだけ初期非表示にする（JS無効でも全文表示）
   ============================================================ */

/* スクロールリビール（フェードイン） */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 見出し罫線の描画（section-head のリビールと連動） */
html.js .section-head .section-title::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s ease 0.25s;
}

html.js .section-head.visible .section-title::after { transform: scaleX(1); }

/* カード上部の藍ラインも控えめに描画 */
html.js .card::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s ease 0.3s;
}

html.js .card.visible::before { transform: scaleX(1); }

/* タイムラインの縦罫線: 上から下へ伸びる */
html.js .timeline::before {
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.3s ease 0.15s;
}

html.js .timeline.visible::before { transform: scaleY(1); }

/* ヒーローの登場演出（読み込み時に1度だけ） */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes draw-x {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

html.js .hero .eyebrow { animation: rise-in 0.7s ease both 0.05s; }
html.js .hero .hero-name { animation: rise-in 0.7s ease both 0.15s; }
html.js .hero .hero-romaji { animation: rise-in 0.7s ease both 0.25s; }
html.js .hero .hero-position { animation: rise-in 0.7s ease both 0.32s; }
html.js .hero .hero-rule {
  transform-origin: left;
  animation: draw-x 0.9s ease both 0.45s;
}
html.js .hero .hero-lead { animation: rise-in 0.7s ease both 0.5s; }
html.js .hero .hero-stats { animation: rise-in 0.7s ease both 0.65s; }
html.js .hero .hero-actions { animation: rise-in 0.7s ease both 0.8s; }
html.js .hero .portrait-frame { animation: rise-in 0.9s ease both 0.35s; }

/* モーション抑制時はすべて静的に表示 */
@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .card::before,
  html.js .timeline::before,
  html.js .section-head .section-title::after {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html.js .hero .eyebrow,
  html.js .hero .hero-name,
  html.js .hero .hero-romaji,
  html.js .hero .hero-position,
  html.js .hero .hero-rule,
  html.js .hero .hero-lead,
  html.js .hero .hero-stats,
  html.js .hero .hero-actions,
  html.js .hero .portrait-frame {
    animation: none;
  }
}

/* ---------------- レスポンシブ ---------------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }

  .hero-visual { order: 2; max-width: 560px; }

  .card-grid, .book-grid { grid-template-columns: 1fr; }

  .talk-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }

  .hero-stats { grid-template-columns: 1fr 1fr; }

  .stat:nth-child(3) { border-left: none; }

  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

  .talk-grid, .contact-grid { grid-template-columns: 1fr; }

  .book-card { grid-template-columns: 120px 1fr; gap: 18px; }

  .pc-only { display: none; }
}
