/* Sang's Workshop: theme styles. Colours and type are fixed by the design. */
@font-face {
	font-family: 'Hitchcut';
	src: url('../fonts/Hitchcut-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	--cream: #f4ebdc;
	--ink: #231f20;
	--red: #ee2332;
	--muted: #6b6560;
	--line: #231f20;
	--max: 1848px;
	--gutter: 20px;
	--nav: 'Hitchcut', 'Arial Black', Impact, sans-serif;
	--body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.5;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
button { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

.site { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 0 18px;
	border-bottom: 1px solid rgba(35,31,32,.08);
	margin-bottom: 20px;
}
.brand { display: block; flex: 0 0 auto; margin-left: 10.6%; }
.brand img { width: 320px; max-width: 42vw; height: auto; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2.6em; margin-right: 10.6%; }
.site-nav a {
	font-family: var(--nav);
	font-size: 22px;
	letter-spacing: .02em;
	text-decoration: none;
	color: var(--ink);
	text-transform: lowercase;
	padding: 4px 0;
	border-bottom: 3px solid transparent;
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a, .site-nav .current_page_parent > a { border-bottom-color: var(--red); }
.nav-toggle { display: none; }
.site-nav .menu > li { position: relative; }
.site-nav .sub-menu {
	list-style: none; margin: 0; padding: 10px 0 6px; position: absolute; left: 0; top: 100%; min-width: 150px;
	display: none; flex-direction: column; gap: 4px; background: var(--cream); border-top: 3px solid var(--red); z-index: 20;
	box-shadow: 0 10px 24px rgba(35,31,32,.12);
}
.site-nav .sub-menu a { font-size: 18px; display: block; padding: 6px 16px; border-bottom: 0; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu .current-menu-item > a { color: var(--red); }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }

/* ---------- Home grid ---------- */
.tile-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: calc((min(100vw, var(--max)) - 2 * var(--gutter) - 11 * var(--gutter)) / 12 * .85);
	gap: var(--gutter);
	grid-auto-flow: dense;
}
.tile {
	grid-column: span var(--w, 3);
	grid-row: span var(--h, 2);
	position: relative;
	overflow: hidden;
	background: #ddd;
	text-decoration: none;
}
.tile figure { margin: 0; width: 100%; height: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Mouse-over on any image: dim the image, show the caption (headline / subhead / description). */
.tile figure, .viewer .slide { position: relative; }
.tile figure::after, .viewer .slide::after {
	content: ''; position: absolute; inset: 0; background: rgba(35,31,32,0); transition: background .3s; pointer-events: none;
}
.tile figure figcaption, .viewer .slide figcaption {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px; color: #fff;
	opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.tile figure figcaption .kick, .viewer .slide figcaption .kick { display: block; font-family: var(--nav); font-size: 20px; letter-spacing: .02em; text-transform: lowercase; }
.tile figure figcaption strong, .viewer .slide figcaption strong { display: block; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.tile figure figcaption p, .viewer .slide figcaption p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; max-width: 46ch; }
.tile:hover figure::after, .tile:focus-visible figure::after, .viewer .slide:hover::after { background: rgba(35,31,32,.6); }
.tile:hover figcaption, .tile:focus-visible figcaption, .viewer .slide:hover figcaption { opacity: 1; transform: none; }
/* Strips that play on hover keep the video visible: lighter dim, caption only. */
.mode-all .slide:hover::after { background: rgba(35,31,32,.25); }
.viewer .slide.is-playing::after, .viewer .slide.is-playing figcaption { opacity: 0; background: transparent; }

.empty { padding: 40px 0; color: var(--muted); }

/* ---------- Sub-nav (atrium / plasma / projection) ---------- */
.sub-nav { display: flex; gap: 2em; margin: 0 0 24px 10.6%; }
.sub-nav a { font-family: var(--nav); font-size: 18px; text-decoration: none; color: var(--muted); text-transform: lowercase; }
.sub-nav a[aria-current="page"] { color: var(--ink); border-bottom: 3px solid var(--red); }

/* ---------- Viewer (video + gallery) ---------- */
.viewer { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.stage { width: 100%; display: flex; justify-content: center; }
.slide { margin: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
.slide > video, .slide > img, .slide > .embed { display: block; }
.viewer-plasma .slide, .viewer-layout .slide, .viewer-projection.mode-all .slide { width: auto; max-width: 100%; }
.slide[hidden] { display: none; }
.slide video, .slide img, .slide .embed { max-height: 78vh; width: auto; max-width: 100%; background: #000; }
.slide .embed { position: relative; width: 100%; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.slide .embed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* "All" mode: every item visible. Atrium strips (1848x260) stack full width; projection strips (248x1683) sit side by side. */
.mode-all .stage { flex-direction: column; gap: 20px; }
.mode-all .slide video, .mode-all .slide img { cursor: pointer; }
.viewer-atrium.mode-all .slide video, .viewer-atrium.mode-all .slide img { width: 100%; max-height: none; }
.viewer-projection.mode-all .stage { flex-direction: row; justify-content: center; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.viewer-projection.mode-all .slide { width: auto; }
.viewer-projection.mode-all .slide video, .viewer-projection.mode-all .slide img { height: 80vh; max-height: 900px; width: auto; }
.viewer-plasma .slide video, .viewer-plasma .slide .embed { width: 100%; max-width: 1400px; }
.viewer-layout .slide img { max-height: none; width: 100%; max-width: 1400px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }

.controls { display: flex; align-items: center; gap: 28px; }
.ctl { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; border-radius: 50%; }
.ctl img { width: 44px; height: 44px; }
.ctl.play img { width: 64px; height: 64px; }
.ctl:hover img, .ctl:focus-visible img { filter: brightness(1.25); }
.ctl.play[aria-pressed="true"] img { filter: hue-rotate(140deg) brightness(1.1); }
.ctl:disabled { opacity: .3; cursor: default; }

.thumbs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; max-width: 100%; }
.thumb { background: none; border: 3px solid transparent; padding: 0; cursor: pointer; line-height: 0; }
.thumb img { height: 72px; width: auto; max-width: 240px; object-fit: cover; }
.viewer-projection .thumb img { height: 140px; }
.viewer-layout .thumb img { height: 90px; }
.thumb.is-active, .thumb:hover { border-color: var(--red); }

/* ---------- Resumé ---------- */
.resume { position: relative; max-width: 1100px; margin: 20px auto 0; padding: 20px 0 40px; }
.resume-photo { position: absolute; right: 7%; top: 28px; width: 150px; }
.resume-photo img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 2px solid var(--red); }
.resume-body { max-width: 100%; }
.resume-intro { max-width: 62%; }
.resume-name { font-size: clamp(34px, 4.5vw, 54px); line-height: 1; margin: 0 0 6px; color: var(--red); font-weight: 400; letter-spacing: -.01em; }
.resume-name strong { font-weight: 900; }
.resume-role { letter-spacing: .28em; font-size: 13px; margin: 0 0 22px; }
.resume-columns { margin-top: 40px; gap: 60px !important; position: relative; }
.resume-columns::before { content: ''; position: absolute; top: -40px; bottom: 0; left: calc(62% + 22px); width: 2px; background: var(--line); }
.resume h2 { color: var(--red); font-size: 20px; letter-spacing: .18em; font-weight: 700; margin: 36px 0 18px; }
.resume h2:first-child { margin-top: 0; }
.resume .job { display: flex; gap: 20px; margin: 22px 0 8px; line-height: 1.35; }
.resume .job .years { color: var(--muted); border-right: 1px solid var(--ink); padding-right: 14px; min-width: 56px; }
.resume ul { padding-left: 18px; margin: 0 0 8px; }
.resume li { margin: 0 0 4px; }
.resume ul.skills { list-style: none; padding: 0; }
.resume ul.skills li { padding: 10px 0 14px; position: relative; }
.resume ul.skills li::after { content: ''; position: absolute; left: 0; bottom: 6px; width: 100%; height: 3px; background: linear-gradient(90deg, var(--red) 70%, rgba(238,35,50,.3) 70%); }
.resume p { margin: 0 0 10px; }
.resume .contact-strip { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(35,31,32,.15); }

/* ---------- Resumé download ---------- */
.resume-download { margin: 36px 0 0; }
.resume-download .button {
	display: inline-block; font-family: var(--nav); font-size: 16px; letter-spacing: .04em; text-decoration: none; text-transform: lowercase;
	color: #fff; background: var(--red); padding: 12px 22px; border-radius: 999px;
}
.resume-download .button:hover { background: var(--ink); }

/* ---------- Contact ---------- */
.contact { max-width: 1100px; margin: 60px auto; }
.contact-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 32px 60px; }
.contact-strip li { display: grid; grid-template-columns: 26px auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; font-size: 15px; letter-spacing: .06em; }
.contact-strip img { grid-row: 1 / 3; width: 26px; height: 30px; }
.contact-strip .label { font-size: 12px; color: var(--muted); }
.contact-strip a { text-decoration: none; }
.contact-strip a:hover { color: var(--red); }
.contact-extra { margin-top: 40px; max-width: 700px; }

/* ---------- Generic page ---------- */
.page-content { max-width: 800px; margin: 20px auto 60px; }
.page-title { font-family: var(--nav); font-weight: 400; font-size: 32px; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 24px; font-size: 12px; color: var(--muted); text-align: center; }

@media (hover: none) {
	.tile figure figcaption, .viewer .slide figcaption { opacity: 1; transform: none; padding: 10px 12px; background: linear-gradient(transparent, rgba(35,31,32,.7)); }
	.tile figure figcaption strong, .tile figure figcaption p, .viewer .slide figcaption p { display: none; }
	.site-nav .sub-menu { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.brand, .site-nav .menu, .sub-nav { margin-left: 0; margin-right: 0; }
	.site-nav .menu { gap: 1.6em; }
	.site-nav a { font-size: 18px; }
}
@media (max-width: 900px) {
	.tile-grid { grid-auto-rows: auto; grid-template-columns: repeat(2, 1fr); }
	.tile { grid-column: span 1 !important; grid-row: auto !important; aspect-ratio: 4 / 3; }
	.tile[style*="--w:12"] { grid-column: span 2 !important; aspect-ratio: 7 / 1; }
	.resume-intro { max-width: 100%; padding-right: 0; }
	.resume-photo { position: static; width: 120px; margin-bottom: 20px; }
	.resume-photo img { width: 120px; height: 120px; }
	.resume-columns::before { display: none; }
	.resume-columns { gap: 30px !important; }
}
@media (max-width: 700px) {
	.site-header { flex-wrap: wrap; }
	.brand img { width: 220px; max-width: 60vw; }
	.nav-toggle {
		display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer;
	}
	.nav-toggle span { width: 26px; height: 3px; background: var(--ink); display: block; }
	.site-nav { display: none; width: 100%; }
	.site-nav.is-open { display: block; }
	.site-nav .menu { flex-direction: column; gap: .6em; padding: 10px 0 4px; }
	.site-nav .sub-menu { display: flex !important; position: static; box-shadow: none; border-top: 0; padding: 2px 0 0 18px; background: none; }
	.resume-columns.wp-block-columns { flex-direction: column; }
	.resume-columns .wp-block-column { flex-basis: 100% !important; }
	.thumb img { height: 56px; }
	.viewer-projection.mode-all .stage { gap: 10px; }
	.viewer-projection.mode-all .slide video, .viewer-projection.mode-all .slide img { height: 60vh; }
	.viewer-projection .thumb img { height: 100px; }
}
