/* ==========================================================================
   shawnfinnerty.work
   Two themes share one identity:
   - "screen": CRT black, used on the homepage and portfolio (the loud side)
   - "label":  white VHS-tape-label, used on the freelance pages (the calm side)
   ========================================================================== */

:root {
  /* the six stripes */
  --green: #5cb84a;
  --yellow: #f7c325;
  --orange: #f4892b;
  --red: #e2403f;
  --purple: #8f479c;
  --blue: #1aa3dc;

  --black: #000;
  --white: #fff;
  --osd-blue: #2340e0;

  --font-display: "Righteous", "Arial Rounded MT Bold", system-ui, sans-serif;  /* name, page titles, cards */
  --font-headline: "Anton", "Impact", "Arial Narrow", sans-serif;                 /* section headlines */
  --font-body: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;          /* paragraphs */
  --font-osd: "VT323", ui-monospace, monospace;

  --wrap: 1120px;
  --gutter: 16px;
  --radius-screen: 18px;

  /* picture effects; the VCR menu switches these off via classes on <html>,
     and Intensity sets --k (Low .55 / Med 1 / High 1.6) */
  --k: 1.6;
  --bleed: 0;
  --fx-glow: 0 0 calc(.05em * var(--k)) rgba(255,255,255, calc(.45 * var(--k))),
             0 0 calc(.28em * var(--k)) rgba(150,205,255, calc(.32 * var(--k))),
             0 0 calc(.8em * var(--k)) rgba(150,205,255, calc(.14 * var(--k)));
  --fx-glow-soft: 0 0 calc(.35em * var(--k)) rgba(200,225,255, calc(.16 * var(--k)));
  --fx-fringe: calc(-.02em * var(--k)) 0 rgba(255,40,80,.7), calc(.02em * var(--k)) 0 rgba(0,200,255,.7);
  --fx-bleed: 0 calc(var(--bleed) * 1px) rgba(255,30,70,.8),
              calc(var(--bleed) * .25px) calc(var(--bleed) * .45px) rgba(40,255,110,.6),
              0 calc(var(--bleed) * -.8px) rgba(30,130,255,.8);
  --fx-blur: blur(calc(.28px * var(--k)));
  --fx-media-glow: drop-shadow(0 0 calc(8px * var(--k)) currentColor);
}
html[data-fx-level="1"] { --k: .55; }
html[data-fx-level="2"] { --k: 1; }
html[data-fx-level="3"] { --k: 1.6; }
html.no-glow { --fx-glow: 0 0 0 transparent; --fx-glow-soft: 0 0 0 transparent; --fx-media-glow: drop-shadow(0 0 0 transparent); }
html.no-bleed, html.no-motion { --fx-bleed: 0 0 0 transparent; }
html.no-fuzz { --fx-fringe: 0 0 0 transparent; --fx-blur: blur(0); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--osd-blue); color: #fff; font-family: var(--font-osd); font-size: 1.25rem; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.theme-label :focus-visible { outline-color: var(--osd-blue); }

/* OSD: the VCR on-screen-display font, used only for channel numbers & tape controls */
.osd { font-family: var(--font-osd); font-weight: 400; letter-spacing: .02em; }

/* ---------- Rainbow stripes ---------- */
.stripes { display: grid; grid-template-rows: repeat(6, 1fr); }
.stripes i:nth-child(1) { background: var(--green); }
.stripes i:nth-child(2) { background: var(--yellow); }
.stripes i:nth-child(3) { background: var(--orange); }
.stripes i:nth-child(4) { background: var(--red); }
.stripes i:nth-child(5) { background: var(--purple); }
.stripes i:nth-child(6) { background: var(--blue); }
.stripes--rule { height: 18px; }

/* ---------- No-signal placeholder (SMPTE-style color bars) ---------- */
.nosignal { position: relative; aspect-ratio: 16 / 10; width: 100%; background: #111; overflow: hidden; }
.nosignal__bars {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    #c0c0c0 0 14.28%, #c0c000 14.28% 28.57%, #00c0c0 28.57% 42.85%, #00c000 42.85% 57.14%,
    #c000c0 57.14% 71.42%, #c00000 71.42% 85.71%, #0000c0 85.71% 100%);
  filter: saturate(.85);
}
.nosignal__bars::after { /* bottom strip */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(90deg, #0000c0 0 14.28%, #111 14.28% 28.57%, #c000c0 28.57% 42.85%, #111 42.85% 57.14%, #00c0c0 57.14% 71.42%, #111 71.42% 85.71%, #c0c0c0 85.71% 100%);
}
.nosignal__text {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  padding: .1em .6em; background: var(--osd-blue); color: #fff; font-size: clamp(1.1rem, 3vw, 1.7rem);
  text-transform: uppercase; white-space: nowrap;
}
.media { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .8em 1.4em; border: 3px solid var(--black); border-radius: 999px;
  background: var(--black); color: var(--white); font-family: var(--font-display); font-size: 1.1rem;
  text-decoration: none; line-height: 1.1;
}
/* scoped to the theme so the theme's link color can't override button text */
.theme-label .btn, .theme-screen .btn { color: var(--white); }
.btn:hover { background: var(--osd-blue); border-color: var(--osd-blue); }
.theme-label .btn--ghost { background: transparent; color: var(--black); }
.theme-label .btn--ghost:hover { background: var(--osd-blue); color: var(--white); }

/* ==========================================================================
   SCREEN THEME (homepage + portfolio)
   ========================================================================== */
.theme-screen { background: var(--black); color: #e9e9e4; }
.theme-screen a { color: #fff; }
/* scanlines over everything, very faint */
.theme-screen::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
}
.screen-frame { border-radius: var(--radius-screen); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.screen-frame > * { border-radius: inherit; }

.chip {
  display: inline-block; padding: 0 .45em; font-size: 1.15rem; line-height: 1.35;
  background: var(--ch, var(--osd-blue)); color: #000; text-transform: uppercase;
}

.wordmark { font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; color: inherit; }

/* ---------- Homepage ---------- */
.osd-bar {
  display: flex; justify-content: space-between; padding: 14px var(--gutter) 0;
  font-size: 1.6rem; color: #fff; text-transform: uppercase; text-shadow: 0 0 6px rgba(255,255,255,.45);
}
.home__main { padding-bottom: 64px; }
.home__hero { padding: 48px 0 40px; overflow: hidden; }

.logo { position: relative; margin: 0; padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.logo__stripes {
  position: absolute; z-index: 0; right: 0;
  left: calc(max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) + .35em);
  top: 18%; height: 34%;
  font-size: clamp(3.6rem, 13vw, 9.5rem);
}
.logo__stripes .stripes { height: 100%; border-radius: .5em 0 0 .5em; overflow: hidden; }
.logo__name {
  position: relative; z-index: 1; display: inline-block;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(3.6rem, 13vw, 9.5rem); line-height: .92;
  color: #f4f4ef; -webkit-text-stroke: .045em #000; paint-order: stroke fill;
}
.home__tagline {
  margin: 28px 0 0; padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  padding-right: var(--gutter); max-width: 42ch; box-sizing: content-box;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem); color: #d7d7d0;
}

/* CRT power-on: the one orchestrated motion moment on the site */
@keyframes power-on {
  0% { transform: scale(1, .004); filter: brightness(4); opacity: .2; }
  45% { transform: scale(1, .004); filter: brightness(4); opacity: 1; }
  100% { transform: scale(1, 1); filter: brightness(1); }
}
.home .home__main { animation: power-on .7s cubic-bezier(.2,.7,.2,1) both; transform-origin: 50% 30%; }
@media (prefers-reduced-motion: reduce) { .home .home__main { animation: none; } }
html.no-motion .home .home__main { animation: none; }

.channels { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 720px) { .channels { grid-template-columns: 1fr 1fr; gap: 24px; } }
.channel {
  position: relative; display: grid; gap: 4px; padding: 22px 24px 24px; text-decoration: none;
  border: 3px solid #fff; border-radius: var(--radius-screen); background: #000; overflow: hidden;
}
.channel::before { /* channel color bar along the top */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--ch);
}
.channel__num { font-size: 2.2rem; line-height: 1; color: var(--ch); margin-top: 6px; }
.channel__name { font-family: var(--font-display); font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.05; color: #fff; }
.channel__desc { color: #bdbdb6; font-size: 1rem; }
.channel:hover, .channel:focus-visible { border-color: var(--ch); }
.channel:hover .channel__name { animation: tracking .32s steps(4) 1; }
@keyframes tracking {
  0% { transform: translateX(0); text-shadow: none; }
  25% { transform: translateX(-4px); text-shadow: 3px 0 rgba(255,40,80,.7), -3px 0 rgba(0,200,255,.7); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); text-shadow: 2px 0 rgba(255,40,80,.6), -2px 0 rgba(0,200,255,.6); }
  100% { transform: translateX(0); text-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .channel:hover .channel__name { animation: none; } }
html.no-motion .channel:hover .channel__name, html.no-fuzz .channel:hover .channel__name { animation: none; }

/* Now Playing */
.nowplaying { margin-top: 56px; }
.nowplaying__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.nowplaying__label { margin: 0; font-size: 1.9rem; text-transform: uppercase; color: #fff; display: flex; align-items: center; gap: 10px; }
.rec { width: 14px; height: 14px; border-radius: 50%; background: var(--red); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rec { animation: none; } }
html.no-motion .rec { animation: none; }
.nowplaying__controls { display: flex; gap: 6px; }
.np-btn {
  min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 1.3rem; cursor: pointer;
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); border-radius: 8px;
}
.np-btn:hover { background: #fff; color: #000; }
.np-slide__link { display: grid; gap: 20px; text-decoration: none; }
@media (min-width: 760px) { .np-slide__link { grid-template-columns: 1.4fr 1fr; align-items: center; gap: 32px; } }
.np-slide__body h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 8px; color: #fff; }
.np-slide__body p { color: #c9c9c2; max-width: 40ch; }
.np-slide__more { color: var(--ch); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.home__about { margin-top: 64px; }
.home__about p { max-width: 62ch; color: #bdbdb6; font-size: 1.05rem; }

/* ---------- Portfolio ---------- */
.pf-header { border-bottom: 1px solid rgba(255,255,255,.14); }
.pf-header__inner, .fl-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 16px; }
.pf-header nav ul, .fl-header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; }
.pf-header nav a { text-decoration: none; color: #c9c9c2; }
.pf-header nav a:hover, .pf-header nav a[aria-current] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.portfolio__head { padding: 48px 0 24px; }
.portfolio__title {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 10vw, 6rem); margin: 0 0 12px;
}
.lede { font-size: 1.2rem; max-width: 56ch; }
.theme-screen .lede { color: #c9c9c2; }

.pf-grid { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pf-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .pf-card--featured { grid-column: span 2; } }
.pf-card[hidden] { display: none; }
.pf-card__link { display: block; text-decoration: none; }
.pf-card__media { transition: transform .15s ease-out; }
.pf-card__link:hover .pf-card__media { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--ch); }
.pf-card__body { padding-top: 14px; }
.pf-card__title { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: 8px 0 6px; color: #fff; }
.pf-card--featured .pf-card__title { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.pf-card__summary { color: #b8b8b0; margin: 0; max-width: 52ch; }
.pf-grid__empty { color: #b8b8b0; }

.portfolio__about { margin-top: 80px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.14); }
.portfolio__about h2 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.portfolio__about p { max-width: 62ch; color: #c9c9c2; }

/* Project page */
.project { padding-bottom: 64px; }
.backlink { display: inline-block; margin: 28px 0 8px; text-decoration: none; }
.backlink::before { content: "\25C0\FE0E  "; }
.theme-screen .backlink { color: #c9c9c2; }
.project__head { padding: 16px 0 28px; }
.project__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 8vw, 5rem); margin: 12px 0 10px; color: #fff; }
.project__summary { font-size: 1.25rem; max-width: 50ch; color: #d2d2cb; }
.project__hero { box-shadow: 0 0 0 3px var(--ch); }
.project__layout { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 860px) { .project__layout { grid-template-columns: 240px 1fr; gap: 56px; } }
.project__meta { margin: 0; display: grid; gap: 16px; align-content: start; }
.project__meta dt { font-family: var(--font-osd); font-size: 1.3rem; color: var(--ch); text-transform: uppercase; line-height: 1; }
.project__meta dd { margin: 4px 0 0; }
.prose { max-width: 66ch; }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.theme-screen .prose { color: #d2d2cb; }
.theme-screen .prose h2 { color: #fff; }
.prose code { font-size: .85em; background: rgba(127,127,127,.18); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.project__pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); }
.project__pager a { display: grid; gap: 2px; text-decoration: none; font-family: var(--font-display); font-size: 1.3rem; }
.project__pager .osd { font-size: 1.2rem; color: var(--ch); text-transform: uppercase; }
.project__pager .next { text-align: right; margin-left: auto; }

/* ---------- Shared footer ---------- */
.site-footer { margin-top: 32px; font-size: .95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px; }
.theme-screen .site-footer { color: #8f8f88; border-top: 1px solid rgba(255,255,255,.14); }
.theme-screen .site-footer a { color: #c9c9c2; }

/* ==========================================================================
   LABEL THEME (freelance)  -  a VHS tape label: white stock, black type, stripes
   ========================================================================== */
.theme-label { background: #fbfbf8; color: #141414; }
.theme-label a { color: #141414; }
.fl-header { background: #fbfbf8; }
.fl-header nav a { text-decoration: none; padding: 4px 0; }
.fl-header nav a:hover, .fl-header nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--orange); }
.fl-header__cta { font-weight: 700; }

.fl-hero { padding-top: 64px; padding-bottom: 56px; }
.fl-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 7vw, 4.6rem); max-width: 16ch; margin-bottom: 20px; }
.fl-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.fl-section { padding-top: 56px; padding-bottom: 8px; }
.fl-section h2, .fl-list h1, .fl-detail h1, .fl-contact h2 { font-family: var(--font-display); font-weight: 400; }
.fl-section h2 { font-size: clamp(2rem, 5vw, 2.8rem); }
.fl-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.fl-section__intro { max-width: 60ch; color: #4a4a4a; }
.more { font-weight: 700; text-underline-offset: 4px; }

.services { display: grid; gap: 28px; margin-top: 12px; }
@media (min-width: 860px) { .services { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.service { padding-left: 18px; border-left: 8px solid var(--ch); }
.service h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.service p { color: #4a4a4a; }
.service ul { margin: 0; padding-left: 1.1em; }
.service li { margin-bottom: 4px; }

.tiles { display: grid; gap: 28px; margin-top: 20px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); } .tiles--two { grid-template-columns: repeat(2, 1fr); } }
.tile { display: block; text-decoration: none; }
.tile__media { border: 3px solid #141414; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.tile:hover .tile__media { border-color: var(--osd-blue); }
.tile__kicker { display: block; font-size: .9rem; font-weight: 700; color: #555; }
.tile h2, .tile h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; margin: 6px 0; }
.tile:hover h2, .tile:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.tile p { color: #4a4a4a; margin: 0; }

.quotes { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 720px) { .quotes { grid-template-columns: repeat(2, 1fr); } }
.quote { margin: 0; padding: 20px 22px; background: #fff; border: 3px solid #141414; border-radius: 6px; box-shadow: 6px 6px 0 var(--yellow); }
.quote p { font-size: 1.15rem; margin-bottom: 10px; }
.quote footer { font-weight: 700; color: #555; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; gap: 24px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.4rem; background: #141414; color: #fff; border-radius: 50%;
}
.steps h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; }
.steps p { color: #4a4a4a; margin: 0; }

.fl-contact { margin-top: 64px; padding-top: 48px; padding-bottom: 56px; }
.fl-contact h2 { font-size: clamp(2rem, 5vw, 2.8rem); }
.fl-contact__email {
  display: inline-block; margin-top: 8px; font-family: var(--font-display); font-size: clamp(1.2rem, 4.2vw, 2.2rem);
  overflow-wrap: anywhere; text-decoration-thickness: 4px; text-underline-offset: 8px; text-decoration-color: var(--green);
}
.fl-contact__email:hover { text-decoration-color: var(--osd-blue); }

/* freelance list + detail pages */
.fl-list { padding-bottom: 48px; }
.fl-list h1, .fl-detail h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin-top: 12px; }
.client-list { display: grid; gap: 48px; margin-top: 24px; }
.client-row { display: grid; gap: 24px; align-items: start; }
@media (min-width: 820px) { .client-row { grid-template-columns: 1.2fr 1fr; } }
.fl-detail { padding-bottom: 48px; }
.fl-detail__head { padding: 8px 0 28px; }
.fl-detail__client { font-weight: 700; color: #555; margin: 0; }
.badge { display: inline-block; margin: 8px 0 4px; padding: 6px 12px; background: var(--yellow); border-radius: 6px; font-weight: 600; font-size: .95rem; max-width: 60ch; }
.fl-detail__hero { border: 3px solid #141414; border-radius: 6px; overflow: hidden; }
.fl-detail__layout { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 860px) { .fl-detail__layout { grid-template-columns: 240px 1fr; gap: 56px; } }
.fl-meta { margin: 0; display: grid; gap: 16px; align-content: start; }
.fl-meta dt { font-weight: 700; font-size: .9rem; color: #555; }
.fl-meta dd { margin: 2px 0 0; }
.fl-detail .quote { margin-top: 32px; }
.fl-cta { margin-top: 56px; padding: 28px; border: 3px solid #141414; border-radius: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.fl-cta h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; margin: 0; }

.site-footer--label { margin-top: 48px; color: #555; }
.site-footer--label .site-footer__inner a { font-weight: 700; }

/* ==========================================================================
   PICTURE EFFECTS (glow, fuzz, scanlines) - screen theme only
   ========================================================================== */
.theme-screen .logo__name,
.theme-screen .channel__name,
.theme-screen .portfolio__title,
.theme-screen .project__title,
.theme-screen .pf-card__title,
.theme-screen .np-slide__body h3,
.theme-screen .portfolio__about h2,
.theme-screen .prose h2,
.theme-screen .osd-bar,
.theme-screen .nowplaying__label,
.theme-screen .ident__label {
  text-shadow: var(--fx-bleed), var(--fx-fringe), var(--fx-glow);
}
/* everything else that's text gets the bleed + a soft halo */
.theme-screen p, .theme-screen li, .theme-screen dd, .theme-screen dt, .theme-screen a,
.theme-screen .chip, .theme-screen .wordmark, .theme-screen .lede, .theme-screen .guide__all, .theme-screen .np-slide__more {
  text-shadow: var(--fx-bleed), var(--fx-glow-soft);
}
.theme-screen .chip { text-shadow: var(--fx-bleed); }
.theme-screen .logo__name, .theme-screen .portfolio__title { filter: var(--fx-blur); }
.theme-screen .logo__stripes { filter: var(--fx-blur) drop-shadow(0 0 14px rgba(255,255,255,.18)); }
html.no-glow .theme-screen .logo__stripes { filter: var(--fx-blur); }

/* film grain = part of "fuzz" */
.theme-screen::before {
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 49; opacity: calc(.065 * var(--k));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-1%, 3%); } 80% { transform: translate(4%, 1%); } 100% { transform: translate(0, 0); }
}
html.no-fuzz .theme-screen::before { display: none; }
html.no-motion .theme-screen::before, html.no-motion .theme-screen::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .theme-screen::before { animation: none; } }

/* scanlines + RGB phosphor mask + CRT vignette (+ faint flicker) */
.theme-screen::after {
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0, calc(.32 * var(--k))) 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0, calc(.24 * var(--k))) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,0,60, calc(.035 * var(--k))) 0 1px, rgba(0,255,90, calc(.035 * var(--k))) 1px 2px, rgba(0,90,255, calc(.035 * var(--k))) 2px 3px);
  animation: flicker 4s steps(1) infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 31% { opacity: .93; } 32% { opacity: 1; } 67% { opacity: .96; } 68% { opacity: 1; } }
html.no-motion .theme-screen::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .theme-screen::after { animation: none; } }
html.no-scan .theme-screen::after { display: none; }

/* ---------- VCR menu ---------- */
.fx { position: fixed; right: 16px; bottom: 16px; z-index: 60; }
.fx__open {
  min-height: 44px; padding: 2px 14px; font-size: 1.5rem; text-transform: uppercase; cursor: pointer;
  color: #fff; background: var(--osd-blue); border: 2px solid #fff; border-radius: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,.5);
}
.fx__open:hover { background: #fff; color: var(--osd-blue); }
.fx__panel {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: min(300px, calc(100vw - 32px));
  padding: 14px 16px 10px; background: var(--osd-blue); color: #fff; border: 2px solid #fff; border-radius: 6px;
  font-size: 1.55rem; text-transform: uppercase; box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
.fx__title { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid rgba(255,255,255,.6); }
.fx__row, .fx__close {
  display: flex; justify-content: space-between; width: 100%; min-height: 40px; align-items: center;
  padding: 0 6px; font: inherit; text-transform: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left;
}
.fx__row:hover, .fx__row:focus-visible, .fx__close:hover, .fx__close:focus-visible { background: #fff; color: var(--osd-blue); outline: none; }
.fx__val::before { content: "Off"; }
.fx__row[aria-checked="true"] .fx__val::before { content: "\25B6\FE0E  On"; }
.fx__close { justify-content: center; margin-top: 6px; border-top: 2px solid rgba(255,255,255,.6); }

/* ==========================================================================
   CHANNEL IDENTS (your own animations, set in _data/channels.yml)
   ========================================================================== */
.ident {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; color: var(--ch);
  background: #000; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.ident__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: var(--fx-blur); }
.ident__empty { position: absolute; inset: 0; display: block; }
.ident__bars { /* channel-tinted test pattern until an animation is added */
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(0,0,0,.55) 6px 9px),
    linear-gradient(135deg, var(--ch), color-mix(in srgb, var(--ch) 35%, #000));
  opacity: .55;
}
.ident::after { /* scrim so labels stay readable over any animation */
  content: ""; position: absolute; inset: 45% 0 0 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
}
.ident__label {
  z-index: 1; position: absolute; left: 10px; bottom: 6px; right: 10px; color: #fff; font-size: 1.25rem; line-height: 1.1; text-transform: uppercase;
}
.ident__num { display: block; color: var(--ch); font-size: 1.6em; line-height: 1; filter: var(--fx-media-glow); }
.ident--band { aspect-ratio: auto; height: clamp(140px, 22vw, 240px); border-radius: var(--radius-screen); }
.ident--band .ident__label { left: 20px; bottom: 14px; font-size: 1.6rem; }

/* portfolio channel guide: a wall of channel TVs */
.guide { margin: 8px 0 36px; }
.guide__tiles {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 10px; margin: 0 -4px;
}
@media (min-width: 1000px) { .guide__tiles { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; } }
.guide__tiles { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.guide__tile { scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; text-align: left; }
.guide__tile .ident { box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); transition: box-shadow .15s; }
.guide__tile:hover .ident { box-shadow: inset 0 0 0 3px var(--ch); }
.guide__tile[aria-pressed="true"] .ident { box-shadow: inset 0 0 0 4px var(--ch), 0 0 18px color-mix(in srgb, var(--ch) 55%, transparent); }
html.no-glow .guide__tile[aria-pressed="true"] .ident { box-shadow: inset 0 0 0 4px var(--ch); }
.guide__all {
  margin-top: 10px; min-height: 44px; padding: 2px 16px; font-size: 1.4rem; text-transform: uppercase; cursor: pointer;
  color: #fff; background: #000; border: 2px solid rgba(255,255,255,.4); border-radius: 8px;
}
.guide__all:hover { border-color: #fff; }
.guide__all[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

/* channel-change static: answers a click on a channel */
.pf-grid { position: relative; }
.pf-grid.is-switching::after {
  content: ""; position: absolute; inset: -8px; z-index: 5; pointer-events: none; border-radius: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: static-out .22s steps(3) forwards;
}
@keyframes static-out { 0% { opacity: .95; } 100% { opacity: 0; } }

.project__ident { display: block; margin: 8px 0 4px; border-radius: var(--radius-screen); }

/* ---------- Section headlines in Anton (condensed, magazine-style) ---------- */
.fl-section h2, .fl-contact h2, .fl-cta h2, .prose h2, .portfolio__about h2 {
  font-family: var(--font-headline); font-weight: 400; letter-spacing: .005em; line-height: 1.05;
}
.fl-section h2, .fl-contact h2 { font-size: clamp(2.3rem, 6vw, 3.4rem); }
.prose h2, .portfolio__about h2 { font-size: 2.1rem; }

/* ==========================================================================
   TV WALL: stacked CRTs in the background of the dark pages
   ========================================================================== */
.theme-screen > header, .theme-screen > main, .theme-screen > footer, .theme-screen > .osd-bar { position: relative; z-index: 1; }
.tvwall {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none; overflow: hidden;
  width: min(860px, 72vw); opacity: .5;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 100%);
          mask-image: linear-gradient(to left, #000 35%, transparent 100%);
}
@media (max-width: 760px) { .tvwall { width: 100vw; opacity: .26; } }
html.no-tv .tvwall { display: none; }
.tvwall__track { will-change: transform; transform: translate3d(0, var(--wall-y, 0px), 0); }
.tvwall__row { display: flex; justify-content: center; align-items: flex-end; gap: .6%; }
.tv {
  flex: none; width: var(--w); display: grid; grid-template-columns: 1fr 13%; gap: 4%; padding: 4.5% 4%;
  border-radius: 9% / 11%; box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 6px 14px rgba(0,0,0,.6);
}
.tv--wood { background: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 3px, transparent 3px 9px), linear-gradient(#7a4f2e, #4f321c); }
.tv--silver { background: linear-gradient(#c9c9c5, #7d7d79); }
.tv--black { background: linear-gradient(#2c2c2a, #121211); }
.tv--cream { background: linear-gradient(#e2d8bf, #b3a888); }
.tv__screen {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; color: var(--ch);
  border-radius: 12% / 15%; box-shadow: inset 0 0 14px rgba(0,0,0,.95);
}
.tv__screen::after { /* glass + scanlines */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    radial-gradient(ellipse at 30% 22%, rgba(255,255,255,.16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px 3px);
}
.tv__media, .tv__fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tv__fill--channel { background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ch) 80%, #fff), color-mix(in srgb, var(--ch) 30%, #000)); }
.tv__fill--bars { background: linear-gradient(90deg, #c0c0c0 0 14.28%, #c0c000 14.28% 28.57%, #00c0c0 28.57% 42.85%, #00c000 42.85% 57.14%, #c000c0 57.14% 71.42%, #c00000 71.42% 85.71%, #0000c0 85.71% 100%); }
.tv__fill--stripes {
  background: linear-gradient(180deg, transparent 0 22%, var(--green) 22% 31%, var(--yellow) 31% 40%, var(--orange) 40% 49%, var(--red) 49% 58%, var(--purple) 58% 67%, var(--blue) 67% 76%, transparent 76%);
}
.tv__fill--static {
  inset: -40%; width: auto; height: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='1'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .5s steps(4) infinite;
}
html.no-motion .tv__fill--static { animation: none; }
@media (prefers-reduced-motion: reduce) { .tv__fill--static { animation: none; } }
.tv__osd { position: absolute; right: 7%; top: 5%; z-index: 1; color: #fff; font-size: clamp(.8rem, 1.6vw, 1.3rem); line-height: 1; text-shadow: var(--fx-glow); }
.tv__side { display: grid; align-content: start; justify-items: center; gap: 12%; padding-top: 10%; }
.tv__side i { width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9a978f, #3a3835); }
.tv__side b { width: 70%; aspect-ratio: 1 / 2; background: repeating-linear-gradient(0deg, rgba(0,0,0,.6) 0 2px, transparent 2px 4px); }

/* intensity row in the menu */
.fx__level::before { content: "High"; }
html[data-fx-level="1"] .fx__level::before { content: "Low"; }
html[data-fx-level="2"] .fx__level::before { content: "Med"; }
.fx__level::after { content: " \25B8\FE0E"; }
