:root {
	--page-bg: #ffffff;
	--surface: #ffffff;
	--surface-soft: #f3f5f7;
	--text-primary: #131516;
	--text-secondary: #586068;
	--border: #d7dde2;
	--card-shadow: 0 14px 34px rgba(12, 24, 35, 0.08);
	--button-bg: #eef2f5;
	--button-bg-hover: #e2e8ed;
	--overlay: rgba(8, 12, 16, 0.84);
	--title-rail: clamp(150px, 16vw, 300px);
	--metadata-rail: clamp(130px, 11vw, 230px);
	--project-grid-gap: 1.15rem;
	--project-inline-gap: 0.52rem;
	--project-thumb-width: clamp(170px, 18.8vw, 250px);
	--landscape-pdf-width: calc((var(--project-thumb-width) * 2 + var(--project-grid-gap)) * 1.74);
	--website-preview-scale: 0.78;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	background: linear-gradient(180deg, var(--page-bg) 0%, #f8fafb 100%);
	color: var(--text-primary);
	font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
	display: flex;
	flex-direction: column;
}

.page-header {
	width: 100%;
	padding: 2.2rem 2rem 1rem;
	text-align: left;
	position: relative;
}

.page-header-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 1.8rem;
	align-items: start;
}

.page-header-main {
	min-width: 0;
}

.page-header-side {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	padding-top: clamp(6rem, 8.8vw, 7.8rem);
}

.page-header-side-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 0;
}

.page-title-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1rem;
	flex-wrap: wrap;
}

.page-header h1 {
	margin: 0;
	font-size: clamp(2.2rem, 3.8vw, 3.2rem);
	font-weight: 600;
	letter-spacing: 0.01em;
}

.page-title-sub {
	margin: 0;
	font-size: clamp(1.1rem, 1.9vw, 1.6rem);
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #000000;
}

.page-role {
	margin: 0;
}

.page-role a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.08em;
}

.page-role-logo-link {
	display: inline-block;
	vertical-align: middle;
	text-decoration: none;
	border-radius: 3px;
}

.page-role-logo-link:focus-visible {
	outline: 2px solid #3c6e97;
	outline-offset: 2px;
}

.page-role-logo {
	display: block;
	height: clamp(4.8rem, 8vw, 6.8rem);
	width: auto;
	object-fit: contain;
}

.page-email {
	margin: 0.08rem 0 0;
	font-size: clamp(0.78rem, 1.12vw, 0.92rem);
	line-height: 1.32;
	color: #2f3941;
}

.page-email a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.08em;
}

.page-subtitle {
	margin: 0;
	font-size: clamp(1.15rem, 1.8vw, 1.45rem);
	color: var(--text-secondary);
	text-transform: none;
}

.page-topics {
	margin: 0.32rem 0 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.04rem;
	font-size: clamp(0.82rem, 1.2vw, 0.98rem);
	font-weight: 700;
	line-height: 1.35;
	color: #000000;
}

.page-topics-line {
	display: block;
}

.page-resume-inline {
	margin: 0;
	font-size: clamp(0.78rem, 1.12vw, 0.92rem);
	line-height: 1.32;
	color: #2f3941;
	padding-top: 0.16rem;
}

.page-resume-inline a {
	color: inherit;
	font-weight: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.08em;
}

.page-resume-inline a:focus-visible {
	outline: 2px solid #3c6e97;
	outline-offset: 2px;
}

.page-details {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.05rem;
	font-size: clamp(0.78rem, 1.12vw, 0.92rem);
	line-height: 1.32;
	color: #2f3941;
	text-align: left;
	align-items: flex-start;
}

.page-main {
	display: block;
	padding: 1.35rem 2rem 3rem;
}


.project-stack {
	width: min(1460px, 100%);
	padding-left: var(--title-rail);
}

.project-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.1rem var(--project-grid-gap);
}

.project-list-error {
	margin: 0.3rem 0 0;
	font-size: 0.92rem;
	color: var(--text-secondary);
}

.project-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	position: relative;
	padding: 0.2rem 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	cursor: pointer;
	transition: transform 140ms ease;
}

.project-date-marker {
	position: absolute;
	left: calc(-1 * var(--title-rail) - 5.2rem);
	top: 0.24rem;
	width: calc(var(--title-rail) + var(--metadata-rail));
	margin: 0;
	padding-left: 0;
	text-align: center;
	font-size: clamp(0.94rem, 1.3vw, 1.08rem);
	font-weight: 500;
	font-style: italic;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: #000000;
	pointer-events: none;
}

.project-date-marker--ongoing {
	font-weight: 500;
}

.project-card--website {
	grid-column: auto;
}

.project-card--landscape {
	grid-column: 1 / -1;
}

.project-card--landscape-pdf .preview-wrap--landscape {
	width: var(--landscape-pdf-width);
}

.project-card--landscape-map .preview-wrap--landscape {
	width: var(--landscape-pdf-width);
}

.project-card--landscape-pptx .preview-wrap--landscape {
	width: var(--landscape-pdf-width);
}

.project-card--model {
	grid-column: 1 / -1;
	cursor: default;
}

.project-card--model:hover {
	transform: none;
}


.project-card:hover {
	transform: translateY(-2px);
}

.project-card:focus-visible {
	outline: 2px solid #3c6e97;
	outline-offset: 3px;
}

.project-layout {
	display: grid;
	grid-template-columns: var(--metadata-rail) auto;
	align-items: stretch;
	column-gap: var(--project-inline-gap);
}

.project-layout--website {
	grid-template-columns: var(--metadata-rail) minmax(0, 1fr);
	column-gap: var(--project-inline-gap);
}

.project-layout--landscape {
	grid-template-columns: var(--metadata-rail) minmax(0, 1fr);
	column-gap: var(--project-inline-gap);
}

.project-meta-space {
	min-height: 170px;
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	padding-top: 0.28rem;
	cursor: default;
}

.project-meta-space--website {
	min-height: clamp(190px, 22vw, 255px);
	padding-top: 0.42rem;
}

.project-meta-space--landscape {
	min-height: clamp(220px, 24vw, 312px);
	padding-top: 0.42rem;
}

.project-meta-placeholder {
	margin: 0;
	max-width: 18ch;
	font-size: 0.72rem;
	line-height: 1.35;
	color: #79828b;
	letter-spacing: 0.01em;
}

.project-meta-block {
	display: flex;
	flex-direction: column;
	gap: 0.28rem;
	max-width: 22ch;
	align-self: stretch;
}

.project-meta-title {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--text-primary);
}

.project-meta-title-link {
	display: inline-block;
	max-width: 100%;
	margin: -0.08rem 0 0;
	padding: 0.08rem 0.32rem 0.08rem 0;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
	color: var(--text-primary);
	border-radius: 3px;
}

.project-meta-title-link:hover {
	color: #0f3f63;
}

.project-meta-title-link:focus-visible {
	outline: 2px solid #3c6e97;
	outline-offset: 2px;
}

.project-meta-description {
	margin: 0;
	font-size: 0.73rem;
	line-height: 1.4;
	color: var(--text-secondary);
}

.project-meta-line {
	margin: 0;
	font-size: 0.7rem;
	line-height: 1.35;
	color: var(--text-secondary);
}

.project-org-logo-link {
	display: inline-block;
	margin-top: 0.5rem;
	align-self: flex-start;
	border-radius: 4px;
	opacity: 0.85;
	transition: opacity 0.15s;
}

.project-org-logo-link:hover {
	opacity: 1;
}

.project-org-logo-link:focus-visible {
	outline: 2px solid #3c6e97;
	outline-offset: 2px;
}

.project-org-logo {
	display: block;
	max-height: 72px;
	max-width: 160px;
	width: auto;
	object-fit: contain;
}

.project-org-logo--upal {
	max-height: 88px;
	max-width: 200px;
}

.project-org-section {
	display: flex;
	flex-direction: column;
}

.preview-wrap {
	display: flex;
	min-height: 170px;
	padding: 0.3rem;
	background: transparent;
	align-items: center;
	justify-content: flex-start;
}

.preview-wrap--website {
	min-height: clamp(200px, 22vw, 290px);
	padding-top: 0.12rem;
	justify-content: flex-start;
	width: 100%;
}

.preview-wrap--landscape {
	min-height: clamp(220px, 24vw, 312px);
	padding-top: 0.12rem;
	justify-content: flex-start;
	width: 100%;
	position: relative;
}


.preview-canvas {
	width: var(--project-thumb-width);
	height: auto;
	background: #ffffff;
	border: 1px solid #d4dbe2;
	border-radius: 4px;
	box-shadow: 0 5px 14px rgba(10, 24, 34, 0.12);
}

.geojson-map {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	min-height: clamp(200px, 22vw, 300px);
	position: relative;
	border: 1px solid #2b333c;
	border-radius: 6px;
	overflow: hidden;
	background: #0c1117;
	align-self: stretch;
}

.geojson-map-overlay {
	position: absolute;
	top: 0.5rem;
	left: 0.55rem;
	right: 3.2rem;
	z-index: 650;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	gap: 0.14rem;
}

.geojson-map .leaflet-top.leaflet-right {
	top: 0.45rem;
	right: 0.45rem;
}

.geojson-map .leaflet-control-zoom {
	margin: 0;
}

.geojson-map-title {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 700;
	color: #dde9f6;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.geojson-map-subtitle {
	margin: 0;
	font-size: 0.72rem;
	color: #afc2d6;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.geojson-map-legend {
	position: absolute;
	left: 0.55rem;
	bottom: 0.55rem;
	z-index: 650;
	min-width: 110px;
	max-width: min(190px, calc(100% - 1.1rem));
	padding: 0.28rem 0.35rem;
	border: 1px solid rgba(126, 155, 181, 0.36);
	border-radius: 5px;
	background: rgba(8, 12, 16, 0.78);
	backdrop-filter: blur(2px);
	color: #dfeaf5;
	pointer-events: none;
}

.geojson-map-legend[hidden] {
	display: none;
}

.geojson-map-legend-title {
	margin: 0 0 0.18rem;
	font-size: 0.52rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: #edf6ff;
}

.geojson-map-legend-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.1rem;
}

.geojson-map-legend-item {
	display: grid;
	grid-template-columns: 0.5rem 1fr;
	align-items: center;
	column-gap: 0.26rem;
}

.geojson-map-legend-swatch {
	width: 0.5rem;
	height: 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 2px;
}

.geojson-map-legend-label {
	font-size: 0.48rem;
	line-height: 1.2;
	color: #c5d7e9;
}

.geojson-map.leaflet-container {
	background: #0c1117;
}

.geojson-map--error {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem;
	color: #c6d3df;
	font-size: 0.78rem;
	text-align: center;
}

.geojson-map .leaflet-control-attribution {
	margin: 0 0.35rem 0.35rem 0;
	padding: 0.12rem 0.35rem;
	border-radius: 999px;
	background: rgba(8, 12, 16, 0.7);
	color: #c6d3df;
	font-size: 0.58rem;
}

.geojson-map .leaflet-control-attribution a {
	color: #c6d3df;
}

.geojson-map .leaflet-popup-content-wrapper,
.geojson-map .leaflet-popup-tip {
	background: #0f141b;
	color: #e4eef8;
}

.geojson-map .leaflet-popup-content {
	margin: 0.55rem 0.7rem;
	font-size: 0.68rem;
	line-height: 1.3;
}

.map-popup-row {
	display: flex;
	justify-content: space-between;
	gap: 0.6rem;
	padding: 0.1rem 0;
}

.map-popup-key {
	font-weight: 600;
	color: #d9e6f2;
}

.map-popup-value {
	color: #b7c6d6;
	text-align: right;
}

.website-preview {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid #d4dbe2;
	border-radius: 10px;
	overflow: hidden;
	background: linear-gradient(145deg, #f3f7fb 0%, #ffffff 100%);
	box-shadow: 0 8px 20px rgba(10, 24, 34, 0.12);
	text-decoration: none;
}

.pptx-preview-img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #f3f5f7;
	border: 1px solid #d4dbe2;
	border-radius: 4px;
	box-shadow: 0 5px 14px rgba(10, 24, 34, 0.12);
	display: block;
}

.pptx-preview-placeholder {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: linear-gradient(145deg, #f0f3f6 0%, #e4e9ee 100%);
	border: 1px solid #d4dbe2;
	border-radius: 4px;
	box-shadow: 0 5px 14px rgba(10, 24, 34, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
}

.pptx-preview-placeholder-label {
	font-size: clamp(0.8rem, 1.2vw, 1rem);
	color: var(--text-secondary);
	font-style: italic;
}


.pptx-preview {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid #d4dbe2;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f7fb;
	box-shadow: 0 8px 20px rgba(10, 24, 34, 0.12);
}

.pptx-embed {
	width: 100%;
	height: 100%;
	border: 0;
	pointer-events: none;
	background: #ffffff;
}

.presentation-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: var(--overlay);
	padding: 0.35rem;
	z-index: 1000;
	overflow: hidden;
	touch-action: none;
}

.presentation-overlay.is-open {
	display: flex;
}

.presentation-panel {
	position: relative;
	width: min(1820px, 100%, calc((100vh - 2rem) * 16 / 9));
	align-self: center;
}

.presentation-frame {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 6px;
	background: #000000;
}

.landscape-media {
	max-width: 100%;
}

.model-ui-shell {
	width: 100%;
	min-height: clamp(190px, 21vw, 286px);
	padding: 0.6rem;
	border: 1px solid #525961;
	border-radius: 8px;
	background: linear-gradient(180deg, #5c656d 0%, #4d555d 100%);
	box-shadow: 0 10px 24px rgba(8, 12, 16, 0.3);
	display: flex;
	flex-direction: column;
	gap: 0.48rem;
	position: relative;
}

.model-top-panel {
	display: flex;
	flex-direction: column;
	gap: 0.42rem;
	padding: 0.46rem 0.5rem;
	border: 1px solid rgba(27, 36, 46, 0.55);
	border-radius: 6px;
	background: linear-gradient(180deg, rgba(24, 34, 44, 0.72) 0%, rgba(18, 28, 38, 0.74) 100%);
}

.model-slider-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.46rem;
}

.model-slider-control {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.22rem 0.26rem;
	border-radius: 4px;
	background: rgba(12, 18, 24, 0.34);
}

.model-slider-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.45rem;
}

.model-slider-label {
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #d9e6f2;
	text-transform: uppercase;
}

.model-slider-value {
	font-size: 0.72rem;
	font-weight: 700;
	color: #f8fcff;
}

.model-slider-input {
	width: 100%;
	height: 0.9rem;
	margin: 0;
	accent-color: #8ecde7;
}

.model-monitor-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.46rem;
}

.model-monitor-chip {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	padding: 0.24rem 0.34rem;
	border: 1px solid rgba(79, 106, 124, 0.55);
	border-radius: 5px;
	background: rgba(9, 15, 20, 0.52);
}

.model-monitor-label {
	font-size: 0.61rem;
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #bfd6e8;
}

.model-monitor-value {
	font-size: 0.84rem;
	font-weight: 700;
	line-height: 1.2;
	color: #f2f9ff;
}

.model-loader,
.model-status {
	margin: 0;
	font-size: 0.76rem;
	line-height: 1.35;
	color: #eef4fb;
}

.model-loader {
	font-weight: 700;
	letter-spacing: 0.01em;
}

.model-status.error {
	color: #ffd2d2;
}

.model-command-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: flex-start;
}

.model-command-row .model-status {
	margin-left: 0.18rem;
	flex: 1 1 17rem;
	min-width: 14rem;
}

.model-command-btn {
	height: 1.72rem;
	padding: 0 0.68rem;
	border-radius: 6px;
	border: 1px solid #3a4147;
	background: linear-gradient(180deg, #dbe4ed 0%, #bfccd8 100%);
	color: #1a232c;
	font-size: 0.73rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 120ms ease, background-color 120ms ease;
}

.model-command-btn:hover:not(:disabled) {
	background: linear-gradient(180deg, #e4ecf4 0%, #cbd8e3 100%);
	transform: translateY(-1px);
}

.model-command-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.model-command-btn.is-running {
	background: linear-gradient(180deg, #d9f6dc 0%, #b9e6bf 100%);
	border-color: #4a7a54;
}

.model-open-link {
	display: inline-flex;
	align-items: center;
	height: 1.86rem;
	padding: 0 0.62rem;
	border: 1px solid #414951;
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 600;
	color: #edf5ff;
	background: rgba(24, 34, 44, 0.72);
}

.model-open-link:hover {
	background: rgba(30, 42, 54, 0.9);
}

.model-world-panel {
	width: 100%;
	aspect-ratio: 3 / 2;
	align-self: center;
	border: 1px solid #2b333c;
	border-radius: 6px;
	overflow: hidden;
	background: #10161d;
}

.model-world-canvas {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000000;
}

.model-runtime-frame {
	position: absolute;
	left: -220vw;
	top: -220vh;
	width: 1100px;
	height: 860px;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.website-embed {
	width: calc(100% / var(--website-preview-scale));
	height: calc(100% / var(--website-preview-scale));
	border: 0;
	pointer-events: auto;
	background: #ffffff;
	transform: scale(var(--website-preview-scale));
	transform-origin: top left;
}

.project-meta {
	display: grid;
	grid-template-columns: var(--metadata-rail) auto;
	align-items: center;
	column-gap: var(--project-inline-gap);
	padding: 0.34rem 0.2rem 0.4rem;
}

.project-hint {
	margin: 0;
	font-size: 0.84rem;
	color: var(--text-secondary);
	grid-column: 2;
}

.reader-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: var(--overlay);
	padding: 0.35rem;
	z-index: 1000;
	overflow: hidden;
	touch-action: none;
}

.reader-overlay.is-open {
	display: flex;
}

.reader-panel {
	position: relative;
	width: min(1820px, 100%);
	height: calc(100vh - 0.7rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.12rem;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
}

.reader-close-btn {
	position: absolute;
	top: 1.2rem;
	right: 0.5rem;
	z-index: 10;
	width: 2.2rem;
	height: 2.2rem;
	border: 1px solid rgba(217, 224, 230, 0.9);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(4px);
	color: var(--text-primary);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 120ms ease, transform 120ms ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.reader-close-btn:hover {
	background: var(--button-bg-hover);
	transform: translateY(-1px);
}

.reader-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	width: fit-content;
	margin: 0.2rem auto 0;
	padding: 0.24rem 0.4rem;
	border: 1px solid rgba(217, 224, 230, 0.9);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(4px);
}

.reader-toolbar-bottom {
	order: 2;
	align-self: center;
	margin-top: 0.3rem;
}


.nav-btn {
	width: 1.7rem;
	height: 1.7rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--button-bg);
	color: var(--text-primary);
	font-size: 0.95rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 120ms ease, transform 120ms ease;
}

.nav-btn:hover:not(:disabled) {
	background: var(--button-bg-hover);
	transform: translateY(-1px);
}

.nav-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.page-status {
	margin: 0;
	color: var(--text-secondary);
	font-size: 0.78rem;
	min-width: 8.2rem;
	text-align: center;
}

.spread-stage {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.22rem;
	padding: 0.12rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: hidden;
	touch-action: none;
}


.spread-canvas {
	max-width: 100%;
	max-height: 100%;
	height: auto;
	background: #ffffff;
	border: 0;
	border-radius: 0;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
	object-fit: contain;
}


.spread-canvas.is-empty {
	visibility: hidden;
}

.reader-message {
	min-height: 1.05rem;
	margin: 0.22rem 0 0;
	text-align: center;
	color: #eef2f5;
	font-size: 0.8rem;
}


.reader-message.error {
	color: #ffd2d2;
}

@media (max-width: 940px) {
	:root {
		--website-preview-scale: 0.86;
	}

	.page-header-grid {
		grid-template-columns: 1fr;
		row-gap: 0.5rem;
	}

	.page-header-side {
		display: none;
	}

	.page-resume-inline {
		padding-top: 0.24rem;
	}

	.project-stack {
		padding-left: 0;
	}

	.project-date-marker {
		position: static;
		left: auto;
		top: auto;
		width: 100%;
		margin: 0.6rem 0 0.3rem;
		padding-left: 0;
		text-align: center;
		font-size: clamp(1rem, 1.4vw, 1.12rem);
	}

	.project-list {
		grid-template-columns: 1fr;
	}

	.project-card--website {
		grid-column: auto;
	}

	.project-layout--website {
		grid-template-columns: 1fr;
		row-gap: 0.55rem;
	}

	.project-layout--landscape {
		grid-template-columns: 1fr;
		row-gap: 0.55rem;
	}

	.project-card--landscape-pdf .project-layout {
		grid-template-columns: 1fr;
	}

	.project-card--landscape-pdf .preview-wrap--landscape {
		width: 100%;
		justify-content: center;
	}

	.project-card--landscape-pdf .project-meta-space {
		min-height: auto;
	}

	.project-card--landscape-pdf .preview-canvas {
		width: 100%;
		max-width: 100%;
	}

	.project-card--landscape-map .project-layout {
		grid-template-columns: 1fr;
	}

	.project-card--landscape-map .preview-wrap--landscape {
		width: 100%;
	}

	.project-card--landscape-map .project-meta-space {
		min-height: auto;
	}

	.project-card--landscape-pptx .project-layout {
		grid-template-columns: 1fr;
	}

	.project-card--landscape-pptx .preview-wrap--landscape {
		width: 100%;
	}

	.project-card--landscape-pptx .project-meta-space {
		min-height: auto;
	}

	/* Portrait PDFs: stack description above PDF like landscape */
	.project-card:not(.project-card--landscape) .project-layout {
		grid-template-columns: 1fr;
		row-gap: 0.55rem;
	}

	.project-card:not(.project-card--landscape) .project-meta-space {
		min-height: auto;
	}

	.project-card:not(.project-card--landscape) .preview-wrap {
		justify-content: center;
	}

	.project-card:not(.project-card--landscape) .preview-canvas {
		width: clamp(200px, 45vw, 320px);
	}

	.model-world-panel {
		aspect-ratio: 3 / 2;
	}

	.model-slider-row {
		grid-template-columns: 1fr;
	}

	.model-monitor-row {
		grid-template-columns: 1fr;
	}

	.project-meta-space--website {
		min-height: auto;
	}

	.project-meta-space--landscape {
		min-height: auto;
	}

	.reader-panel {
		height: calc(100vh - 0.7rem);
	}

	.spread-stage {
		flex-direction: column;
		justify-content: center;
	}
}

@media (max-width: 640px) {
	:root {
		--website-preview-scale: 0.92;
		--project-thumb-width: clamp(120px, 36vw, 200px);
	}

	.page-header {
		padding: 1.6rem 1rem 0.8rem;
	}

	.page-header h1 {
		font-size: clamp(1.5rem, 6vw, 2.2rem);
	}

	.page-main {
		padding: 0.85rem 0.75rem 1.8rem;
	}

	.project-layout {
		grid-template-columns: 1fr;
		row-gap: 0.45rem;
	}

	.project-card--landscape-pdf .project-layout,
	.project-card--landscape-map .project-layout,
	.project-card--landscape-pptx .project-layout,
	.project-layout--landscape,
	.project-layout--website {
		grid-template-columns: 1fr;
	}

	.project-card--landscape-pdf .project-meta-block,
	.project-card--landscape-map .project-meta-block,
	.project-card--landscape-pptx .project-meta-block {
		max-width: none;
		text-align: left;
	}

	.project-card--landscape-pdf .project-meta-space,
	.project-card--landscape-map .project-meta-space,
	.project-card--landscape-pptx .project-meta-space {
		justify-content: flex-start;
	}

	.project-card:not(.project-card--landscape) .project-meta-space {
		min-height: auto;
	}

	.project-card:not(.project-card--landscape) .preview-canvas {
		width: clamp(160px, 50vw, 260px);
	}

	.project-meta {
		grid-template-columns: minmax(62px, 0.75fr) auto;
		column-gap: 0.45rem;
	}

	.project-meta-space {
		min-height: auto;
	}

	.project-meta {
		justify-content: flex-start;
		padding-left: 0;
	}

	.project-meta-block {
		max-width: none;
		text-align: left;
	}

	.preview-wrap {
		justify-content: center;
	}

	.preview-wrap--landscape {
		justify-content: center;
	}

	.reader-overlay {
		padding: 0.22rem;
	}

	.reader-panel {
		padding: 0.1rem;
		border-radius: 0;
	}

	.reader-toolbar {
		width: calc(100% - 0.4rem);
		justify-content: space-between;
	}

	.geojson-map {
		min-height: 200px;
	}

	.model-ui-shell {
		min-height: auto;
	}

	.website-preview {
		border-radius: 6px;
	}
}
