/* ==========================================================================
   Jovan Penezić — actor page
   Palette taken from the studio backdrops in the photographs themselves:
   a warm putty ground, deep ink, and a single near-black band for video.
   ========================================================================== */

:root {
  --paper:      #d5d0c5;
  --paper-deep: #c6c0b3;
  --ink:        #201d18;
  --ink-soft:   #56503f;
  --ink-faint:  #5c5649;
  --rule:       rgba(32, 29, 24, 0.22);
  --dark:       #141310;
  --dark-rule:  rgba(213, 208, 197, 0.22);

  --serif: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1.5rem, 5vw, 6rem);
  --stack:  clamp(3.25rem, 7vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 50;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 80svh);
  align-items: stretch;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 0 0 0 var(--gutter);
  height: 100svh;
  min-height: 100svh;
}

.hero__frame {
  grid-column: 2;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  justify-self: end;
  aspect-ratio: 4 / 5;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

.hero__picture,
.hero__picture img {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.hero__picture img {
  max-height: none;
  object-fit: cover;
  object-position: 50% 12%;
  aspect-ratio: 4 / 5;
}

.hero__text {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  max-width: 39rem;
  padding-bottom: clamp(2.5rem, 5vh, 4.5rem);
}

.nameplate {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 9.5vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}
.nameplate span { display: block; }

.hero__subtitle {
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.hero__bio {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  line-height: 1.5;
  margin: 0 0 2rem;
  max-width: 32ch;
}

/* Page index: the one piece of navigation, sitting under the bio so a
   casting director can jump straight to reel, photos or credits. */
.index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.index__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.68rem 1.05rem 0.62rem;
  border: 1px solid rgba(32, 29, 24, 0.26);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.index__link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.index__link:hover,
.index__link:focus-visible {
  color: var(--ink);
  border-color: rgba(32, 29, 24, 0.58);
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.index__link:hover::after,
.index__link:focus-visible::after {
  opacity: 0.7;
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .index__link,
  .index__link::after { transition: none; }
  .index__link:hover,
  .index__link:focus-visible { transform: none; }
}

.hero__contact {
  margin: 0;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
}

.link {
  text-decoration: none;
  padding-bottom: 0.2em;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}
.link:hover { border-color: currentColor; }

/* Single orchestrated page-load reveal. */
@media (prefers-reduced-motion: no-preference) {
  .hero__frame,
  .hero__text > * {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  .hero__frame     { animation-delay: 0.05s; }
  .nameplate       { animation-delay: 0.18s; }
  .hero__subtitle  { animation-delay: 0.26s; }
  .hero__bio       { animation-delay: 0.32s; }
  .index           { animation-delay: 0.38s; }
  .hero__contact   { animation-delay: 0.44s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to   { opacity: 1; transform: none; }
}

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

.section {
  padding: var(--stack) var(--gutter);
}

.section--dark {
  background: var(--dark);
  color: var(--paper);
}
.section--dark .section__heading::after { background: var(--dark-rule); }

.section--quiet { padding-block: calc(var(--stack) * 0.72); }

.section__heading {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  letter-spacing: 0.01em;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}
.section__heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.subheading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: clamp(2.25rem, 4.5vw, 3.25rem) 0 1.25rem;
}

.note {
  font-size: 0.9375rem;
  color: var(--ink-faint);
  margin: 1.25rem 0 0;
  max-width: 46ch;
}
.section--dark .note { color: rgba(213, 208, 197, 0.65); }

/* --- Video --------------------------------------------------------------- */

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 1180px;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}
.player--narrow { max-width: 620px; margin: 0; }

.player__button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--paper);
}

.player__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(213, 208, 197, 0.8);
  border-radius: 50%;
  background: rgba(20, 19, 16, 0.42);
  padding-left: 4px;
  transition: background 0.25s ease;
}
.player__button:hover .player__play { background: rgba(20, 19, 16, 0.72); }

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Headshots ----------------------------------------------------------- */
/* A filmstrip rather than a stack: five portraits stacked vertically cost
   more page height than every other section combined. */

.strip { position: relative; }

.strip__track {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0 0 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.strip__track:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

.strip__item {
  flex: 0 0 clamp(15rem, 26vw, 23rem);
  scroll-snap-align: start;
}

.strip__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  color: inherit;
}
.strip__open img { width: 100%; }

.strip__nav {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}
.strip__arrow {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: none;
  border: 1px solid var(--rule);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.strip__arrow:hover:not(:disabled) { border-color: var(--ink); }
.strip__arrow:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 700px) {
  .strip__item { flex-basis: 74vw; }
  .strip__nav { display: none; }
}

/* --- Introduction + slate, one band --------------------------------------- */

.media {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.media__col .player { max-width: none; margin: 0; }

.media__label {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.0625rem;
  margin: 0 0 0.85rem;
  color: rgba(213, 208, 197, 0.7);
}

/* --- Credits + details, one band ------------------------------------------ */

.dossier {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}
@media (min-width: 900px) {
  .dossier { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .dossier__col--side { padding-top: 0.15rem; }
}

/* --- Credits ------------------------------------------------------------- */

.credits, .trainings {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 62rem;
}

.credit, .training {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.credits > .credit:first-child,
.trainings > .training:first-child { border-top: 1px solid var(--rule); }

.credit__title, .training__school {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.25;
}
.credit__note {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.credit__role, .training__detail {
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.credit__meta, .training__years {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.credit__year { margin-left: 1.25rem; color: var(--ink-faint); }

@media (min-width: 720px) {
  .credit  { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.6fr); align-items: baseline; }
  .training { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.6fr); align-items: baseline; }
  .credit__meta, .training__years { text-align: right; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease;
}
.cta:hover { background: var(--ink); color: var(--paper); }

/* --- Facts and contact --------------------------------------------------- */

.facts { margin: 0; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts > div:first-child { border-top: 1px solid var(--rule); }
.facts dt {
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  padding-top: 0.15em;
}
.facts dd { margin: 0; }

.contact { list-style: none; margin: 0; padding: 0; }
.contact li {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact li:first-child { border-top: 1px solid var(--rule); }
.contact .k {
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  padding-top: 0.15em;
}
.contact a { justify-self: start; }

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

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.footer span:last-child { margin-left: auto; }

/* --- Lightbox ------------------------------------------------------------ */

.lightbox {
  border: 0;
  padding: 0;
  background: none;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 19, 16, 0.94); }
.lightbox img {
  width: auto;
  height: auto;
  max-width: min(92vw, 900px);
  max-height: 92vh;
  margin: auto;
  position: absolute;
  inset: 0;
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--paper);
  cursor: pointer;
}

/* --- Narrow screens ------------------------------------------------------ */

@media (max-width: 899px) {
  .hero {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: var(--dark);
    color: var(--paper);
  }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(20, 19, 16, 0.02) 0%,
      rgba(20, 19, 16, 0.18) 38%,
      rgba(20, 19, 16, 0.82) 100%
    );
  }
  .hero__frame {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: auto;
    min-height: 100svh;
  }
  .hero__picture,
  .hero__picture img {
    height: 100%;
  }
  .hero__text {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    position: relative;
    z-index: 2;
    max-width: none;
    padding: 1.5rem var(--gutter) 1.25rem;
  }
  .hero__picture img {
    aspect-ratio: auto;
    max-height: none;
    min-height: 100svh;
    object-position: 50% 12%;
  }
  .nameplate {
    font-size: 3.15rem;
    margin-bottom: 0.75rem;
  }
  .hero__subtitle {
    color: rgba(213, 208, 197, 0.78);
    border-top-color: rgba(213, 208, 197, 0.3);
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
    padding-top: 0.7rem;
  }
  .hero__bio {
    font-size: 1.05rem;
    line-height: 1.35;
    max-width: 26ch;
    margin-bottom: 0.95rem;
  }
  .index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    border-top-color: rgba(213, 208, 197, 0.3);
    padding-top: 0.7rem;
  }
  .index__link {
    color: rgba(213, 208, 197, 0.78);
    border-color: rgba(213, 208, 197, 0.32);
    background: rgba(213, 208, 197, 0.08);
    font-size: 0.8rem;
    min-height: 2.2rem;
    padding: 0.5rem 0.55rem 0.46rem;
    white-space: nowrap;
  }
  .index__link::after {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.35rem;
  }
  .index__link:hover,
  .index__link:focus-visible {
    color: var(--paper);
    border-color: rgba(213, 208, 197, 0.64);
    background: rgba(213, 208, 197, 0.14);
  }
  .hero__contact {
    color: rgba(213, 208, 197, 0.86);
    font-size: 0.82rem;
  }
  .hero .link {
    border-bottom-color: rgba(213, 208, 197, 0.32);
  }
  .player--narrow { max-width: none; }
}

@media (max-width: 560px) {
  .facts > div,
  .contact li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .footer span:last-child { margin-left: 0; }
}

@media (max-width: 380px), (max-height: 700px) {
  .hero__text { padding-bottom: 1rem; }
  .nameplate { font-size: 2.72rem; }
  .hero__subtitle,
  .hero__bio { margin-bottom: 0.62rem; }
  .index { margin-bottom: 0.62rem; }
  .index__link {
    min-height: 2.05rem;
    padding: 0.42rem 0.42rem 0.38rem;
  }
}

@media print {
  .player, .lightbox, .skip { display: none; }
  body { background: #fff; color: #000; }
}
