/* ============================================================
   channels.css — the inside of a channel.

   Every view carries --from / --to (its tile's gradient), set as an
   inline style by data.js. So one set of rules dresses all six
   channels, and adding a channel in the editor needs no CSS.
   ============================================================ */

.view {
  background: var(--bg-1);
}
.js .view { background: linear-gradient(var(--bg-1), var(--bg-2)); }

.view__inner { max-width: 1080px; }

/* ============================================================
   CHANNEL HEADER — the colour band that names the channel
   ============================================================ */
.chead {
  position: relative;
  margin: 0 0 clamp(22px, 4vw, 38px);
  padding: clamp(20px, 3.4vw, 34px) clamp(20px, 3.4vw, 36px);
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, var(--from, #6f8b9c), var(--to, #35505f));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .32),
    0 6px 18px rgba(30, 70, 95, .18);
}
/* the same fine stripe that sits on the tiles and the background */
.chead::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .10) 0px, rgba(255, 255, 255, .10) 1px,
    rgba(0, 0, 0, .05) 1px, rgba(0, 0, 0, .05) 3px);
}
/* the moulded gloss curving across the top */
.chead::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 62%;
  border-radius: 0 0 46% 46% / 0 0 26% 26%;
  background: linear-gradient(rgba(255, 255, 255, .30), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.chead__ico {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(38px, 5vw, 48px);
  height: clamp(38px, 5vw, 48px);
  margin-bottom: .5em;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
}
.chead__ico svg { width: 58%; height: 58%; }

.chead h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(26px, 4.2vw, 42px);
  color: #fff;
  text-shadow: 0 1px 2px rgba(10, 30, 45, .3);
}
.chead__blurb {
  position: relative;
  z-index: 1;
  margin: .4em 0 0;
  max-width: 56ch;
  font-size: clamp(14px, 1.5vw, 16.5px);
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 2px rgba(10, 30, 45, .25);
}

/* A channel with artwork: the picture sits behind the header, with the
   channel colour laid over it so the title still reads. */
.chead--art {
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--from, #6f8b9c) 62%, transparent),
                            color-mix(in srgb, var(--to, #35505f) 72%, transparent)),
    var(--art) center 30% / cover no-repeat,
    linear-gradient(150deg, var(--from, #6f8b9c), var(--to, #35505f));
  min-height: clamp(150px, 22vw, 220px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.chead--art::after { opacity: .5; }
.chead--art h2, .chead--art .chead__blurb { text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }

/* ---------- breadcrumb, when you are inside a folder ---------- */
.crumbs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35em;
  margin: 0 0 .9em;
  font-size: 13px;
  letter-spacing: .04em;
}
.crumbs a, .crumbs span { color: inherit; opacity: .85; text-decoration: none; }
.crumbs a:hover { opacity: 1; text-decoration: underline; }
.crumbs [aria-current] { opacity: 1; font-weight: 600; }
.crumbs__sep { opacity: .5; }

/* ---------- folders inside a folder: a row of small discs ---------- */
.discs {
  list-style: none;
  margin: 0 0 clamp(18px, 3vw, 30px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
  gap: clamp(10px, 1.6vw, 16px);
}
.disc {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  min-height: 74px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 2px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--line-soft), 0 3px 8px rgba(45, 85, 110, .13);
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
/* a slim band of the channel colour down the left edge */
.disc::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(var(--from, #6f8b9c), var(--to, #35505f));
}
.disc__ico {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-left: 4px;
  border-radius: 50%;
  color: #2b3d47;
  background: linear-gradient(150deg, color-mix(in srgb, var(--from, #fff) 45%, #fff),
                                      color-mix(in srgb, var(--to, #dfeaf1) 35%, #fff));
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .9), 0 1px 3px rgba(20, 45, 65, .2);
}
.disc__ico svg { width: 50%; height: 50%; }
.disc__name { font-size: 15.5px; line-height: 1.25; }
.disc__n { font-size: 12px; color: var(--ink-soft); }
.disc:hover, .disc:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--glow), 0 10px 20px rgba(30, 80, 110, .2);
}
.disc:active { transform: translateY(-1px); }

/* ---------- plain note cards (the Secret folder, or anything untyped) ---------- */
.works--note { max-width: 74ch; margin-inline: auto; }
.work--note { padding: clamp(18px, 2.4vw, 28px); }

/* A pale channel (Résumé, Writing) needs dark text to stay readable. */
.view--resume .chead,
#writing .chead { color: var(--ink); }
.view--resume .chead h2,
#writing .chead h2 { color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.view--resume .chead__blurb,
#writing .chead__blurb { color: var(--ink-soft); text-shadow: none; }
.view--resume .chead__ico,
#writing .chead__ico { background: rgba(255, 255, 255, .55); color: var(--ink); }

.empty {
  padding: 2.4em 1.4em;
  text-align: center;
  color: var(--ink-soft);
  background: var(--paper);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

/* ============================================================
   WORK LISTS
   ============================================================ */
.works { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2.4vw, 28px); }

.work {
  background: var(--paper);
  border: 2px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line-soft), 0 3px 10px rgba(45, 85, 110, .13);
  overflow: hidden;
}
.work h3 { margin: 0 0 .15em; font-size: clamp(18px, 2.2vw, 24px); }
.work__text { padding: clamp(16px, 2.2vw, 24px); }
.work__meta {
  margin: 0 0 .7em;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.work__logline {
  margin: 0 0 .7em;
  font-size: 1.06em;
  color: var(--ink);
}
.work__credit { margin: .6em 0 0; font-size: .92em; color: var(--ink-soft); }
.work__gear {
  margin: .8em 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.work__gear span {
  display: inline-block;
  margin-right: .5em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef4f8;
  border: 1px solid var(--line-soft);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.work__still, .work__shot { width: 100%; object-fit: cover; }

/* ---------- films: two up, or one wide ---------- */
.works--film { grid-template-columns: 1fr; }
/* A 16:9 player across a full-width card is taller than the viewport on a
   laptop, so cap it and let object-fit crop the poster instead. */
.work--film .facade { max-height: 58svh; }

@media (min-width: 900px) {
  .works--film { grid-template-columns: repeat(2, 1fr); }
  /* A single film gets the whole row, player beside the text rather than
     one enormous stacked block. */
  .works--film .work:only-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: center;
  }
  .works--film .work:only-child .facade { max-height: none; }
}
@media (max-width: 899px) {
  .works--film .work:only-child { display: block; }
}

/* ---------- code: two-up cards ---------- */
@media (min-width: 760px) { .works--code { grid-template-columns: repeat(2, 1fr); } }

/* ---------- writing: one readable column ---------- */
.works--write { max-width: 74ch; margin-inline: auto; }
.work--write { padding: clamp(18px, 2.4vw, 28px); }
.work--write h3 { margin-bottom: .2em; }
.work__more { margin-top: 1em; }
.work__more summary {
  cursor: pointer;
  display: inline-block;
  padding: .45em 1.1em;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: linear-gradient(#fff, #eef4f8);
  font-size: .92em;
  list-style: none;
}
.work__more summary::-webkit-details-marker { display: none; }
.work__more summary:hover { border-color: var(--accent-lo); }
.work__more[open] summary { margin-bottom: 1em; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- photography: a wall of prints ---------- */
.works--photo {
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: clamp(12px, 1.8vw, 20px);
}
.pola-li { list-style: none; }
.pola {
  display: block;
  width: 100%;
  padding: 8px 8px 0;
  font: inherit;
  text-align: center;
  background: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(40, 70, 90, .22);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.pola img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: #dfe8ee;
}
.pola__cap {
  display: block;
  padding: .7em .3em .8em;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.pola:hover, .pola:focus-visible {
  transform: translateY(-4px) rotate(-.6deg);
  box-shadow: 0 10px 22px rgba(40, 70, 90, .3);
}

/* ============================================================
   SHOWREEL — the work, first, with a little cinema on it
   ============================================================ */
.reel { display: grid; gap: clamp(16px, 2.4vw, 26px); }
.reel__player {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1116;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line), 0 18px 50px rgba(20, 50, 75, .3);
}
.reel__player .facade, .reel__player iframe, .reel__player video { border-radius: 0; }
.reel__text { max-width: 68ch; }

/* a vignette, so the frame reads like a projected image rather than a thumbnail */
.facade--reel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 clamp(60px, 12vw, 160px) rgba(0, 0, 0, .55);
}
/* film grain: a tile of fractal noise, blended over the poster */
.facade__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
}
/* viewfinder brackets in the corners */
.facade__corners { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.facade__corners i {
  position: absolute;
  width: clamp(18px, 3vw, 30px);
  height: clamp(18px, 3vw, 30px);
  border: 2px solid rgba(255, 255, 255, .75);
  transition: transform var(--t-mid) var(--ease);
}
.facade__corners i:nth-child(1) { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.facade__corners i:nth-child(2) { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.facade__corners i:nth-child(3) { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.facade__corners i:nth-child(4) { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
/* the brackets close in a touch when the pointer arrives — a lens finding focus */
.facade--reel:hover .facade__corners i:nth-child(1), .facade--reel:focus-visible .facade__corners i:nth-child(1) { transform: translate(6px, 6px); }
.facade--reel:hover .facade__corners i:nth-child(2), .facade--reel:focus-visible .facade__corners i:nth-child(2) { transform: translate(-6px, 6px); }
.facade--reel:hover .facade__corners i:nth-child(3), .facade--reel:focus-visible .facade__corners i:nth-child(3) { transform: translate(6px, -6px); }
.facade--reel:hover .facade__corners i:nth-child(4), .facade--reel:focus-visible .facade__corners i:nth-child(4) { transform: translate(-6px, -6px); }
.facade--reel .facade__play { z-index: 3; }
.facade--reel:disabled { cursor: default; }

/* ---------- the academy leader: 5, 4, 3, 2 ---------- */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.leader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #2a2620;
  background:
    /* the crosshair */
    linear-gradient(#2a2620 0 0) center / 100% 2px no-repeat,
    linear-gradient(#2a2620 0 0) center / 2px 100% no-repeat,
    /* the rings */
    repeating-radial-gradient(circle at center, transparent 0 calc(14% - 2px), rgba(42, 38, 32, .35) calc(14% - 2px) 14%),
    #d8d2c2;
}
.leader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
}
/* the wipe: a dark sector sweeping round once per beat */
.leader__sweep {
  position: absolute;
  inset: -50%;
  background: conic-gradient(rgba(42, 38, 32, .5) 0 var(--a), transparent var(--a));
  animation: leader-sweep 420ms linear infinite;
}
@keyframes leader-sweep { from { --a: 0deg; } to { --a: 360deg; } }
.leader__ring {
  position: absolute;
  width: min(62vh, 62%);
  aspect-ratio: 1;
  border: 3px solid #2a2620;
  border-radius: 50%;
}
.leader__n {
  position: relative;
  font-size: clamp(72px, 18vw, 190px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .35);
}
.leader.is-tick .leader__n { animation: leader-pop 200ms var(--ease-pop); }
@keyframes leader-pop { from { transform: scale(1.12); } to { transform: scale(1); } }

/* ============================================================
   THEATER
   ============================================================ */
.theater__h {
  margin: clamp(24px, 3vw, 34px) 0 .7em;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.theater__h:first-of-type { margin-top: 0; }
.theater__list { display: grid; gap: clamp(14px, 2vw, 20px); }
@media (min-width: 860px) { .theater__list { grid-template-columns: repeat(2, 1fr); } }

.seen {
  display: grid;
  grid-template-columns: clamp(84px, 14vw, 124px) 1fr;
  gap: clamp(14px, 2vw, 22px);
  padding: clamp(14px, 2vw, 20px);
  background: var(--paper);
  border: 2px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line-soft), 0 3px 10px rgba(45, 85, 110, .13);
}
.seen--now {
  grid-template-columns: clamp(120px, 22vw, 200px) 1fr;
  background: linear-gradient(150deg, #fff, #fdf3f4);
  box-shadow: 0 0 0 1px #eccdd3, 0 6px 18px rgba(120, 40, 60, .16);
}
.seen__poster {
  width: 100%;
  border-radius: var(--radius-sm);
  background: #dfe8ee;
  box-shadow: 0 3px 10px rgba(20, 40, 55, .3);
}
.seen__body { min-width: 0; }
.seen h4 { margin: 0 0 .25em; font-size: clamp(17px, 2vw, 22px); }
.seen__kind {
  display: inline-block;
  vertical-align: middle;
  margin-left: .4em;
  padding: 1px 7px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #eef4f8;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.seen__meta { margin: 0 0 .2em; font-size: 12.5px; color: var(--ink-soft); }
.seen__cast { margin: .4em 0 .5em; font-size: .92em; color: var(--ink-soft); }
.seen__rating { margin: .3em 0 .5em; }
.stars { color: #f0a92c; letter-spacing: .08em; font-size: 1.05em; }
.stars__off { color: #d8e2e8; }
.seen__review {
  margin: .6em 0 0;
  padding: .55em 0 .55em .9em;
  border-left: 3px solid var(--line);
  font-style: italic;
  color: var(--ink);
}
.seen__plot { margin: .7em 0 0; font-size: .92em; color: var(--ink-soft); }

@media (max-width: 520px) {
  .seen, .seen--now { grid-template-columns: 1fr; }
  .seen__poster { max-width: 150px; }
}

/* ============================================================
   RÉSUMÉ — a printed page, on screen
   ============================================================ */
.manual__paper {
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 52px);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(45, 85, 110, .14), 0 14px 40px rgba(45, 85, 110, .12);
}
.manual__head {
  margin-bottom: 1.8em;
  padding-bottom: 1.2em;
  border-bottom: 2px solid var(--ink);
}
.manual__head h3 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); }
.manual__head p { margin: .2em 0 0; color: var(--ink-soft); }
.manual__contact { font-size: .92em; }
.manual__contact a { color: var(--accent-hi); }

.manual__sec { margin-bottom: 1.8em; }
.manual__sec h4 {
  margin: 0 0 .8em;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: .4em;
}
.manual__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1em; }
.manual__list b { display: block; font-weight: 400; font-size: 1.06em; }
.manual__list span { display: block; font-size: .92em; color: var(--ink-soft); }
.manual__list p { margin: .35em 0 0; font-size: .95em; }
.manual__tools { margin: 0; font-size: .96em; color: var(--ink-soft); }
.manual__dl { margin: 2em 0 0; display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}
@media (min-width: 800px) {
  .about__grid { grid-template-columns: minmax(200px, 300px) 1fr; }
}
.about__shot { margin: 0; }
.about__shot img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  background: #e3ecf1;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line), 0 10px 26px rgba(40, 80, 105, .22);
}
.about__text h2 { font-size: clamp(28px, 4.4vw, 44px); margin-bottom: .5em; }
.about__status {
  display: flex;
  align-items: center;
  gap: .6em;
  margin: 1.6em 0 0;
  padding: .8em 1.1em;
  background: var(--paper);
  border: 2px solid var(--line-soft);
  border-radius: 999px;
  font-size: .95em;
  color: var(--ink-soft);
}
.about__status .dot {
  flex: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #48b563;
  box-shadow: 0 0 0 3px rgba(72, 181, 99, .22);
}

/* ============================================================
   CONTACT
   ============================================================ */
.bubbles {
  list-style: none;
  margin: 0 0 clamp(26px, 4vw, 40px);
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 700px) { .bubbles { grid-template-columns: repeat(2, 1fr); } }

.bubble {
  position: relative;
  padding: .9em 1.2em;
  background: var(--paper);
  border: 2px solid #fff;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line-soft), 0 3px 8px rgba(45, 85, 110, .12);
}
.bubble__from {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .15em;
}
.bubble a { text-decoration: none; word-break: break-word; }
.bubble a:hover { text-decoration: underline; }

.note {
  max-width: 620px;
  padding: clamp(20px, 3vw, 30px);
  background: var(--paper);
  border: 2px solid #fff;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line-soft), 0 3px 10px rgba(45, 85, 110, .13);
}
.note h3 { margin-bottom: .9em; font-size: 19px; }
.note__fallback { margin: .9em 0 0; font-size: 12.5px; color: var(--ink-soft); }
