:root {
	--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
	--font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
	--font-mono: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
	--page-width: min(1100px, calc(100vw - 2rem));
	--panel-bg: rgba(7, 15, 24, 0.56);
	--panel-bg-strong: rgba(4, 10, 17, 0.72);
	--panel-border: rgba(255, 255, 255, 0.16);
	--panel-muted: rgba(148, 163, 184, 0.78);
	--panel-text: #e5edf8;
	--panel-soft: #b8c4d6;
	--accent: #7dd3fc;
	--accent-strong: #38bdf8;
	--paper-bg: rgba(253, 240, 213, 0.92);
	--paper-ink: #2d2116;
	--shadow-heavy: 0 8px 24px rgba(15, 23, 42, 0.45);
	--radius-xl: 8px;
	--radius-lg: 6px;
	--radius-dock: 22px;
	--window-height: clamp(24.75rem, 66vh, 31rem);
	--safe-bottom-space: 0px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100svh;
	color: var(--panel-text);
	font-family: var(--font-sans);
	background-color: #05070a;
	overflow-x: hidden;
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -2;
	transform: scale(1.03);
	background-image:
		linear-gradient(180deg, rgba(10, 20, 34, 0.24) 0%, rgba(9, 14, 21, 0.58) 100%),
		url('../data/background-1280.webp');
	background-position: center;
	background-size: cover;
}

body::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(circle at top left, rgba(125, 211, 252, 0.28), transparent 32%),
		radial-gradient(circle at top right, rgba(253, 186, 116, 0.22), transparent 30%),
		linear-gradient(180deg, rgba(3, 7, 12, 0.18), rgba(3, 7, 12, 0.7)),
		repeating-linear-gradient(
			90deg,
			rgba(255, 255, 255, 0.015) 0,
			rgba(255, 255, 255, 0.015) 1px,
			transparent 1px,
			transparent 120px
		);
}

a {
	color: inherit;
}

button,
input,
textarea,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

svg {
	display: block;
}

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

.portfolio-shell {
	position: relative;
	width: var(--page-width);
	min-height: 100vh;
	min-height: 100svh;
	margin: 0 auto;
	padding: 2.5rem 0 calc(1.5rem + var(--safe-bottom-space));
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.portfolio-menubar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	min-height: 2rem;
	padding: 0.16rem 1rem;
	pointer-events: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(15, 23, 42, 0.28);
	color: #ffffff;
	font-family: var(--font-ui);
	font-size: 0.84rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.workspace {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	font-family: var(--font-mono);
}

.page-panel {
	width: 100%;
	animation: panel-fade 220ms ease;
}

.panel-links {
	width: min(640px, 100%);
	margin: 0 auto;
}

.window {
	overflow: hidden;
	border: 1px solid var(--panel-border);
	border-radius: var(--radius-xl);
	background: #0f172a;
	box-shadow: var(--shadow-heavy);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.window--dark {
	background: #1a2438;
}

.panel-about .window--dark {
	background: rgba(15, 23, 42, 0.4);
}

.window--note {
	color: var(--paper-ink);
	background: #fdf0d5;
	border-color: rgba(255, 255, 255, 0.3);
}

.window__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.4rem 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(15, 23, 42, 0.12);
}

.window__toolbar--compact {
	gap: 0.75rem;
	padding: 0.28rem 0.75rem;
}

.window__toolbar--paper {
	border-bottom-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.08);
}

.window__title {
	font-family: var(--font-mono);
	font-size: 0.69rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #cbd5e1;
}

.window__title--paper {
	color: var(--paper-ink);
}

.window__toolbar-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.window__toolbar--compact .window__toolbar-actions {
	gap: 0.4rem;
}

.toolbar-toggle {
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	background: rgba(15, 23, 42, 0.28);
	color: #e2e8f0;
	padding: 0.34rem 0.72rem;
	font-family: var(--font-mono);
	font-size: 0.64rem;
	letter-spacing: 0.04em;
	transition:
		border-color 180ms ease,
		color 180ms ease,
		transform 180ms ease,
		background-color 180ms ease,
		box-shadow 180ms ease;
}

.window__toolbar--compact .toolbar-toggle {
	padding-block: 0.24rem;
}

.toolbar-toggle:hover {
	border-color: rgba(255, 255, 255, 0.4);
	color: #ffffff;
	background: rgba(255, 255, 255, 0.07);
}

.toolbar-toggle--filters {
	border-color: rgba(125, 211, 252, 0.42);
	background: rgba(10, 18, 28, 0.82);
	padding-inline: 0.9rem;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.toolbar-toggle--filters:hover {
	border-color: rgba(125, 211, 252, 0.72);
	background: rgba(15, 23, 42, 0.94);
}

.toolbar-toggle--filters[aria-expanded='true'] {
	border-color: rgba(125, 211, 252, 0.76);
	background: rgba(30, 41, 59, 0.96);
}

.toolbar-toggle:focus-visible,
.dock__item:focus-visible,
.explorer-item:focus-visible,
.filter-item:focus-visible,
.clear-filters:focus-visible,
.chip-link:focus-visible,
.project-card__title:focus-visible,
.note-link:focus-visible {
	outline: 2px solid rgba(125, 211, 252, 0.7);
	outline-offset: 2px;
}

.traffic-lights {
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.traffic-light {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	box-shadow: none;
}

.window__toolbar--compact .traffic-lights {
	gap: 0.3rem;
}

.window__toolbar--compact .traffic-light {
	width: 0.46rem;
	height: 0.46rem;
}

.traffic-light--red {
	background: #ef4444;
}

.traffic-light--yellow {
	background: #f59e0b;
}

.traffic-light--green {
	background: #22c55e;
}

.window__body {
	height: var(--window-height);
}

.window__body--split {
	display: flex;
	overflow: hidden;
}

.window__body--single {
	display: block;
}

.window__sidebar {
	width: 13rem;
	flex-shrink: 0;
	min-width: 0;
	overflow: hidden;
	padding: 0.75rem;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(15, 23, 42, 0.6);
	transition:
		width 220ms ease,
		padding 220ms ease,
		opacity 220ms ease,
		border-color 220ms ease;
}

.window__sidebar.is-collapsed {
	width: 0;
	padding: 0;
	opacity: 0;
	border-right-color: transparent;
}

.window__sidebar-label {
	margin: 0 0 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.625rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(148, 163, 184, 0.72);
}

.window__content {
	flex: 1;
	min-width: 0;
	background: rgba(2, 6, 23, 0.35);
}

.window__scroll {
	height: 100%;
	overflow: auto;
}

.window__empty {
	border: 1px dashed rgba(255, 255, 255, 0.15);
	border-radius: var(--radius-lg);
	padding: 1rem 1.15rem;
	background: rgba(15, 23, 42, 0.4);
	text-align: center;
	color: var(--panel-muted);
	font-size: 0.82rem;
}

.explorer-list,
.filter-list {
	display: grid;
	gap: 0.45rem;
}

.explorer-item,
.filter-item {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-lg);
	background: rgba(30, 41, 59, 0.7);
	color: #cfd8e5;
	padding: 0.45rem 0.55rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	text-align: left;
	font-family: var(--font-mono);
	font-size: 0.69rem;
	line-height: 1.4;
	transition:
		border-color 180ms ease,
		background-color 180ms ease,
		color 180ms ease,
		transform 180ms ease;
}

.explorer-item:hover,
.filter-item:hover {
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(30, 41, 59, 0.8);
	color: #f8fafc;
}

.explorer-item.is-active,
.filter-item.is-active {
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(30, 41, 59, 0.9);
	color: #f8fafc;
}

.item-dot {
	width: 0.52rem;
	height: 0.52rem;
	border-radius: 999px;
	flex-shrink: 0;
	background: rgba(148, 163, 184, 0.55);
}

.explorer-item.is-active .item-dot {
	background: var(--accent-strong);
}

.filter-item.is-active .item-dot {
	background: var(--accent);
}

.file-preview {
	padding: 0.75rem 1rem;
	color: #94a3b8;
	font-family: var(--font-mono);
	font-size: 0.875rem;
	line-height: 1.65;
}

.project-list {
	padding: 1rem;
	display: grid;
	gap: 0.75rem;
	align-content: start;
}

.project-card {
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-lg);
	background: rgba(6, 12, 22, 0.48);
	padding: 1.15rem 1.15rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	transition:
		border-color 180ms ease,
		transform 180ms ease,
		box-shadow 180ms ease;
}

.project-card:hover {
	border-color: rgba(125, 211, 252, 0.36);
	transform: translateY(-1px);
	box-shadow: 0 12px 30px rgba(2, 6, 23, 0.18);
}

.project-card__header {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.project-card__title-group {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.project-card__title-row {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	width: 100%;
}

.project-card__title,
.project-card__title-static {
	display: inline-flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	color: #f8fafc;
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.project-card__title:hover {
	color: #d9f5ff;
}

.project-card__subtitle {
	margin: 0;
	color: #7f93ad;
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.04em;
}

.project-card__badges {
	display: flex;
	flex: 0 1 52%;
	flex-wrap: wrap;
	gap: 0.45rem;
	justify-content: flex-end;
	margin-left: auto;
	max-width: 52%;
}

.project-card__description {
	margin: 0;
	color: #9fb0c7;
	font-size: 0.78rem;
	line-height: 1.72;
}

.project-card__description--hint {
	cursor: help;
}

.badge {
	border: none;
	border-radius: 999px;
	padding: 0.28rem 0.68rem;
	font-family: var(--font-mono);
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
}

.badge--link {
	text-decoration: none;
	transition:
		transform 180ms ease,
		filter 180ms ease;
}

.badge--link:hover {
	transform: translateY(-1px);
	filter: brightness(1.06);
}

.badge--ui {
	background: #0f62a9;
	color: #ffffff;
}

.badge--server {
	background: #c76a1a;
	color: #ffffff;
}

.badge--ml {
	background: #7d3ac1;
	color: #ffffff;
}

.badge--infra {
	background: #6B3410;
	color: #f8fafc;
}

.badge--code {
	background: #4b5565;
	color: #f8fafc;
}

.badge--live {
	background: #177245;
	color: #ffffff;
}

.empty-state {
	border: 1px dashed rgba(255, 255, 255, 0.18);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	background: rgba(15, 23, 42, 0.4);
	text-align: center;
}

.empty-state__title {
	margin: 0;
	color: #f8fafc;
	font-size: 0.98rem;
	font-weight: 600;
}

.empty-state__body {
	margin: 0.45rem 0 0;
	color: var(--panel-muted);
	font-size: 0.88rem;
	line-height: 1.6;
}

.clear-filters {
	width: 100%;
	margin-top: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	padding: 0.45rem 0.65rem;
	background: transparent;
	color: #e2e8f0;
	font-family: var(--font-mono);
	font-size: 0.69rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition:
		transform 180ms ease,
		border-color 180ms ease,
		color 180ms ease;
}

.clear-filters:hover {
	border-color: rgba(255, 255, 255, 0.38);
	color: #ffffff;
}

.notes-sheet {
	height: 100%;
	padding: 0.8rem 1rem 1rem;
	color: var(--paper-ink);
}

.note-block {
	padding: 0.75rem 0 0 0.2rem;
}

.note-block + .note-block {
	margin-top: 0;
	padding-top: 0.75rem;
	border-top: 0;
}

.note-line,
.note-footnote,
.note-lead {
	margin: 0;
	line-height: 1.8;
}

.note-line {
	color: rgba(45, 33, 22, 0.9);
}

.note-bullet {
	margin-right: 0.35rem;
}

.note-link {
	text-decoration: underline dotted;
	text-underline-offset: 0.28rem;
}

.note-link:hover {
	color: #000000;
}

.note-lead {
	margin-bottom: 0.5rem;
	font-weight: 700;
}

.note-footnote {
	margin-top: 0.7rem;
	color: rgba(45, 33, 22, 0.7);
	font-size: 0.9rem;
}

.dock {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 0.25rem;
	align-self: center;
	margin-top: auto;
	padding: 0.05rem 0.25rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--radius-dock);
	background: rgba(255, 255, 255, 0.03);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	font-family: var(--font-mono);
}

.dock__item {
	min-width: auto;
	padding: 0.38rem 0.75rem 0.35rem;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	color: #94a3b8;
	text-decoration: none;
	font-family: var(--font-mono);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	transition:
		transform 180ms ease,
		color 180ms ease,
		background-color 180ms ease;
}

.dock__item:hover {
	transform: translateY(-1px);
	color: #ffffff;
}

.dock__item.is-active {
	color: #ffffff;
}

.dock__item-icon {
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.72);
	display: grid;
	place-items: center;
	transition:
		border-color 180ms ease,
		background-color 180ms ease,
		box-shadow 180ms ease;
}

.dock__item.is-active .dock__item-icon {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.1);
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
}

.dock__item-icon svg {
	width: 1.45rem;
	height: 1.45rem;
}

.dock__item[data-panel-link='about'] .dock__item-icon svg {
	width: 1.65rem;
	height: 1.65rem;
}

.dock__item[data-panel-link='links'] .dock__item-icon svg {
	width: 1.4rem;
	height: 1.4rem;
}

.noscript {
	margin: 0 auto;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.88rem;
}

.custom-scrollbar {
	scrollbar-width: thin;
	scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
	width: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
	background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
	border-radius: 999px;
	border: 2px solid transparent;
	background-clip: padding-box;
	background-color: rgba(148, 163, 184, 0.34);
}

@keyframes panel-fade {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 900px) {
	.portfolio-shell {
		width: min(100vw - 1rem, 1100px);
		padding-top: 1rem;
	}

	.portfolio-menubar {
		font-size: 0.8rem;
	}

	.window__body {
		height: clamp(24.75rem, 71vh, 33rem);
	}

	.window__sidebar {
		width: 12rem;
	}
}

@media (min-width: 1600px) and (min-height: 900px) {
	html {
		font-size: 17px;
	}

	:root {
		--page-width: min(1360px, calc(100vw - 4rem));
		--window-height: clamp(28rem, 69vh, 37rem);
	}

	.panel-links {
		width: min(720px, 100%);
	}
}

@media (max-width: 700px) {
	:root {
		--window-height: clamp(16rem, 75svh, 50rem);
		--safe-bottom-space: calc(env(safe-area-inset-bottom) + 0.4rem);
	}

	.window__body {
		height: var(--window-height);
	}

	.portfolio-shell {
		width: calc(100vw - 1rem);
		min-height: 100svh;
		padding-top: calc(env(safe-area-inset-top) + 2.15rem);
		padding-bottom: calc(0.75rem + var(--safe-bottom-space));
		gap: 0.75rem;
	}

	.workspace {
		justify-content: flex-start;
	}

	.portfolio-menubar {
		min-height: 1.75rem;
		padding-inline: 0.75rem;
	}

	.window__toolbar {
		padding-inline: 0.75rem;
		gap: 0.5rem;
	}

	.window__toolbar-actions {
		gap: 0.35rem;
	}

	.toolbar-toggle {
		padding-inline: 0.6rem;
		font-size: 0.58rem;
	}

	.project-card__header {
		flex-direction: column;
	}

	.project-card__title-row {
		gap: 0.5rem;
	}

	.dock {
		position: sticky;
		bottom: calc(env(safe-area-inset-bottom) + 0.35rem);
		width: 100%;
		justify-content: space-between;
		margin-top: 0;
		padding: 0.05rem 0.2rem;
		z-index: 2;
	}

	.dock__item {
		flex: 1;
		min-width: 0;
		padding: 0.32rem 0.45rem 0.28rem;
		gap: 0.25rem;
		letter-spacing: 0.14em;
	}

	.dock__item-icon {
		width: 2rem;
		height: 2rem;
	}

	.dock__item-icon svg {
		width: 1.2rem;
		height: 1.2rem;
	}

	.dock__item[data-panel-link='about'] .dock__item-icon svg {
		width: 1.35rem;
		height: 1.35rem;
	}

	.dock__item[data-panel-link='links'] .dock__item-icon svg {
		width: 1.15rem;
		height: 1.15rem;
	}
}
