/* ==========================================================================
   Jessica Bulinski — portfolio
   Rebuilt to match the original site. Written from scratch; nothing is
   copied from the previous host's stylesheet.
   ========================================================================== */

:root {
  --brand: #6965ff;          /* periwinkle — sidebar, links, captions */
  --ink: #0500a3;            /* deep blue — the big display headings */
  --ink-nav: #000020;        /* almost-black — the active nav item */
  --paper: #ffffff;
  --rule: #e6e5f7;

  --sidebar-w: 297px;
  /* The original insets its content by a percentage of the column, not a fixed
     max-width, so the margins grow with the window. Measured off the live site
     at two different widths: 10.35% each side. */
  --content-pad: 10.35%;
  --bar-h: 56px;            /* the phone top bar */

  --font-display: "Quicksand", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-nav: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --gap: 40px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

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

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

.skip-link {
  position: absolute;
  top: -999px; left: 8px;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- shell ---------------------------------------------------- */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

/* ---------- sidebar -------------------------------------------------- */

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  background: var(--brand);
  color: #fff;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

/* Desktop: the bar is just the Home link and the panel is the rest of the
   column. The toggle and the page footer only exist on a phone. */
.navtoggle { display: none; }

.sidebar__panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.site-foot { display: none; }

.sidebar__home {
  font-family: var(--font-nav);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.09em;
  font-weight: 400;
  color: #fff;
  margin: 0 0 40px;
}

.sidebar__nav ul,
.sidebar__projects ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar__nav a,
.sidebar__projects a {
  display: block;
  color: #fff;
  transition: opacity 0.18s var(--ease);
}

.sidebar__nav a {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 5px;
}
.sidebar__nav a[aria-current="page"] { font-weight: 500; }

.sidebar__nav a[aria-current="page"],
.sidebar__projects a[aria-current="page"] { color: var(--ink-nav); }

.sidebar__rule {
  width: 20px;
  height: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  margin: 30px 0;
}

/* 11.62px is what the original uses. It is the size at which the longest
   title — How to Train Your Dragon: Flight Academy — still fits the column
   on a single line. */
.sidebar__projects a {
  font-size: 11.62px;
  line-height: 1.25;
  margin-bottom: 5px;
}

@media (hover: hover) {
  .sidebar__nav a:hover,
  .sidebar__projects a:hover { opacity: 0.62; }
}

.sidebar__foot { margin-top: auto; padding-top: 40px; }

.sidebar__social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.sidebar__social a {
  display: inline-flex;
  align-items: center;
  color: var(--ink-nav);
  transition: opacity 0.18s var(--ease);
}
.sidebar__social a:hover { opacity: 0.65; }
.sidebar__social svg { display: block; }
.sidebar__social .imdb {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.sidebar__copy {
  font-size: 12px;
  color: var(--ink-nav);
  margin: 0;
}

/* ---------- main column ---------------------------------------------- */

.main {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--paper);
}

.block { width: 100%; }

.block__inner {
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.block--banner { width: 100%; }
.block--banner img { width: 100%; height: auto; }

.block--title {
  padding: 21px 0 26px;
  text-align: center;
}

.display-name {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 60px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.display-tagline {
  font-size: clamp(0.9rem, 2.6vw, 16px);
  line-height: 1.55;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: var(--brand);
  margin: 10px 0 0;
  text-wrap: balance;
}

/* ---------- banner video --------------------------------------------- */

/* The original holds this to a 330px strip on a wide screen and scales it
   down in step with the window on narrower ones. */
.banner-video {
  width: 100%;
  height: clamp(84px, 20.6vw, 330px);
  object-fit: cover;
  background: var(--brand);
}

.block--hero { width: 100%; }

/* ---------- home poster grid ------------------------------------------ */

.block--portfolio {
  background-image: linear-gradient(
    0deg,
    #ffffff 0%,
    #9e7fff 33%,
    #6a80ff 66%,
    #ffffff 100%
  );
  padding: 39px 0 15px;
}

.poster-grid {
  margin: 0 auto;
  padding: 0 var(--content-pad);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.poster {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

/* The original site washed each tile in the brand colour on hover.
   This sits under the title label and over the artwork. */
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(105, 101, 255, 0.42) 0%,
    rgba(105, 101, 255, 0.18) 45%,
    rgba(5, 0, 163, 0.40) 100%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

@media (hover: hover) {
  .poster:hover::after,
  .poster:focus-visible::after { opacity: 1; }
}

.poster img {
  width: 100%;
  height: auto;              /* beat the img height attribute */
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s var(--ease), filter 0.3s var(--ease);
}

@media (hover: hover) {
  .poster:hover img { transform: scale(1.035); }
}

.poster__label {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(
    0deg,
    rgba(5, 0, 163, 0.94) 0%,     /* --ink, the heading indigo */
    rgba(56, 50, 205, 0.72) 45%,
    rgba(105, 101, 255, 0) 100%   /* --brand, faded out */
  );
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
@media (hover: hover) {
  .poster:hover .poster__label,
  .poster:focus-visible .poster__label { opacity: 1; }
}

/* ---------- project pages -------------------------------------------- */

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 60px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
  margin: 0;
  padding: 46px 0 34px;
}

.project-meta {
  display: grid;
  grid-template-columns: 33.33% 1fr;
  gap: 0;
  padding: 8px 0 44px;
}

.project-meta h2 {
  font-size: 12.8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin: 0 0 1px;
}

/* the About column's heading sits at body size on the original */
.project-meta__col--about h2 {
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.55;
  margin-bottom: 0;
}

/* Role lines sit on consecutive lines, not as separated paragraphs. */
.project-meta p {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.04em;
}
.project-meta__col--about p {
  line-height: 1.55;
  margin-bottom: 20px;
}
.project-meta p:last-child { margin-bottom: 0; }
.project-meta__col > *:last-child { margin-bottom: 0; }

.project-tagline {
  font-size: clamp(1.25rem, 3.4vw, 30px);
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
  margin: 0;
  padding: 26px 0 40px;
}

.project-note {
  text-align: center;
  font-size: 17px;
  padding: 6px 0 40px;
  margin: 0;
}
.project-note a { text-decoration: underline; text-underline-offset: 3px; }

/* masonry-ish three column artwork grid, as on the original */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  padding-bottom: 20px;
}

.art-col { display: flex; flex-direction: column; gap: 20px; }

figure.art { margin: 0; }

.art__frame {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.art__frame img {
  width: 100%;
  height: auto;
}

figure.art figcaption {
  font-size: 12px;
  line-height: 1.45;
  color: var(--brand);
  padding: 8px 2px 0;
}

/* ---------- prev / next ---------------------------------------------- */

.project-nav {
  border-top: 1px solid var(--rule);
  margin-top: 26px;
  padding: 34px 0 60px;
  display: grid;
  gap: 28px;
}

.project-nav__link {
  display: flex;
  align-items: center;
  gap: 14px;
}
.project-nav__link--next { justify-content: flex-end; text-align: right; }

.project-nav__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: rgba(105, 101, 255, 0.55);
  margin-bottom: 2px;
}

.project-nav__title {
  font-size: clamp(1.4rem, 3.6vw, 36px);
  line-height: 1.1;
  font-weight: 400;
  color: var(--brand);
  transition: color 0.18s var(--ease);
}
.project-nav__link:hover .project-nav__title { color: var(--ink); }

.project-nav__chev { flex: 0 0 auto; opacity: 0.55; }

/* ---------- about ----------------------------------------------------- */

/* Two columns: the photograph on the left at 40% of the content width, the
   writing on the right at 50%. Measured off the original. */
.about {
  display: grid;
  grid-template-columns: 40.2% 50%;
  column-gap: 9.8%;
  row-gap: 22px;
  align-items: start;
  padding: 60px 0 40px;
}

.about__label {
  font-size: 16px;
  font-weight: 400;
  color: var(--brand);
  margin: 0;
}

.about__lead {
  font-size: 16px;
  line-height: 1.45;
  color: var(--brand);
  margin: 0;
}

.about__body p {
  font-size: 20px;
  line-height: 1.22;
  letter-spacing: 0.04em;
  margin: 0 0 22px;
}
.about__body p:last-child { margin-bottom: 0; }

.about__portrait { width: 100%; margin: 0; }
.about__portrait img,
.about__portrait picture {
  width: 100%;
  height: auto;
  display: block;
}
.about__portrait img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
}

.about__portrait-missing {
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed rgba(105, 101, 255, 0.4);
  border-radius: 4px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  padding: 16px;
  color: rgba(105, 101, 255, 0.75);
}

.awards { padding: 24px 0 40px; }
.awards h2 { font-size: 16px; font-weight: 400; color: var(--brand); margin: 0 0 14px; }
.awards p { font-size: 20px; line-height: 1.22; letter-spacing: 0.04em; margin: 0 0 12px; white-space: pre-wrap; }

.skills { padding: 0 0 70px; }
.skills h2 { font-size: 16px; font-weight: 400; color: var(--brand); margin: 0 0 16px; }
.skills ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 20px;
}
.skills li { font-size: 20px; line-height: 1.25; }

/* ---------- contact --------------------------------------------------- */

.contact {
  text-align: center;
  padding: clamp(60px, 18vh, 190px) 0 120px;
}
.contact h1 {
  font-size: clamp(1.4rem, 4vw, 30px);
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 34px;
}
.contact p { font-size: clamp(1.15rem, 3vw, 28px); margin: 0 0 4px; }
.contact a { transition: opacity 0.18s var(--ease); }
.contact a:hover { opacity: 0.7; }
.contact__social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
  color: var(--brand);
}
.contact__social .imdb {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}

/* ---------- 404 -------------------------------------------------------- */

.notfound { text-align: center; padding: clamp(60px, 16vh, 170px) 0 130px; }
.notfound h1 {
  font-size: clamp(2rem, 7vw, 60px);
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0 0 18px;
}
.notfound p { font-size: 19px; margin: 0 0 30px; }
.notfound a { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }

/* ---------- ring cursor over the artwork ------------------------------- */
/* The original replaces the pointer with a thin circle carrying a plus when
   you are over something that will open larger. Pointer devices only. */

.ringcursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 130;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  mix-blend-mode: difference;
}
.ringcursor::before,
.ringcursor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
}
.ringcursor::before { width: 11px; height: 1px; transform: translate(-50%, -50%); }
.ringcursor::after { width: 1px; height: 11px; transform: translate(-50%, -50%); }
.ringcursor.is-on { opacity: 1; transform: scale(1); }

@media (hover: hover) and (pointer: fine) {
  body.has-ring .art__frame { cursor: none; }
}

/* ---------- lightbox --------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(6, 4, 40, 0.94);
  display: grid;
  place-items: center;
  padding: 3vmin;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  object-fit: contain;
  cursor: zoom-out;
}
.lightbox__caption {
  color: #fff;
  text-align: center;
  font-size: 14px;
  padding-top: 12px;
  min-height: 1em;
}
.lightbox__close {
  position: absolute;
  top: 16px; right: 18px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.26); }

/* ---------- responsive ------------------------------------------------- */

/* Between the sidebar and the phone bar: keep the sidebar, tighten the gaps. */
@media (max-width: 1100px) {
  :root { --content-pad: 6%; }
  .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phone: bar + drop-down menu, as on the original ------------- */

@media (max-width: 900px) {
  :root { --content-pad: 20px; }

  .shell { display: block; }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    min-height: 0;
    background: var(--paper);
    color: var(--ink-nav);
    padding: 0;
    display: block;
  }

  .sidebar__bar {
    display: flex;
    align-items: center;
    height: var(--bar-h);
    padding: 0 20px;
    background: var(--paper);
  }

  .sidebar__home {
    color: var(--ink-nav);
    font-size: 28px;
    margin: 0;
  }

  /* the hamburger, and the X it turns into */
  .navtoggle {
    display: block;
    position: fixed;
    top: 0;
    right: 8px;
    z-index: 95;
    width: var(--bar-h);
    height: var(--bar-h);
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--ink-nav);
  }
  .navtoggle__bars {
    display: block;
    position: relative;
    width: 24px;
    height: 16px;
    margin: 0 auto;
  }
  .navtoggle__bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.28s var(--ease), opacity 0.18s var(--ease);
  }
  .navtoggle__bars span:nth-child(1) { top: 0; }
  .navtoggle__bars span:nth-child(2) { top: 7px; }
  .navtoggle__bars span:nth-child(3) { top: 14px; }

  .navtoggle[aria-expanded="true"] { color: #fff; }
  .navtoggle[aria-expanded="true"] .navtoggle__bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .navtoggle[aria-expanded="true"] .navtoggle__bars span:nth-child(2) { opacity: 0; }
  .navtoggle[aria-expanded="true"] .navtoggle__bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* the menu itself: a full-screen wash of the deep blue, links centred */
  .sidebar__panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 78px 16px 40px;
    background: rgba(9, 0, 145, 0.93);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s var(--ease), visibility 0s linear 0.28s;
  }
  .sidebar__panel.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s var(--ease), visibility 0s;
  }

  .sidebar__nav,
  .sidebar__projects { width: 100%; }

  .sidebar__nav ul,
  .sidebar__projects ul {
    display: block;
    text-align: center;
    margin: 0;
    padding: 0;
  }

  .sidebar__nav a,
  .sidebar__projects a {
    display: block;
    color: #fff;
    font-size: min(20px, 5.1vw);
    font-weight: 400;
    line-height: 45px;
    margin: 0;
  }
  .sidebar__nav a[aria-current="page"],
  .sidebar__projects a[aria-current="page"] { color: #fff; opacity: 0.55; }

  .sidebar__rule { display: none; }
  .sidebar__foot { display: none; }

  /* body scroll lock while the menu is open */
  body.nav-open { overflow: hidden; }

  /* the icons and copyright line move to the foot of the page */
  .site-foot {
    display: block;
    text-align: center;
    padding: 34px 20px 40px;
  }
  .site-foot__social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    color: var(--brand);
    margin-bottom: 10px;
  }
  .site-foot__social a { display: inline-flex; align-items: center; color: var(--brand); }
  .site-foot__social .imdb {
    font-family: var(--font-nav);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
  }
  .site-foot__copy { font-size: 12px; color: var(--brand); margin: 0; }

  /* one column of everything */
  .poster-grid { grid-template-columns: 1fr; gap: 40px; }
  .art-grid { grid-template-columns: 1fr; gap: 26px; }
  .art-col { gap: 26px; }
  .skills ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .project-meta { grid-template-columns: 1fr; gap: 18px; }
  .project-meta__col--about h2 { margin-top: 6px; }

  .about {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 18px;
    padding-top: 34px;
  }
  .about__portrait { max-width: 420px; }

  .project-title { padding: 30px 0 22px; }
  .project-nav { padding: 28px 0 10px; }
}

@media (max-width: 480px) {
  .about__body p,
  .awards p,
  .skills li { font-size: 18px; }
  .skills ul { grid-template-columns: 1fr; }
}

/* Respect the visitor's motion preference. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .sidebar, .lightbox, .banner-video { display: none; }
}

/* ---------- video embed (loads nothing until asked) -------------------- */

.video-embed {
  max-width: 760px;
  margin: 0 auto 44px;
}

.video-embed__button,
.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 3px;
  background: #0b0930;
}

.video-embed__button {
  position: relative;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.video-embed__button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.video-embed__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 54px;
  border-radius: 12px;
  background: rgba(5, 0, 60, 0.72);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.video-embed__play::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-42%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}

@media (hover: hover) {
  .video-embed__button:hover img { transform: scale(1.02); opacity: 0.88; }
  .video-embed__button:hover .video-embed__play {
    background: var(--brand);
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.video-embed__credit {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(105, 101, 255, 0.8);
  text-align: center;
  margin: 10px 0 0;
}
