/* Alèxia Cervera — portfolio
   Dos columnas: información/CV a la izquierda, proyectos a la derecha.
   Para cambiar el color o el tamaño de la letra, edita las variables de :root */

:root {
	--pink: #ff0077;
	--rule: rgba(255, 0, 119, 0.35);   /* color de las líneas finas */
	--text: max(calc(0.95rem - 4pt), 9px);   /* tamaño del texto */
	--pad: 0.4rem;                      /* margen interior */
	--info-width: 33.333%;              /* ancho de la columna izquierda */
	--foot: 1.5rem;                     /* alto del pie */
}

/* El texto escala con el ancho de la ventana, como en Cargo */
html { font-size: clamp(11px, 1.08vw, 18px); }

html, body {
	margin: 0;
	padding: 0;
	background: #fff;
	height: 100%;
}

* { box-sizing: border-box; }

body {
	color: var(--pink);
	font-family: "Goudy Bookletter 1911", Georgia, serif;
	font-size: var(--text);
	line-height: 1.12;
	overflow: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:active { opacity: 0.7; }

h2, p { margin: 0; font-weight: 400; font-size: inherit; }
img, video { display: block; max-width: 100%; }

/* ---------- Columnas ---------- */

.col {
	position: fixed;
	top: 0;
	bottom: var(--foot);
	display: flex;
	flex-direction: column;
}

.col-info {
	left: 0;
	width: var(--info-width);
	border-right: 1px solid var(--rule);
}

.col-work {
	left: var(--info-width);
	right: 0;
}

.col-head {
	flex: 0 0 auto;
	padding: 0.3rem var(--pad) 0.25rem;
	border-bottom: 1px solid var(--rule);
	text-transform: uppercase;
}

.col-body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
}
.col-body::-webkit-scrollbar { display: none; }

/* ---------- Columna izquierda: info / CV ---------- */

.block {
	padding: var(--pad) var(--pad) 6rem;
	border-bottom: 1px solid var(--rule);
}
.block:last-child { border-bottom: 0; }

.row {
	display: grid;
	grid-template-columns: 1fr 1.9fr;
	gap: var(--pad);
}

.block h2 { text-transform: uppercase; }
i, em, b, strong { font-style: normal; font-weight: 400; }
.caption .title { font-weight: 700; -webkit-text-stroke: 0.35px currentColor; }
.col-info .col-head { text-transform: none; }   /* nombre arriba a la izquierda tal cual: Alèxia Cervera Simó */   /* títulos de proyecto en negrita */

.entry { margin-bottom: 1.15em; }
.entry:last-child { margin-bottom: 0; }

.index a {
	display: grid;
	grid-template-columns: 2.3rem 1fr auto;
}
.index a:hover { text-decoration: none; background: var(--pink); color: #fff; }

/* ---------- Columna derecha: proyectos ---------- */

.work {
	padding: var(--pad) var(--pad) 5rem;
	border-bottom: 1px solid var(--rule);
}
.work:last-child { border-bottom: 0; }

.gallery {
	display: flex;
	flex-direction: column;
	gap: var(--pad);
}

.g-item { margin: 0; }
.g-item img,
.g-item video {
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 6rem);   /* las imágenes verticales caben en la pantalla */
	height: auto;
}
.g-item.zoomable { cursor: zoom-in; }

.vimeo { width: 100%; }
.vimeo iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Pie de cada proyecto: número a la izquierda, texto en la mitad derecha */
.caption {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--pad);
	margin-top: 0.7rem;
}

/* Texto de cada proyecto alineado a la derecha (caja derecha) */
.caption .info { text-align: right; }

/* ---------- Pie ---------- */

.foot {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--foot);
	padding: 0.3rem var(--pad);
	border-top: 1px solid var(--rule);
	background: #fff;
}

/* ---------- Visor de imágenes ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5rem;
	cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Móvil: las columnas se apilan ---------- */

@media (max-width: 760px) {
	html { font-size: 15px; }
	:root { --text: 11px; }
	body { overflow: auto; height: auto; line-height: 1.2; }
	.col, .foot { position: static; width: auto; height: auto; }
	.col-info { border-right: 0; border-bottom: 1px solid var(--rule); }
	.col-body { overflow: visible; }
	.col-head { position: sticky; top: 0; background: #fff; z-index: 2; }
	.block { padding-bottom: 2.5rem; }
	.g-item img, .g-item video { width: 100%; max-height: none; }
}
