:root {
  --paper: #efe9db;
  --paper-hi: #f7f2e6;
  --paper-lo: #e2dac6;
  --ink: #34322c;
  --ink-soft: #6b665a;
  --line: #d3cbb6;
  --accent: #a95c33;
  --accent-soft: #c48a5c;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  min-height: 100vh;
  font-family: "Shippori Mincho", serif;
  color: var(--ink);
  /* 黒板の下地: 深い緑がかった黒に、わずかな明暗のムラを重ねる */
  background-color: #1b231f;
  background-image:
    radial-gradient(70% 55% at 28% 26%, rgba(226,236,229,0.05) 0%, transparent 60%),
    radial-gradient(60% 50% at 76% 78%, rgba(214,228,220,0.04) 0%, transparent 60%),
    linear-gradient(160deg, #232d27 0%, #141a16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

/*
 * 黒板の質感。チョークの粉と消し跡のかすみを重ねる。
 * position を absolute にして本文と一緒にスクロールさせ、名刺だけが
 * 滑って見える不自然さを解消する。
 */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  background-image:
    /* 黒板消しでこすったような大きな白いかすみ */
    radial-gradient(58% 44% at 22% 28%, rgba(228,236,230,0.11), transparent 72%),
    radial-gradient(50% 40% at 80% 66%, rgba(222,232,226,0.08), transparent 72%),
    radial-gradient(46% 54% at 56% 92%, rgba(222,232,226,0.06), transparent 72%),
    radial-gradient(38% 30% at 68% 18%, rgba(224,234,228,0.05), transparent 70%),
    /* チョークの粉の細かなザラつき(グレースケール化したノイズ) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='cd'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23cd)' opacity='0.35'/%3E%3C/svg%3E");
  background-size:
    auto,
    auto,
    auto,
    auto,
    260px 260px;
  mix-blend-mode: screen;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  color: var(--ink);
  /* コルクボードに少し斜めに留められた紙 */
  transform: rotate(-1.2deg);
  /* 紙本体: 中央が明るく端が沈む、抄紙の色ムラを重ねる */
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 90% at 30% 20%, var(--paper-hi) 0%, transparent 55%),
    radial-gradient(130% 100% at 80% 100%, var(--paper-lo) 0%, transparent 60%),
    radial-gradient(60% 50% at 65% 40%, rgba(150,120,70,0.05) 0%, transparent 70%);
  border-radius: 3px;
  padding: 60px 58px 46px;
  /* コルクの上に浮いた紙の厚みと落ち影 */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.4),
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -1px 12px rgba(120,95,55,0.08),
    0 1px 1px rgba(0,0,0,0.05),
    0 3px 8px rgba(50,32,12,0.18),
    0 30px 55px -20px rgba(45,28,10,0.55);
}

/* ざらつきを主張させる粗い紙目のメインテクスチャ層 */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='0.14'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.1'/%3E%3C/svg%3E"),
    radial-gradient(circle at 22% 30%, rgba(150,110,60,0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 22%, rgba(150,110,60,0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 75%, rgba(150,110,60,0.05) 0 1px, transparent 3px),
    radial-gradient(circle at 84% 66%, rgba(150,110,60,0.04) 0 1px, transparent 2px);
  mix-blend-mode: multiply;
}

/* 斜めの繊維目を薄く走らせる仕上げ層 */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(25deg, rgba(90,70,40,0.02) 0 3px, transparent 3px 7px);
  mix-blend-mode: overlay;
}

.card > * { position: relative; z-index: 1; }

/* 活版印刷風にわずかにインクを沈ませる共通の刻印効果 */
.name,
.role,
.section-label {
  text-shadow: 0 1px 0 rgba(255,255,255,0.55), 0 -1px 1px rgba(60,45,25,0.12);
}

/* 角の飾り罫 */
.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent-soft);
  opacity: 0.5;
  z-index: 2;
  pointer-events: none;
}
.corner.tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; }
.corner.br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }

/* 四隅を留める半透明のマスキングテープ */
.tape {
  position: absolute;
  width: 116px;
  height: 34px;
  z-index: 4;
  pointer-events: none;
  /* 半透明の乳白色テープ。端はギザつかせず、光沢を薄く乗せる */
  background:
    linear-gradient(115deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.15) 100%),
    rgba(226, 216, 190, 0.55);
  border-left: 1px solid rgba(255,255,255,0.35);
  border-right: 1px solid rgba(160,150,120,0.25);
  box-shadow:
    0 2px 5px rgba(50,35,15,0.22),
    inset 0 0 8px rgba(255,255,255,0.25);
  /* テープ表面の細かな艶ムラ */
  background-blend-mode: overlay, normal;
}
/* テープの布目・繊維をうっすら重ねる */
.tape::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.tape-tl { top: -14px; left: -26px; transform: rotate(-44deg); }
.tape-tr { top: -14px; right: -26px; transform: rotate(44deg); }
.tape-bl { bottom: -14px; left: -26px; transform: rotate(44deg); }
.tape-br { bottom: -14px; right: -26px; transform: rotate(-44deg); }

/* 言語切り替えトグル */
.lang-toggle {
  position: absolute;
  top: 30px;
  right: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}
.lang-btn {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  padding: 3px 5px;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.2s ease, background 0.2s ease;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active {
  color: var(--accent);
  font-weight: 500;
}
.lang-sep { color: var(--line); font-size: 11px; }

/* 名前まわりと写真を左右に並べるヘッダー */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 30px;
}
.head-text { flex: 1 1 240px; min-width: 0; }

/* 写真: 名刺に刷り込まれたイメージとして、影を付けずフラットに配置 */
.photo {
  flex: 0 0 auto;
  width: 158px;
  margin: 0;
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  /* 印刷物らしく輪郭を締める控えめな線のみ */
  border: 1px solid rgba(60,45,25,0.18);
}

.name {
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 54px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--ink);
  word-break: break-word;
}

.role {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 26px;
}
.divider .rule { flex: 1; height: 1px; background: var(--line); }
.divider .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.6; }

.bio {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 54ch;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 30px 0 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}
.link svg { width: 15px; height: 15px; }

.footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .card { padding: 52px 28px 34px; }
  .lang-toggle { top: 22px; right: 22px; }
  .head { justify-content: center; }
  .head-text { flex-basis: 100%; }
  .photo { margin: 4px auto 8px; }
  .footer { flex-direction: column; gap: 18px; align-items: flex-start; }
}
