/*
Theme Name: TDF Portafolio
Theme URI: https://marketeandote.com
Author: Marketeándote
Description: Directorio de portafolios para estudiantes y exalumnos del Taller de Fotografía. Tema clásico en PHP + CSS, con Custom Post Type "fotografo" y taxonomía propia, sin dependencia de plugins.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: tdf
*/

/* =========================================================
   1. TIPOGRAFÍAS
   Lemon Milk → todos los títulos (H1–H6)
   Helvetica  → párrafos y textos
   Copia los archivos de Lemon Milk en /assets/fonts/ (ver LEEME.txt)
   ========================================================= */
@font-face {
	font-family: "Lemon Milk";
	src: url("assets/fonts/LEMONMILK-Light.woff2") format("woff2"),
	     url("assets/fonts/LEMONMILK-Light.otf") format("opentype");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lemon Milk";
	src: url("assets/fonts/LEMONMILK-Regular.woff2") format("woff2"),
	     url("assets/fonts/LEMONMILK-Regular.otf") format("opentype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lemon Milk";
	src: url("assets/fonts/LEMONMILK-Medium.woff2") format("woff2"),
	     url("assets/fonts/LEMONMILK-Medium.otf") format("opentype");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Lemon Milk";
	src: url("assets/fonts/LEMONMILK-Bold.woff2") format("woff2"),
	     url("assets/fonts/LEMONMILK-Bold.otf") format("opentype");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* =========================================================
   2. VARIABLES (paleta del proyecto)
   ========================================================= */
:root {
	--navy: #000036;       /* Azul noche: textos, fondos oscuros, footer */
	--orange: #F59D19;     /* Naranja: acentos, flechas, botón principal */
	--purple: #43277B;     /* Morado: hover, etiquetas, detalles */

	--navy-90: rgba(0, 0, 54, .9);
	--navy-60: rgba(0, 0, 54, .6);
	--purple-10: rgba(67, 39, 123, .08);

	--text: #1d1d3a;
	--muted: #6a6a86;
	--line: #e3e3ec;
	--bg: #fafafb;
	--bg-alt: #efeff3;
	--white: #fff;

	--font-title: "Lemon Milk", "Montserrat", "Arial Black", sans-serif;
	--font-text: "Helvetica Neue", Helvetica, Arial, sans-serif;

	--container: 1180px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 2px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--header-h: 76px;
}

/* =========================================================
   3. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-title);
	font-weight: 500;
	color: var(--navy);
	line-height: 1.15;
	letter-spacing: .01em;
	margin: 0 0 .5em;
	text-transform: uppercase; /* Lemon Milk es una tipografía de mayúsculas */
}

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--purple); }

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

.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: middle; }

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: -999px; top: 8px; z-index: 999;
	background: var(--navy); color: var(--white); padding: 10px 16px;
}
.skip-link:focus { left: 8px; color: var(--white); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Placeholder cuando falta imagen */
.tdf-placeholder {
	display: block; width: 100%; height: 100%; min-height: 100%;
	background: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);
}

/* =========================================================
   4. ELEMENTOS COMUNES
   ========================================================= */
.eyebrow {
	font-family: var(--font-text);
	font-size: 11px;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 12px;
	display: flex; align-items: center; gap: 12px;
}
.eyebrow::before {
	content: ""; width: 22px; height: 2px; background: var(--orange); flex: none;
}
.eyebrow--light { color: rgba(255, 255, 255, .78); }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding-top: 0; }

.section-title { font-size: clamp(22px, 2.6vw, 32px); margin: 0; }

.section-head { margin-bottom: 32px; }
.section-head--split {
	display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 56px; align-items: end;
}
.section-head--end { grid-template-columns: 1fr auto; }
.section-head__text { color: var(--muted); font-size: 14px; margin: 0; max-width: 400px; justify-self: end; }

.link-arrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 14px; color: var(--navy); white-space: nowrap;
}
.link-arrow .icon { color: var(--orange); transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

.btn {
	display: inline-flex; align-items: center; gap: 12px;
	padding: 14px 26px; border: 0; border-radius: var(--radius);
	font-family: var(--font-title); font-size: 12px; letter-spacing: .08em;
	text-transform: uppercase; cursor: pointer;
	transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: var(--purple); color: var(--white); }
.btn--accent { background: var(--orange); color: var(--navy); }
.btn--accent:hover { background: var(--navy); color: var(--white); }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }

.breadcrumb {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	font-size: 13px; color: var(--muted); margin-bottom: 28px;
}
.breadcrumb .icon { width: 14px; height: 14px; }
.breadcrumb a:hover { color: var(--purple); }

/* =========================================================
   5. HEADER
   ========================================================= */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.site-header__inner {
	display: flex; align-items: center; gap: 32px; min-height: var(--header-h);
}

.brand { display: inline-flex; margin-right: auto; }
.brand__text {
	font-family: var(--font-title); font-weight: 500;
	font-size: 16px; line-height: 1.05; letter-spacing: .06em;
	text-transform: uppercase; color: var(--navy);
}
.brand--logo img { max-height: 48px; width: auto; }

.main-nav__list { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
.main-nav__list a {
	position: relative; font-size: 13.5px; color: var(--navy); padding: 6px 0;
}
.main-nav__list a::after {
	content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
	background: var(--orange); transition: width .25s var(--ease);
}
.main-nav__list a:hover::after,
.main-nav__list .current-menu-item > a::after { width: 100%; }
.main-nav__list a:hover { color: var(--navy); }

.site-header__actions { display: flex; align-items: center; gap: 4px; margin-left: 40px; }
.icon-btn {
	background: none; border: 0; padding: 8px; cursor: pointer;
	color: var(--navy); display: inline-flex;
}
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn:hover { color: var(--purple); }
.menu-toggle { display: none; }

.header-search { border-top: 1px solid var(--line); background: var(--white); padding: 16px 0; }
.header-search__form { display: flex; gap: 12px; }
.header-search__form input[type="search"] {
	flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
	font: inherit; color: var(--navy); background: var(--bg);
}
.header-search__form input[type="search"]:focus { outline: none; border-color: var(--purple); }

/* =========================================================
   6. HOME — HERO
   ========================================================= */
.hero {
	position: relative; min-height: clamp(420px, 52vw, 560px);
	display: flex; align-items: center; overflow: hidden;
	background: var(--navy); color: var(--white);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media .tdf-placeholder {
	width: 100%; height: 100%; object-fit: cover; object-position: 70% center;
}
.hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, var(--navy) 0%, rgba(0,0,54,.85) 30%, rgba(0,0,54,.25) 65%, rgba(0,0,54,.1) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 56px; }
.hero__title {
	color: var(--white);
	font-size: clamp(30px, 4.4vw, 54px);
	max-width: 14ch; margin-bottom: 20px;
}
.hero__text { max-width: 420px; color: rgba(255,255,255,.85); font-size: 15px; }
.hero__tagline {
	display: flex; align-items: center; gap: 28px; margin-top: 36px;
	font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.8);
}
.hero__tagline .line, .line { display: inline-block; width: 48px; height: 1px; background: var(--orange); flex: none; }

/* =========================================================
   7. HOME — CATEGORÍAS
   ========================================================= */
.cat-grid {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.cat-card {
	position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
	background: var(--navy); color: var(--white); isolation: isolate;
}
.cat-card__img, .cat-card .tdf-placeholder {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	transition: transform .8s var(--ease);
}
.cat-card::after {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(180deg, rgba(0,0,54,0) 35%, rgba(0,0,54,.88) 100%);
	transition: background .4s var(--ease);
}
.cat-card:hover { color: var(--white); }
.cat-card:hover .cat-card__img { transform: scale(1.06); }
.cat-card:hover::after {
	background: linear-gradient(180deg, rgba(67,39,123,.15) 20%, rgba(0,0,54,.95) 100%);
}
.cat-card__body {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	padding: 20px;
}
.cat-card__title { color: var(--white); font-size: clamp(14px, 1.35vw, 18px); margin-bottom: 8px; }
.cat-card__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cat-card__desc { font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.85); }
.cat-card__arrow { color: var(--orange); transition: transform .25s var(--ease); }
.cat-card:hover .cat-card__arrow { transform: translateX(4px); }

/* =========================================================
   8. HOME — TARJETAS MINI (aleatorias)
   ========================================================= */
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-card { background: var(--white); }
.mini-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.mini-card__media img, .mini-card__media .tdf-placeholder {
	width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease);
}
.mini-card:hover .mini-card__media img { transform: scale(1.05); }
.mini-card__body { display: flex; align-items: center; gap: 12px; padding: 14px 6px 14px 4px; }
.mini-card__avatar, .mini-card__body .tdf-placeholder {
	width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none;
}
.mini-card__info { flex: 1; min-width: 0; }
.mini-card__name {
	font-size: 12px; margin: 0 0 2px; letter-spacing: .03em;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-card__cats { display: block; font-size: 12.5px; color: var(--muted); }
.mini-card__arrow { color: var(--navy); transition: color .2s, transform .25s var(--ease); }
.mini-card:hover .mini-card__arrow { color: var(--orange); transform: translateX(4px); }

/* =========================================================
   9. HOME — CTA "Sé parte del directorio"
   ========================================================= */
.cta {
	position: relative; overflow: hidden; background: var(--bg-alt);
	min-height: 180px; display: flex; align-items: center;
}
.cta__inner {
	position: relative; z-index: 1;
	display: flex; align-items: center; gap: 48px; padding-top: 40px; padding-bottom: 40px;
}
.cta__content { max-width: 440px; }
.cta__content .section-title { margin-bottom: 12px; }
.cta__text { color: var(--muted); font-size: 14px; margin: 0; }
.cta__media { position: absolute; top: 0; right: 0; bottom: 0; width: 34%; }
.cta__media img, .cta__media .tdf-placeholder { width: 100%; height: 100%; object-fit: cover; }
.cta__media::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(90deg, var(--bg-alt) 0%, rgba(239,239,243,0) 35%);
}

/* =========================================================
   10. FOOTER
   ========================================================= */
.site-footer { padding: 48px 0 40px; font-size: 13px; }
.site-footer--dark { background: var(--navy); color: rgba(255,255,255,.82); }
.site-footer--dark .brand__text { color: var(--white); }
.site-footer--light { background: var(--white); border-top: 1px solid var(--line); color: var(--muted); }

.site-footer__grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1.2fr 1fr; }
.site-footer__col { padding: 4px 36px; border-left: 1px solid currentColor; border-color: rgba(128,128,160,.3); }
.site-footer__col:first-child { padding-left: 0; border-left: 0; }
.site-footer__brand p { margin: 12px 0 0; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer__menu a:hover { color: var(--orange); }
.social { display: flex; gap: 14px; margin-bottom: 14px; }
.social a { display: inline-flex; }
.social .icon { width: 22px; height: 22px; }
.social a:hover { color: var(--orange); }
.site-footer__copy { font-size: 12px; margin: 0; opacity: .85; }
.site-footer__tagline {
	display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right;
}
.site-footer__tagline p {
	margin: 14px 0 0; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase;
}
.site-footer__legal {
	margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
	font-size: 12px; line-height: 1.55;
}
.site-footer__legal strong { color: var(--navy); display: block; margin-bottom: 4px; }
.site-footer__legal p { max-width: 780px; margin: 0; }

/* =========================================================
   11. LISTADO POR CATEGORÍA (imagen 2)
   ========================================================= */
.directory { padding: 36px 0 88px; }
.directory__head {
	display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px 56px; align-items: start; margin-bottom: 36px;
}
.directory__title { font-size: clamp(26px, 3.6vw, 42px); margin-bottom: 10px; }
.directory__subtitle { font-size: 17px; color: var(--muted); margin: 0; }
.directory__note { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; max-width: 300px; justify-self: end; }

.tabs {
	display: flex; gap: 36px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
	overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
	position: relative; padding: 10px 2px 14px; font-size: 14px; color: var(--muted); white-space: nowrap;
}
.tabs__item::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
	background: var(--orange); transform: scaleX(0); transition: transform .25s var(--ease);
}
.tabs__item:hover { color: var(--navy); }
.tabs__item.is-active { color: var(--navy); font-weight: 700; }
.tabs__item.is-active::after { transform: scaleX(1); }

.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 16px; }
.p-card { background: transparent; }
.p-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--navy); }
.p-card__media img, .p-card__media .tdf-placeholder {
	width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease);
}
.p-card:hover .p-card__media img { transform: scale(1.05); }
.p-card__body { display: flex; gap: 16px; padding: 0 4px; }
.p-card__avatar {
	flex: none; width: 72px; height: 72px; margin-top: -22px; position: relative; z-index: 1;
	border-radius: 50%; border: 4px solid var(--bg); overflow: hidden; background: var(--bg);
}
.p-card__avatar img, .p-card__avatar .tdf-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.p-card__info { padding-top: 14px; min-width: 0; }
.p-card__name { font-size: 14px; margin: 0 0 4px; letter-spacing: .03em; }
.p-card__name a:hover { color: var(--purple); }
.p-card__city { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.p-card__tags { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.p-card__link { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--navy); }
.p-card__link span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.p-card__link .icon { color: var(--orange); transition: transform .25s var(--ease); }
.p-card__link:hover .icon { transform: translateX(4px); }

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

/* Paginación */
.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers {
	min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--line); font-size: 14px; color: var(--navy); background: var(--white);
}
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pagination a.page-numbers:hover { border-color: var(--orange); color: var(--navy); }

/* =========================================================
   12. PERFIL DEL FOTÓGRAFO (imagen 3)
   ========================================================= */
.profile-cover {
	position: relative; height: clamp(200px, 26vw, 320px); background: var(--navy); overflow: hidden;
}
.profile-cover img, .profile-cover .tdf-placeholder { width: 100%; height: 100%; object-fit: cover; }
.profile-cover::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,54,0) 50%, rgba(0,0,54,.35) 100%);
}
.profile-cover__quote {
	position: absolute; right: var(--gutter); bottom: 22px; z-index: 1; max-width: 200px; margin: 0;
	font-family: var(--font-title); font-weight: 300; text-transform: uppercase;
	font-size: 12px; line-height: 1.7; letter-spacing: .3em; color: var(--white); text-align: left;
}
.profile-cover__quote .line { display: block; margin: 14px 0 0 auto; }

.profile-head {
	display: grid; grid-template-columns: 200px 1fr 300px; gap: 32px 48px; align-items: start;
	padding-top: 24px; padding-bottom: 40px;
}
.profile-head__avatar {
	width: 200px; height: 200px; margin-top: -100px; position: relative; z-index: 2;
	border-radius: 50%; border: 6px solid var(--bg); overflow: hidden; background: var(--bg);
	box-shadow: 0 10px 30px rgba(0,0,54,.12);
}
.profile-head__avatar img, .profile-head__avatar .tdf-placeholder { width: 100%; height: 100%; object-fit: cover; }
.profile-head__name { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 4px; }
.profile-head__role { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.profile-head__bio { max-width: 560px; font-size: 15px; }
.profile-head__bio p:last-child { margin-bottom: 0; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.tag-list a {
	display: inline-block; padding: 5px 12px; font-size: 12.5px;
	background: var(--purple-10); color: var(--purple); border-radius: var(--radius);
}
.tag-list a:hover { background: var(--purple); color: var(--white); }

.profile-contact { list-style: none; margin: 0; padding: 18px 0 0; display: grid; gap: 12px; font-size: 14px; }
.profile-contact li { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-contact .icon { color: var(--purple); width: 18px; height: 18px; }
.profile-contact a { overflow-wrap: anywhere; }
.profile-contact a:hover { color: var(--purple); }

/* Galería tipo masonry (3 columnas con proporciones libres) */
.gallery { padding-bottom: 72px; }
.gallery__grid { column-count: 3; column-gap: 12px; }
.gallery__item { margin: 0 0 12px; break-inside: avoid; }
.gallery__item a { display: block; overflow: hidden; background: var(--navy); cursor: zoom-in; }
.gallery__item img { width: 100%; height: auto; transition: transform .8s var(--ease), opacity .3s; }
.gallery__item a:hover img { transform: scale(1.03); opacity: .92; }

.profile-back { padding-bottom: 72px; }

/* Lightbox */
.lightbox {
	position: fixed; inset: 0; z-index: 1000; display: none;
	align-items: center; justify-content: center;
	background: rgba(0, 0, 54, .985); padding: 56px 72px;
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox__caption {
	position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
	color: rgba(255,255,255,.8); font-size: 13px;
}
.lightbox button {
	position: absolute; background: none; border: 0; color: var(--white); cursor: pointer; padding: 10px;
}
.lightbox button:hover { color: var(--orange); }
.lightbox button .icon { width: 30px; height: 30px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
body.no-scroll { overflow: hidden; }

/* =========================================================
   13. PÁGINAS / ENTRADAS
   ========================================================= */
.page-title { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 24px; }
.entry { padding: 24px 0; border-bottom: 1px solid var(--line); }
.entry__title { font-size: 20px; }
.entry__content { font-size: 16px; }
.entry__content a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.entry__content img { margin: 24px 0; }

/* =========================================================
   14. RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
	.main-nav__list { gap: 24px; }
	.site-header__actions { margin-left: 16px; }
	.profile-head { grid-template-columns: 160px 1fr; }
	.profile-head__avatar { width: 160px; height: 160px; margin-top: -80px; }
	.profile-contact { grid-column: 2; padding-top: 0; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 0; }
	.site-footer__col:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
	:root { --header-h: 64px; }

	.menu-toggle { display: inline-flex; }
	.main-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		background: var(--white); border-bottom: 1px solid var(--line);
		display: none;
	}
	.main-nav.is-open { display: block; }
	.main-nav__list { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
	.main-nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
	.main-nav__list a::after { display: none; }
	.site-header__inner { position: static; }
	.site-header { position: sticky; }

	.cat-grid, .mini-grid { grid-template-columns: repeat(2, 1fr); }
	.p-grid { grid-template-columns: repeat(2, 1fr); }
	.section-head--split, .directory__head { grid-template-columns: 1fr; }
	.section-head--end { grid-template-columns: 1fr; }
	.section-head__text, .directory__note { justify-self: start; max-width: none; }

	.cta { flex-direction: column; align-items: stretch; }
	.cta__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
	.cta__media { position: relative; width: 100%; height: 200px; }
	.cta__media::before { background: linear-gradient(180deg, var(--bg-alt) 0%, rgba(239,239,243,0) 40%); }

	.gallery__grid { column-count: 2; }
}

@media (max-width: 640px) {
	.hero::after { background: linear-gradient(180deg, rgba(0,0,54,.45) 0%, var(--navy) 90%); }
	.hero { align-items: flex-end; }

	.cat-grid { gap: 6px; }
	.cat-card__body { padding: 14px; }
	.cat-card__desc { display: none; }

	.mini-grid, .p-grid { grid-template-columns: 1fr; }

	.profile-head { grid-template-columns: 1fr; text-align: left; gap: 20px; }
	.profile-head__avatar { width: 136px; height: 136px; margin-top: -68px; }
	.profile-contact { grid-column: auto; }
	.profile-cover__quote { display: none; }

	.gallery__grid { column-count: 1; }

	.site-footer__grid { grid-template-columns: 1fr; }
	.site-footer__col { padding: 0; border-left: 0; }
	.site-footer__tagline { align-items: flex-start; text-align: left; }

	.lightbox { padding: 56px 12px; }
	.lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
