/* jonasfriedman.com — static rebuild
   Font: Jost (Google Fonts) — geometric sans substitute for live site font.
   Live site font could not be identified (Squarespace/Adobe Fonts, JS-rendered);
   Jost is the closest freely-licensable geometric sans. Verify in Phase 1.7.
*/



/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Base ─────────────────────────────────────────── */
:root {
  --bg:       #0d0d0d;
  --surface:  #141414;
  --text:     #ebebeb;
  --muted:    #7a7a72;
  --border:   #222222;
  --gap:      2.5rem;
}

body {
  font-family: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 92% 4%,  rgba(175, 62, 8, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 4%  92%, rgba(10, 22, 80, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 45% 30% at 50% 0%,  rgba(48,  8, 72, 0.20) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

/* Breathing ambient-light overlay using screen blend — adds light to dark
   areas, leaves white text nearly unchanged. Pulses 0.06→0.40 over 20s. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(ellipse 80% 65% at 90% 6%,  #a83802 0%, transparent 60%),
    radial-gradient(ellipse 65% 55% at 5%  91%, #0a1462 0%, transparent 62%);
  background-attachment: fixed;
  opacity: 0.06;
  animation: ambientBreathe 20s ease-in-out infinite alternate;
}

@keyframes ambientBreathe {
  0%   { opacity: 0.06; }
  100% { opacity: 0.40; }
}

/* ── Nav ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(8,8,8,0.98), rgba(14,14,14,0.93));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 4px 24px rgba(0,0,0,0.5);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gap);
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  position: relative;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-social a {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
  line-height: 1;
}

.nav-social a:hover { color: var(--text); }

.nav-social svg { display: block; }

.nav-education {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid rgba(235,235,235,0.4);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-education:hover { border-color: var(--text); }

/* Phone header: two rows. The logo and the Education pill on the first,
   the three pages and the social icons on the second, so nothing crowds.
   .nav-right dissolves (display: contents) so the pill and the icons can
   sit on different rows of the grid. */
@media (max-width: 740px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1rem;
    row-gap: 0.9rem;
    align-items: center;
    padding-top: 1.1rem;
    padding-bottom: 1rem;
  }
  .nav-right { display: contents; }
  .nav-left { grid-row: 1; grid-column: 1; }
  .nav-education { grid-row: 1; grid-column: 2; justify-self: end; }
  .nav-links { grid-row: 2; grid-column: 1; gap: 1.35rem; }
  .nav-social { grid-row: 2; grid-column: 2; justify-self: end; gap: 0.8rem; }
}

/* ── Main wrapper ─────────────────────────────────── */
.page-content {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Project hero: cinematic full-bleed with title overlay ── */
.project-hero {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 340px;
  overflow: hidden;
  background: #080808;
}

.project-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: heroIn 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 25%,
    rgba(8, 8, 8, 0.6) 65%,
    rgba(8, 8, 8, 0.95) 100%
  );
  pointer-events: none;
}

.project-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 var(--gap) 2.25rem;
}

.project-hero__title {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.project-hero__credit {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(235,235,235,0.6);
  margin-bottom: 0;
}

.project-hero__credit strong {
  color: rgba(235,235,235,0.9);
  font-weight: 500;
}

/* ── Hero image (About page) ──────────────────────── */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 82vh;
  object-fit: cover;
  object-position: center center;
  animation: heroIn 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.hero--about img {
  height: 80vh;
  object-position: center 30%;
}

/* Gradient dissolve at bottom into page background */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(to bottom, transparent 0%, rgba(13,13,13,0.7) 60%, #0d0d0d 100%);
  pointer-events: none;
}

/* ── Hero home (split: image left, video right) ────── */
.hero-home {
  position: relative;
  width: 100%;
  height: clamp(480px, 80vh, 740px);
  overflow: hidden;
}

.hero-home__bg {
  position: absolute;
  inset: 0;
}

.hero-home__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  animation: heroIn 1s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

/* Right-side darkening: only affects the right 40% where the video sits */
.hero-home__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 42%,
    rgba(13,13,13,0.25) 62%,
    rgba(13,13,13,0.82) 100%
  );
}

/* Bottom dissolve into page */
.hero-home::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(to bottom, transparent 0%, rgba(13,13,13,0.75) 55%, #0d0d0d 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-home__content {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Right panel: label + title + credit stacked above video */
.hero-home__right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 44%;
  max-width: 560px;
}

.hero-home__project-info {
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.hero-project-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.hero-project-credit {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hero-home__video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 3px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 4px 16px rgba(0,0,0,0.5);
}

/* ── Hero load animation ──────────────────────────── */
@keyframes heroIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Scroll reveal ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.68s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.68s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Section ──────────────────────────────────────── */
.section {
  padding: 3.5rem var(--gap);
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ── Typography ───────────────────────────────────── */
h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.credit {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.credit strong {
  color: var(--text);
  font-weight: 500;
}

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

/* ── Home: two-column section ─────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.two-col-text { padding-right: 1rem; }

/* ── Featured project grid (home) ─────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.featured-grid a {
  display: block;
  overflow: hidden;
  position: relative;
}

.featured-grid img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s;
}

.featured-grid a:hover img {
  transform: scale(1.03);
  opacity: 0.75;
}

/* ── Project grid (film-tv) ───────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem var(--gap) 3.5rem;
}

.project-item {
  display: block;
  overflow: hidden;
  position: relative;
}

.project-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s;
}

.project-item:hover img {
  transform: scale(1.03);
  opacity: 0.75;
}

.project-item-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.6rem;
  padding: 0 0.1rem;
}

/* ── Project body ─────────────────────────────────── */
.project-body {
  padding-top: 2rem;
}

.project-description {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 680px;
  margin-top: 1.25rem;
  line-height: 1.75;
}

/* ── ReelCrafter / Spotify player ─────────────────── */
.player-wrap {
  width: 100%;
  margin: 1.5rem 0;
}

.player-wrap iframe {
  width: 100%;
  border: none;
}

/* ── Related projects (project pages) ─────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-grid a {
  display: block;
  overflow: hidden;
  position: relative;
}

.related-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s;
}

.related-grid a:hover img {
  transform: scale(1.03);
  opacity: 0.75;
}

/* ── About page ───────────────────────────────────── */
.about-body {
  display: grid;
  grid-template-columns: 5fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-bio p {
  max-width: none;
}

.poster-slideshow {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.poster-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}

.poster-slideshow img.is-active {
  opacity: 1;
}

@media (max-width: 900px) {
  .about-body {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 740px) {
  .about-body {
    display: block;
  }
  .poster-slideshow {
    max-width: 320px;
    margin: 2.5rem auto 0;
  }
}

/* ── Contact form ─────────────────────────────────── */
.contact-form {
  max-width: 560px;
}

.contact-form label {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--muted); }

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form button {
  margin-top: 2rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.75rem 2.25rem;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.contact-form button:hover { opacity: 0.7; }

.mailto-fallback {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ── Sunderfolk page ──────────────────────────────── */
.streaming-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.streaming-links a img {
  height: 36px;
  width: auto;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.streaming-links a:hover img { opacity: 1; }

.press-quote {
  font-style: italic;
  font-size: 0.95rem;
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--muted);
}

.press-quote cite {
  display: block;
  margin-top: 0.6rem;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.press-score {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem var(--gap);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-social {
  display: flex;
  gap: 2rem;
}

.footer-social a {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--text); }

.footer-copy {
  margin-left: auto;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── Divider ──────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --gap: 1.5rem; }

  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid  { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .two-col-text { padding-right: 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .hero img { height: 65vh; }
  .hero--about img { height: 72vh; }
  .project-hero { height: 44vh; }

  .hero-home { height: clamp(380px, 70vh, 560px); }
  .hero-home__right { width: 56%; }
}

@media (max-width: 600px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid  { grid-template-columns: repeat(2, 1fr); }
  .related-grid  { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.5rem; }
  .hero img { height: 52vh; }
  .hero--about img { height: 58vh; }
  .project-hero { height: 38vh; }

  /* On small screens, video stacks below image */
  .hero-home {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .hero-home__bg {
    position: relative;
    height: 52vw;
    min-height: 240px;
  }
  .hero-home__content {
    position: relative;
    z-index: 3;
    height: auto;
    padding: 1.5rem var(--gap) 2rem;
    justify-content: center;
  }
  .hero-home__right { width: 100%; max-width: 100%; }
  .hero-home::after { display: none; }
}
