/*
Theme Name: Svizzera
Author: Mario Blum
Author URI: https://marioblum.com
Description: Schlankes Custom Theme für die Portfolio-Website. Schweizer Typografie, Projektliste als Akkordeon, optionale Case Studies.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: svizzera
*/

/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */

:root {
	--font-size-base: clamp(25.5px, 23.68px + 0.4854vw, 33px);
	--line-height: 1.333;
	--font: acumin-pro, "Acumin Pro", sans-serif;

	--color-text: #111;
	--color-bg: #ffffff;
	/*--color-bg: #fdfdf3;*/
	--container: 1320px;
	--gutter: clamp(1.25rem, 4vw, 2.75rem);
	--section-gap: clamp(4rem, 9vw, 7rem);
	--panel-pad: 1.6em;
	--panel-pad-top: calc(var(--panel-pad) * 0.85);

	/*
	 * Seitenraster:
	 * Jahr 8% | Titel 34.2% | Rolle 23% | Kategorie 34.8% (rechtsbündig).
	 * Intro, Profiltext, Skills und Footer sitzen auf denselben Kanten.
	 */
	--grid-cols: 8% 34.2% 23% 34.8%;
	--grid-start-text: 42.2%;
}

/* -------------------------------------------------------------------------
   Reset / Basis
   ------------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: var(--font-size-base);
	font-weight: 400;
	line-height: var(--line-height);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

img,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-align: left;
}

ul,
ol,
p,
h1,
h2,
h3,
figure {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
}

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 100;
	background: var(--color-bg);
	padding: 0.25em 0.5em;
}

.skip-link:focus {
	top: 0.5em;
}

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */

.site {
	width: min(var(--container), calc(100% - 2 * var(--gutter)));
	margin-inline: auto;
	padding-block: clamp(1.4rem, 3.5vw, 2.4rem) clamp(2.5rem, 7vw, 5rem);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-main {
	flex: 1;
}

.layout-split,
.page-grid {
	display: grid;
	grid-template-columns: var(--grid-cols);
	align-items: start;
}

.page-grid > .site-logo,
.page-grid > .profil__left,
.page-grid > .site-footer__connect,
.page-grid > .legal__aside {
	grid-column: 1 / 3;
}

.page-grid > .site-header__aside,
.page-grid > .profil__text,
.page-grid > .legal__main {
	grid-column: 3 / -1;
}

.site-footer__contact {
	grid-column: 3;
}

.site-footer__legal {
	grid-column: 4;
}

.section {
	margin-top: var(--section-gap);
}

/* Fließtext außerhalb der Projektliste */
.site-header__aside,
.profil__text,
.skills,
.case-study__headline,
.case-study__intro,
.case-study-block--text,
.page-plain,
.legal__content {
	hyphens: auto;
	-webkit-hyphens: auto;
	hyphenate-limit-chars: 10 5 4;
	-webkit-hyphenate-limit-before: 5;
	-webkit-hyphenate-limit-after: 4;
	hyphenate-limit-zone: 15%;
	hyphenate-limit-lines: 1;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.site-header {
	margin-bottom: var(--section-gap);
}

.site-logo {
	text-decoration: none;
}

.site-logo:hover {
	text-decoration: none;
}

.site-header__aside p + p {
	margin-top: 1em;
}

.legal-header-title {
	margin: 0;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.header-projekt__meta {
	margin-bottom: 1em;
}

/* -------------------------------------------------------------------------
   Projektliste / Akkordeon
   ------------------------------------------------------------------------- */

.projekt-liste {
	background: var(--color-bg);
}

.projekt-liste__title {
	margin: -2em 0 0.75em;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

@media (max-width: 720px) {
	.projekt-liste__title {
		margin: 0em 0 0.75em  !important

	}
}

.projekt-liste__title {
	margin: -2em 0 0.75em;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.projekt-item {
	position: relative;
	z-index: 1;
	border-bottom: 1px solid currentColor;
	transition: box-shadow 0.15s ease;
	overflow: visible;
	background: var(--color-bg);
}

.projekt-item:first-of-type {
	border-top: 1px solid currentColor;
}

/* Offenes Panel darf in den Seitenrand ragen; folgende Zeilen liegen darüber und decken vertikales Überlaufen ab. */
.projekt-item.is-open {
	z-index: 0;
}

.projekt-item__row,
.projekt-item__panel {
	display: grid;
	grid-template-columns: var(--grid-cols);
	width: 100%;
	align-items: baseline;
	background: var(--color-bg);
}

.projekt-item__row {
	padding-block: 0.08em;
	cursor: pointer;
	transition: box-shadow 0.15s ease;
}

.projekt-item__row > * {
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.projekt-item__row > *::-webkit-scrollbar {
	display: none;
}

.projekt-item:hover > .projekt-item__scroll > .projekt-item__row {
	box-shadow: inset 0 0.75px 0 currentColor;
}

.projekt-item:hover + .projekt-item > .projekt-item__scroll > .projekt-item__row {
	box-shadow: inset 0 0.75px 0 currentColor;
}

.projekt-item__kat {
	text-align: right;
}

.projekt-item__panel {
	overflow: hidden;
	height: 0;
	transition: height 0.35s ease;
	pointer-events: none;
	align-items: stretch;
}

.projekt-item.is-open .projekt-item__panel {
	pointer-events: auto;
	overflow: hidden;
}

.projekt-item__panel-spacer {
	grid-column: 1;
}

.projekt-item__meta {
	grid-column: 2;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1em;
	padding-top: var(--panel-pad-top);
	padding-bottom: var(--panel-pad);
}

.projekt-item__panel--text .projekt-item__meta {
	grid-column: 2 / -1;
}

.projekt-item__media {
	grid-column: 3 / -1;
	padding-top: var(--panel-pad-top);
	padding-bottom: var(--panel-pad);
	min-width: 0;
	overflow: hidden;
}

.projekt-item__media > video {
	width: 100%;
	aspect-ratio: 16 / 10;

	background: #111;
	border: 50px solid currentColor;
	padding-left: 100px;
	padding-right: 100px;
	box-sizing: border-box;
}

.projekt-item.has-media-shadow .projekt-item__media {
	padding-inline: 0.05em;
}

.projekt-item.has-media-shadow .projekt-item__media > video {
	box-shadow: 0 0 0.75em rgba(0, 0, 0, 0.28);

}

.projekt-item.has-media-frame .projekt-item__media > video {
	border-radius: 20px;
	border: 1px solid currentColor;

}

.meta-block + .meta-block {
	margin-top: 1em;
}

.projekt-item__meta-copy > .meta-block:first-child {
	margin-top: calc((var(--line-height) - 1) * -0.5em - 0.08em);
}

@supports (text-box-trim: trim-start) {
	.projekt-item__meta-copy > .meta-block:first-child {
		margin-top: 0;
		text-box-trim: trim-start;
		text-box-edge: cap alphabetic;
	}
}

.meta-block__label {
	display: block;
}

.meta-block__credit + .meta-block__credit {
	margin-top: 0;
}

.meta-block__links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	margin-top: auto;
}

.meta-block__links a {
	text-decoration: none;
}

.meta-block__links a:hover {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.link-arrow {
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-left: 2px;
	vertical-align: super;
	overflow: visible;
	stroke: currentColor;
	stroke-width: 2px;
	stroke-linecap: square;
	stroke-linejoin: miter;
	vector-effect: non-scaling-stroke;
}

/* -------------------------------------------------------------------------
   Profil / Skills
   ------------------------------------------------------------------------- */

.profil.page-grid {
	align-items: stretch;
}

.profil__left {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1.35em;
	height: 100%;
}
/*
.profil__photo {
	display: block;
	width: 6.4em;
	height: 6.4em;
	margin-bottom: 0.2em;
	border-radius: 50%;
	object-fit: cover;
	object-position: top center;
}
*/

.profil__photo {
	display: block;
	width: 6.4em;
	height: 9em;
	margin-bottom: 0.5em;
	border-radius: 15px 90px;
	object-fit: cover;
	object-position: top center;
	filter: grayscale(0.1);
}

.profil__text p + p {
	margin-top: 1em;
}

.skills {
	display: grid;
	grid-template-columns: var(--grid-start-text) 1fr 1fr;
	align-items: start;
	margin-top: var(--section-gap);
	column-gap: 0;
}

.skills > :nth-child(2) {
	padding-right: 1.25em;
}

.skills > :nth-child(3) {
	padding-left: 1.25em;
}

/* Dritte Spalte hängt am rechten Rand, Überschrift und Liste bleiben zusammen. */
.skills__end .skills__inner {
	width: max-content;
	max-width: 100%;
	margin-left: auto;
	text-align: left;
}

.skills__label {
	margin-bottom: 0.75em;
}

.stack-list {
	list-style: none;
}

/* -------------------------------------------------------------------------
   Case Study
   ------------------------------------------------------------------------- */

.case-study__cover {
	margin-top: clamp(2.5rem, 6vw, 4rem);
}

.case-study__cover img {
	width: 100%;
}

.case-study__headline {
	margin-top: var(--section-gap);
	margin-left: var(--grid-start-text);
	font-weight: 700;
}

.case-study__headline p {
	margin: 0;
}

.case-study__headline em,
.case-study__headline i {
	font-style: italic;
	font-weight: 700;
}

.case-study__intro {
	margin-top: 1em;
	margin-left: var(--grid-start-text);
}

.case-study__intro p + p {
	margin-top: 1em;
}

.case-study-block {
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.case-study-block--text {
	margin-left: var(--grid-start-text);
}

.case-study-block--text p + p {
	margin-top: 1em;
}

.case-study-block--media img,
.case-study-block--media video {
	width: 100%;
}

/* -------------------------------------------------------------------------
   Video
   ------------------------------------------------------------------------- */

.svz-video {
	background: #111;
}

/* -------------------------------------------------------------------------
   Bildvorschau / Diashow
   ------------------------------------------------------------------------- */

.svz-media-shell,
.svz-slideshow {
	position: relative;
	width: 100%;
}

.projekt-item.has-media-shadow .svz-media-shell > .svz-preview,
.projekt-item.has-media-shadow .svz-slideshow > .svz-slideshow__frame {
	box-shadow: 0em 0.1em 0.55em rgb(0, 0, 0, 0.2);
	width:calc(100% - 10px) !important;


}

.projekt-item.has-media-frame .svz-preview,
.projekt-item.has-media-frame .svz-slideshow__frame {
	border-radius: 25px;
	border: 5px solid #9a9a9a;

	
}

.svz-preview,
.svz-slideshow__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;

}

.svz-preview[data-kind="image"] > img,
.svz-slideshow__slide[data-kind="image"] img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 20px;
}

.svz-preview__scroll,
.svz-slideshow__scroll {
	width: 100%;
	height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	/* Firefox: scrollbar-width kennt kein px – native ausblenden, 2px-Rail via JS */
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.svz-preview__scroll::-webkit-scrollbar,
.svz-slideshow__scroll::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

/* Custom 2px Scrollbar (Chrome + Firefox) – aktuell ausgeblendet */
.svz-scroll-host {
	position: relative;
}

.svz-scrollrail {
	display: none;
}

.svz-preview__scroll img,
.svz-slideshow__scroll img {
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: top center;
}

.svz-slideshow__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.svz-slideshow__slide.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

.svz-media-count {
	position: absolute;
	z-index: 4;
	font-size: 0.4em;
	line-height: 1;
	letter-spacing: 0.02em;
	color: currentColor;
	white-space: nowrap;
	user-select: none;
	pointer-events: none;
}

.svz-media-count[hidden] {
	display: none;
}

/* Cursor: gleiches →-SVG wie Links, links gespiegelt */
.svz-slideshow--multi .svz-slideshow__frame.is-prev {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M11 6H1M4 3L1 6l3 3' stroke='%23111' stroke-width='1' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") 12 12, w-resize;
}

.svz-slideshow--multi .svz-slideshow__frame.is-next {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M1 6h10M8 3l3 3-3 3' stroke='%23111' stroke-width='1' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E") 12 12, e-resize;
}

@media (prefers-reduced-motion: reduce) {
	.svz-slideshow__slide {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.site-footer {
	margin-top: var(--section-gap);
}

.site-footer__contact {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.site-footer__legal {
	text-align: right;
}

.site-footer__legal a {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
}

.site-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

/* -------------------------------------------------------------------------
   Statische Seiten / Legal
   ------------------------------------------------------------------------- */

.page-plain {
	margin-left: var(--grid-start-text);
	max-width: 36em;
}

.page-plain__title {
	margin: 0 0 0.75em;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.page-plain__content > *:first-child {
	margin-top: 0;
}

.page-plain h2,
.page-plain h3 {
	margin: 1.5em 0 0.4em;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.page-plain p,
.page-plain ul,
.page-plain ol {
	margin: 0;
}

.page-plain p + p,
.page-plain p + ul,
.page-plain p + ol,
.page-plain ul + p,
.page-plain ol + p {
	margin-top: 1em;
}

.page-plain ul,
.page-plain ol {
	padding-left: 1.1em;
}

.page-plain a:hover {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.legal__heading {
	margin: 0;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.legal__content > *:first-child {
	margin-top: 0;
}

.legal__content h3 {
	margin: 1.35em 0 0.35em;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.legal__content p,
.legal__content ul,
.legal__content ol {
	margin: 0;
}

.legal__content p + p,
.legal__content p + ul,
.legal__content p + ol,
.legal__content ul + p,
.legal__content ol + p {
	margin-top: 0.85em;
}

.legal__content h3 + p {
	margin-top: 0.35em;
}

.legal__content ul,
.legal__content ol {
	padding-left: 1.1em;
}

.legal__content a:hover,
.legal a:hover {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.legal__content strong {
	font-weight: 400;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	:root {
		--font-size-base: clamp(23px, 21.3px + 0.437vw, 28px);
	}

	.projekt-item__panel {
		grid-template-columns: 1fr;
	}

	.projekt-item__panel-spacer {
		display: none;
	}

	.projekt-item__meta,
	.projekt-item__media,
	.projekt-item__panel--text .projekt-item__meta {
		grid-column: 1;
	}

	.projekt-item__media {
		order: -1;
		padding-bottom: 0;
	}

	.projekt-item__meta {
		padding-top: var(--panel-pad-top);
	}
}

@media (max-width: 1023px) and (min-width: 768px) {
	.projekt-item__row {
		grid-template-columns: 8% 34.2% 57.8%;
	}

	.projekt-item__kat {
		display: none;
	}

	.skills {
		grid-template-columns: var(--grid-start-text) 1fr;
		row-gap: 1.25em;
	}

	.skills > :first-child {
		grid-column: auto;
	}

	.skills > :nth-child(2) {
		padding-right: 0;
	}

	.skills > :nth-child(3) {
		grid-column: 2;
		padding-left: 0;
	}

	.skills__end .skills__inner {
		margin-left: 0;
	}
}

@media (max-width: 767px) {
	.skills {
		grid-template-columns: 1fr;
		row-gap: 1.25em;
	}

	.skills > :first-child {
		grid-column: auto;
	}

	.skills > :nth-child(2),
	.skills > :nth-child(3) {
		padding-left: 0;
		padding-right: 0;
	}

	.skills__end .skills__inner {
		margin-left: 0;
	}
}

@media (max-width: 720px) {
	.page-grid,
	.layout-split {
		grid-template-columns: 1fr;
		row-gap: 1.25em;
	}

	.page-grid > .site-logo,
	.page-grid > .profil__left,
	.page-grid > .site-footer__connect,
	.page-grid > .site-header__aside,
	.page-grid > .profil__text,
	.page-grid > .legal__aside,
	.page-grid > .legal__main,
	.site-footer__contact,
	.site-footer__legal {
		grid-column: 1;
	}

	.site-footer__legal {
		text-align: left;
	}

	.site-footer__legal a {
		align-items: flex-start;
	}

	.case-study__headline,
	.case-study__intro,
	.case-study-block--text,
	.page-plain {
		margin-left: 0;
	}

	.legal__block .legal__aside {
		margin-bottom: 0.35em;
	}

	.projekt-item__scroll {
		overflow-x: visible;
	}

	.projekt-item__row {
		min-width: 0;
		grid-template-columns: 4.4rem minmax(0, 1fr);
		grid-template-areas:
			"jahr titel"
			"jahr rolle"
			"jahr kat";
		row-gap: 0;
		padding-block: 0.08em 5px;
	}

	.projekt-item__jahr {
		grid-area: jahr;
	}

	.projekt-item__titel {
		grid-area: titel;
	}

	.projekt-item__rolle {
		grid-area: rolle;
	}

	.projekt-item__kat {
		grid-area: kat;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.projekt-item__panel {
		transition: none;
	}

	.svz-slideshow__slide {
		transition: none;
	}
}
