/* V/O Portfolio. Tokens (colors, type, spacing) are defined in theme.json. */

:root {
	--vo-line: rgba(41, 43, 42, 0.16);
	--vo-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

html { scroll-padding-top: 5.5rem; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.vo-modal-open { overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks > * { margin-block-start: 0; }
:focus-visible { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 3px; }
a { text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--wp--preset--color--accent); }
a:hover { text-decoration-thickness: 2px; }

.vo-muted, .vo-org, .vo-dates { color: var(--wp--preset--color--muted); }
.vo-small { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin: 0; }
.vo-dates:empty, .vo-org:empty, .vo-card__type:empty, .wp-block-post-excerpt__excerpt:empty { display: none; }

/* ---------- Header / navigation ---------- */
.vo-site-header {
	position: sticky; top: 0; z-index: 30;
	margin-inline: calc(-1 * var(--wp--style--root--padding-left, 0px));
	padding-inline: var(--wp--style--root--padding-left, 0px);
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--vo-line);
}
@supports (backdrop-filter: blur(8px)) {
	.vo-site-header { background: rgba(246, 243, 235, 0.84); backdrop-filter: blur(8px); }
}
.admin-bar .vo-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .vo-site-header { top: 46px; } }
.vo-header__inner { max-width: var(--wp--style--global--wide-size, 1280px); margin-inline: auto; padding-block: 1rem; }
.vo-wordmark { margin: 0; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.vo-wordmark a { text-decoration: none; }
.vo-wordmark a::after { content: "°"; content: "°" / ""; color: var(--wp--preset--color--accent); margin-left: 0.05em; }
.vo-nav { font-size: 0.95rem; letter-spacing: 0.02em; gap: 1.75rem; }
.vo-nav .wp-block-navigation-item__content { text-decoration: none; padding-block: 0.25rem; border-bottom: 1px solid transparent; }
.vo-nav .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--accent); }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }

/* ---------- Sections ---------- */
.vo-section { padding-block: var(--wp--preset--spacing--70); }
.vo-section + .vo-section { border-top: 1px solid var(--vo-line); }
.vo-section > h2 { margin: 0 0 var(--wp--preset--spacing--50); }
.vo-hero { padding-top: var(--wp--preset--spacing--60); }

.vo-kicker { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin: 0 0 1.25rem; }
.vo-h1 { font-size: clamp(2.75rem, 7vw, 6rem); line-height: 1.04; margin: 0 0 1.75rem; }
.vo-intro { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.5; max-width: 36rem; }
.vo-about { color: var(--wp--preset--color--muted); max-width: 36rem; }
.vo-hero__cols { align-items: center; gap: clamp(2rem, 6vw, 6rem); margin: 0; }
.vo-portfolio-placeholder, .vo-portrait { margin: 0 auto; max-width: 440px; }
.vo-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; }
@media (max-width: 781px) {
	.vo-hero__cols > .wp-block-column:last-child { order: -1; }
	.vo-portrait { max-width: min(70vw, 300px); }
}

/* ---------- Buttons ---------- */
.wp-block-button__link {
	border: 1px solid var(--wp--preset--color--contrast); border-radius: 999px;
	background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base);
	padding: 0.8rem 1.6rem; font-size: 0.95rem; letter-spacing: 0.02em; text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}
.wp-block-button__link:hover { background: transparent; color: var(--wp--preset--color--contrast); }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--contrast); }
.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }

/* ---------- Experience / Education rows ---------- */
.vo-rows .wp-block-post-template { list-style: none; margin: 0; padding: 0; gap: 0; }
.vo-rows .wp-block-post { margin: 0; padding-block: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--vo-line); }
.vo-rows .wp-block-post:last-child { border-bottom: 1px solid var(--vo-line); }
.vo-rows .vo-row { margin: 0; gap: clamp(1rem, 4vw, 3rem); }
.vo-dates { font-size: 0.95rem; font-variant-numeric: tabular-nums; margin: 0.35rem 0 0; }
.vo-row__title { margin: 0; font-size: 1.5rem; }
.vo-org { margin: 0.15rem 0 0; }
.vo-row__desc { max-width: 40rem; margin-top: 0.75rem; }
.vo-row__desc > * + * { margin-top: 0.75rem; }
.vo-row__desc:empty { display: none; }

/* ---------- Selected work grid ---------- */
.vo-work .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.vo-work .wp-block-post-template.is-layout-grid { gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 3rem); }
@media (max-width: 700px) { .vo-work .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; } }
.vo-card { position: relative; cursor: pointer; }
.vo-card .vo-card__media { margin: 0 0 1rem; overflow: hidden; background: #E9E3D5; border-radius: 2px; }
.vo-card__media img { display: block; width: 100%; }
.vo-card__media--empty { aspect-ratio: 4 / 3; }
@media (prefers-reduced-motion: no-preference) {
	.vo-card__media img { transition: transform 0.6s var(--vo-ease); }
	.vo-card:hover .vo-card__media img { transform: scale(1.025); }
}
.vo-card__type { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin: 0 0 0.35rem; }
.vo-card__title { margin: 0; font-size: 1.5rem; }
.vo-card__title a { text-decoration: none; }
.vo-card__title a::after { content: "\2197"; content: "\2197" / ""; font-size: 0.8em; margin-left: 0.4em; opacity: 0; transition: opacity 0.2s; }
.vo-card:hover .vo-card__title a, .vo-card__title a:focus-visible { text-decoration: underline; text-decoration-color: var(--wp--preset--color--accent); text-underline-offset: 0.25em; }
.vo-card:hover .vo-card__title a::after, .vo-card__title a:focus-visible::after { opacity: 1; }
.vo-card__excerpt { margin-top: 0.5rem; color: var(--wp--preset--color--muted); font-size: 1rem; }
.vo-card__excerpt p { margin: 0; }
.vo-source { display: none !important; }

/* ---------- Contact ---------- */
.vo-email { font-size: clamp(1.75rem, 4.5vw, 3.25rem); line-height: 1.15; margin: 1.5rem 0 1rem; }
.vo-links a { margin-right: 1.5rem; }

/* ---------- Footer ---------- */
.vo-site-footer {
	margin-inline: calc(-1 * var(--wp--style--root--padding-left, 0px));
	padding-inline: var(--wp--style--root--padding-left, 0px);
	border-top: 1px solid var(--vo-line);
}
.vo-footer__inner { max-width: var(--wp--style--global--wide-size, 1280px); margin-inline: auto; padding-block: 2rem 3rem; }

/* ---------- Project facts, used in modal and on single page ---------- */
.vo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem 2rem; margin: 0 0 2rem; padding: 1.25rem 0; border-block: 1px solid var(--vo-line); }
.vo-facts dt { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.vo-facts dd { margin: 0.15rem 0 0; }
.vo-cta { margin-top: 2.5rem; }

/* ---------- Single project page (fallback URL) ---------- */
.vo-back { font-size: var(--wp--preset--font-size--small); }
.vo-single__sub { font-size: 1.25rem; color: var(--wp--preset--color--muted); max-width: 40rem; }
.vo-single__hero { margin: 2rem 0; }
.vo-single__hero img { width: 100%; height: auto; }
.vo-single__content > * + * { margin-top: 1.5rem; }

/* ---------- Modal ---------- */
.vo-modal {
	position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0; background: transparent; color: var(--wp--preset--color--contrast);
	overflow: hidden; opacity: 0;
}
.vo-modal:not([open]) { display: none; }
.vo-modal.is-open { opacity: 1; }
.vo-modal::backdrop { background: rgba(41, 43, 42, 0.55); }
@media (prefers-reduced-motion: no-preference) { .vo-modal { transition: opacity 0.25s ease; } }
@media (prefers-reduced-motion: reduce) { .vo-modal { opacity: 1; } }

.vo-modal__panel {
	position: relative; box-sizing: border-box; width: min(1180px, 100%); height: 100%;
	margin: 0 auto; background: var(--wp--preset--color--base);
	overflow-y: auto; overscroll-behavior: contain;
}
@media (min-width: 900px) { .vo-modal__panel { height: calc(100% - 4rem); margin-top: 2rem; border-radius: 4px; } }
.vo-modal__bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 1rem clamp(1rem, 3vw, 2rem); background: var(--wp--preset--color--base); }
.vo-modal__close {
	display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer;
	font: inherit; font-size: 0.95rem; color: inherit; background: transparent;
	border: 1px solid var(--vo-line); border-radius: 999px; padding: 0.55rem 1.1rem;
}
.vo-modal__close:hover { border-color: var(--wp--preset--color--contrast); }
.vo-modal__close svg { width: 0.9em; height: 0.9em; }
.vo-modal__inner { padding: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.vo-modal__type { margin: 0 0 0.75rem; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.vo-modal__title { margin: 0; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.05; }
.vo-modal__sub { margin: 1rem 0 0; font-size: 1.25rem; line-height: 1.5; color: var(--wp--preset--color--muted); max-width: 40rem; }
.vo-modal__hero { margin: clamp(1.5rem, 4vw, 3rem) 0; }
.vo-modal__hero img { display: block; width: 100%; height: auto !important; aspect-ratio: auto !important; object-fit: contain !important; }
.vo-modal__body > * + * { margin-top: 1.5rem; }
.vo-modal__body img, .vo-modal__body video, .vo-modal__body iframe { max-width: 100%; }
.vo-modal__body video { width: 100%; height: auto; }
.vo-modal__body figcaption { font-size: 0.9rem; color: var(--wp--preset--color--muted); }
.vo-modal__body .vo-facts { margin-top: 2rem; }
