/*
Theme Name: Ylva Katarina Lindh — Portfolio 07
Theme URI: https://ylvakatarina.com/
Author: Ylva Katarina Lindh
Description: Redigerbart ensides-portfoliotema för konstnären och keramikern Ylva Katarina Lindh.
Version: 7.2.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: ylva-katarina-lindh
*/

:root {
	--yk-background: #fff;
	--yk-text: #161615;
	--yk-muted: #6d6a63;
	--yk-accent: #b89527;
	--yk-panel: #f4f3ef;
	--header-height: 78px;
	--page-padding: clamp(20px, 3vw, 52px);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--yk-background); }
body {
	margin: 0;
	background: var(--yk-background);
	color: var(--yk-text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.42;
	-webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, a { color: inherit; }
button { font: inherit; }
img, video { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin-top: 0; }
a { text-decoration-thickness: 1px; text-underline-offset: .22em; }

.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 300;
	padding: 10px 14px;
	background: var(--yk-text);
	color: var(--yk-background);
	transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: var(--header-height);
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 28px;
	padding: 22px var(--page-padding) 0;
	pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-name {
	grid-column: 2;
	grid-row: 1;
	font-size: clamp(.72rem, .85vw, .88rem);
	line-height: 1;
	font-weight: 700;
	letter-spacing: .09em;
	text-decoration: none;
	white-space: nowrap;
	text-transform: uppercase;
}
.menu-toggle {
	display: none;
	grid-column: 1;
	grid-row: 1;
	justify-self: start;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}
.site-navigation {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	gap: clamp(16px, 2vw, 34px);
	align-items: center;
	font-size: clamp(.72rem, .85vw, .88rem);
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .07em;
}
.site-navigation a { text-decoration: none; }
.site-navigation a:hover, .site-navigation a:focus-visible, .site-name:hover, .site-name:focus-visible { opacity: .48; }

.intro-section {
	min-height: 100svh;
	display: grid;
	place-items: center;
	padding: calc(var(--header-height) + 32px) var(--page-padding) 40px;
}
.intro-video {
	width: min(40.25vw, 644px);
	max-height: 68svh;
	object-fit: contain;
	background: #f3f2ee;
}

.works { overflow: clip; }
.work-section {
	min-height: 100svh;
	display: grid;
	place-items: center;
	padding: calc(var(--header-height) + 44px) var(--page-padding) 68px;
	transition: opacity .75s var(--ease), filter .75s var(--ease);
}
.js .work-section:not(.is-spotlight) { opacity: .34; filter: saturate(.42); }
.js .work-section.is-spotlight { opacity: 1; filter: saturate(1); }
.work-section--degree, .work-section--floor { min-height: 100svh; }
.work-inner { width: min(76vw, 980px); margin-inline: auto; }
.work-inner--wide { width: min(84vw, 1180px); }
.work-inner--portrait { width: min(42vw, 560px); }
.work-inner--medium { width: min(58vw, 820px); }
.work-inner--medium-wide { width: min(74vw, 1060px); }
.work-inner--paired-vertical { width: min(38vw, 520px); }
.work-inner--about { width: min(68vw, 920px); }
.work-inner--object { width: min(92vw, 1410px); }
.work-inner--small { width: min(34vw, 480px); }
.work-inner--functional { width: min(34vw, 480px); }
.work-inner--video { width: min(72vw, 1120px); }
.work-card {
	display: block;
	width: 100%;
	border: 0;
	padding: 0;
	background: transparent;
	text-align: inherit;
	cursor: pointer;
}
.work-card:focus-visible { outline: 2px solid var(--yk-accent); outline-offset: 10px; }
.work-figure, .about-figure { margin: 0; }
.work-image, .work-video {
	width: 100%;
	height: auto;
	object-fit: contain;
}
.work-image--hero { width: 100%; }
.detail-pair {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(12px, 1.5vw, 24px);
	margin: clamp(12px, 1.5vw, 24px) auto 0;
	align-items: start;
}
.detail-pair img { width: 100%; height: auto; object-fit: contain; }
.work-image--floor {
	width: min(76%, 900px);
	margin-inline: auto;
}
.detail-pair--floor { width: min(76%, 900px); }
.work-image--floor-installation {
	width: min(76%, 900px);
	margin: clamp(28px, 5vw, 72px) auto 0;
}
.work-inner--paired-vertical .work-figure { display: grid; gap: clamp(34px, 7vh, 90px); }
.work-inner--paired-vertical .work-image { max-height: 74svh; }
.work-image--object { max-height: 70svh; object-fit: contain; }
.additional-work-copy {
	width: min(100%, 760px);
	margin: 28px auto 0;
	text-align: left;
}
.additional-work-copy > :first-child { margin-top: 0; }
.additional-work-copy > :last-child { margin-bottom: 0; }
.additional-work-copy img,
.additional-work-copy video { display: block; max-width: 100%; height: auto; }
.work-caption {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.3fr);
	gap: clamp(24px, 5vw, 86px);
	align-items: start;
	padding-top: 18px;
	text-align: left;
}
.work-caption h2 {
	margin: 0;
	font-size: clamp(1rem, 1.35vw, 1.32rem);
	line-height: 1.12;
	font-weight: 700;
}
.work-caption p {
	margin: 0;
	max-width: 48ch;
	font-size: clamp(.86rem, 1vw, 1rem);
}
.work-caption--title {
	display: block;
	padding-top: 14px;
	text-align: left;
}
.work-caption--title h2 {
	max-width: 48ch;
	margin-inline: 0;
	font-size: clamp(.96rem, 1.25vw, 1.22rem);
	font-weight: 700;
}
.work-section--floor .work-caption--title {
	width: min(76%, 900px);
	margin-inline: auto;
}
.work-video-meta {
	margin: 7px auto 0 !important;
	font-size: .78rem !important;
	color: var(--yk-muted);
}

.about-image { max-height: 70svh; }
.about-copy {
	width: min(100%, 780px);
	margin: 26px auto 0;
	font-size: clamp(.92rem, 1.15vw, 1.08rem);
	line-height: 1.5;
	text-align: center;
}
.about-copy p { margin: 0; }
.about-copy p + p { margin-top: 18px; }
.about-detail-grid {
	width: min(68%, 760px);
	display: block;
	margin: clamp(28px, 5vw, 72px) auto 0;
}
.about-detail-grid img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	margin-inline: auto;
}
.work-video { max-height: 72svh; background: #f3f2ee; }

.text-section {
	min-height: 100svh;
	display: grid;
	grid-template-columns: minmax(100px, .55fr) minmax(0, 2.45fr);
	gap: clamp(34px, 8vw, 140px);
	align-content: start;
	padding: calc(var(--header-height) + 70px) var(--page-padding) 100px;
}
.section-kicker {
	position: sticky;
	top: calc(var(--header-height) + 28px);
	align-self: start;
	margin: 0;
	font-size: .78rem;
	line-height: 1;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.section-copy { max-width: 1050px; }
.cv-list { display: grid; grid-template-columns: 1fr; gap: 52px; max-width: 760px; }
.cv-group h3 { margin: 0 0 12px; font-size: .78rem; line-height: 1.2; text-transform: uppercase; letter-spacing: .07em; }
.cv-group p { margin: 0; font-size: clamp(.85rem, 1vw, .98rem); }
.pre-line { white-space: pre-line; }
.contact-section { min-height: 72svh; }
.contact-section .section-copy > h2 { margin-bottom: 40px; }
.contact-section p { margin-bottom: 18px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px 28px; font-size: clamp(1.15rem, 2vw, 2rem); }

.site-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 30px;
	padding: 30px var(--page-padding) 38px;
	font-size: .78rem;
}
.site-footer p { margin: 0; }

.work-modal {
	position: fixed;
	inset: 0;
	z-index: 220;
	padding: 14px;
	background: rgba(255, 255, 255, .97);
	opacity: 0;
	transition: opacity .22s ease;
}
.work-modal.is-open { opacity: 1; }
.work-modal[hidden] { display: none; }
.work-modal__surface { height: 100%; display: grid; grid-template-rows: auto 1fr; }
.work-modal__header { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 6px 8px 14px; }
.work-modal__artist { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.modal-close, .modal-navigation button {
	border: 0;
	padding: 5px;
	background: transparent;
	cursor: pointer;
}
.modal-close { display: flex; gap: 10px; align-items: center; }
.work-modal__body {
	min-height: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 31vw);
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 18px 30px;
}
.modal-stage {
	grid-row: 1 / 3;
	min-height: 0;
	display: grid;
	place-items: center;
	background: var(--yk-panel);
	overflow: hidden;
}
.modal-image { max-width: 100%; max-height: calc(100svh - 86px); width: auto; height: auto; object-fit: contain; transition: opacity .14s ease; }
.modal-image.is-changing { opacity: .15; }
.modal-navigation { align-self: end; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: .78rem; }
.modal-counter { margin: 0; }
.modal-information {
	align-self: stretch;
	min-height: 0;
	overflow-y: auto;
	padding-right: 8px;
}
.modal-information h2 { margin: 0 0 18px; font-size: clamp(1.7rem, 2.8vw, 3.35rem); line-height: .95; font-weight: 700; }
.modal-information p { margin: 0; max-width: 48ch; font-size: .9rem; }
.modal-meta {
	white-space: pre-line;
	line-height: 1.45;
	font-weight: 700;
}
.modal-description {
	margin-top: 24px !important;
	white-space: pre-line;
	line-height: 1.52;
}

@media (hover: hover) {
	.work-card .work-image { transition: transform .65s var(--ease); }
	.work-card:hover .work-image { transform: scale(.992); }
}

@media (max-width: 760px) {
	:root { --header-height: 64px; --page-padding: 18px; }
	.site-header { padding-top: 18px; align-items: start; }
	.site-name { font-size: .68rem; }
	.menu-toggle { display: none; align-items: center; gap: 9px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
	.js .menu-toggle { display: flex; }
	.menu-toggle-mark { position: relative; width: 12px; height: 12px; }
	.menu-toggle-mark::before, .menu-toggle-mark::after { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 1px; background: currentColor; transition: transform .2s ease; }
	.menu-toggle-mark::after { transform: rotate(90deg); }
	.menu-toggle[aria-expanded="true"] .menu-toggle-mark::after { transform: rotate(0); }
	.site-navigation {
		position: fixed;
		top: 52px;
		left: 12px;
		display: flex;
		min-width: 150px;
		padding: 16px;
		background: rgba(255,255,255,.98);
		box-shadow: 0 8px 30px rgba(0,0,0,.08);
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
	.js .site-navigation { display: none; }
	.js .site-navigation.is-open { display: flex; }
	.intro-video { width: min(85vw, 506px); max-height: 64svh; }
	.work-section { min-height: 100svh; padding: calc(var(--header-height) + 28px) var(--page-padding) 46px; }
	.work-section--degree, .work-section--floor { min-height: auto; padding-block: calc(var(--header-height) + 36px) 72px; }
	.work-inner, .work-inner--wide, .work-inner--portrait, .work-inner--medium, .work-inner--medium-wide, .work-inner--paired-vertical, .work-inner--about, .work-inner--object, .work-inner--small, .work-inner--functional, .work-inner--video { width: 100%; }
	.work-inner--portrait, .work-inner--paired-vertical, .work-inner--small, .work-inner--functional { max-width: 430px; }
	.detail-pair { width: min(100%, 560px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.work-image--floor, .detail-pair--floor, .work-image--floor-installation { width: 100%; }
	.work-section--floor .work-caption--title { width: 100%; }
	.work-caption { grid-template-columns: 1fr; gap: 10px; padding-top: 14px; }
	.work-caption p { max-width: none; }
	.work-inner--paired-vertical .work-figure { gap: 38px; }
	.about-copy { margin-top: 20px; font-size: .92rem; text-align: left; }
	.about-detail-grid { width: 100%; }
	.text-section { min-height: auto; grid-template-columns: 1fr; gap: 30px; padding: calc(var(--header-height) + 38px) var(--page-padding) 86px; }
	.section-kicker { position: static; font-size: .78rem; }
	.cv-list { grid-template-columns: 1fr; gap: 42px; }
	.contact-section { min-height: 70svh; }
	.site-footer { align-items: flex-end; }
	.work-modal { padding: 8px; }
	.work-modal__header { padding-inline: 4px; }
	.work-modal__body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto auto; gap: 10px; }
	.modal-stage { grid-row: auto; min-height: 46svh; }
	.modal-image { max-height: 52svh; }
	.modal-navigation { grid-row: 2; }
	.modal-information { grid-row: 3; max-height: 34svh; padding: 4px 2px 10px; }
	.modal-information h2 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.js .work-section { opacity: 1; filter: none; }
}
