/* Brian Barrale, composer portfolio. Plain CSS, no external fonts or services. */

:root {
  --bg: #0b0b0f;
  --bg-alt: #111117;
  --panel: #16161d;
  --line: #2a2a35;
  --text: #ecebe6;
  --muted: #a3a2ad;

  /* The grey for the credit detail only: the studio, network, and role after each title.
     Darker than --muted, so the white titles stand clear of it. Used nowhere else. */
  --credit-detail: #85848f;

  /* His color is purple.
     --accent is the light purple (lavender) for text, lines, and outlines on the dark page.
     --accent-fill is the deeper purple for filled buttons, always with white on top.
     Text is never set in --accent-fill: it is too dark to read on the dark page. */
  --accent: #b197fc;
  --accent-fill: #7c3aed;
  --accent-fill-hover: #6d28d9;
  --accent-ink: #ffffff;
  --accent-rgb: 167, 139, 250;

  /* ONE font for the whole page, his name included. There is no serif anywhere.
     If he names a typeface, it replaces this one line. */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --menu-h: 56px;
  --hero-h: max(100vh, 600px);
  --row-h: calc(var(--hero-h) / 3);
  --i-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4v16l14-8z' fill='%23b197fc'/%3E%3C/svg%3E");
  --i-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h5v16H5zM14 4h5v16h-5z' fill='%23b197fc'/%3E%3C/svg%3E");
}
@supports (height: 100svh) {
  :root { --hero-h: max(100svh, 600px); }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-padding-top: calc(var(--menu-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
}

/* Form controls and buttons take the page's one font too, never the browser's own. */
button, input, textarea, select { font-family: inherit; }

img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 100;
  background: var(--accent-fill); color: var(--accent-ink);
  padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Section headings: ONE rule for all of them ---------- */
/*
   SELECT MUSIC, FEATURED VIDEO, ABOUT, SELECT CREDITS, and CONTACT all carry the class
   "section-heading" and take their whole look from this one rule:
   one font, one size, one weight, one letter-spacing. Nothing else on the site styles them.
   To change how the headings look, change it here and only here.
*/
.section-heading {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 clamp(22px, 4vw, 34px);
  padding: 0 0 14px;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 56px 2px no-repeat;
}

/* ---------- Menu ---------- */

.menu {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--menu-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(14px, 4vw, 40px);
  background: rgba(11, 11, 15, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand {
  font: 800 1.05rem/1 var(--sans);
  letter-spacing: -.01em; color: var(--text); text-decoration: none; white-space: nowrap;
}
.menu nav { display: flex; gap: clamp(2px, 1.5vw, 14px); }
.menu nav a {
  color: var(--muted); text-decoration: none;
  font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 8px; border-radius: 6px;
}
.menu nav a:hover, .brand:hover { color: var(--accent); }
@media (max-width: 400px) {
  .menu nav a { font-size: .72rem; letter-spacing: .06em; padding: 10px 5px; }
  .brand { font-size: .95rem; }
}

/* ---------- 1. Top: the poster wall ---------- */

.hero {
  position: relative;
  height: var(--hero-h);
  overflow: hidden;
  display: grid; place-items: center;
  background: #08080b;
  isolation: isolate;
}

.wall { position: absolute; inset: 0; z-index: 0; }
.row {
  display: flex; height: var(--row-h); width: max-content;
  padding-bottom: 8px;
}
/* A still wall looks better with the rows staggered. */
.row:nth-child(2) { margin-left: calc(var(--row-h) * -.33); }
.row:nth-child(3) { margin-left: calc(var(--row-h) * -.12); }

/* A poster tile. There is no text on the wall, ever (his word): no title on hover or at any other time. */
.tile {
  position: relative; flex: none;
  height: 100%; width: calc((var(--row-h) - 8px) * 2 / 3);
  margin-right: 8px;
  overflow: hidden; border-radius: 4px;
  background: #17171d;
  filter: brightness(.4) saturate(.85);
  transition: filter .3s ease;
}
.tile.wide { width: calc((var(--row-h) - 8px) * 1.5); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.logo { background: #5d5f6b; }
.tile.logo img { object-fit: contain; padding: 14%; }

/* A poster brightens when the cursor rests on it. Nothing else happens. */
.tile:hover { filter: brightness(1) saturate(1); }

/* The drift. Only when the script has looped the rows, and only if motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .row.is-looped { animation: drift 150s linear infinite; will-change: transform; }
  .row.is-looped:nth-child(2) { animation-direction: reverse; animation-duration: 180s; }
  .row.is-looped:nth-child(3) { animation-duration: 130s; }
  .row.is-looped:hover { animation-play-state: paused; }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-33.3333%, 0, 0); }
}

/* Darkening, so the text on top stays easy to read. Lets the cursor through to the posters. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(11, 11, 15, .55) 0, rgba(11, 11, 15, 0) 22%, rgba(11, 11, 15, 0) 70%, var(--bg) 100%),
    radial-gradient(ellipse 75% 60% at 50% 50%, rgba(8, 8, 11, .72), rgba(8, 8, 11, .2) 100%);
}

/* His name and the one line under it. Nothing else sits on the wall.
   The shadow here falls on both lines, so both stay readable over the posters. */
.hero-text {
  position: relative; z-index: 2;
  text-align: center;
  padding: var(--menu-h) 20px 0;
  max-width: 900px;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .9), 0 0 3px rgba(0, 0, 0, .7);
}

/* His name: the page's one sans, at a heavy weight with tight letter-spacing. Not a section heading. */
h1 {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.02;
}

/* The one line under his name, in the lavender accent so it pops (his word).
   The lavender, never the deep --accent-fill purple, which is too dark to read on the darkened wall.
   It keeps the shadow it inherits from .hero-text. */
.tagline {
  margin-top: 16px;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--accent);
  letter-spacing: .02em;
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid rgba(255, 255, 255, .05); }
.wrap { width: min(1080px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 2 * clamp(16px, 4vw, 40px)); }

/* The two blocks that start partway down a section get their space from the block, not from the heading. */
.video, .credits-wrap { margin-top: clamp(52px, 8vw, 84px); }

/* ---------- 2. SELECT MUSIC: the player, one dark card ---------- */
/*
   Top to bottom inside the one card:
     .phead      one round play/pause button, then the track's number and title on one line
     .wave-row   the waveform bar across the whole card, elapsed time at its left end, total at its right
     .tracks     the playlist, ONE column, numbered rows with thin lines between them
     .transport  one horizontal row: previous, play/pause, next, side by side

   The compact size (Revision 9): the card is about two-thirds of its former height.
   Every element is still here; each one is smaller. The sizes to adjust are marked "size".
*/

.music {
  width: 100%;
  background: #14141b;
  border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

/* Without the script there are no controls: the card is just the list, each name a plain link to its file. */
.phead, .wave-row, .transport { display: none; }

/* 2a. Top row: the one play/pause button, then number and title on one line. */
.js .phead {
  display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap;
  gap: clamp(10px, 2vw, 16px);
  padding: 14px clamp(14px, 2.4vw, 22px) 0;
  min-width: 0;
}
.bigplay {
  flex: none;
  width: 48px; height: 48px;                                  /* size: was up to 76px */
  border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--accent-fill); color: var(--accent-ink);
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(124, 58, 237, .4);
  transition: transform .15s, background .15s;
}
.bigplay:hover { background: var(--accent-fill-hover); transform: scale(1.05); }
.bigplay svg { width: 44%; height: 44%; display: block; }

.ptitle {
  flex: 1; min-width: 0;
  font-weight: 700; font-size: clamp(1.05rem, 2.2vw, 1.3rem);  /* size: was up to 2.1rem */
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.now-num { color: var(--accent); font-variant-numeric: tabular-nums; }
.now-num::after { content: "\00a0\00b7\00a0"; color: var(--muted); font-weight: 400; }

/* 2b. The waveform bar, across the whole card, with the times at its ends. */
.js .wave-row {
  display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap;
  gap: clamp(8px, 1.4vw, 12px);
  padding: 10px clamp(14px, 2.4vw, 22px) 12px;
}
.wave {
  position: relative; flex: 1; min-width: 0;
  height: clamp(40px, 5.5vw, 54px);                            /* size: was up to 104px */
  border-radius: 4px;
}
/* Decorative drawn bars: the played part purple, the rest grey. */
.bars {
  position: absolute; inset: 0;
  display: flex; flex-direction: row; align-items: center; gap: 2px;
}
.bars span { flex: 1; min-width: 0; border-radius: 1px; background: #4b4b59; }
.bars.fill { clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); }
.bars.fill span { background: var(--accent); }
/* The real control sits unseen on top of the bars, so a click, a drag, or the arrow keys all seek. */
.wave input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer;
}
.wave:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.t-elapsed, .t-total {
  flex: none; min-width: 2.6em;
  font-size: .74rem;                                           /* size: was .85rem */
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.t-elapsed { color: var(--accent); }
.t-total { text-align: right; }
.music.is-missing .t-total { color: #e58b7b; min-width: 0; }

@media (max-width: 560px) {
  .bars { gap: 1px; }
}

/* 2c. The playlist: ONE column, numbered rows, thin lines between them, every row clickable. */
.tracks {
  display: block; columns: auto; column-count: 1;
  border-top: 1px solid var(--line);
}
.track {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--menu-h) + 16px);
}
.track:last-child { border-bottom: 0; }
.track-link {
  flex: 1; min-width: 0;
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  padding: 5px clamp(14px, 2.4vw, 22px);                       /* size: was 12px top and bottom */
  color: var(--text); text-decoration: none;
  font-size: .9rem; line-height: 22px;                         /* size: was 1rem */
}
.track-link:hover { background: rgba(255, 255, 255, .04); }
.num {
  flex: none; width: 22px; height: 22px; line-height: 22px; text-align: right;
  font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums;
  background: right center / 12px 12px no-repeat;
}
.track-name { font-weight: 600; overflow-wrap: anywhere; }

/* The playing row, in purple, with a small play or pause mark in place of its number. */
.js .track-link:hover .num,
.js .track.is-current .num { color: transparent; background-image: var(--i-play); }
.js .track.is-playing .num { background-image: var(--i-pause); }
.track.is-current { background: rgba(var(--accent-rgb), .14); box-shadow: inset 3px 0 0 var(--accent); }
.track.is-current .track-name { color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding-right: clamp(14px, 2.4vw, 22px); }
.tags:empty { display: none; }
.tag {
  font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.tag.medium { border-color: rgba(var(--accent-rgb), .5); color: var(--accent); }

/* 2d. The control row at the bottom of the card: previous, play/pause, next, side by side. */
.js .transport {
  display: flex; flex-direction: row; align-items: center; justify-content: center; flex-wrap: nowrap;
  gap: clamp(12px, 2.4vw, 20px);
  padding: 7px clamp(14px, 2.4vw, 22px);
  background: #0f0f15;
  border-top: 1px solid var(--line);
}
.ctl {
  flex: none; width: 36px; height: 36px;                       /* size: was 46px */
  border-radius: 50%;
  border: 0; cursor: pointer; padding: 0;
  background: transparent; color: var(--text);
  display: grid; place-items: center;
  transition: color .15s, background .15s;
}
.ctl:hover { color: var(--accent); }
.ctl:disabled { opacity: .35; cursor: default; color: var(--text); }
.ctl svg { width: 18px; height: 18px; display: block; }
.ctl.main { background: var(--accent-fill); color: var(--accent-ink); }
.ctl.main:hover { background: var(--accent-fill-hover); color: var(--accent-ink); }

/* ---------- 3. Featured video card ---------- */

/* A still frame from the video, centered in the content column, with its credit line centered under it.
   The heading above it is not centered: it stays on the one section-heading rule. */
.vcard { max-width: 860px; margin-inline: auto; }
.vcard img, .vcard video {
  width: 100%; height: auto; aspect-ratio: 1200 / 670; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line);
  background: #000;
}
.vcard figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: .98rem; color: var(--text); line-height: 1.5;
}

/* ---------- 4. About ---------- */

.about-grid { display: grid; gap: 26px; align-items: start; }
@media (min-width: 720px) {
  .about-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 44px; }
}
.portrait {
  width: 100%; max-width: 340px; height: auto; aspect-ratio: 1;
  border-radius: 8px; border: 1px solid var(--line);
}
.about-text p { max-width: 62ch; }
.about-text p + p { margin-top: 1em; }

/* The one filled button left on the page is the form's Send. */
.btn {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent); text-decoration: none; font-weight: 700; letter-spacing: .04em;
}
.btn:hover { background: rgba(var(--accent-rgb), .14); }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }

/* ---------- SELECT CREDITS: three levels of color ---------- */
/*
   1. .credit-group h4   each group name (Film, TV and web, ...)        lavender, the accent
   2. .c-title           each title                                     bright white, bold, never purple
   3. .c-meta            the studio, network, and role after the title  the credit-detail grey, #85848f,
                                                                        in a span of its own

   The credit-detail grey is darker than the page's --muted and is used here only.
   The titles stay white, never purple.
   The group names are labels inside the section, not section headings.
   The section ends with its last list. There is no button under it.
*/
.credits { columns: 1; column-gap: 44px; }
@media (min-width: 820px) { .credits { columns: 2; } }
.credit-group { break-inside: avoid; margin-bottom: 26px; }
.credit-group:last-child { margin-bottom: 0; }
.credit-group h4 {
  font: 700 1.08rem/1.2 var(--sans); letter-spacing: .01em;
  color: var(--accent);
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.credit-group li {
  padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: .95rem; line-height: 1.45;
}
.c-title { font-weight: 700; color: var(--text); }
.c-meta { font-weight: 400; color: var(--credit-detail); }

/* ---------- Footer ---------- */

.foot {
  padding: 30px 20px 40px; text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted); font-size: .85rem;
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 12px; }
.foot a {
  color: var(--muted); text-decoration: none;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.foot a:hover { color: var(--accent); }
