@font-face {
  font-family: "Open Sauce Sans";
  src: url("/assets/fonts/open-sauce-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sauce Sans";
  src: url("/assets/fonts/open-sauce-sans-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root { color-scheme: light; --ink: #090909; --paper: #f7f7f5; --panel: #e5e5e3; --muted: rgba(9,9,9,.58); }
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background-image: linear-gradient(rgba(247,247,245,.92), rgba(247,247,245,.92)), url("/assets/images/texture-grain.png");
  background-repeat: repeat;
  background-size: auto, 64px auto;
  color: var(--ink);
  font-family: "Open Sauce Sans", Arial, sans-serif;
  font-size: 16px;
  letter-spacing: -.02em;
}
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { border: 3px solid var(--paper); border-radius: 10px; background: var(--ink); }

.site-header, main, .site-footer { width: min(100% - 64px, 1920px); margin-inline: auto; }
.site-header { display: grid; grid-template-columns: 1fr 2.2fr 1fr 24px; gap: 24px; align-items: center; padding: 32px 0 0; }
.brand, .role, .location { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.2; }
.location { justify-self: end; white-space: nowrap; }
.theme-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); }

.video-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(185px, 24%); gap: 54px; align-items: end; padding: clamp(104px, 13vw, 206px) 0 36px; }
h1 { max-width: 1100px; margin: 0; font-size: clamp(78px, 10.7vw, 164px); font-weight: 500; line-height: .82; letter-spacing: -.04em; }
.video-intro .intro-copy > p { max-width: 43ch; margin: 36px 0 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.28; }
.intro-side { display: grid; justify-items: start; gap: 42px; padding-bottom: 4px; }
.intro-meta { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.18; }
.intro-meta span { color: var(--ink); font-size: 44px; letter-spacing: -.04em; line-height: .85; }
.playlist-link { display: inline-flex; align-items: center; gap: 6px; padding: 0 0 7px; border-bottom: 1px solid var(--ink); font-weight: 500; transition: opacity .2s ease, transform .2s ease; white-space: nowrap; }
.playlist-link:hover { opacity: .58; transform: translateX(3px); }
.playlist-link span { margin-left: 5px; }

.video-library { margin-bottom: 32px; padding: clamp(20px, 2.2vw, 36px); border-radius: 32px; background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.library-bar { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding-bottom: 26px; border-bottom: 1px solid rgba(9,9,9,.17); }
.library-bar h2 { margin: 0; font-size: clamp(27px, 2.5vw, 42px); font-weight: 500; letter-spacing: -.04em; line-height: .98; }
.library-description { max-width: 45ch; margin: 12px 0 0; color: var(--muted); line-height: 1.25; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter { padding: 9px 12px; border: 1px solid rgba(9,9,9,.22); border-radius: 999px; background: transparent; color: rgba(9,9,9,.62); font-weight: 500; line-height: 1; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.filter:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.filter.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.filter span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.video-count { margin: 14px 0 -1px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.filter:focus-visible, .video-card:focus-visible, .close-player:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }

.video-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding-top: 18px; }
.video-card { position: relative; display: block; min-width: 0; aspect-ratio: 9 / 16; overflow: hidden; border: 0; border-radius: 16px; background: #cfcfcd; color: #fff; text-align: left; isolation: isolate; }
.video-card[hidden] { display: none; }
.video-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.video-card::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 28%, rgba(0,0,0,.86) 100%); content: ""; transition: background .25s ease; }
.video-card:hover img { transform: scale(1.045); }
.video-card:hover::after { background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.94)); }
.video-card-content { position: absolute; inset: auto 14px 14px; }
.video-category { display: block; margin-bottom: 7px; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.1; }
.video-title { display: -webkit-box; overflow: hidden; font-size: 15px; font-weight: 500; line-height: 1.12; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.play-mark { position: absolute; top: 12px; right: 12px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ink); transition: transform .2s ease; }
.video-card:hover .play-mark { transform: scale(1.08); }
.play-mark::before { width: 0; height: 0; margin-left: 2px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; content: ""; }
.empty-state { margin: 24px 0 0; color: var(--muted); }

.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 0 0 30px; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); font-weight: 500; }

.video-player-dialog { width: min(92vw, 490px); max-width: 490px; margin: auto; padding: 14px; overflow: visible; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 22px 70px rgba(0,0,0,.24); }
.video-player-dialog::backdrop { background: rgba(10,10,10,.42); }
.dialog-topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 2px 2px 14px; }
.dialog-topbar p { margin: 0; font-size: 15px; line-height: 1.2; }
.close-player { position: relative; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; }
.close-player span { position: absolute; top: 17px; left: 10px; width: 16px; height: 1px; background: currentColor; transform: rotate(45deg); }
.close-player span:last-child { transform: rotate(-45deg); }
.player-wrap { aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px; background: #171717; }
.player-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (max-width: 1050px) { .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .site-header, main, .site-footer { width: min(100% - 32px, 1920px); }
  .site-header { grid-template-columns: 1fr auto; gap: 5px 16px; padding-top: 20px; }
  .role { grid-column: 1 / -1; order: 3; color: rgba(9,9,9,.62); font-size: 14px; }
  .location { display: none; }
  .theme-dot { width: 16px; height: 16px; }
  .video-intro { grid-template-columns: 1fr; gap: 32px; padding: 104px 0 22px; }
  .video-intro .intro-copy > p { margin-top: 24px; font-size: 18px; }
  .intro-side { grid-template-columns: 1fr auto; align-items: end; justify-items: stretch; gap: 16px; padding: 0; }
  .intro-meta span { font-size: 36px; }
  .playlist-link { justify-self: start; }
  .video-library { margin-bottom: 16px; padding: 16px; border-radius: 22px; }
  .library-bar { align-items: flex-start; flex-direction: column; gap: 20px; padding-bottom: 16px; }
  .library-description { margin-top: 10px; font-size: 15px; }
  .filters { justify-content: flex-start; gap: 8px; }
  .filter, .video-count { font-size: 14px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
  .video-card { border-radius: 12px; }
  .video-card-content { inset: auto 10px 10px; }
  .video-category { font-size: 11px; }
  .video-title { font-size: 13px; }
  .play-mark { top: 10px; right: 10px; width: 34px; height: 34px; }
  .play-mark::before { border-top-width: 5px; border-bottom-width: 5px; border-left-width: 8px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; font-size: 14px; }
}

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