/* ==========================================================================
   Profile
   平井彩子について（page-profile.php）
   デザイン幅: 1920px
   ========================================================================== */

/* --------------------------------------------------------------------------
   プロフィール
   -------------------------------------------------------------------------- */
.p-profile-intro {
	position: relative;
	z-index: 0;
	padding-top: 40px;
	padding-bottom: 40px;
	overflow: hidden;
	background-color: var(--color-white);
}

/* 背景の装飾 */
.p-profile-intro::before {
	content: "";
	position: absolute;
	top: 0;
	left: calc(50% - 960px);
	z-index: -2;
	width: 1920px;
	height: 762px;
	background: url("../../img/profile/bg-profile.svg") left top / 1920px 762px no-repeat;
	/* SP の縮小（--bg-scale）は、画面の中央・セクションの上端を軸にして、配置を保ったまま縮める */
	transform-origin: 960px 0;
	scale: var(--bg-scale);
}

/* 写真（円形の切り抜き・背景は白）
   画像はリングの下端まで入っている（824 x 803）。PC は上揃え（セクションの上端）にする。
   下揃えにすると、画面幅が狭く文章の行数が多いときにセクションが高くなり、写真の上に空きができるため。
   セクションの高さは最低でも写真の高さ - 41px にし、文章が短いとき（1920px など）はデザインどおり
   リングの下端 41px をセクションの overflow: hidden で切る（下のリングが History の背景に接して見える）。
   文章が長くセクションが写真より高いときは、写真は全体を表示し、下に空きができる。SP は切らずに全体を表示する */
.p-profile-intro {
	min-height: 762px; /* 803 - 41 */
}

.p-profile-intro__image {
	position: absolute;
	top: 0;
	left: 0;
	z-index: -1;
	width: 824px;
}

.p-profile-intro__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-left: 640px;
}

.p-profile-intro__head {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.p-profile-intro__name {
	display: flex;
	gap: 24px;
	align-items: flex-end;
	padding-bottom: 12px;
	font-size: 2.375rem;
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: 0.08em;
	color: var(--color-navy);
	white-space: nowrap;
	/* 下線（グラデーション） */
	background: var(--gradient-red-navy) left bottom / 100% 4px no-repeat;
}

.p-profile-intro__name-en {
	font-family: var(--font-en);
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1.09;
	letter-spacing: 0.08em;
	color: var(--color-pink-red);
}

.p-profile-intro__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	padding-left: 20px;
}

.p-profile-intro__tag {
	padding: 12px 24px;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.08em;
	color: var(--color-white);
	background-color: var(--color-navy-clear);
}

.p-profile-intro__text {
	padding: 20px 80px 20px 30px;
	font-weight: 500;
	line-height: 1.625;
	letter-spacing: 0.05em;
	color: var(--color-black);
	background-color: rgb(255 255 255 / 0.4);
	border: 1px solid var(--color-white);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.p-profile-intro__text > p + p {
	margin-top: 26px;
}

.p-profile-intro__text > .p-profile-intro__point,
.p-profile-intro__text > .p-profile-intro__point + p {
	margin-top: 15px;
}

.p-profile-intro__strong {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-red);
}

/* ノートPC 幅は、写真を画面幅に合わせて縮め（1279px で 640px → 1024px で 540px）、文章の幅を広げる。
   写真は下揃えだと上に大きな空きができるため、上揃え（文章の上端と同じ位置）にし、下は切らずに全体を表示する。
   文章が写真より短いときも写真が切れないよう、セクションの高さは写真の高さ以上にする */
@media (max-width: 1279px) {
	.p-profile-intro {
		--intro-img-w: clamp(540px, 540px + (100vw - 1024px) * 100 / 255, 640px);
		min-height: calc(var(--intro-img-w) * 1606 / 1648 + 80px); /* 80px は上下の余白 */
	}

	.p-profile-intro__image {
		top: 40px;
		width: var(--intro-img-w);
	}

	.p-profile-intro__body {
		margin-left: calc(var(--intro-img-w) * 0.78); /* 写真の右側の空き（円の外側）に文章を重ねる */
	}

	.p-profile-intro__text {
		padding-right: 30px;
		padding-left: 20px;
	}
}

@media (max-width: 1023px) {
	.p-profile-intro {
		min-height: 0;
		padding-top: 0;
	}

	.p-profile-intro__image {
		position: relative;
		top: auto;
		width: 100%;
		max-width: 600px;
		margin-left: auto; /* 写真が画面幅より狭いときは中央に置く */
		margin-right: auto;
	}

	.p-profile-intro__body {
		margin: 30px var(--container-gutter) 0; /* 上の写真との間をあける */
	}
}

/* 丸い写真（img-profile-tb.webp）に切り替える幅（page-profile.php の <source> と合わせる）。
   縦長で場所をとるため、縦横比はそのままで高さ 400px に縮める */
@media (min-width: 600px) and (max-width: 1023px) {
	.p-profile-intro__image {
		width: auto;
		height: 400px;
	}
}

@media (max-width: 767px) {
	.p-profile-intro {
		padding-bottom: 24px;
	}

	.p-profile-intro__name {
		gap: 16px;
		font-size: 1.75rem;
	}

	.p-profile-intro__name-en {
		font-size: 1.125rem;
	}

	.p-profile-intro__tags {
		gap: 10px;
		padding-left: 0;
	}

	.p-profile-intro__tag {
		padding: 8px 16px;
		font-size: 1rem;
	}

	.p-profile-intro__text {
		padding: 20px;
	}

	.p-profile-intro__text br {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   History（沿革）
   -------------------------------------------------------------------------- */
.p-profile-history {
	padding-top: 40px;
	padding-bottom: 40px;
	background-color: var(--color-pale-orange);
}

.p-profile-history__list {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-top: 30px;
	padding-bottom: 18px;
	padding-left: 5px;
}

/* 縦のバー */
.p-profile-history__list::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 30px;
	background-image: linear-gradient(rgb(248 185 105 / 0.7), var(--color-pink-red-a70));
}

.p-profile-history__item {
	position: relative;
	padding: 20px 0 12px;
}

.p-profile-history__title {
	display: flex;
	gap: 12px;
	align-items: center;
	font-size: 1.5625rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.08em;
	color: var(--color-navy-clear);
}

/* 丸印と横線 */
.p-profile-history__title::before {
	content: "";
	flex-shrink: 0;
	width: 170px;
	height: 20px;
	background: url("../../img/profile/icon-timeline-marker.svg") left center / contain no-repeat;
}

.p-profile-history__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 5px;
	padding-left: 190px;
	line-height: 1.75;
	letter-spacing: 0.03em;
	color: var(--color-navy);
}

.p-profile-history__images {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 300px));
	gap: 8px;
}

.p-profile-history__img {
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 1;
	object-fit: cover;
}

@media (max-width: 767px) {
	.p-profile-history {
		padding-top: 24px;
		padding-bottom: 24px;
	}

	/* 本文の幅を広げるため、縦の棒・丸・横の棒を細くして左の余白の中へ 10px 寄せる */
	.p-profile-history__list {
		margin-left: -10px;
		padding-left: 0;
	}

	.p-profile-history__list::before {
		width: 12px;
	}

	.p-profile-history__title {
		align-items: flex-start;
		font-size: 1.125rem;
	}

	/* 丸印と横線（PC の SVG を縮めると横線のグラデーションが見えないため、CSS で描く。色は SVG と同じ）
	   丸（直径 10px）は PC と同じく縦の棒（12px）の内側の中央に置き、横線は紺からグレーへ薄くする */
	.p-profile-history__title::before {
		width: 36px;
		height: 12px;
		margin-top: 7px;
		background:
			radial-gradient(circle at 50% 50%, var(--color-navy-clear) 4.5px, transparent 5px) left center / 12px 12px no-repeat,
			linear-gradient(90deg, var(--color-navy-clear), #a6a7b7 64%, rgb(166 167 183 / 0.1) 90%) right center / calc(100% - 11px) 2px no-repeat;
	}

	.p-profile-history__body {
		padding-left: 48px;
	}

	.p-profile-history__body br {
		display: none;
	}

	.p-profile-history__images {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --------------------------------------------------------------------------
   Career Achievements（実績）
   -------------------------------------------------------------------------- */
.p-profile-career {
	--bg-decoration-top: -394px; /* 背景の装飾（c-bg-decoration）の位置 */
	position: relative;
	z-index: 0;
	padding-top: 40px;
	padding-bottom: 40px;
	overflow: hidden;
	background-color: var(--color-white);
}

.p-profile-career__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 30px;
	padding: 20px 40px;
	background-color: rgb(255 255 255 / 0.2);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.p-profile-career__item {
	display: flex;
	gap: 80px;
	align-items: center;
	padding-top: 5px;
	padding-bottom: 5px;
	border-bottom: 1px solid rgb(21 25 85 / 0.2);
}

.p-profile-career__item:last-child {
	border-bottom: 0;
}

/* 機関名（c-square-heading） */
.p-profile-career__org {
	flex-shrink: 0;
	width: 260px;
	padding-left: 10px;
	white-space: nowrap;
}

.p-profile-career__desc {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
	font-weight: 500;
	line-height: 1.375;
	letter-spacing: 0.1em;
	color: var(--color-navy);
}

.p-profile-career__role {
	min-width: 371px;
}

/* 機関名が長い行は字間を詰めて 1 行に収める */
.p-profile-career__item:nth-child(3) .p-profile-career__org {
	letter-spacing: 0.02em;
}

@media (max-width: 1023px) {
	.p-profile-career__item {
		flex-direction: column;
		gap: 4px;
		align-items: flex-start;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.p-profile-career__role {
		min-width: 0;
	}
}

@media (max-width: 767px) {
	.p-profile-career {
		padding-top: 24px;
		padding-bottom: 24px;
	}

	.p-profile-career__list {
		padding: 10px 0;
	}

	.p-profile-career__org {
		width: auto;
		padding-left: 0;
		font-size: 1.125rem;
	}
}

/* --------------------------------------------------------------------------
   Link（SNS アカウント）
   -------------------------------------------------------------------------- */
.p-profile-link {
	padding-top: 40px;
	padding-bottom: 40px;
	background-color: var(--color-pale-white);
}

.p-profile-link__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 386px));
	justify-content: space-between;
	gap: 20px;
	margin-top: 30px;
}

.p-profile-link__card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	background-color: var(--color-white);
	/* 影は filter（drop-shadow）ではなく box-shadow で付ける。カードは白い四角なので見た目は同じ。
	   古い iOS の Safari では、filter を付けた要素の中で overflow: hidden が画像（__image）を切り取らないことがあるため */
	box-shadow: 2px 4px 5px rgb(0 0 0 / 0.25);
}

/* SNS 名のラベル（c-band-label） */
.p-profile-link__name {
	align-self: flex-start;
}

.p-profile-link__body {
	position: relative;
	z-index: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	height: 190px;
	padding: 0 12px 20px;
	overflow: hidden;
	/* 古い iOS の Safari で overflow: hidden が効かない場合も、枠の外の画像を確実に切り取る */
	-webkit-clip-path: inset(0);
	clip-path: inset(0);
}

.p-profile-link__handle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 0 8px 8px;
	font-family: var(--font-en);
	font-size: 1.375rem;
	line-height: 1.09;
	letter-spacing: 0.08em;
	color: var(--color-pink-red);
	/* 下線（グラデーション） */
	background: var(--gradient-red-navy) left bottom / 100% 4px no-repeat;
	transition: color var(--duration);
}

.p-profile-link__handle::after {
	content: "";
	flex-shrink: 0;
	width: 23px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../../img/common/icon-chevron.svg") center / 6px 11px no-repeat;
	mask: url("../../img/common/icon-chevron.svg") center / 6px 11px no-repeat;
	transition: translate var(--duration);
}

/* ホバー: 文字と矢印を半透明にし、矢印を右へ寄せる（下線はそのまま） */
@media (any-hover: hover) {
	.p-profile-link__handle:hover {
		opacity: 1;
		color: var(--color-pink-red-a50);
	}

	.p-profile-link__handle:hover::after {
		translate: 6px 0;
	}
}

.p-profile-link__handle:focus-visible {
	color: var(--color-pink-red-a50);
}

.p-profile-link__handle:focus-visible::after {
	translate: 6px 0;
}

.p-profile-link__text {
	padding-left: 175px;
	font-size: 0.875rem;
	line-height: 1.71;
	letter-spacing: 0.1em;
	color: var(--color-navy);
}

.p-profile-link__image {
	position: absolute;
	top: 43px;
	left: -64px;
	z-index: -1;
	width: 235px;
}

/* ノートPC 幅は 3 枚を横に並べたまま縮める。画像と本文の位置はカード幅に合わせて縮め（SP と同じ比率）、
   本文が切れないよう高さは内容に合わせる */
@media (max-width: 1279px) {
	.p-profile-link__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.p-profile-link__body {
		height: auto;
		min-height: 190px;
	}

	.p-profile-link__text {
		padding-left: min(45%, 175px);
		font-size: 1rem;
		letter-spacing: 0.05em;
	}

	.p-profile-link__image {
		left: max(-17%, -64px);
		width: min(61%, 235px);
	}

	.p-profile-link__text br {
		display: none;
	}
}

/* TB は 2 枚 + 1 枚に戻す */
@media (max-width: 1023px) {
	.p-profile-link__list {
		grid-template-columns: repeat(auto-fit, minmax(0, 386px));
		justify-content: center;
	}
}

@media (max-width: 767px) {
	.p-profile-link {
		padding-top: 24px;
		padding-bottom: 24px;
	}

	.p-profile-link__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	/* カード幅に合わせて画像と本文の位置を縮める（PC のカード幅 386px に対する比率。PC の大きさを上限にする）。本文が切れないよう高さは内容に合わせる */
	.p-profile-link__body {
		height: auto;
		min-height: 190px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.p-profile-link__text {
		padding-left: min(45%, 175px);
	}

	.p-profile-link__image {
		left: max(-17%, -64px);
		width: min(61%, 235px);
	}

	.p-profile-link__text br {
		display: none;
	}
}
