/* Portfolio-specific additions layered over the existing Ryan/Cvio template. */

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

.new-skin .container {
	z-index: 1;
}

.skip-link {
	position: fixed;
	top: 10px;
	left: 10px;
	padding: 10px 14px;
	background: var(--theme-surface-raised);
	color: var(--theme-text);
	border: 1px solid var(--theme-accent);
	border-radius: 4px;
	transform: translateY(-150%);
	z-index: 10000;
}

.skip-link:focus {
	transform: translateY(0);
}

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

.content .title,
.card-started .profile h1.title,
.service-item h3.name,
.resume-title h3.name {
	margin-top: 0;
}

.card-started .profile h1.title {
	margin-bottom: 0;
	line-height: 1.2;
}

.card-started .profile .slide {
	background-position: 25% 62%;
}

.text-box p:last-child,
.service-item p:last-child,
.resume-item p:last-child {
	margin-bottom: 0;
}

.about .info-list ul li,
.contact-list ul li {
	display: grid;
	grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
	gap: 14px;
	align-items: baseline;
}

.about .info-list ul li {
	word-break: normal;
	overflow-wrap: break-word;
}

@media (min-width: 1200px) {
	.new-skin .container {
		--profile-card-width: clamp(480px, 27vw, 520px);
		width: min(calc(100vw - clamp(64px, 12vw, 240px)), 1440px);
		max-width: 1440px;
		margin-left: auto;
		margin-right: auto;
	}

	.new-skin .card-started {
		width: var(--profile-card-width);
	}

	.new-skin .card-inner {
		left: calc(var(--profile-card-width) + 80px);
	}

	.content.about .row .col.col-d-7 {
		width: 46%;
		padding-right: 20px;
	}

	.content.about .row .col.col-d-5 {
		width: 54%;
		padding-left: 20px;
	}
}

@media (max-width: 1199px) {
	.content.about .row .col.col-t-7,
	.content.about .row .col.col-t-5 {
		width: 100%;
	}
}

.about .info-list ul li strong,
.contact-list ul li strong {
	padding-right: 0;
}

.service-item h3.name,
.resume-title h3.name {
	font-size: inherit;
	line-height: inherit;
}

.skills-groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.skill-group {
	padding: 18px;
	border: 1px solid var(--theme-border);
	border-radius: 8px;
	background: var(--theme-surface-raised);
}

.skill-group h3 {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--theme-text);
}

.skill-group h3 span {
	margin-right: 6px;
	color: var(--theme-accent);
}

.skill-group ul {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.skill-group li {
	padding: 5px 9px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--theme-text-muted);
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: 999px;
}

.resume-note,
.project-intro,
.timeline-intro {
	margin: 0 0 22px;
	color: var(--theme-text-muted);
}

.content.works .title {
	padding-bottom: 0;
}

.content.works .filter-menu.project-filter-menu {
	position: static;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 28px;
}

.content.works .project-filter-menu .project-filter {
	width: auto;
	margin: 0;
	min-height: 42px;
	padding: 8px 14px;
	font: inherit;
	font-size: 13px;
	line-height: 1;
	color: var(--theme-text-muted);
	background: var(--theme-surface-raised);
	border: 1px solid var(--theme-border);
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.content.works .project-filter-menu .project-filter:hover,
.content.works .project-filter-menu .project-filter.active {
	color: var(--theme-on-accent);
	background: var(--theme-accent);
	border-color: var(--theme-accent);
}

.content.works .project-filter-menu .project-filter:hover {
	background: var(--theme-accent-hover);
	border-color: var(--theme-accent-hover);
}

.content.works .project-filter-menu .project-filter:disabled {
	color: var(--theme-text-muted);
	background: var(--theme-surface);
	border-color: var(--theme-border);
	cursor: not-allowed;
	opacity: 0.55;
}

.project-section {
	margin-top: 34px;
}

.project-section[hidden] {
	display: none;
}

.project-section-heading {
	margin-bottom: 16px;
}

.project-section-heading h3 {
	margin: 0 0 5px;
	font-size: 20px;
	line-height: 1.35;
	color: var(--theme-text);
}

.project-section-heading p {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--theme-text-muted);
}

.project-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	min-width: 0;
}

.project-grid--featured {
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

.project-card {
	min-width: 0;
	padding: 20px;
	display: flex;
	flex-direction: column;
	background: var(--theme-surface-raised);
	border: 1px solid var(--theme-border);
	border-radius: 10px;
	box-shadow: 0 8px 22px var(--theme-shadow);
}

.project-card--featured {
	padding: 24px;
	border-top: 3px solid var(--theme-accent);
}

.project-card--flagship {
	border-top-width: 5px;
	box-shadow: 0 12px 28px var(--theme-shadow);
}

.project-card--prominent {
	grid-column: 1 / -1;
	border-top: 3px solid var(--theme-accent-secondary);
}

.project-card--archive {
	padding: 16px;
	background: var(--theme-surface);
	box-shadow: none;
}

.project-image {
	width: 100%;
	aspect-ratio: 16 / 9;
	margin-bottom: 18px;
	overflow: hidden;
	flex: 0 0 auto;
	background: var(--theme-surface-deep);
	border: 1px solid var(--theme-border);
	border-radius: 7px;
}

.project-image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.project-image--contain {
	padding: 12px;
	background: var(--theme-surface-deep);
}

.project-image--contain img {
	object-fit: contain;
}

.project-image--focus-right img {
	object-position: right center;
}

.project-image--placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 18px;
	text-align: center;
	color: var(--theme-text-muted);
	background:
		linear-gradient(135deg, var(--theme-accent-soft), var(--theme-mauve-soft)),
		var(--theme-surface-deep);
}

.project-image--placeholder .ion {
	font-size: 28px;
	color: var(--theme-accent-secondary);
}

.project-image--placeholder strong {
	font-size: 12px;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.project-card--flagship .project-image {
	border-color: var(--theme-accent);
}

.project-kicker {
	margin: 0 0 8px;
	font-size: 10px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--theme-accent);
}

.project-card__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 10px;
}

.project-status {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 4px 8px;
	font-size: 10px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--theme-accent-hover);
	background: var(--theme-accent-soft);
	border-radius: 4px;
}

.project-card--archive .project-status {
	color: var(--theme-text-muted);
	background: var(--theme-mauve-soft);
}

.project-period {
	font-size: 11px;
	color: var(--theme-text-muted);
}

.project-card h4 {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.35;
	color: var(--theme-text);
}

.project-card--featured h4 {
	font-size: 24px;
}

.project-card--flagship h4 {
	font-size: 28px;
}

.project-card--prominent h4 {
	font-size: 22px;
}

.project-card--archive h4 {
	font-size: 16px;
}

.project-card p {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--theme-text-muted);
}

.project-card--featured p {
	font-size: 14px;
}

.project-card--archive p {
	font-size: 12px;
	line-height: 1.55;
}

.project-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.project-tags li {
	padding: 4px 7px;
	font-size: 10px;
	line-height: 1.25;
	color: var(--theme-text-muted);
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: 4px;
}

.project-card--archive .project-tags li {
	background: var(--theme-surface-deep);
}

.project-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: auto;
}

.project-action,
.project-availability {
	min-height: 44px;
	padding: 9px 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-size: 12px;
	line-height: 1.2;
	font-weight: 500;
	border-radius: 5px;
}

.project-action {
	color: var(--theme-accent-hover);
	background: var(--theme-accent-soft);
	border: 1px solid var(--theme-accent);
}

.project-action:hover {
	color: var(--theme-on-accent);
	background: var(--theme-accent-hover);
}

.project-availability {
	color: var(--theme-text-muted);
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
}

.archive-link {
	min-height: 52px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: 1px solid var(--theme-border);
	border-radius: 8px;
	background: var(--theme-surface-raised);
	font-weight: 500;
	color: var(--theme-text);
}

.archive-link:hover,
.archive-link:focus {
	color: var(--theme-accent-hover);
	background: var(--theme-accent-soft);
}

.archive-link .fab {
	font-size: 22px;
}

.card-started .profile .social a {
	width: 44px;
	height: 44px;
	margin: 0 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.card-started .profile .social a .fab,
.card-started .profile .social a .fas,
.card-started .profile .social a .ion {
	font-size: 24px;
}

.section-anchor-alias {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.recent-work-timeline {
	margin: 0;
	padding: 0;
	list-style: none;
}

.recent-work-entry {
	position: relative;
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 14px;
	padding-bottom: 22px;
}

.recent-work-entry:not(:last-child)::before {
	content: '';
	position: absolute;
	left: 8px;
	top: 16px;
	bottom: 0;
	width: 2px;
	background: var(--theme-border);
}

.recent-work-marker {
	position: relative;
	width: 18px;
	height: 18px;
	margin-top: 4px;
	background: var(--theme-accent);
	border: 4px solid var(--theme-accent-soft);
	border-radius: 50%;
	z-index: 1;
}

.recent-work-card {
	min-width: 0;
	padding: 18px 20px;
	background: var(--theme-surface-raised);
	border: 1px solid var(--theme-border);
	border-left: 3px solid var(--theme-accent);
	border-radius: 8px;
	box-shadow: 0 8px 22px var(--theme-shadow);
}

.recent-work-entry--half-year .recent-work-marker {
	background: var(--theme-accent-secondary);
	border-color: var(--theme-mauve-soft);
}

.recent-work-entry--half-year .recent-work-card {
	border-left-color: var(--theme-accent-secondary);
}

.recent-work-entry--year .recent-work-marker {
	background: var(--theme-border);
	border-color: var(--theme-mauve-soft);
}

.recent-work-entry--year .recent-work-card {
	background: var(--theme-surface);
	border-left-color: var(--theme-border);
	box-shadow: none;
}

.recent-work-entry__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 5px 16px;
	margin-bottom: 12px;
}

.recent-work-period {
	margin: 0;
	font-size: 19px;
	line-height: 1.35;
	color: var(--theme-text);
}

.recent-work-entry--year .recent-work-period {
	font-size: 17px;
}

.recent-work-kind {
	font-size: 10px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--theme-accent);
}

.recent-work-entry--half-year .recent-work-kind,
.recent-work-entry--year .recent-work-kind {
	color: var(--theme-accent-secondary);
}

.recent-work-points {
	margin: 0;
	padding-left: 18px;
	list-style: disc;
}

.recent-work-points li {
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--theme-text-muted);
}

.recent-work-points li::marker {
	color: var(--theme-accent);
}

.recent-work-entry--year .recent-work-points li::marker {
	color: var(--theme-accent-secondary);
}

.recent-work-points li:last-child {
	margin: 0;
}

.recent-work-links {
	display: flex;
	flex-wrap: wrap;
	gap: 7px 14px;
	margin: 14px 0 0;
	padding: 12px 0 0;
	list-style: none;
	border-top: 1px solid var(--theme-border);
}

.recent-work-links a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 500;
	color: var(--theme-accent-hover);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.recent-work-links a:hover,
.recent-work-links a:focus {
	color: var(--theme-accent);
}

.content.contacts .contact-list ul {
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--theme-surface-raised);
	border: 1px solid var(--theme-border);
	border-radius: 8px;
}

.content.contacts .contact-list ul li {
	display: grid;
	width: 100%;
	grid-template-columns: minmax(128px, 148px) minmax(0, 1fr);
	gap: 24px;
	min-height: 64px;
	margin: 0;
	padding: 16px 20px;
	align-items: center;
	background: var(--theme-surface-raised);
}

.content.contacts .contact-list ul li + li {
	border-top: 1px solid var(--theme-border);
}

.content.contacts .contact-list ul li::before {
	display: none;
}

.new-skin .contact-list ul li strong {
	padding: 0;
	color: var(--theme-accent-hover);
	background: transparent;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.contact-list a {
	justify-self: start;
	word-break: break-word;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 3px solid var(--theme-focus);
	outline-offset: 3px;
}

@media (max-width: 1199px) {
	.project-card--featured {
		padding: 22px;
	}
}

@media (max-width: 560px) {
	body {
		overflow-x: hidden;
	}

	.card-inner .card-wrap {
		padding: 24px 18px;
	}

	.card-started .profile h1.title {
		font-size: 28px;
	}

	.about .info-list ul li,
	.content.contacts .contact-list ul li {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.skills-groups,
	.project-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.content.works .project-filter-menu .project-filter {
		width: auto;
		flex: 1 1 calc(50% - 8px);
	}

	.project-card,
	.project-card--featured {
		padding: 18px;
	}

	.project-card--featured h4 {
		font-size: 21px;
	}

	.project-card--flagship h4,
	.project-card--prominent h4 {
		font-size: 22px;
	}

	.project-actions {
		align-items: stretch;
	}

	.project-action,
	.project-availability {
		flex: 1 1 100%;
	}

	.recent-work-entry {
		grid-template-columns: 18px minmax(0, 1fr);
		gap: 10px;
	}

	.recent-work-entry:not(:last-child)::before {
		left: 7px;
	}

	.recent-work-marker {
		width: 16px;
		height: 16px;
	}

	.recent-work-card {
		padding: 16px;
	}

	.recent-work-entry__header {
		display: block;
	}

	.recent-work-kind {
		display: block;
		margin-top: 3px;
	}

	.project-grid--archive {
		padding: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
