/*
Theme Name: Hanjiro
Theme URI: https://sliceofmoment.com/
Author: Hanjiro
Author URI: https://sliceofmoment.com/
Description: 写真家 Hanjiro のためのモノクロ・ミニマルテーマ。ブラウン管テレビ風に画面四隅が丸くなるCRTフレーム、左側スクロール追従メニュー、管理画面から差し替え可能なトップスライドショーを備えます。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hanjiro
Tags: photography, portfolio, black-and-white, minimal, custom-menu, custom-logo, full-width-template, translation-ready
*/

/* =========================================================================
   0a. Webfont
   ロゴ用の書体は inc/fonts.php が @font-face を出力する
   （カスタマイザーで選ばれた1書体だけを読み込む）。
   ライセンス: assets/fonts/OFL-*.txt（すべて SIL Open Font License 1.1）
   ========================================================================= */

/* =========================================================================
   0. Design tokens
   ========================================================================= */
:root {
	--paper: #ffffff;
	--ink: #0a0a0a;
	--ink-90: #1a1a1a;
	--ink-60: #6e6e6e;
	--ink-40: #9b9b9b;
	--line: rgba(10, 10, 10, 0.14);
	--line-strong: rgba(10, 10, 10, 0.3);
	--bezel: #000000;

	--sidebar-w: 236px;
	--gutter: clamp(20px, 4vw, 64px);
	--screen-radius: 26px;

	--font-sans: "Helvetica Neue", Helvetica, Arial, "Hiragino Kaku Gothic ProN",
		"Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
		"Roboto Mono", "Courier New", monospace;
	--font-script: "Mrs Saint Delafield", "Snell Roundhand", "Apple Chancery",
		"Segoe Script", cursive;

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================================
   1. Reset / base
   ========================================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.9;
	font-feature-settings: "palt" 1;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
blockquote {
	margin: 0;
	padding: 0;
}

ul,
ol {
	list-style: none;
}

::selection {
	background: var(--ink);
	color: var(--paper);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -80px;
	left: 12px;
	z-index: 10000;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	transition: top 0.2s var(--ease);
}

.skip-link:focus {
	top: 12px;
}

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

/* Utility typography ----------------------------------------------------- */
.u-mono {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ink-60);
}

.u-rule {
	height: 1px;
	background: var(--line);
	border: 0;
}

/* =========================================================================
   2. CRT frame (Gizmodo風・四隅が丸い画面)
   ========================================================================= */
.crt-corners {
	position: fixed;
	inset: 0;
	z-index: 9500;
	pointer-events: none;
}

.crt-corner {
	position: fixed;
	width: var(--screen-radius);
	height: var(--screen-radius);
	background-color: var(--bezel);
	pointer-events: none;
	z-index: 9500;
}

.crt-corner--tl {
	top: 0;
	left: 0;
	-webkit-mask-image: radial-gradient(
		circle var(--screen-radius) at 100% 100%,
		transparent 99%,
		#000 100%
	);
	mask-image: radial-gradient(
		circle var(--screen-radius) at 100% 100%,
		transparent 99%,
		#000 100%
	);
}

.crt-corner--tr {
	top: 0;
	right: 0;
	-webkit-mask-image: radial-gradient(
		circle var(--screen-radius) at 0% 100%,
		transparent 99%,
		#000 100%
	);
	mask-image: radial-gradient(
		circle var(--screen-radius) at 0% 100%,
		transparent 99%,
		#000 100%
	);
}

.crt-corner--bl {
	bottom: 0;
	left: 0;
	-webkit-mask-image: radial-gradient(
		circle var(--screen-radius) at 100% 0%,
		transparent 99%,
		#000 100%
	);
	mask-image: radial-gradient(
		circle var(--screen-radius) at 100% 0%,
		transparent 99%,
		#000 100%
	);
}

.crt-corner--br {
	bottom: 0;
	right: 0;
	-webkit-mask-image: radial-gradient(
		circle var(--screen-radius) at 0% 0%,
		transparent 99%,
		#000 100%
	);
	mask-image: radial-gradient(
		circle var(--screen-radius) at 0% 0%,
		transparent 99%,
		#000 100%
	);
}

/* 走査線・ビネット・フリッカー */
.crt-overlay {
	position: fixed;
	inset: 0;
	z-index: 9400;
	pointer-events: none;
	mix-blend-mode: multiply;
}

.crt-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.05) 0 1px,
		rgba(0, 0, 0, 0) 1px 3px
	);
	opacity: var(--crt-scanline-opacity, 1);
}

.crt-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		ellipse at center,
		rgba(0, 0, 0, 0) 62%,
		rgba(0, 0, 0, 0.09) 100%
	);
	opacity: var(--crt-vignette-opacity, 1);
}

.crt-flicker {
	position: fixed;
	inset: 0;
	z-index: 9450;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.5);
	opacity: 0;
	animation: crt-flicker 7s steps(1, end) infinite;
}

@keyframes crt-flicker {
	0%,
	97.4%,
	100% {
		opacity: 0;
	}
	97.6% {
		opacity: 0.1;
	}
	97.8% {
		opacity: 0;
	}
	98.2% {
		opacity: 0.06;
	}
	98.5% {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.crt-flicker {
		display: none;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* =========================================================================
   3. Layout
   ========================================================================= */
.site {
	position: relative;
	min-height: 100vh;
}

.site-main {
	margin-left: var(--sidebar-w);
	min-height: 100vh;
}

.wrap {
	padding: clamp(56px, 8vw, 120px) var(--gutter);
	max-width: 1360px;
}

.wrap--narrow {
	max-width: 860px;
}

/* =========================================================================
   4. Sidebar (左側・スクロール追従)
   ========================================================================= */
.site-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	width: var(--sidebar-w);
	height: 100vh;
	height: 100svh;
	padding: 40px 28px 34px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	background: rgba(255, 255, 255, 0.88);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	backdrop-filter: saturate(140%) blur(14px);
	border-right: 1px solid var(--line);
	z-index: 900;
}

.admin-bar .site-sidebar {
	top: 32px;
	height: calc(100vh - 32px);
}

.brand {
	display: block;
}

.brand__logo img {
	max-width: 150px;
	height: auto;
}

.brand__name {
	/* 筆記体は字がつながるので字間は空けない */
	font-family: var(--font-script);
	/* 書体ごとの見た目の差を --logo-scale で吸収する */
	font-size: calc(clamp(32px, 2.6vw, 40px) * var(--logo-scale, 1));
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.05;
	margin: 0 0 -0.12em;
	/* ディセンダ（fやyの下の払い）が切れないよう余白を確保 */
	padding-bottom: 0.14em;
	/*
	 * nowrap にしない：Webフォントの読み込みに失敗したとき、
	 * 代替フォントの方が幅広くサイドバーからはみ出すため。
	 * 1語なので overflow-wrap でしか折り返せない。
	 */
	max-width: 100%;
	overflow-wrap: anywhere;
}

.brand__role {
	display: block;
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--ink-40);
}

.brand__signal {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--ink);
	vertical-align: middle;
	animation: signal-blink 2.4s steps(1, end) infinite;
}

@keyframes signal-blink {
	0%,
	60% {
		opacity: 1;
	}
	61%,
	100% {
		opacity: 0.15;
	}
}

/* Navigation ------------------------------------------------------------- */
.site-nav {
	counter-reset: navitem;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}

.site-nav__list {
	width: 100%;
}

.site-nav__list > li {
	counter-increment: navitem;
	border-top: 1px solid var(--line);
}

.site-nav__list > li:last-child {
	border-bottom: 1px solid var(--line);
}

.site-nav__list a {
	position: relative;
	display: block;
	padding: 15px 2px 15px 30px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	line-height: 1.4;
	transition: color 0.35s var(--ease), padding-left 0.35s var(--ease);
}

.site-nav__list a::before {
	content: counter(navitem, decimal-leading-zero);
	position: absolute;
	left: 2px;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.1em;
	color: var(--ink-40);
	transition: color 0.35s var(--ease);
}

.site-nav__list a::after {
	content: "";
	position: absolute;
	left: 30px;
	right: 2px;
	bottom: 11px;
	height: 1px;
	background: var(--ink);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.45s var(--ease);
}

.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after,
.site-nav__list .current-menu-item > a::after,
.site-nav__list .is-current > a::after {
	transform: scaleX(1);
}

.site-nav__list a:hover::before {
	color: var(--ink);
}

.site-nav__ext {
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--font-mono);
	font-size: 9px;
	color: var(--ink-40);
	opacity: 0;
	transition: opacity 0.35s var(--ease);
}

.site-nav__list a:hover .site-nav__ext {
	opacity: 1;
}

/* Sidebar foot ----------------------------------------------------------- */
.sidebar-foot {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.social {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.social a {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-60);
	border-bottom: 1px solid transparent;
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.social a:hover {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

.copyright {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.14em;
	color: var(--ink-40);
	line-height: 1.7;
}

/* Mobile header ---------------------------------------------------------- */
.mobile-bar {
	display: none;
}

.nav-toggle {
	display: none;
}

/* =========================================================================
   5. Hero slideshow
   ========================================================================= */
.hero {
	position: relative;
	height: 100vh;
	height: 100svh;
	background: #000;
	overflow: hidden;
}

.hero__stage {
	position: absolute;
	inset: 0;
}

.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1.4s var(--ease);
	will-change: opacity;
}

.hero__slide.is-active {
	opacity: 1;
	z-index: 2;
}

.hero__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.06);
	transition: transform 8s linear;
}

.hero__slide.is-active img {
	transform: scale(1);
}

.is-mono .hero__slide img,
.is-mono .work-card__media img {
	filter: grayscale(1) contrast(1.05);
}

.hero__scrim {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	background: linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.4) 0%,
			rgba(0, 0, 0, 0) 30%
		),
		linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 42%);
}

.hero__hud {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: clamp(26px, 4vw, 52px) var(--gutter);
	color: #fff;
	pointer-events: none;
}

.hero__hud a,
.hero__hud button {
	pointer-events: auto;
}

.hero__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
}

.hero__rec {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.24em;
	color: rgba(255, 255, 255, 0.85);
}

.hero__rec span.dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	animation: signal-blink 1.6s steps(1, end) infinite;
}

.hero__bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

.hero__lead {
	max-width: 34ch;
}

.hero__title {
	/* 筆記体。大文字変換はかけない（続け字が崩れるため） */
	font-family: var(--font-script);
	font-size: calc(clamp(52px, 8vw, 108px) * var(--logo-scale, 1));
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1;
	margin: 0 0 18px;
	/* 下に伸びる払いが切れないよう余白を確保 */
	padding-bottom: 0.12em;
	text-transform: none;
	/* 明るい写真の上でも線が消えないよう、ごく薄い影を敷く */
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
	overflow-wrap: anywhere;
}

.hero__statement {
	font-size: 13px;
	line-height: 1.95;
	color: rgba(255, 255, 255, 0.82);
	max-width: 40ch;
}

.hero__meta {
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.hero__caption {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.16em;
	color: rgba(255, 255, 255, 0.9);
	text-transform: uppercase;
	min-height: 1.4em;
}

.hero__counter {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.2em;
	color: rgba(255, 255, 255, 0.7);
}

.hero__ticks {
	display: flex;
	gap: 6px;
}

.hero__tick {
	width: 26px;
	height: 2px;
	background: rgba(255, 255, 255, 0.32);
	position: relative;
	overflow: hidden;
	cursor: pointer;
	pointer-events: auto;
}

.hero__tick::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left;
}

.hero__tick.is-active::after {
	transform: scaleX(1);
	transition: transform var(--hero-duration, 5s) linear;
}

.hero__scroll {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	z-index: 5;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 0.26em;
	color: rgba(255, 255, 255, 0.7);
	text-transform: uppercase;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.hero__scroll i {
	display: block;
	width: 1px;
	height: 34px;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.8),
		rgba(255, 255, 255, 0)
	);
	animation: scroll-pulse 2.4s var(--ease) infinite;
}

@keyframes scroll-pulse {
	0% {
		transform: scaleY(0);
		transform-origin: top;
	}
	50% {
		transform: scaleY(1);
		transform-origin: top;
	}
	51% {
		transform: scaleY(1);
		transform-origin: bottom;
	}
	100% {
		transform: scaleY(0);
		transform-origin: bottom;
	}
}

.hero--empty {
	display: grid;
	place-items: center;
	color: rgba(255, 255, 255, 0.6);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-align: center;
	padding: var(--gutter);
}

/* =========================================================================
   6. Section headings
   ========================================================================= */
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--ink);
	margin-bottom: clamp(28px, 4vw, 52px);
}

.section-head__title {
	font-size: clamp(22px, 2.6vw, 34px);
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.1;
}

.section-head__meta {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.22em;
	color: var(--ink-60);
	text-transform: uppercase;
	white-space: nowrap;
}

/* =========================================================================
   7. Work grid
   ========================================================================= */
.work-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: clamp(20px, 2.6vw, 40px) clamp(18px, 2vw, 32px);
}

.work-grid--wide {
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.work-card {
	display: block;
	position: relative;
}

.work-card__media {
	display: block;
	position: relative;
	overflow: hidden;
	background: #ededed;
	aspect-ratio: 4 / 3;
	cursor: zoom-in;
}

.work-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}

.work-card__media:hover img,
.work-card__media:focus-visible img {
	transform: scale(1.045);
	filter: grayscale(0);
}

.work-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.18);
	opacity: 0;
	transition: opacity 0.5s var(--ease);
}

.work-card__media:hover::after,
.work-card__media:focus-visible::after {
	opacity: 1;
}

.work-card__zoom {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	padding: 6px 10px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 0.2em;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.6);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.work-card__media:hover .work-card__zoom,
.work-card__media:focus-visible .work-card__zoom {
	opacity: 1;
	transform: none;
}

.work-card__title a {
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s var(--ease);
}

.work-card__title a:hover {
	border-bottom-color: var(--ink);
}

.work-card__index {
	position: absolute;
	top: 10px;
	left: 12px;
	z-index: 2;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.18em;
	color: #fff;
	mix-blend-mode: difference;
}

.work-card__body {
	padding-top: 14px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	border-top: 1px solid var(--line);
}

.work-card__title {
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1.5;
}

.work-card__meta {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.16em;
	color: var(--ink-40);
	text-transform: uppercase;
	white-space: nowrap;
}

.work-card__excerpt {
	margin-top: 6px;
	font-size: 12.5px;
	line-height: 1.85;
	color: var(--ink-60);
}

/* Filter (series) -------------------------------------------------------- */
.series-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-bottom: clamp(24px, 3vw, 40px);
}

.series-filter a {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-60);
	padding-bottom: 3px;
	border-bottom: 1px solid transparent;
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.series-filter a:hover,
.series-filter a.is-current {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

/* =========================================================================
   8. Single work
   ========================================================================= */
.entry-head {
	padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(24px, 3vw, 40px);
	max-width: 1360px;
}

.entry-title {
	font-size: clamp(26px, 3.6vw, 46px);
	font-weight: 400;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ink-60);
}

/* タイトルも作品情報も無い作品は、見出し欄の余白だけを最小限に残す */
.entry-head--bare {
	padding-top: clamp(24px, 3vw, 40px);
	padding-bottom: 0;
}

.entry-hero {
	margin: 0 0 clamp(28px, 4vw, 56px);
}

.entry-hero img {
	width: 100%;
	height: auto;
}

.entry-content {
	max-width: 720px;
	padding: 0 var(--gutter) clamp(56px, 8vw, 110px);
	font-size: 14.5px;
	line-height: 2.05;
}

.entry-content > * + * {
	margin-top: 1.5em;
}

.entry-content h2 {
	font-size: 18px;
	font-weight: 500;
	letter-spacing: 0.1em;
	margin-top: 2.4em;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--line);
}

.entry-content h3 {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.06em;
	margin-top: 2em;
}

.entry-content a {
	border-bottom: 1px solid var(--line-strong);
	transition: border-color 0.3s var(--ease);
}

.entry-content a:hover {
	border-bottom-color: var(--ink);
}

.entry-content ul {
	list-style: none;
	padding-left: 0;
}

.entry-content ul li {
	position: relative;
	padding-left: 1.1em;
}

.entry-content ul li::before {
	content: "—";
	position: absolute;
	left: 0;
	color: var(--ink-40);
}

.entry-content ol {
	list-style: decimal;
	padding-left: 1.4em;
}

.entry-content blockquote {
	padding-left: 20px;
	border-left: 1px solid var(--ink);
	color: var(--ink-60);
	font-style: normal;
}

.entry-content img,
.entry-content figure {
	margin-left: 0;
	margin-right: 0;
}

.entry-content figcaption {
	margin-top: 8px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	color: var(--ink-40);
}

/* Work gallery ----------------------------------------------------------- */
.work-gallery {
	display: flex;
	flex-direction: column;
	gap: clamp(24px, 4vw, 64px);
	padding: 0 var(--gutter) clamp(56px, 8vw, 110px);
	max-width: 1200px;
}

.work-gallery figure {
	margin: 0;
}

.work-gallery figcaption {
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	color: var(--ink-40);
}

/* Prev / next ------------------------------------------------------------ */
.entry-nav {
	display: flex;
	border-top: 1px solid var(--line);
	margin-left: var(--gutter);
	margin-right: var(--gutter);
}

.entry-nav a {
	flex: 1 1 50%;
	padding: 28px 4px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ink-60);
	transition: color 0.3s var(--ease);
}

.entry-nav a:hover {
	color: var(--ink);
}

.entry-nav a + a {
	text-align: right;
	border-left: 1px solid var(--line);
	padding-left: 20px;
}

/* =========================================================================
   9. Biography / Info
   ========================================================================= */
.profile {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
}

.profile__portrait {
	position: sticky;
	top: 48px;
}

.profile__portrait img {
	width: 100%;
	filter: grayscale(1);
}

.profile__portrait figcaption {
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.16em;
	color: var(--ink-40);
	text-transform: uppercase;
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: clamp(24px, 3vw, 48px);
	margin-top: clamp(32px, 4vw, 56px);
}

.info-block {
	border-top: 1px solid var(--ink);
	padding-top: 16px;
}

.info-block__label {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ink-40);
	margin-bottom: 10px;
	display: block;
}

.info-block__body {
	font-size: 13.5px;
	line-height: 1.95;
}

.info-block__body a {
	border-bottom: 1px solid var(--line-strong);
}

.info-block__body a:hover {
	border-bottom-color: var(--ink);
}

/* =========================================================================
   8b. Photo preview（浮き上がる拡大表示）
   ========================================================================= */
.entry-hero img,
.entry-content img,
.work-gallery img {
	cursor: zoom-in;
}

.preview {
	position: fixed;
	inset: 0;
	z-index: 9300;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(44px, 6vw, 72px) clamp(16px, 5vw, 72px);
	opacity: 0;
	visibility: hidden;
	/* 閉じるときだけ visibility を遅らせる（開いた瞬間からフォーカス可能にするため） */
	transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}

.preview.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.5s var(--ease), visibility 0s linear 0s;
}

.preview__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 6, 6, 0.9);
	-webkit-backdrop-filter: blur(16px) saturate(115%);
	backdrop-filter: blur(16px) saturate(115%);
	cursor: zoom-out;
}

.preview__figure {
	position: relative;
	margin: 0;
	max-width: min(100%, 1500px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	/* ここが「浮き上がる」動き */
	opacity: 0;
	transform: translateY(46px) scale(0.94);
	transition: opacity 0.5s var(--ease), transform 0.85s var(--ease);
}

.preview.is-open .preview__figure {
	opacity: 1;
	transform: none;
}

.preview__frame {
	position: relative;
	line-height: 0;
	background: #0f0f0f;
	box-shadow: 0 60px 110px -30px rgba(0, 0, 0, 0.85),
		0 18px 40px -18px rgba(0, 0, 0, 0.7),
		0 0 0 1px rgba(255, 255, 255, 0.07);
}

.preview__img {
	display: block;
	max-width: 100%;
	max-height: min(74vh, 900px);
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.6s var(--ease);
}

.preview__img.is-loaded {
	opacity: 1;
}

.preview__loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.24em;
	color: rgba(255, 255, 255, 0.5);
	pointer-events: none;
	transition: opacity 0.3s var(--ease);
}

.preview__img.is-loaded + .preview__loading {
	opacity: 0;
}

.preview__caption {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 22px;
	width: 100%;
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.6;
}

.preview__title {
	font-size: 13.5px;
	letter-spacing: 0.1em;
}

.preview__meta,
.preview__counter {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.preview__counter {
	margin-left: auto;
}

.preview__link {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.preview__link:hover {
	color: #fff;
	border-bottom-color: #fff;
}

.preview__close,
.preview__nav {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.75);
	font-family: var(--font-mono);
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
		opacity 0.3s var(--ease);
}

.preview__close {
	top: clamp(14px, 2.4vw, 26px);
	right: clamp(14px, 2.4vw, 26px);
	gap: 8px;
	padding: 9px 14px;
	font-size: 9px;
	letter-spacing: 0.2em;
	border: 1px solid rgba(255, 255, 255, 0.28);
}

.preview__close:hover {
	color: #fff;
	border-color: #fff;
}

.preview__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	font-size: 15px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
}

.preview__nav:hover {
	color: #fff;
	border-color: #fff;
}

.preview__nav[hidden] {
	display: none;
}

.preview__nav--prev {
	left: clamp(10px, 2vw, 26px);
}

.preview__nav--next {
	right: clamp(10px, 2vw, 26px);
}

.has-preview {
	overflow: hidden;
}

@media (max-width: 860px) {
	.preview {
		padding: 64px 14px 18px;
	}

	.preview__img {
		max-height: 62vh;
	}

	.preview__nav {
		top: auto;
		bottom: 16px;
		transform: none;
		width: 42px;
		height: 42px;
	}

	.preview__nav--prev {
		left: 50%;
		margin-left: -50px;
	}

	.preview__nav--next {
		right: 50%;
		margin-right: -50px;
	}

	.preview__caption {
		padding-bottom: 58px;
	}

	.preview__counter {
		margin-left: 0;
	}
}

/* =========================================================================
   9b. Contact form
   ========================================================================= */
.contact {
	margin-top: clamp(48px, 7vw, 96px);
}

.contact-form {
	max-width: 640px;
}

.contact-form__trap {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.field {
	margin-bottom: clamp(22px, 3vw, 32px);
}

.field__label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ink-60);
}

.field__req {
	margin-left: 6px;
	color: var(--ink);
}

.field__input {
	display: block;
	width: 100%;
	padding: 10px 2px;
	font-family: var(--font-sans);
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--ink);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--line-strong);
	border-radius: 0;
	transition: border-color 0.35s var(--ease);
	-webkit-appearance: none;
	appearance: none;
}

.field__input--area {
	resize: vertical;
	min-height: 160px;
}

.field__input:hover {
	border-bottom-color: var(--ink-60);
}

.field__input:focus {
	outline: 0;
	border-bottom-color: var(--ink);
}

.field__input:focus-visible {
	outline: 0;
}

.field__input:user-invalid {
	border-bottom-color: var(--ink);
	border-bottom-width: 2px;
}

.contact-form__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: clamp(28px, 4vw, 44px);
}

.button-line--submit {
	background: transparent;
	cursor: pointer;
}

.contact-form__note {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.14em;
	color: var(--ink-40);
}

.form-alert {
	margin-bottom: clamp(24px, 3vw, 36px);
	padding: 18px 20px;
	background: var(--ink);
	color: var(--paper);
}

.form-alert__label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

.form-alert ul {
	font-size: 13px;
	line-height: 1.9;
}

.form-alert li::before {
	content: "—";
	margin-right: 8px;
	color: rgba(255, 255, 255, 0.5);
}

/* =========================================================================
   9c. Thank you overlay
   ========================================================================= */
.thanks {
	position: fixed;
	inset: 0;
	z-index: 9200;
	display: grid;
	place-items: center;
	padding: var(--gutter);
	text-align: center;
	background: var(--ink);
	color: var(--paper);
	animation: thanks-fade 1.1s var(--ease) both;
}

@keyframes thanks-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.thanks__inner > * {
	animation: thanks-rise 1.3s var(--ease) both;
}

.thanks__signal {
	display: block;
	width: 8px;
	height: 8px;
	margin: 0 auto 26px;
	border-radius: 50%;
	background: #fff;
	animation: thanks-rise 1.3s var(--ease) both,
		signal-blink 1.8s steps(1, end) infinite 1.3s;
}

.thanks__mark {
	font-size: clamp(30px, 7vw, 82px);
	font-weight: 400;
	letter-spacing: 0.24em;
	line-height: 1.1;
	text-indent: 0.24em;
	animation-delay: 0.28s;
}

.thanks__lead {
	margin-top: 22px;
	font-size: 14px;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.86);
	animation-delay: 0.5s;
}

.thanks__note {
	margin-top: 10px;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
	animation-delay: 0.68s;
}

.thanks__link {
	display: inline-block;
	margin-top: 34px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
	animation-delay: 0.86s;
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.thanks__link:hover {
	color: #fff;
	border-bottom-color: #fff;
}

@keyframes thanks-rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.has-thanks {
	overflow: hidden;
}

/* =========================================================================
   10. Footer
   ========================================================================= */
.site-footer {
	margin-left: var(--sidebar-w);
	background: var(--ink);
	color: var(--paper);
	padding: clamp(26px, 3vw, 34px) var(--gutter);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	align-items: center;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.16em;
	line-height: 1.9;
}

.site-footer__social a {
	color: rgba(255, 255, 255, 0.8);
	border-bottom: 1px solid rgba(255, 255, 255, 0.3);
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-footer__social a:hover {
	color: #fff;
	border-bottom-color: #fff;
}

.site-footer__copy {
	color: rgba(255, 255, 255, 0.5);
	margin-left: auto;
}

/* =========================================================================
   11. Pagination / 404 / archive intro
   ========================================================================= */
.pagination {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: clamp(36px, 5vw, 64px);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--line);
	transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

.notfound {
	min-height: 70vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 18px;
}

.notfound__code {
	font-family: var(--font-mono);
	font-size: clamp(48px, 12vw, 140px);
	letter-spacing: 0.08em;
	line-height: 1;
}

.button-line {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	padding: 12px 22px;
	border: 1px solid var(--ink);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.button-line:hover {
	background: var(--ink);
	color: var(--paper);
}

.archive-intro {
	max-width: 52ch;
	font-size: 13.5px;
	line-height: 2;
	color: var(--ink-60);
	margin-bottom: clamp(28px, 4vw, 48px);
}

/* =========================================================================
   12. Reveal animation
   ========================================================================= */
.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* =========================================================================
   13. Responsive
   ========================================================================= */
@media (max-width: 1024px) {
	:root {
		--sidebar-w: 200px;
	}

	.site-nav__list a {
		font-size: 11px;
		letter-spacing: 0.18em;
	}
}

@media (max-width: 860px) {
	:root {
		--sidebar-w: 0px;
		--screen-radius: 16px;
	}

	.site-main,
	.site-footer {
		margin-left: 0;
	}

	/* モバイルヘッダー */
	.mobile-bar {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: 56px;
		z-index: 950;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 18px 0 22px;
		background: rgba(255, 255, 255, 0.9);
		-webkit-backdrop-filter: saturate(140%) blur(14px);
		backdrop-filter: saturate(140%) blur(14px);
		border-bottom: 1px solid var(--line);
	}

	.admin-bar .mobile-bar {
		top: 46px;
	}

	.mobile-bar .brand__name {
		font-size: calc(28px * var(--logo-scale, 1));
		letter-spacing: 0;
		line-height: 1;
	}

	.mobile-bar .brand__logo img {
		max-width: 110px;
	}

	.nav-toggle {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 40px;
		height: 40px;
		align-items: flex-end;
	}

	.nav-toggle span {
		display: block;
		width: 24px;
		height: 1px;
		background: var(--ink);
		transition: transform 0.4s var(--ease), opacity 0.3s var(--ease),
			width 0.4s var(--ease);
	}

	.nav-toggle span:nth-child(2) {
		width: 16px;
	}

	.is-nav-open .nav-toggle span:nth-child(1) {
		transform: translateY(6px) rotate(45deg);
	}

	.is-nav-open .nav-toggle span:nth-child(2) {
		opacity: 0;
	}

	.is-nav-open .nav-toggle span:nth-child(3) {
		width: 24px;
		transform: translateY(-6px) rotate(-45deg);
	}

	/* サイドバー→フルスクリーンドロワー */
	.site-sidebar {
		top: 0;
		width: 100%;
		height: 100vh;
		height: 100svh;
		padding: 90px 26px 40px;
		background: rgba(255, 255, 255, 0.97);
		border-right: 0;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-12px);
		transition: opacity 0.4s var(--ease), transform 0.5s var(--ease),
			visibility 0.4s;
		z-index: 940;
	}

	.admin-bar .site-sidebar {
		top: 0;
		height: 100vh;
	}

	.is-nav-open .site-sidebar {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-sidebar .brand {
		display: none;
	}

	.site-nav__list a {
		padding: 20px 2px 20px 34px;
		font-size: 15px;
		letter-spacing: 0.2em;
	}

	.site-nav__list a::after {
		bottom: 15px;
	}

	.site-main {
		padding-top: 56px;
	}

	.hero {
		height: calc(100svh - 56px);
	}

	.hero__bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.hero__meta {
		align-items: flex-start;
		text-align: left;
		width: 100%;
	}

	.hero__scroll {
		display: none;
	}

	.profile {
		grid-template-columns: 1fr;
	}

	.profile__portrait {
		position: static;
		max-width: 260px;
	}

	.site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer__copy {
		margin-left: 0;
	}

	.entry-nav {
		margin-left: 0;
		margin-right: 0;
		padding: 0 var(--gutter);
	}
}

@media (max-width: 520px) {
	.work-grid {
		grid-template-columns: 1fr;
	}

	.section-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

/* =========================================================================
   14. Print
   ========================================================================= */
@media print {
	.site-sidebar,
	.mobile-bar,
	.crt-overlay,
	.crt-flicker,
	.crt-corner,
	.hero__scroll {
		display: none !important;
	}

	.site-main,
	.site-footer {
		margin-left: 0;
	}
}
