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

:root {
	font-size: 17px;
	/* 高级灰调配色 - 取自顶级艺术画廊 */
	--color-text: #e9e4dc;
	--color-text-muted: #9a958d;
	--color-bg: #111110;
	--color-link: #c9c4bc;
	--color-link-hover: #fff;
	--page-padding: 1.25rem;
	--grid-gap: 0.5rem;
	--color-bg-content: #111110;
	--color-bg-frame: #1a1918;
	--color-border: #2a2927;
	/* 微妙的暖金色点缀 */
	--color-accent: #d4a853;
	--color-accent-soft: #c9b896;
}

html,
body {
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	/* 优雅的衬线与无衬线组合 */
	font-family: "area-variable", -apple-system, "Noto Sans SC", "PingFang SC", sans-serif;
	font-variation-settings: "slnt" 0, "wdth" 100, "wght" 380, "INKT" 0;
	font-weight: 380;
	line-height: 1.65;
	letter-spacing: 0.01em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.js .loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	opacity: 0.4;
	background: var(--color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.5,0.5,1);
	}
}

a {
	text-decoration: none;
	color: var(--color-link);
	outline: none;
	cursor: pointer;
	transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
	text-decoration: none;
	color: var(--color-link-hover);
	outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
	background: lightgrey;
}

a:focus:not(:focus-visible) {
	/* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
	background: transparent;
}

a:focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	outline: 2px solid red;
	background: transparent;
}

.unbutton {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
}

.unbutton:focus {
	outline: none;
}

.type-tiny,
.cdawrap {
	font-size: 0.80rem;
	text-transform: uppercase;
	font-weight: 400;
	font-variation-settings: "wght" 400;
	letter-spacing: 0.15em;
	color: var(--color-text-muted);
}

/* 段落标题样式增强 */
.content--padded > h4.type-tiny {
	opacity: 0;
	position: relative;
	margin-bottom: 1.5rem;
	/* 艺术性下划线 */
	padding-bottom: 0.75rem;
}

.content--padded > h4.type-tiny::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 30px;
	height: 1px;
	background: var(--color-accent);
	opacity: 0;
}

.content--padded > h4.type-tiny.animated {
	opacity: 0.7;
	transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.content--padded > h4.type-tiny.animated::after {
	opacity: 1;
	transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s, width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
	width: 50px;
}

.frame {
	padding: var(--page-padding);
	text-transform: uppercase;
	position: relative;
	display: grid;
	overflow: hidden; /* prevent nested scrollbars when title scales */
	line-height: 1;
	height: 100vh;
	grid-row-gap: 0.75rem;
	grid-column-gap: 2rem;
	justify-items: start;
	align-content: start;
	/* 艺术性黑白灰渐变背景 */
	background: linear-gradient(135deg, #0a0a0a 0%, #1a1918 25%, #2a2927 50%, #1a1918 75%, #111110 100%);
	background-size: 200% 200%;
	animation: gradientShift 8s ease infinite;
	grid-template-columns: auto auto;
	grid-template-rows: auto auto auto 1fr;
	grid-template-areas: 'logo' 'tags' 'sponsor' 'subline' 'title';
}

@keyframes gradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.frame #cdawrap {
  justify-self: start;
}

.frame__title {
	white-space: nowrap;
  grid-area: title;
  font-size: clamp(3rem, 18vw, 16rem);
  margin: 0;
  letter-spacing: -0.03em;
  padding-top: 0.1em;
  font-weight: 300;
  line-height: 0.85;
  text-indent: -0.04em;
  word-spacing: 0.08em;
  font-family: "bricolage-grotesque-48", "Noto Serif SC", Georgia, serif;
  color: var(--color-text);
}

.frame__subline {
	grid-area: subline;
	opacity: 0.7;
}

.frame__tags {
  grid-area: tags;
}

.frame__logo {
	grid-area: logo;
	padding-bottom: 0.15rem;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	color: var(--color-accent);
	font-family: "bricolage-grotesque-48", sans-serif;
}

.flex-line {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.content {
	position: relative;
	min-height: 100dvh;
	background: var(--color-bg-content);
	align-content: center;
	overflow-x: hidden;
	/* 增加section间呼吸感 */
	padding: 4vh 0;
}

.content--cutoff {
	overflow: hidden;
}

.content--padded {
	padding: var(--page-padding);
	/* 文字内容居中，增强艺术感 */
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	justify-content: center;
}

/* 序部分特殊布局 - 左右分栏 */
.content--intro {
	text-align: left;
	align-items: stretch;
	padding: var(--page-padding);
	padding-top: 3vh;
	padding-bottom: 15vh;
}

.intro-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
}

.intro-text {
	text-align: left;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	/* 让姓名与正文整体下移一些，贴近参考排版 */
	padding-top: 12.5rem;
}

.intro-name {
	margin: 0 0 0.6rem;
	font-size: clamp(1.9rem, 3.2vw, 2.7rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	font-weight: 320;
	font-variation-settings: "wght" 320;
	font-family: "bricolage-grotesque-48", "Noto Serif SC", Georgia, serif;
	color: var(--color-text);
}

.intro-role {
	margin: 0 0 0.65rem;
	font-size: 1.05rem;
	line-height: 1.4;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
}

/* Intro 区的文案段落：压缩默认 content__text 的上下间距 */
.content--intro .content__text {
	margin: 0.65rem 0;
	padding: 0.7rem 0;
}

/* 强制“04年生人...”这一句在桌面端单行显示 */
.intro-oneline {
	white-space: nowrap;
}

.intro-highlights {
	margin-top: 0.4rem;
	padding: 0;
	border: none;
	background: none;
	box-shadow: none;
	max-width: 640px;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	color: var(--color-accent);
	font-family: "bricolage-grotesque-48", sans-serif;
}

.intro-text h4.type-tiny {
	text-align: left;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
}

.intro-text h4.type-tiny::after {
	left: 0;
	transform: none;
}

.intro-text .content__text {
	text-align: left;
	max-width: 100%;
}

.intro-text .content__text::before {
	left: 0;
	transform: none;
}

/* 艺术性个人写真框架 */
.intro-portrait {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 13.5rem;
}

.portrait-frame {
	position: relative;
	width: 360px;
	height: 480px;
	border-radius: 50% / 60%;
	overflow: hidden;
	box-shadow: 
		0 0 0 1px rgba(212, 168, 83, 0.2),
		0 20px 60px rgba(0, 0, 0, 0.5),
		0 0 80px rgba(212, 168, 83, 0.1) inset;
	background: linear-gradient(135deg, rgba(42, 41, 39, 0.3), rgba(26, 25, 24, 0.5));
	transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portrait-frame:hover {
	transform: scale(1.02);
	box-shadow: 
		0 0 0 2px rgba(212, 168, 83, 0.4),
		0 30px 80px rgba(0, 0, 0, 0.6),
		0 0 120px rgba(212, 168, 83, 0.15) inset;
}

.portrait-frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	filter: grayscale(10%) contrast(1.05);
	transition: filter 0.6s ease;
}

.portrait-frame:hover img {
	filter: grayscale(0%) contrast(1.1);
}

/* 移动端响应式 */
@media (max-width: 900px) {
	.intro-container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	
	.intro-text {
		padding-top: 2rem;
	}
	
	.intro-oneline {
		white-space: normal;
	}
	
	.portrait-frame {
		width: 280px;
		height: 380px;
	}
	
	.intro-portrait {
		justify-content: center;
		margin-top: 8rem;
	}
}

.content--full {
	display: grid;
	height: 100vh;
	place-items: center;
	grid-template-areas: 'main';
	grid-template-rows: 100%;
	grid-template-columns: 100%;
	overflow: hidden; /* 确保全屏内容不溢出 */
}

.content--full .grid:not(.grid--columns) {
	overflow: visible; /* 允许某些grid的内容正常显示,避免缩放问题 */
}

.content__text {
	font-size: 1.35rem;
	max-width: 580px;
	line-height: 1.85;
	margin: 2rem 0;
	font-weight: 380;
	font-variation-settings: "wght" 380;
	text-wrap: balance;
	letter-spacing: 0.02em;
	color: var(--color-text);
	opacity: 0;
	/* 优雅的装饰线 */
	position: relative;
	padding: 2rem 0;
}

/* 文字顶部装饰线 */
.content__text::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--color-accent-soft), transparent);
	opacity: 0;
}

/* 动画就绪状态 */
.content__text.animated {
	opacity: 0.92;
	transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.content__text.animated::before {
	opacity: 0.6;
	transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.grid {
	grid-area: main;
	display: grid;
	width: 100%;
	height: 100%;

	grid-template-columns: repeat(8,1fr);
	grid-template-rows: 1fr 1fr 1fr;
}

/* 针对性解决滚动条问题 - 只对columns类型的grid应用overflow控制 */
.grid--columns {
	overflow: hidden;
}

.grid--four {
	grid-template-columns: repeat(4,1fr);
	grid-template-rows: min-content;
	align-content: center;
	overflow: visible;
	width: 92%;
	margin: 0 auto;
	gap: 1.5rem;
}

.grid--four .grid__img {
	height: min-content;
	aspect-ratio: 9 / 16;
}

.grid--spaced {
	gap: var(--grid-gap);
}

.grid--zoomed {
	gap: 2rem;
	grid-template-columns: repeat(3, 70%);
	grid-template-rows: repeat(3, 60%);
	justify-content: center;
	align-content: center;
	aspect-ratio: 2 / 1;
}

.grid--zoomed .grid__img {
	width: 100%;
	height: 100%;
}

.grid--columns {
  grid-template-columns: repeat(5,1fr);
	grid-template-rows: repeat(2,min-content);
  align-content: center;
}

/* AI绘空港项目展示布局 */
.content--project {
	display: flex;
	flex-direction: column;
	padding: 0;
	grid-template-areas: none;
}

.project-grid-area {
	height: 80vh;
	width: 100%;
	padding: 1.5rem;
	box-sizing: border-box;
}

/* 仅用于需要“按比例不压扁”的网格：在80vh区域内居中展示 */
.project-grid-area--center {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* AI绘空港分镜网格布局 - 不对称排列 */
.grid--storyboard {
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 0.5rem;
	padding: 0;
	width: 100%;
	height: 100%;
}

/* 云端实物招领处分镜网格布局 - 4行6列（每格约13:7），避免被拉扁 */
.grid--storyboard-6x4 {
	grid-template-columns: repeat(6, 1fr);
	grid-template-rows: repeat(4, 1fr);
	gap: 0.5rem;
	padding: 0;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 39 / 14;
	height: auto;
}

/* 广告分镜展示布局 - 3行4列（每格16:9） */
.grid--storyboard-4x3 {
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 0.7rem;
	padding: 0;
	width: min(96vw, 1500px);
	max-width: 100%;
	aspect-ratio: 64 / 27;
	height: auto;
}

.grid--storyboard-4x3 .grid__img {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.grid--storyboard-6x4 .grid__img {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

.grid--storyboard .grid__img {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

/* 分镜1：左上角大图，占2列2行 */
.storyboard-1 { 
	grid-area: 1 / 1 / 3 / 3;
}

/* 分镜2和3：左下角两张中图，各占1列1行 */
.storyboard-2 { grid-area: 3 / 1 / 4 / 2; }
.storyboard-3 { grid-area: 3 / 2 / 4 / 3; }

/* 分镜4-9：右侧3行2列小图网格 */
.storyboard-4 { grid-area: 1 / 3 / 2 / 4; }
.storyboard-5 { grid-area: 1 / 4 / 2 / 5; }
.storyboard-6 { grid-area: 2 / 3 / 3 / 4; }
.storyboard-7 { grid-area: 2 / 4 / 3 / 5; }
.storyboard-8 { grid-area: 3 / 3 / 4 / 4; }
.storyboard-9 { grid-area: 3 / 4 / 4 / 5; }

/* 项目介绍区域 - 屏幕下方1/5 */
.project-info {
	height: 20vh;
	width: 100%;
	padding: 0.5rem 2rem 1.5rem;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto auto;
	align-content: end;
	column-gap: 2rem;
	background: var(--color-bg);
}

.project-info__left,
.project-info__right {
	display: contents;
}

.project-info__title {
	grid-area: 1 / 1 / 2 / 2;
	font-size: clamp(1.6rem, 2.5vw, 2.2rem);
	font-weight: 400;
	font-family: "bricolage-grotesque-48", "Noto Serif SC", Georgia, serif;
	color: var(--color-text);
	margin: 0;
	line-height: 1.2;
}

.project-info__type {
	grid-area: 2 / 1 / 3 / 2;
	font-size: 0.95rem;
	color: var(--color-text-muted);
	letter-spacing: 0.08em;
	margin: 0.2rem 0 0.5rem;
}

.project-info__desc {
	grid-area: 3 / 1 / 4 / 2;
	font-size: 0.9rem;
	color: var(--color-text-muted);
	max-width: 500px;
	line-height: 1.5;
	margin: 0;
	opacity: 0.8;
	align-self: end;
}

.project-info__date {
	grid-area: 1 / 2 / 2 / 3;
	font-size: clamp(1.6rem, 2.5vw, 2.2rem);
	font-weight: 400;
	font-family: "bricolage-grotesque-48", "Noto Serif SC", Georgia, serif;
	color: var(--color-text);
	margin: 0;
	line-height: 1.2;
	text-align: right;
}

.project-info__tools {
	grid-area: 3 / 2 / 4 / 3;
	font-size: 0.85rem;
	color: var(--color-text-muted);
	margin: 0;
	opacity: 0.7;
	text-align: right;
	align-self: end;
}

.grid--single {
  height: auto;
  justify-self: center;
}

.grid--column {
	grid-template-columns: repeat(15, calc((100% - 14 * 10px) / 15));
  gap: 10px;
	grid-template-rows: auto;
}

.grid__img:has(.grid__img-inner) {
	position: relative;
	overflow: hidden;
	display: grid;
	place-items: center;
	max-height: 100%;
	min-width: 100%;
}

.grid__img .grid__img-inner {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: 50% 50%;
	will-change: transform;
}

.ar-wide {
	aspect-ratio: 4/3;
}

.ar-narrow {
	aspect-ratio: 2/3;
}

.ar-rect {
	aspect-ratio: 1;
}

.span-2 {
	grid-column: auto / span 2;
}

.span-3 {
	grid-column: auto / span 3;
}

.grid--small {
	grid-template-columns: repeat(9,1fr);
	grid-auto-rows: 1fr;
}

.grid--tiny {
	height: 60vh;
	grid-template-columns: repeat(14,1fr);
	grid-auto-rows: auto;
}

.grid--wide {
	grid-template-columns: repeat(5,1fr);
	grid-template-rows: repeat(4,1fr);
}

.pos-1 { grid-area: 1 / 1; }
.pos-2 { grid-area: 1 / 3; }
.pos-3 { grid-area: 1 / 4; }
.pos-4 { grid-area: 1 / 5; }
.pos-5 { grid-area: 1 / 7; }
.pos-6 { grid-area: 2 / 1; }
.pos-7 { grid-area: 2 / 3; }
.pos-8 { grid-area: 2 / 4; }
.pos-9 { grid-area: 2 / 6; }
.pos-10 { grid-area: 2 / 7; }
.pos-11 { grid-area: 2 / 8; }
.pos-12 { grid-area: 3 / 1; }
.pos-13 { grid-area: 3 / 2; }
.pos-14 { grid-area: 3 / 4; }
.pos-15 { grid-area: 3 / 5; }
.pos-16 { grid-area: 3 / 7; }
.pos-17 { grid-area: 3 / 8; }
.pos-18 { grid-area: 2 / 5; }

.grid__img {
	background-size: cover;
	background-position: 50% 50%;
	pointer-events: none;
	will-change: transform;
	transform: translateZ(0.1px);
}

/* Grid内的文字项目样式优化 */
.grid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2rem;
	position: relative;
}

.grid__item h4 {
	margin-bottom: 0.75rem;
	position: relative;
}

.grid__item h4::after {
	content: '';
	position: absolute;
	bottom: -0.35rem;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 1px;
	background: var(--color-accent);
}

.grid__item p {
	opacity: 0.8;
	max-width: 200px;
	line-height: 1.6;
	font-size: 0.95rem;
}

.grid--columns .grid__img {
	height: min-content;
	aspect-ratio: 9 / 16;
}

.content__title {
	grid-area: main;
	position: relative;
	display: flex;
	flex-direction: column;
}

.content__title-main {
	font-size: clamp(2.5rem, 8vw, 5.5rem);
	line-height: 1.05;
	margin: 0.5rem 0 0;
	font-weight: 300;
	font-variation-settings: "wght" 300;
	text-wrap: balance;
	letter-spacing: -0.02em;
	font-family: "bricolage-grotesque-48", "Noto Serif SC", Georgia, serif;
}

.content__title-main + p {
	margin: 0.5rem 0 0;
	max-width: 180px;
	opacity: 0.6;
}

.center {
	text-align: center;
}

.right {
	text-align: right;
}

.end {
	align-self: end;
}

.acenter {
	align-self: center;
}

.page-footer {
	padding: 2rem var(--page-padding);
	position: relative;
	display: grid;
	width: 100%;
	grid-row-gap: 0.75rem;
	grid-column-gap: 2rem;
	justify-items: center;
	text-align: center;
	margin-top: 12vh;
	grid-template-columns: auto;
	justify-content: center;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
}

@media (max-aspect-ratio: 16/9) {
  .grid:not(.grid--zoomed) {
    width: 100%; 
    height: auto; 
    aspect-ratio: 16/9;
  }
}

@media screen and (min-width: 53em) {
	body {
		--page-padding: 1rem;
	}
	.frame {
		grid-template-columns: 20% 1fr 1fr;
		grid-template-rows: min-content 1fr auto;
		grid-row-gap: 15vh;
		align-items: center;
		grid-template-areas: 'logo tags sponsor' '... ... subline' 'title title title' ;
	}
	.frame__links {
		margin-left: 3rem;
	}
	.frame__subline {
		align-self: end;
	}
	.frame__title {
		align-self: end;
	}
	.frame #cdawrap {
		text-align: right;
		max-width: 250px;
		justify-self: end;
	}
	.page-footer {
		grid-template-columns: repeat(3,auto);
	}
}
