@font-face {
  font-family: "Oswald";
  src: url("assets/fonts/oswald-variable-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f5eddd;
  --paper-light: #fbf5e8;
  --ink: #072857;
  --rust: #9f3f1e;
  --gold: #f1b51c;
  --line: rgba(7, 40, 87, 0.65);
  --shadow: rgba(52, 33, 19, 0.2);
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

html.manual-scroll {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("assets/images/paper-tile.png");
  background-repeat: repeat;
  font-family: "Oswald", "Arial Narrow", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero-section {
  padding: clamp(44px, 4.8vw, 76px) 26px;
}

.hero-card {
  position: relative;
  width: min(100%, 1186px, calc((100svh - 56px) * 1.484355));
  aspect-ratio: 1186 / 799;
  margin: 0 auto;
  isolation: isolate;
  filter: drop-shadow(0 18px 28px rgba(52, 33, 19, 0.16));
}

.hero-art,
.hero-art img {
  width: 100%;
  height: 100%;
}

.hero-art img {
  object-fit: fill;
}

.hero-frame {
  position: absolute;
  z-index: 2;
  inset: -2.25% -2.1%;
  width: 104.2%;
  height: 104.5%;
  max-width: none;
  pointer-events: none;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.hero-actions {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.hero-action,
.hero-portfolio-link {
  position: absolute;
  pointer-events: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-action {
  bottom: 8.8%;
  display: grid;
  height: 6.4%;
  place-items: center;
}

.hero-action:hover,
.hero-action:focus-visible,
.hero-portfolio-link:hover,
.hero-portfolio-link:focus-visible {
  transform: translateY(-4px) scale(1.02);
  outline: none;
}

.hero-action:focus-visible,
.hero-portfolio-link:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--paper-light), 0 0 0 6px var(--ink);
}

.hero-action img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-action span {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  padding: 3px 6px;
  color: var(--paper-light);
  background: var(--ink);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.hero-action:hover span,
.hero-action:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hero-action--cv {
  left: 6.2%;
  width: 6.2%;
  padding: 0;
}

.hero-action--linkedin {
  left: 15.1%;
  width: 6.1%;
}

.hero-action--contact {
  right: 14.8%;
  width: 6.5%;
}

.hero-action--youtube {
  right: 6.1%;
  width: 6.2%;
}

.hero-portfolio-link {
  left: 31.3%;
  bottom: 0.8%;
  width: 37.4%;
}

.hero-portfolio-link img {
  width: 100%;
}

.portfolio-section {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 0 28px clamp(70px, 9vw, 130px);
  scroll-margin-top: 24px;
}

.selected-work-heading {
  width: min(78%, 760px);
  margin: 0 auto clamp(18px, 2.4vw, 34px);
}

.portfolio-player-shell {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(12px, 2vw, 20px);
  background: transparent;
  border: 1px solid rgba(83, 57, 35, 0.16);
  box-shadow: none;
}

.portfolio-player-shell::before,
.portfolio-player-shell::after {
  content: "";
  position: absolute;
  left: -2.5%;
  width: 105%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0 2%, var(--rust) 2% 6%, transparent 6% 94%, var(--rust) 94% 98%, transparent 98%);
  opacity: 0.48;
}

.portfolio-player-shell::before {
  top: -10px;
}

.portfolio-player-shell::after {
  bottom: -10px;
}

.technical-mark {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
}

.technical-mark::before,
.technical-mark::after {
  content: "";
  position: absolute;
  background: var(--rust);
}

.technical-mark::before {
  top: 13px;
  left: 0;
  width: 28px;
  height: 1px;
}

.technical-mark::after {
  top: 0;
  left: 13px;
  width: 1px;
  height: 28px;
}

.technical-mark--tl { top: -24px; left: -22px; }
.technical-mark--tr { top: -24px; right: -22px; }
.technical-mark--bl { bottom: -24px; left: -22px; }
.technical-mark--br { bottom: -24px; right: -22px; }

.featured-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #081224;
  box-shadow: inset 0 0 0 1px rgba(6, 35, 72, 0.42);
}

.featured-video img,
.featured-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.play-featured {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 48px;
  padding: 0;
  color: var(--ink);
  background: var(--gold);
  border: 1px solid rgba(7, 40, 87, 0.72);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.play-featured:hover,
.play-featured:focus-visible {
  background: #ffc62b;
  box-shadow: 0 9px 23px rgba(0, 0, 0, 0.34);
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  transform: translate(-50%, -50%) scale(1.06);
}

.play-triangle {
  position: relative;
  display: block;
  width: 20px;
  height: 22px;
}

.play-triangle::before,
.play-triangle::after {
  content: "";
  position: absolute;
  top: 0;
  left: 2px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid var(--ink);
}

.play-triangle::after {
  display: none;
}

.local-player-notice {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 28px;
  color: var(--paper-light);
  background: rgba(6, 35, 72, 0.94);
  text-align: center;
}

.local-player-notice strong {
  color: var(--gold);
  font-size: clamp(20px, 3vw, 34px);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.local-player-notice a {
  justify-self: center;
  margin-top: 5px;
  color: var(--paper-light);
  text-underline-offset: 5px;
}

.external-player-link {
  min-width: 170px;
  padding: 11px 22px;
  color: var(--ink) !important;
  background: var(--gold);
  border: 1px solid rgba(251, 245, 232, 0.65);
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, transform 160ms ease;
}

.external-player-link:hover,
.external-player-link:focus-visible {
  background: #ffc62b;
  outline: 2px solid var(--paper-light);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.play-featured > span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.active-video-title {
  margin: 12px 2px 16px;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 500;
  font-variation-settings: "wght" 500;
  line-height: 1.14;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 13px;
  will-change: opacity, transform;
}

.video-card {
  position: relative;
  min-width: 0;
}

.video-card-button {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.video-card-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.thumbnail-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #101727;
}

.thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.video-card-button:hover .thumbnail-wrap img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.035);
}

.video-duration {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 19px;
  padding: 0 5px;
  color: #fff;
  background: rgba(4, 17, 39, 0.92);
  font: 500 11px/1 "Oswald", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.video-card-title {
  display: -webkit-box;
  min-height: 2.04em;
  margin: 7px 1px 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  line-height: 1.16;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-card-button::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin-top: 7px;
  background: var(--gold);
  transition: width 180ms ease;
}

.video-card.is-active .video-card-button::after {
  width: 100%;
}

.video-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(7, 40, 87, 0.18);
}

.video-pagination button {
  padding: 5px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-pagination button:first-child {
  justify-self: start;
}

.video-pagination button:last-child {
  justify-self: end;
}

.video-pagination button:disabled {
  opacity: 0.25;
  cursor: default;
}

#page-status {
  color: rgba(7, 40, 87, 0.62);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.playlist-link {
  position: relative;
  display: block;
  width: min(86%, 500px);
  margin: clamp(44px, 6vw, 70px) auto 17px;
  transition: transform 160ms ease, filter 160ms ease;
}

.playlist-link::before,
.playlist-link::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(50px, 10vw, 145px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(7, 40, 87, 0.72));
  pointer-events: none;
}

.playlist-link::before {
  right: calc(100% + 20px);
}

.playlist-link::after {
  left: calc(100% + 20px);
  transform: rotate(180deg);
}

.playlist-link:hover,
.playlist-link:focus-visible {
  outline: none;
  filter: drop-shadow(0 5px 4px rgba(52, 33, 19, 0.18));
  transform: translateY(-2px);
}

.playlist-link:focus-visible {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink);
}

.portfolio-categories {
  width: min(88%, 590px);
  margin: 0 auto;
}

.cv-dialog {
  width: min(94vw, 820px);
  max-width: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  color: var(--ink);
}

.cv-dialog::backdrop {
  background: rgba(5, 20, 43, 0.72);
  backdrop-filter: blur(4px);
}

.cv-dialog-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1552 / 1013;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.36));
}

.cv-dialog-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cv-dialog-close {
  position: absolute;
  z-index: 4;
  top: 6.4%;
  right: 7.2%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
}

.cv-dialog-close:hover,
.cv-dialog-close:focus-visible {
  color: var(--rust);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.cv-choice {
  position: absolute;
  z-index: 3;
  left: 12%;
  width: 76%;
  height: 27%;
  overflow: hidden;
  transition: transform 160ms ease, filter 160ms ease;
}

.cv-choice img {
  width: 100%;
  height: auto;
  max-width: none;
  transform: translateY(-16.5%);
}

.cv-choice--visual {
  top: 33%;
}

.cv-choice--ats {
  top: 63.5%;
}

.cv-choice:hover,
.cv-choice:focus-visible {
  outline: none;
  filter: drop-shadow(0 7px 4px rgba(61, 36, 14, 0.2));
  transform: translateX(5px);
}

.cv-choice:focus-visible {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink);
}

.cv-viewer-page {
  min-height: 100svh;
  background-color: #d9cfbd;
}

.cv-viewer-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 10px clamp(14px, 3vw, 38px);
  color: var(--paper-light);
  background: var(--ink);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.cv-viewer-toolbar a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
}

.cv-viewer-toolbar a:last-child {
  justify-self: end;
}

.cv-viewer-frame {
  width: min(100%, 1180px);
  height: calc(100svh - 58px);
  margin: 0 auto;
  padding: 14px;
}

.cv-viewer-frame object {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 0;
  box-shadow: 0 10px 34px rgba(52, 33, 19, 0.22);
}

.cv-viewer-fallback {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.cv-viewer-fallback a {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 640px) {
  .hero-section {
    padding: 0 0 46px;
  }

  .hero-card {
    width: min(100%, 430px, calc((100svh - 4px) * 0.495327));
    aspect-ratio: 371 / 749;
    overflow: hidden;
    filter: drop-shadow(0 12px 20px rgba(52, 33, 19, 0.12));
  }

  .hero-art {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
  }

  .hero-art img {
    width: 103%;
    height: auto;
    max-width: none;
    transform: translate(-2.65%, -6.9%);
  }

  .hero-frame {
    display: none;
  }

  .hero-action span {
    display: none;
  }

  .hero-portfolio-link {
    left: 11%;
    bottom: 10.5%;
    width: 78%;
  }

  .hero-action--cv,
  .hero-action--linkedin,
  .hero-action--contact,
  .hero-action--youtube {
    bottom: 7%;
    height: 5.4%;
    width: 12%;
  }

  .hero-action--cv {
    left: 11.5%;
  }

  .hero-action--linkedin {
    left: 31.5%;
  }

  .hero-action--contact {
    left: auto;
    right: 31.5%;
  }

  .hero-action--youtube {
    right: 11.5%;
  }

  .portfolio-section {
    padding: 0 14px 74px;
  }

  .selected-work-heading {
    width: min(100%, 620px);
    margin-bottom: 19px;
  }

  .portfolio-player-shell {
    padding: 9px;
  }

  .technical-mark--tl,
  .technical-mark--bl {
    left: -11px;
  }

  .technical-mark--tr,
  .technical-mark--br {
    right: -11px;
  }

  .play-featured {
    width: 64px;
    height: 43px;
  }

  .active-video-title {
    margin: 10px 1px 13px;
    font-size: 15px;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .video-card-title {
    font-size: 11.5px;
    line-height: 1.16;
  }

  .playlist-link {
    width: min(92%, 500px);
    margin-top: 48px;
  }

  .playlist-link::before,
  .playlist-link::after {
    width: 22px;
  }

  .playlist-link::before {
    right: calc(100% + 5px);
  }

  .playlist-link::after {
    left: calc(100% + 5px);
  }

  .portfolio-categories {
    width: min(94%, 590px);
  }

  .cv-dialog {
    width: min(98vw, 760px);
  }

  .cv-dialog-close {
    top: 4.8%;
    right: 5.4%;
    width: 34px;
    height: 34px;
    font-size: 31px;
  }

  .cv-choice {
    left: 6%;
    width: 88%;
    height: 27%;
  }

  .cv-choice--visual {
    top: 33%;
  }

  .cv-choice--ats {
    top: 63.5%;
  }

  .cv-viewer-toolbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    min-height: 52px;
    font-size: 12px;
  }

  .cv-viewer-toolbar strong {
    display: none;
  }

  .cv-viewer-frame {
    height: calc(100svh - 52px);
    padding: 7px;
  }
}

@media (max-width: 420px) {
  .hero-card {
    width: 100%;
  }

  .portfolio-section {
    padding-left: 10px;
    padding-right: 10px;
  }

  .video-pagination button span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
