/* nulldesign.jp — 共通スタイル（日本語・英語ページ共用）
   方向性: 紙面のレイアウト（組版）。字下げ・両端揃えの段落と年表風の Media で構成し、文言は足さない。 */

@font-face {
	font-family: 'EB Garamond';
	src: url('/assets/EBGaramond-Regular.subset.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #fff;
	--text: #111;
	--link: #333;
	--measure: 720px;
	--gutter: 20px;
	--gap: 4.5rem;
	--font-body: system-ui, -apple-system, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif;
	--font-head: 'EB Garamond', 'Times New Roman', serif;
	color-scheme: light;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.8;
	overflow-wrap: break-word;
	line-break: strict;
}

/* 共通の幅（現行どおり max-width 720px / 左右 20px） */
.site-header,
main,
.site-footer {
	max-width: var(--measure);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* 見出し */
h1,
h2,
h3 {
	font-family: var(--font-head);
	font-weight: 400;
	line-height: 1.3;
	margin: 0;
}
h1 {
	font-size: 1.5rem; /* 現行と同じ 24px */
}
h2 {
	font-size: 1.75rem;
	margin-bottom: 0.75em;
}
h3 {
	font-size: 1.375rem;
	margin-bottom: 0.75em;
}

p {
	margin: 0 0 1em;
}

/* リンク */
a {
	color: var(--link);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}
a:hover {
	text-decoration-thickness: 2px;
}
a:focus-visible {
	outline: 3px solid var(--text);
	outline-offset: 3px;
	border-radius: 2px;
}
a[target='_blank']::after {
	content: '\2197' / ''; /* ↗ 装飾（読み上げ対象外。「外部サイト」は sr-only で伝える） */
	display: inline-block;
	margin-left: 0.15em;
	font-size: 0.85em;
	text-decoration: none;
}
.ended {
	text-decoration: line-through; /* 取り消し線は現行どおり。<s> や span の入れ子だと a11y ツリーで名前が空になったため、a 自体に付ける */
	text-decoration-thickness: 1px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: 0;
	padding: 0.5rem 1rem;
	background: var(--text);
	color: var(--bg);
	transform: translateY(-120%);
}
.skip-link:focus {
	transform: translateY(0);
	z-index: 10;
}

/* ヘッダー（扉）・言語切替 */
.site-header {
	position: relative;
	padding-block: 3rem 0;
}
.site-header p {
	margin: 0.25em 0 0;
	font-size: 0.9375rem;
}
.lang-nav {
	position: absolute;
	top: 0.75rem;
	right: var(--gutter);
	display: flex;
	font-size: 0.9375rem;
}
.lang-nav a {
	display: inline-block;
	min-width: 44px;
	min-height: 44px;
	padding: 0.6rem 0.5rem;
	text-align: center;
}
.lang-nav a[aria-current='page'] {
	text-decoration: none;
	pointer-events: none;
}

/* 章（セクション） */
main {
	padding-block: 0 var(--gap);
}
section {
	margin-top: var(--gap);
}
.profile p {
	margin: 0;
}

/* リスト（行頭記号あり） */
section ul {
	margin: 0;
	padding-left: 1.5rem;
}
section ul a {
	display: inline-block;
	padding-block: 0.125rem; /* タップ領域は約33px（44pxより小さいが、ユーザー判断で許容） */
}

/* 作品説明: 書籍の段落組（字下げ・段落間の空きなし・両端揃え） */
.works {
	margin-top: 6rem;
	padding-bottom: var(--gap); /* 次の章との間をさらに広げる */
}
.work + .work {
	margin-top: 6rem;
}
.work p {
	margin: 0;
	text-indent: 1em;
	text-align: justify;
	text-justify: inter-character;
}
.work h3 + p {
	text-indent: 0; /* 見出し直後は字下げしない（和文組版の慣例） */
}

/* Media Coverage: 年を左に置いた年表・索引風 */
.media ol {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}
.media li {
	display: grid;
	grid-template-columns: 5.5em 1fr;
	column-gap: 0.75rem;
	padding-block: 0.75rem;
	overflow-wrap: anywhere;
}
.media time {
	grid-row: 1 / span 2;
	font-style: italic;
}
.media p {
	margin: 0;
	grid-column: 2;
}

/* フッター（奥付） */
.site-footer {
	padding-block: 0 3rem;
	font-size: 0.875rem;
	text-align: center;
}
.site-footer p {
	margin: 0;
}

/* モーション: opacity だけ（位置は動かさない）。標準は opacity 1。JS が画面外の要素にだけ
   .is-pending（opacity 0）を付け、スクロールで入ると opacity 1 へ戻る。
   JS が動かない環境では .is-pending が付かないため、全文字が読める。
   アクセス時に見えている要素は動かさない。低モーション設定では何も付けない。 */
@media (prefers-reduced-motion: no-preference) {
	[data-reveal] {
		transition: opacity 0.5s ease-in-out;
	}
	[data-reveal].is-pending {
		opacity: 0;
	}
}

@media screen and (max-width: 720px) {
	:root {
		--gap: 3.5rem;
	}
	.site-header {
		padding-block: 3.5rem 0;
	}
	.media li {
		grid-template-columns: 4.75em 1fr;
	}
}
