/*
Theme Name: khairosis
Author: Khai
Description: Personal site for photographs, films and writing. Dark glass panels, with a colour theme per section.
Version: 1.4.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: khairosis
*/

/* ---------- Colour themes. One per section, set by a class on <body>. ---------- */
:root, body.kh-t-kyurem {
  --ground:#1A181B; --text:#E0E9F2; --muted:#C4CBD0; --body:#D5DEE6;
  --tile:rgba(12,10,13,.5); --line:rgba(255,255,255,.14); --frame:rgba(255,255,255,.12);
  --top:rgba(195,217,231,.16); --bottom:rgba(180,166,188,.16);
  --c1:rgba(195,217,231,.28); --c2:rgba(180,166,188,.30); --c3:rgba(242,86,224,.14); --c4:rgba(195,217,231,.24);
  --accent:#C3D9E7; --spark:#F256E0; --edge-rgb:255,255,255; --edge-a:.18; --wash:720px;
}
body.kh-t-rayn {
  --ground:#141917; --text:#F2EBDD; --muted:#B4D6CE; --body:#E4DED2;
  --tile:rgba(8,12,10,.55); --line:rgba(255,255,255,.10); --frame:rgba(255,255,255,.10);
  --top:rgba(55,169,145,.22); --bottom:transparent;
  --c1:transparent; --c2:rgba(236,183,110,.16); --c3:transparent; --c4:transparent;
  --accent:#6FBEAF; --spark:#ECB76E; --wash:300px;
}
body.kh-t-rays {
  --ground:#0D0C0C; --text:#EDEBE8; --muted:#BDB8B3; --body:#DDD9D5;
  --tile:rgba(0,0,0,.55); --line:rgba(226,72,58,.38); --frame:rgba(226,72,58,.6);
  --top:rgba(214,48,40,.22); --bottom:transparent;
  --c1:rgba(214,48,40,.30); --c2:rgba(254,213,110,.18); --c3:rgba(214,48,40,.26); --c4:rgba(254,213,110,.16);
  --accent:#F28B68; --spark:#FED56E; --edge-rgb:226,72,58; --edge-a:.6; --wash:560px;
}
body.kh-t-necro {
  --ground:#0C0F1E; --text:#F3F7F9; --muted:#B5C8D2; --body:#DCE4EC;
  --tile:rgba(2,4,14,.55); --line:rgba(255,255,255,.14); --frame:rgba(255,255,255,.14);
  --top:rgba(33,75,124,.38); --bottom:transparent;
  --c1:rgba(33,75,124,.62); --c2:rgba(39,52,103,.72); --c3:rgba(33,75,124,.62); --c4:rgba(39,52,103,.72);
  --accent:#F4F1DE; --spark:#FEC3D5; --wash:480px;
}
body.kh-t-x100 {
  --ground:#1E1E1D; --text:#EDEAE9; --muted:#B4B3B2; --body:#D6D4D2;
  --tile:rgba(0,0,0,.45); --line:rgba(220,219,218,.18); --frame:rgba(220,219,218,.18);
  --top:rgba(220,219,218,.12); --bottom:transparent;
  --c1:rgba(220,219,218,.16); --c2:rgba(139,139,139,.24); --c3:rgba(220,219,218,.16); --c4:rgba(139,139,139,.24);
  --accent:#EDEAE9; --spark:#F04650; --wash:480px;
}

body.kh-t-arceus {
  --ground:#14110C; --text:#F7F0DE; --muted:#C9BFA4; --body:#E9E1CC;
  --tile:rgba(8,6,3,.55); --line:rgba(255,255,255,.14); --frame:rgba(255,255,255,.14);
  --top:rgba(244,216,138,.20); --bottom:transparent;
  --c1:rgba(244,216,138,.22); --c2:rgba(224,162,60,.30); --c3:rgba(244,216,138,.22); --c4:rgba(224,162,60,.30);
  --accent:#E0A23C; --spark:#F4D88A; --wash:560px;
}
body.kh-t-gira {
  --ground:#0E0C12; --text:#F4EFE7; --muted:#BDB5AD; --body:#E2DCD4;
  --tile:rgba(4,3,8,.55); --line:rgba(255,255,255,.14); --frame:rgba(255,255,255,.14);
  --top:rgba(39,184,216,.18); --bottom:transparent;
  --c1:rgba(39,184,216,.24); --c2:rgba(234,217,188,.16); --c3:rgba(39,184,216,.24); --c4:rgba(234,217,188,.16);
  --accent:#EAD9BC; --spark:#3CC4E0; --wash:560px;
}

/* ---------- Base ---------- */
html { scroll-behavior:smooth; }
body {
  margin:0; --g:1;
  background:linear-gradient(180deg,var(--top) 0,transparent var(--wash)),linear-gradient(0deg,var(--bottom) 0,transparent 640px),var(--ground);
  background-color:var(--ground); color:var(--text);
  font-family:'Spectral',Georgia,serif; font-size:1.125rem; line-height:1.65; -webkit-font-smoothing:antialiased;
}
.wp-site-blocks { padding:0; }
a { color:var(--text); text-decoration:none; }
a:hover { color:#fff; }
img { max-width:100%; height:auto; }
h1,h2,h3,h4,p,figure,blockquote { margin:0; }
.kh-wrap { box-sizing:border-box; max-width:1120px; margin:0 auto; padding:16px 16px 40px; display:flex; flex-direction:column; gap:32px; }
.kh-wrap > * { margin-block-start:0; }
.kh-wrap > main { display:flex; flex-direction:column; gap:32px; min-width:0; }
.kh-wrap > main > * { margin-block-start:0; }
.kh-sans, .kh-meta, .kh-label { font-family:'Space Grotesk',system-ui,sans-serif; }
.kh-label { font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:.8125rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.kh-meta { font-size:.875rem; color:var(--muted); }
.kh-muted { color:var(--muted); }
.kh-spark { color:var(--spark); }
.kh-pad { padding-left:12px; padding-right:12px; }

/* ---------- Glass ---------- */
.kh-glass {
  position:relative;
  background:linear-gradient(135deg,rgba(255,255,255,calc(.14*var(--g))),rgba(255,255,255,calc(.04*var(--g))) 42%,rgba(255,255,255,calc(.08*var(--g)))),var(--sec,linear-gradient(transparent,transparent));
  -webkit-backdrop-filter:blur(calc(26px*var(--g))) saturate(calc(100% + 80%*var(--g)));
  backdrop-filter:blur(calc(26px*var(--g))) saturate(calc(100% + 80%*var(--g)));
  border:1px solid rgba(var(--edge-rgb),calc(var(--edge-a)*var(--g)));
  box-shadow:inset 1px 1px 0 rgba(255,255,255,calc(.45*var(--g))),inset -1px -1px 0 rgba(255,255,255,calc(.14*var(--g))),inset 0 0 28px rgba(255,255,255,calc(.05*var(--g))),0 20px 50px rgba(0,0,0,calc(.35*var(--g)));
}
.kh-glass::before { content:""; position:absolute; inset:0; border-radius:inherit; background:linear-gradient(180deg,rgba(255,255,255,calc(.10*var(--g))),rgba(255,255,255,0) 32%); pointer-events:none; }
.kh-panel { --g:.1; border-radius:40px; padding:16px; box-sizing:border-box; }
.kh-panel::after {
  content:""; position:absolute; inset:0; border-radius:inherit; padding:var(--rim,3px); pointer-events:none;
  background:linear-gradient(135deg,rgba(255,255,255,calc(.60*var(--g))),rgba(255,255,255,calc(.06*var(--g))) 28%,rgba(255,255,255,0) 50%,rgba(255,255,255,calc(.06*var(--g))) 72%,rgba(255,255,255,calc(.38*var(--g))));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  -webkit-backdrop-filter:blur(3px) brightness(calc(1 + .5*var(--g))) saturate(calc(1 + 1.2*var(--g)));
  backdrop-filter:blur(3px) brightness(calc(1 + .5*var(--g))) saturate(calc(1 + 1.2*var(--g)));
}
.kh-panel > * { position:relative; z-index:1; }
/* Keep the glass highlight layers underneath the content, so taps always reach links and form fields (Safari on iPhone can otherwise catch them). */
.kh-glass::before, .kh-panel::after, .kh-entrycard::after { z-index:0; }
.kh-sec1 { --sec:linear-gradient(180deg,var(--c1),transparent 75%); }
.kh-sec2 { --sec:linear-gradient(180deg,var(--c2),transparent 75%); }
.kh-sec3 { --sec:linear-gradient(180deg,var(--c3),transparent 75%); }
.kh-sec4 { --sec:linear-gradient(180deg,var(--c4),transparent 75%); }
.kh-panel .kh-glass, .kh-chip { --g:1; --sec:linear-gradient(transparent,transparent); }
.kh-panel-pad { padding:36px 32px; }
.kh-panel-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 24px; padding:12px 16px 24px; }
.kh-chip { display:inline-block; padding:6px 14px; border-radius:999px; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.75rem; letter-spacing:.04em; color:var(--text); }

/* Buttons */
.kh-pill, .kh-wrap .wp-block-button__link {
  display:inline-block; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.9375rem; line-height:1.4; padding:11px 20px; border-radius:999px;
  background:rgba(255,255,255,.10); box-shadow:inset 0 1px 0 rgba(255,255,255,.30); color:var(--accent); border:0; transition:background .2s; cursor:pointer;
}
.kh-pill:hover, .kh-wrap .wp-block-button__link:hover { background:rgba(255,255,255,.18); color:var(--accent); }
.kh-pill-plain { color:var(--text); }
.wp-block-buttons { display:flex; flex-wrap:wrap; gap:12px; }

/* ---------- Menu ---------- */
.kh-wrap > header.wp-block-template-part { position:sticky; top:16px; z-index:20; align-self:center; max-width:100%; }
.admin-bar .kh-wrap > header.wp-block-template-part { top:48px; }
.kh-menu { --g:1; box-sizing:border-box; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 20px; padding:6px 6px 6px 24px; border-radius:999px; font-family:'Space Grotesk',system-ui,sans-serif; }
.kh-menu > * { position:relative; }
.kh-wordmark { font-weight:700; font-size:1.125rem; letter-spacing:-.01em; padding:10px 0; }
.kh-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:2px; font-size:.9375rem; }
.kh-nav a { padding:10px 16px; border-radius:999px; color:var(--muted); transition:background .2s; }
.kh-nav a:hover { background:rgba(255,255,255,.12); color:var(--text); }
.kh-nav a[aria-current="page"] { color:var(--text); background:rgba(255,255,255,.16); box-shadow:inset 0 1px 0 rgba(255,255,255,.35); }

/* ---------- Footer ---------- */
.kh-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 24px; padding:20px 12px 0; border-top:1px solid var(--line); font-family:'Space Grotesk',system-ui,sans-serif; font-size:.8125rem; color:var(--muted); }

/* ---------- Headings ---------- */
.kh-h1, h1.wp-block-post-title { font-family:'Playfair Display',Georgia,serif; font-style:italic; font-weight:400; font-size:clamp(2.5rem,5.5vw,4rem); line-height:1.08; letter-spacing:-.015em; color:var(--spark); }
.kh-h2 { font-family:'Playfair Display',Georgia,serif; font-weight:400; font-size:clamp(2rem,4vw,2.75rem); line-height:1.1; }
.kh-pagehead { padding:56px 12px 8px; }
.kh-pagehead .kh-h1, .kh-pagehead h1.wp-block-post-title { font-size:clamp(2.75rem,6vw,4.5rem); line-height:1.06; }
.kh-lede { margin-top:24px; max-width:560px; font-size:1.25rem; line-height:1.6; color:var(--muted); }
.kh-back { display:inline-block; padding:10px 0; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:var(--muted); }
.kh-backrow { padding:24px 12px 0; }
.kh-empty { padding:24px 16px 32px; color:var(--muted); }

/* ---------- Placeholders and tiles ---------- */
.kh-tile { position:relative; display:flex; align-items:center; justify-content:center; background:var(--tile); border:1px solid var(--frame); border-radius:24px; overflow:hidden; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.8125rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); text-align:center; }
.kh-tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.kh-169 { aspect-ratio:16/9; } .kh-32 { aspect-ratio:3/2; } .kh-45 { aspect-ratio:4/5; }
.kh-play { position:relative; display:flex; align-items:center; justify-content:center; width:64px; height:64px; border-radius:50%; color:var(--text); }
.kh-play-lg { width:96px; height:96px; }
.kh-play-sm { width:48px; height:48px; }
.kh-corner { position:absolute; right:12px; bottom:12px; }

/* ---------- Home ---------- */
.kh-hero { display:flex; flex-wrap:wrap; align-items:center; gap:24px 0; padding:8px 0 24px; }
.kh-hero-photo { flex:1 1 380px; min-width:0; min-height:520px; box-sizing:border-box; border-radius:40px 0 0 40px; display:flex; align-items:center; padding-left:15%; background:linear-gradient(135deg,rgba(255,255,255,.20),rgba(255,255,255,.08)) center/cover no-repeat; -webkit-mask-image:linear-gradient(90deg,#000 35%,transparent 100%); mask-image:linear-gradient(90deg,#000 35%,transparent 100%); font-family:'Space Grotesk',system-ui,sans-serif; font-size:.8125rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.kh-hero-text { flex:1 1 380px; min-width:0; padding:0 12px; }
.kh-hello { font-family:'Sacramento','Spectral',cursive; font-style:italic; font-weight:400; font-size:clamp(4.5rem,10vw,8rem); line-height:1; -webkit-text-stroke:.028em currentColor; color:var(--spark); }
.kh-hello svg { display:inline-block; width:.5em; height:.5em; margin-left:.14em; vertical-align:.04em; transform:skewX(-10deg); fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.kh-hero-text p { margin-top:28px; max-width:500px; font-size:1.25rem; line-height:1.6; color:var(--muted); }
.kh-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; }
.kh-card { display:flex; flex-direction:column; gap:14px; padding-bottom:12px; }
.kh-card-title { font-size:1.375rem; line-height:1.3; padding:0 16px; }
.kh-card .kh-meta { padding:0 16px; margin-top:-8px; }
.kh-about-teaser { display:flex; flex-wrap:wrap; gap:24px 80px; }
.kh-about-teaser > .kh-label { flex:0 0 200px; padding-top:10px; }
.kh-about-teaser > div { flex:999 1 420px; min-width:0; max-width:640px; }
.kh-about-teaser p.kh-big { font-size:clamp(1.375rem,2.6vw,1.75rem); line-height:1.45; }
.kh-contact { padding:80px 12px 48px; }
.kh-contact h2 { font-family:'Playfair Display',Georgia,serif; font-style:italic; font-weight:400; font-size:clamp(2.25rem,5vw,3.5rem); line-height:1.1; }
.kh-contact p { margin-top:24px; max-width:520px; color:var(--muted); }
.kh-links { display:flex; flex-wrap:wrap; gap:12px; }
.kh-contact .kh-links { margin-top:40px; max-width:none; }
.kh-aboutcontact .kh-links { margin-top:28px; }

/* ---------- Lists: essays and films ---------- */
.kh-rows { display:flex; flex-direction:column; }
.kh-row { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 32px; padding:22px 0; border-top:1px solid var(--line); }
.kh-row-title { flex:1 1 380px; font-size:clamp(1.375rem,2.6vw,1.75rem); line-height:1.25; }
.kh-panel .kh-rows { padding:0 16px 8px; }
.kh-year { display:flex; flex-wrap:wrap; gap:8px 40px; padding:0 12px; }
.kh-year > h3 { flex:0 0 120px; padding-top:26px; font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:1rem; color:var(--spark); }
.kh-year > .kh-rows { flex:999 1 420px; min-width:0; }
.kh-years { display:flex; flex-direction:column; gap:24px; }
.kh-feature { padding:40px 32px 36px; }
.kh-feature h2 { margin-top:18px; max-width:820px; font-family:'Playfair Display',Georgia,serif; font-weight:400; font-size:clamp(2rem,4.5vw,3.25rem); line-height:1.1; letter-spacing:-.01em; }
.kh-feature .kh-stand { margin-top:20px; max-width:620px; font-size:1.25rem; line-height:1.55; color:var(--muted); }
.kh-feature .kh-meta { margin-top:20px; }
.kh-feature .kh-go { margin-top:28px; }
.kh-filmfeature-info { display:flex; flex-wrap:wrap; gap:16px 64px; padding:28px 16px 16px; }
.kh-filmfeature-info > div { flex:1 1 320px; min-width:0; }
.kh-filmfeature-info h2 { margin-top:14px; }
.kh-filmrows { border-bottom:1px solid var(--line); }
.kh-filmrow { display:flex; flex-wrap:wrap; align-items:center; gap:16px 32px; padding:24px 12px; border-top:1px solid var(--line); }
.kh-filmrow .kh-tile { flex:0 1 320px; min-width:240px; border-radius:20px; }
.kh-filmrow-text { flex:1 1 320px; min-width:0; display:flex; flex-direction:column; gap:8px; }
.kh-filmrow-title { font-size:1.5rem; line-height:1.25; }
.kh-banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px 40px; padding:40px 32px; }
.kh-banner > div { flex:1 1 320px; min-width:0; }
.kh-banner h2 { font-family:'Playfair Display',Georgia,serif; font-style:italic; font-weight:400; font-size:clamp(1.75rem,3.5vw,2.5rem); line-height:1.15; }
.kh-prevnext { display:flex; flex-wrap:wrap; gap:16px; }
.kh-prevnext a { flex:1 1 320px; min-width:0; padding:28px 32px; display:flex; flex-direction:column; gap:10px; }
.kh-prevnext a.kh-next { text-align:right; }
.kh-prevnext .kh-pn-title { font-size:1.5rem; line-height:1.25; }

/* ---------- Content written in the editor ---------- */
.kh-content > * { margin-block-start:0; }
.kh-content > * + * { margin-top:20px; }
.kh-content p, .kh-content li { font-size:1.1875rem; line-height:1.7; color:var(--body); }
.kh-content a { color:var(--accent); text-decoration:underline; text-underline-offset:4px; }
.kh-content a.wp-block-button__link, .kh-content a.kh-pill, .kh-content .kh-card-link { text-decoration:none; }
.kh-content h2 { font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:1.375rem; line-height:1.3; letter-spacing:-.01em; margin-top:56px; }
.kh-content h3 { font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:1.125rem; margin-top:40px; }
.kh-content .kh-label { font-size:.8125rem; letter-spacing:.16em; line-height:1.65; color:var(--muted); }
.kh-content h2.kh-label { margin-top:40px; }
.kh-content .kh-label.kh-spark { color:var(--spark); }
.kh-content p.kh-meta { font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:var(--muted); }
.kh-label strong { font-weight:500; color:var(--spark); }
.kh-content img { border-radius:24px; }
.kh-content figcaption, .wp-element-caption { margin-top:14px; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:var(--muted); text-align:center; }
.kh-content .wp-block-pullquote, .kh-content blockquote { margin:48px 0; padding:0 0 0 28px; border:0; border-left:2px solid var(--spark); text-align:left; font-style:italic; font-size:clamp(1.5rem,3vw,1.875rem); line-height:1.35; color:var(--spark); }
.kh-content .wp-block-pullquote blockquote { margin:0; padding:0; border:0; }
.kh-content .wp-block-pullquote p, .kh-content blockquote p { font-size:inherit; line-height:inherit; color:inherit; }

/* Essay */
.kh-essayhead, .kh-essay .kh-content > *, .kh-essayfoot { max-width:680px; margin-left:auto; margin-right:auto; }
.kh-essay { padding:40px 12px 0; }
.kh-essayhead .kh-meta { margin-top:36px; }
.kh-essayhead h1.wp-block-post-title { margin-top:16px; }
.kh-standfirst, .kh-essayhead .wp-block-post-excerpt__excerpt { margin-top:24px; font-size:1.375rem; line-height:1.5; color:var(--muted); }
.kh-byline { margin-top:28px; padding-top:20px; border-top:1px solid var(--line); }
.kh-essay .kh-content { padding-top:12px; }
.kh-essay .kh-content > * + * { margin-top:28px; }
.kh-essay .kh-content p { font-size:1.25rem; }
.kh-essay .kh-content > .alignwide, .kh-essay .kh-content > .alignfull, .kh-essay .kh-content > figure.wp-block-image { max-width:920px; margin-top:56px; margin-bottom:28px; }
.kh-essay .kh-content > h2 + * { margin-top:20px; }
.kh-endmark { margin-top:40px; font-family:'Space Grotesk',system-ui,sans-serif; letter-spacing:.4em; color:var(--spark); }
.kh-center { text-align:center; }

/* Film */
.kh-player { position:relative; aspect-ratio:16/9; border:1px solid var(--frame); border-radius:28px; overflow:hidden; background:var(--tile); display:flex; align-items:center; justify-content:center; }
.kh-player iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.kh-player-empty { font-family:'Space Grotesk',system-ui,sans-serif; font-size:.8125rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:24px; text-align:center; }
.kh-filmhead { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:20px 40px; padding:8px 12px 0; }
.kh-filmhead > div { flex:1 1 420px; min-width:0; }
.kh-filmhead .kh-meta { margin-top:16px; }
.kh-film .kh-content { display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,1fr); column-gap:64px; padding:16px 12px 0; align-items:start; }
.kh-film .kh-content > * { grid-column:1; max-width:640px; }
.kh-film .kh-content > .kh-details { grid-column:2; grid-row:1 / span 30; max-width:none; margin-top:0; }
.kh-film .kh-content > .wp-block-gallery, .kh-film .kh-content > .kh-banner, .kh-film .kh-content > .alignwide { grid-column:1 / -1; max-width:none; margin-top:40px; }
.kh-film .kh-content > h2:first-child, .kh-film .kh-content > .kh-label:first-child { margin-top:0; }
.kh-details { --g:.1; --sec:linear-gradient(180deg,var(--c1),transparent 75%); border-radius:32px; padding:24px 28px 16px; box-sizing:border-box; }
.kh-details > * { position:relative; margin-top:0 !important; }
.kh-details p { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--line); font-family:'Space Grotesk',system-ui,sans-serif; font-size:.9375rem !important; line-height:1.4 !important; color:var(--text) !important; text-align:right; }
.kh-details p strong { font-weight:400; font-size:.875rem; color:var(--muted); text-align:left; }
.kh-details p.kh-label { display:block; border:0; padding:0 0 16px; text-align:left; font-size:.8125rem !important; color:var(--muted) !important; }
.kh-film .wp-block-gallery img { border-radius:20px; border:1px solid var(--frame); aspect-ratio:16/9; object-fit:cover; }
@media (max-width:820px){ .kh-film .kh-content { display:block; } .kh-film .kh-content > .kh-details { margin-top:28px !important; } }

/* Photographs */
.kh-serieslinks { display:flex; flex-wrap:wrap; gap:8px; padding:0 12px; }
.kh-serieslinks a { color:var(--muted); }
.kh-serieslinks a[aria-current="true"] { color:var(--text); background:rgba(255,255,255,.22); }
.kh-photos > * + *, .kh-series > * + * { margin-top:28px; }
.kh-photos > p, .kh-series > p { padding:0 12px; max-width:620px; }
body .kh-photos .wp-block-gallery.has-nested-images, body .kh-homephotos .wp-block-gallery.has-nested-images { display:block; columns:3 260px; column-gap:12px; }
body .kh-photos .wp-block-gallery.has-nested-images figure.wp-block-image, body .kh-homephotos .wp-block-gallery.has-nested-images figure.wp-block-image { display:block; width:auto !important; margin:0 0 12px !important; break-inside:avoid; position:relative; }
body .kh-series .wp-block-gallery.has-nested-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
body .kh-series .wp-block-gallery.has-nested-images figure.wp-block-image { width:auto !important; margin:0 !important; position:relative; }
body .kh-series .wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio:3/2; object-fit:cover; height:auto !important; }
body .kh-homephotos .wp-block-gallery.has-nested-images { columns:3 240px; }
body .wp-block-gallery.has-nested-images figure.wp-block-image img { display:block; width:100%; height:auto; border-radius:24px; border:1px solid var(--frame); box-sizing:border-box; cursor:zoom-in; }
body .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { position:absolute; left:12px; bottom:12px; right:auto; top:auto; width:auto; max-width:calc(100% - 24px); max-height:none; margin:0; padding:6px 14px; border-radius:999px; text-align:left; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.75rem; letter-spacing:.04em; color:var(--text); background:rgba(40,40,44,.55); -webkit-backdrop-filter:blur(20px) saturate(180%); backdrop-filter:blur(20px) saturate(180%); border:1px solid rgba(255,255,255,.18); box-shadow:inset 1px 1px 0 rgba(255,255,255,.35); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
body .wp-block-gallery.has-nested-images figure.wp-block-image::before { display:none !important; }
.kh-featured { display:flex; flex-wrap:wrap; gap:16px 40px; align-items:center; }
.kh-featured > .kh-featured-photo { flex:3 1 420px; min-width:0; }
.kh-featured > .kh-featured-text { flex:2 1 300px; min-width:0; padding:16px 16px 16px 0; }
.kh-featured-photo img { display:block; width:100%; aspect-ratio:3/2; object-fit:cover; border-radius:24px; }
.kh-featured-text > * + * { margin-top:16px; }
.kh-featured-text h2 { font-family:'Playfair Display',Georgia,serif; font-weight:400; font-size:clamp(2rem,4vw,2.75rem); line-height:1.1; letter-spacing:0; margin-top:16px; }
.kh-featured-text p { color:var(--muted); font-size:1.125rem; }
.kh-featured-text p.kh-count { font-family:'Space Grotesk',system-ui,sans-serif; font-size:.9375rem; color:var(--spark); }

/* About */
.kh-about > * + * { margin-top:32px; }
.kh-abouthead { display:flex; flex-wrap:wrap; align-items:center; gap:32px 64px; padding:0 12px 8px; }
.kh-abouthead > .kh-portrait { flex:1 1 300px; max-width:400px; min-width:0; }
.kh-abouthead > .kh-intro { flex:2 1 420px; min-width:0; }
.kh-portrait img { display:block; width:100%; aspect-ratio:4/5; object-fit:cover; border-radius:32px; border:1px solid var(--line); }
.kh-intro > * + * { margin-top:20px; }
.kh-intro p { max-width:580px; }
.kh-intro p.kh-first { font-size:1.375rem; line-height:1.5; color:var(--text); }
.kh-num { color:var(--spark); }
.kh-bg-row { display:flex; flex-wrap:wrap; gap:6px 40px; padding:22px 0; border-top:1px solid var(--line); margin-top:0 !important; }
.kh-bg-row > * { margin-top:0 !important; }
.kh-bg-row > p.kh-when { flex:0 0 150px; padding-top:4px; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:var(--muted); }
.kh-bg-row > .kh-what { flex:999 1 380px; min-width:0; }
.kh-what > * { margin-top:0 !important; }
.kh-what p.kh-title { font-size:1.375rem; line-height:1.3; color:var(--text); }
.kh-what p + p { margin-top:8px !important; max-width:620px; color:var(--muted); font-size:1.125rem; }
.kh-panel > .kh-bg-list { margin-top:24px; }
.kh-make { display:flex; flex-wrap:wrap; gap:16px; }
.kh-make > .kh-makecard { flex:1 1 280px; min-width:0; --g:.1; --sec:linear-gradient(180deg,var(--c2),transparent 75%); border-radius:40px; padding:28px 28px 24px; box-sizing:border-box; margin-top:0 !important; }
.kh-makecard > * { position:relative; margin-top:0 !important; }
.kh-makecard p.kh-cardname { font-style:italic; font-size:1.75rem; line-height:1.2; }
.kh-makecard p.kh-cardname a { color:var(--text); text-decoration:none; }
.kh-makecard p + p { margin-top:10px !important; color:var(--muted); font-size:1.125rem; }
.kh-split { display:flex; flex-wrap:wrap; align-items:center; gap:24px 64px; padding:0 12px; }
.kh-split > * { flex:1 1 340px; min-width:0; margin-top:0 !important; }
.kh-split p.kh-title, .kh-plain p.kh-title { font-size:1.375rem; line-height:1.3; color:var(--text); }
.kh-split p, .kh-plain p { color:var(--muted); max-width:560px; font-size:1.125rem; }
.kh-split > div > * + *, .kh-plain > * + * { margin-top:12px !important; }
.kh-split img { display:block; width:100%; aspect-ratio:3/2; object-fit:cover; }
.kh-plain { padding:0 12px; }
.kh-aboutcontact p.kh-big { font-family:'Playfair Display',Georgia,serif; font-style:italic; font-size:clamp(2rem,4.5vw,3rem); line-height:1.1; color:var(--text); margin-top:20px; }
.kh-aboutcontact p { color:var(--muted); max-width:520px; margin-top:16px; }
.kh-aboutcontact .wp-block-buttons { margin-top:28px; }

/* ---------- Large photo view ---------- */
.kh-lb { position:fixed; inset:0; z-index:100; background:rgba(8,9,9,.94); display:none; flex-direction:column; gap:16px; padding:20px; box-sizing:border-box; }
.kh-lb.is-open { display:flex; }
.kh-lb-top, .kh-lb-bottom { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.kh-lb-mid { flex:1 1 auto; min-height:0; display:flex; align-items:center; gap:16px; }
.kh-lb-img { flex:1 1 auto; min-width:0; height:100%; display:flex; align-items:center; justify-content:center; }
.kh-lb-img img { max-width:100%; max-height:100%; border-radius:16px; }
.kh-lb-btn { flex:0 0 48px; width:48px; height:48px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#EDEDED; cursor:pointer; padding:0; font:inherit; }
.kh-lb-btn svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.kh-lb-cap { font-size:1.125rem; color:#EDEDED; }
.kh-lb-count { font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:#B8B8B8; }
.kh-lb-bottom { padding:0 64px; flex-wrap:wrap; }
@media (max-width:600px){ .kh-lb-bottom { padding:0; } .kh-lb-btn.kh-lb-prev, .kh-lb-btn.kh-lb-next { position:absolute; top:50%; } .kh-lb-prev { left:8px; } .kh-lb-next { right:8px; } }

@media (max-width:600px){
  .kh-hero-photo { min-height:340px; -webkit-mask-image:linear-gradient(180deg,#000 45%,transparent 100%); mask-image:linear-gradient(180deg,#000 45%,transparent 100%); border-radius:32px 32px 0 0; }
  .kh-panel { border-radius:28px; padding:12px; }
  .kh-feature, .kh-banner, .kh-panel-pad { padding:28px 20px; }
}
@media (prefers-reduced-transparency:reduce){ .kh-glass, .kh-panel::after { -webkit-backdrop-filter:none; backdrop-filter:none; } .kh-menu { background:var(--ground); } }
@media (prefers-reduced-motion:reduce){ html { scroll-behavior:auto; } }

/* Additions */
.kh-photos > p:first-child, .kh-series > p:first-child { font-size:1.25rem; line-height:1.6; color:var(--muted); }
.kh-photos > p, .kh-series > p { color:var(--muted); }
.kh-page { padding:0 12px; }
.kh-page > * { max-width:760px; }
.kh-pagehead .wp-block-term-description { margin-top:24px; max-width:560px; font-size:1.25rem; line-height:1.6; color:var(--muted); }
.kh-pagehead .wp-block-term-description p { margin:0; }
.kh-series-head { padding-top:16px; }
.kh-series-head h1 { margin-top:16px; }
.kh-index-list { padding:0 12px; }
.kh-index-list .wp-block-post-title { font-family:'Spectral',Georgia,serif; font-style:normal; font-size:clamp(1.375rem,2.6vw,1.75rem); line-height:1.25; }
.kh-index-list li { padding:22px 0; border-top:1px solid var(--line); list-style:none; }
.kh-index-list ul { padding:0; margin:0; }
.screen-reader-text { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
.kh-essayhead .kh-byline { margin-top:28px; }
.kh-about-teaser-text > a, .kh-about-teaser-text > p + p { margin-top:28px; }
.kh-center { padding:8px 0; }
body .kh-film .wp-block-gallery.has-nested-images { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
body .kh-film .wp-block-gallery.has-nested-images figure.wp-block-image { width:auto !important; margin:0 !important; }
@media (max-width:600px){
  .kh-wrap > header.wp-block-template-part { align-self:stretch; top:10px; }
  .kh-menu { flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; gap:4px; padding:4px 4px 4px 18px; scrollbar-width:none; -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent); mask-image:linear-gradient(90deg,#000 88%,transparent); }
  .kh-menu::-webkit-scrollbar { display:none; }
  .kh-wordmark { flex:0 0 auto; font-size:1rem; padding:8px 6px 8px 0; }
  .kh-nav { flex-wrap:nowrap; font-size:.875rem; }
  .kh-nav a { padding:8px 12px; white-space:nowrap; }
}
.kh-banner-text > * + * { margin-top:12px !important; }
.kh-banner .kh-pn-title { font-size:1.5rem !important; line-height:1.25; color:var(--text) !important; }

/* ---------- Footer (1.1.0) ---------- */
.kh-wrap > footer.wp-block-template-part { margin-top:24px; }
.kh-footer-panel { --g:.1; --sec:linear-gradient(180deg,var(--c1),transparent 70%); padding:40px 36px 24px; }
.kh-footer-top { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap:40px 48px; }
.kh-footer-mark { display:inline-block; font-family:'Sacramento','Spectral',cursive; font-style:italic; font-weight:400; font-size:4rem; line-height:1; -webkit-text-stroke:.028em currentColor; color:var(--spark); }
.kh-footer-brand p { margin-top:12px; max-width:320px; color:var(--muted); font-size:1.0625rem; line-height:1.55; }
.kh-socials { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.kh-social { --g:1; --sec:linear-gradient(transparent,transparent); display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:50%; color:var(--text); transition:color .2s, background .2s; }
.kh-social svg { position:relative; width:20px; height:20px; }
.kh-social:hover { color:var(--accent); }
.kh-footer-col ul { list-style:none; margin:16px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; }
.kh-footer-col a { display:inline-block; padding:6px 0; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.9375rem; color:var(--text); text-decoration:underline; text-decoration-color:var(--line); text-underline-offset:5px; transition:text-decoration-color .2s, color .2s; overflow-wrap:break-word; }
.kh-footer-col a:hover { color:var(--accent); text-decoration-color:currentColor; }
.kh-footer-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 24px; margin-top:40px; padding-top:20px; border-top:1px solid var(--line); font-family:'Space Grotesk',system-ui,sans-serif; font-size:.8125rem; color:var(--muted); }
.kh-footer-legal { display:flex; gap:10px; align-items:center; }
.kh-footer-legal a { color:var(--muted); padding:6px 0; }
.kh-footer-legal a:hover { color:var(--text); }
@media (max-width:820px){ .kh-footer-top { grid-template-columns:1fr 1fr; } .kh-footer-brand { grid-column:1 / -1; } }
@media (max-width:600px){ .kh-footer-panel { padding:28px 20px 20px; } }
@media (max-width:480px){ .kh-footer-top { grid-template-columns:1fr; gap:32px; } }

/* ---------- 1.2.0 ---------- */

/* Photo previews carry no text. Captions stay in the page so the large view can read them. */
body .wp-block-gallery.has-nested-images figure.wp-block-image figcaption, .kh-content .wp-block-gallery figcaption { display:none; }

/* Home */
.kh-hero-go { margin-top:32px !important; }
.kh-hero-text p.kh-hero-go { margin-top:32px; }

/* Films: the old details panel is no longer shown */
.kh-film .kh-details { display:none; }
.kh-film .kh-content { display:block; }
.kh-film .kh-content > * + * { margin-top:20px; }
.kh-film .kh-content > .wp-block-gallery, .kh-film .kh-content > .kh-banner, .kh-film .kh-content > .alignwide { max-width:none; }
.kh-film { max-width:none; }

/* About heading */
.kh-h1 .kh-smile { display:inline-block; width:.5em; height:.5em; margin-left:.18em; vertical-align:.04em; transform:skewX(-10deg); fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }

/* Contact */
.kh-content.kh-contactintro { margin-top:24px; }
.kh-content.kh-contactintro p { max-width:560px; font-size:1.1875rem; line-height:1.7; color:var(--body); }
.kh-contactform { position:relative; z-index:2; }
.kh-contactform input, .kh-contactform textarea { -webkit-user-select:text; user-select:text; touch-action:manipulation; }
.kh-contactform .wpcf7 form > div, .kh-contactform .wpcf7 form > p { margin:0; }
.kh-cf-grid { display:grid; grid-template-columns:1fr 1fr; gap:28px 24px; }
.kh-cf-field { display:flex; flex-direction:column; gap:10px; min-width:0; }
.kh-cf-field > span:first-child { font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:.8125rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.kh-cf-wide { grid-column:1 / -1; }
.kh-cf-field .wpcf7-form-control-wrap { display:block; }
.kh-contactform input[type="email"], .kh-contactform input[type="text"], .kh-contactform textarea {
  box-sizing:border-box; width:100%; padding:16px 20px; background:rgba(0,0,0,.35); border:1px solid var(--line); border-radius:20px;
  color:var(--text); font-family:'Spectral',Georgia,serif; font-size:1.125rem; line-height:1.5; transition:border-color .2s, background .2s;
}
.kh-contactform textarea { min-height:220px; resize:vertical; }
.kh-contactform ::placeholder { color:var(--muted); opacity:.6; }
.kh-contactform input:focus, .kh-contactform textarea:focus { outline:none; border-color:var(--accent); background:rgba(0,0,0,.5); }
.kh-contactform .wpcf7-submit, .kh-contactform .kh-cf-send {
  margin-top:28px; padding:14px 32px; border:0; border-radius:999px; background:var(--accent); color:var(--ground);
  font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:1rem; cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 10px 30px rgba(0,0,0,.35); transition:filter .2s;
}
.kh-contactform .wpcf7-submit:hover { filter:brightness(1.08); }
.kh-contactform .wpcf7-submit:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.kh-contactform .wpcf7-spinner { margin:0 0 0 16px; vertical-align:middle; }
.kh-contactform .wpcf7-not-valid-tip { margin-top:6px; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:var(--accent); }
.kh-contactform .wpcf7 form .wpcf7-response-output { margin:24px 0 0; padding:12px 18px; border-radius:16px; border:1px solid var(--line); font-family:'Space Grotesk',system-ui,sans-serif; font-size:.9375rem; color:var(--text); }
.kh-contactform .wpcf7 form.sent .wpcf7-response-output { border-color:var(--accent); }
.kh-contactform .wpcf7 form.invalid .wpcf7-response-output, .kh-contactform .wpcf7 form.failed .wpcf7-response-output { border-color:var(--spark); }
.kh-contactform .screen-reader-response { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); }
@media (max-width:640px){ .kh-cf-grid { grid-template-columns:1fr; } }

/* Research and Projects lists */
.kh-filters { display:flex; flex-wrap:wrap; gap:8px; padding:0 12px; }
.kh-filters button { color:var(--muted); font-family:'Space Grotesk',system-ui,sans-serif; }
.kh-filters button[aria-pressed="true"] { color:var(--text); background:rgba(255,255,255,.22); }
.kh-pill-glass { --g:1; --sec:linear-gradient(transparent,transparent); }
.kh-row-small { font-size:clamp(1.25rem,2.4vw,1.5rem); line-height:1.3; }
.kh-feature h2 a, .kh-featured-text h2 a { color:inherit; }
.kh-featured > a.kh-featured-photo { display:flex; border-radius:24px; }
.kh-entrygrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.kh-entrycard { --g:.1; --sec:linear-gradient(180deg,var(--c2),transparent 75%); border-radius:32px; padding:14px 14px 24px; display:flex; flex-direction:column; gap:12px; min-width:0; box-sizing:border-box; }
.kh-entrycard::after { content:""; position:absolute; inset:0; border-radius:inherit; padding:var(--rim,3px); pointer-events:none;
  background:linear-gradient(135deg,rgba(255,255,255,calc(.60*var(--g))),rgba(255,255,255,calc(.06*var(--g))) 28%,rgba(255,255,255,0) 50%,rgba(255,255,255,calc(.06*var(--g))) 72%,rgba(255,255,255,calc(.38*var(--g))));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0); }
.kh-entrycard > * { position:relative; z-index:1; }
.kh-entrycard .kh-tile { border:0; border-radius:22px; }
.kh-1610 { aspect-ratio:16/10; }
.kh-entrycard-kick { padding:6px 10px 0; font-family:'Space Grotesk',system-ui,sans-serif; font-size:.75rem; letter-spacing:.14em; text-transform:uppercase; color:var(--spark); }
.kh-entrycard-title { padding:0 10px; font-size:1.3125rem; line-height:1.3; }
.kh-entrycard-text { padding:0 10px; color:var(--muted); font-size:1rem; line-height:1.55; }
.kh-entrycard:hover .kh-entrycard-title { color:#fff; }
[data-kh-areas].is-hidden, [data-kh-group].is-hidden { display:none !important; }

/* Single research or project */
.kh-entryhead { padding-top:8px; }
.kh-entryhead .kh-h1 { margin-top:18px; max-width:900px; font-size:clamp(2.25rem,5vw,3.5rem); line-height:1.1; }
.kh-entrydetails { padding:24px 32px 16px; }
.kh-entrydetails h2 { padding-bottom:8px; }
.kh-entrydetails dl { margin:0; }
.kh-dl-row { display:flex; flex-wrap:wrap; gap:4px 32px; padding:16px 0; border-top:1px solid var(--line); }
.kh-dl-row dt { flex:0 0 180px; padding-top:3px; font-family:'Space Grotesk',system-ui,sans-serif; font-weight:500; font-size:.8125rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.kh-dl-row dd { flex:999 1 320px; min-width:0; margin:0; font-family:'Space Grotesk',system-ui,sans-serif; font-size:1rem; line-height:1.5; }
.kh-entrybody { padding:16px 12px 0; }
.kh-entrybody > .kh-label { padding-bottom:20px; }
.kh-entrybody .kh-content > p, .kh-entrybody .kh-content > ul, .kh-entrybody .kh-content > h2, .kh-entrybody .kh-content > h3 { max-width:680px; }
.kh-entrybody .wp-block-gallery { margin-top:40px; }
.kh-entrylink { margin-top:32px; }
@media (max-width:600px){ .kh-entrydetails { padding:20px; } .kh-dl-row dt { flex-basis:100%; } }
.kh-lb-text { display:flex; flex-direction:column; gap:4px; }
.kh-lb-day { font-family:'Space Grotesk',system-ui,sans-serif; font-size:.875rem; color:#B8B8B8; }
.kh-lb-day:empty { display:none; }
.kh-lb-ig { color:#EDEDED; }


/* ---------- 1.4.0 ---------- */

/* Corners: glass panels 20px, and what sits inside them 12px, so the curves nest. */
:root { --r-panel:20px; --r-inner:12px; }
.kh-panel, .kh-entrycard, .kh-details, .kh-make > .kh-makecard, .kh-footer-panel { border-radius:var(--r-panel); }
.kh-tile, .kh-entrycard .kh-tile, .kh-filmrow .kh-tile, .kh-player, .kh-content img, .kh-featured-photo img, .kh-featured > a.kh-featured-photo, .kh-portrait img, .kh-split img,
body .wp-block-gallery.has-nested-images figure.wp-block-image img, .kh-film .wp-block-gallery img { border-radius:var(--r-inner); }
@media (max-width:600px){ .kh-panel { border-radius:var(--r-panel); } }

/* Menu dropdowns. On a mouse they open on hover; on a phone the first tap opens them (kh.js). */
.kh-navi { position:relative; display:flex; }
.kh-dd { position:absolute; top:100%; left:50%; z-index:30; min-width:200px; padding-top:12px; opacity:0; visibility:hidden; transform:translate(-50%,4px); transition:opacity .15s ease, transform .15s ease, visibility .15s; }
@media (hover:hover){
  .kh-navi:hover > .kh-dd, .kh-navi:focus-within > .kh-dd { opacity:1; visibility:visible; transform:translate(-50%,0); }
}
.kh-dd-in, .kh-dd-float { display:flex; flex-direction:column; gap:2px; padding:8px; border-radius:22px; box-sizing:border-box;
  background:color-mix(in srgb,var(--ground) 90%,transparent); -webkit-backdrop-filter:blur(24px) saturate(160%); backdrop-filter:blur(24px) saturate(160%);
  border:1px solid rgba(255,255,255,.14); box-shadow:inset 1px 1px 0 rgba(255,255,255,.22),0 18px 40px rgba(0,0,0,.45); font-family:'Space Grotesk',system-ui,sans-serif; }
.kh-nav .kh-dd-in a, .kh-dd-float a { display:block; padding:9px 14px; border-radius:14px; white-space:nowrap; font-size:.9375rem; color:var(--muted); background:none; box-shadow:none; }
.kh-nav .kh-dd-in a:hover, .kh-dd-float a:hover { background:rgba(255,255,255,.12); color:var(--text); }
.kh-nav .kh-dd-in a.kh-dd-all, .kh-dd-float a.kh-dd-all { color:var(--text); }
.kh-dd-in hr, .kh-dd-float hr { margin:4px 8px; border:0; border-top:1px solid rgba(255,255,255,.12); }
.kh-dd-float { position:fixed; z-index:60; min-width:220px; max-width:calc(100vw - 24px); }
.kh-nav .kh-navi > a.is-open { color:var(--text); background:rgba(255,255,255,.12); }

/* Large photo view: the same charcoal as the Photographs pages. */
.kh-lb { background:rgba(30,30,29,.96); }

/* Single film: the player gets a plain frame so nothing coloured touches the film. */
.kh-player { background:#000; border-color:rgba(255,255,255,.10); }
.kh-player .kh-glass { --edge-rgb:255,255,255; --edge-a:.2; }

/* Single essay: an ivory page laid on the navy room. Dark text on a light ground reads better over long stretches. */
.kh-essay { --text:#1B2140; --muted:#56607A; --body:#2A3050; --line:rgba(27,33,64,.16); --tile:rgba(27,33,64,.07); --frame:rgba(27,33,64,.12); --spark:#B3305E; --accent:#2A4C8C;
  box-sizing:border-box; width:100%; max-width:1000px; margin:0 auto; padding:48px 32px 64px; background:#ECE6D0; color:var(--text);
  border-radius:var(--r-panel); box-shadow:0 30px 70px rgba(0,0,0,.45); }
.kh-essay a:hover { color:var(--text); }
.kh-essay .kh-content a:hover { color:var(--accent); }
.kh-essay ::selection { background:rgba(179,48,94,.18); }
@media (max-width:600px){ .kh-essay { padding:32px 20px 48px; } }

/* About: years on the right, the university on its own line. */
.kh-bg-row > .kh-what { order:1; }
.kh-bg-row > p.kh-when { order:2; flex:0 0 auto; margin-left:auto !important; text-align:right; }
.kh-what p.kh-school { margin-top:6px !important; color:var(--body); font-size:1.125rem; }
@media (max-width:600px){ .kh-bg-row > p.kh-when { order:0; margin-left:0 !important; text-align:left; flex-basis:100%; } }

/* Page transitions. The menu stays put while the next page's colours fade in; a clicked card unfolds into its page.
   Browsers without support (Firefox for now) just load the page normally. Off for anyone who prefers reduced motion. */
@media (prefers-reduced-motion:no-preference){
  @view-transition { navigation:auto; }
}
.kh-wrap > header.wp-block-template-part { view-transition-name:kh-menu; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration:.45s; animation-timing-function:ease; }
::view-transition-group(kh-menu) { animation:none; }
::view-transition-old(kh-menu) { display:none; }
::view-transition-new(kh-menu) { animation:none; }
::view-transition-group(kh-unfold) { animation-duration:.5s; animation-timing-function:cubic-bezier(.2,.8,.2,1); }
::view-transition-old(kh-unfold), ::view-transition-new(kh-unfold) { height:100%; object-fit:cover; overflow:clip; }
