/* ============================================
   Jan Lubicz Przyluski - Portfolio Website
   Recreated from Cargo site design
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: rgba(0, 0, 0, 0.9);
  background-color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  opacity: 0.6;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s;
}

.nav--transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #fff;
}

.nav--transparent .nav__name,
.nav--transparent .nav__links a {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.nav--transparent .nav__hamburger span {
  background: #fff;
}

.nav__name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 50px;
  list-style: none;
}

.nav__links a {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: opacity 0.2s;
}

.nav__links a.active {
  opacity: 0.4;
}

/* Mobile menu */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: rgba(0, 0, 0, 0.9);
  transition: 0.3s;
}

/* ============================================
   Hero Section (Homepage)
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  padding-bottom: 60px;
}

.hero__video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero__video-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.05) 30%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero__video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh; /* 16:9 aspect ratio */
  height: 100vh;
  min-width: 100%;
  min-height: 56.25vw;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

/* Sound toggle button */
.hero__sound-toggle {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.hero__sound-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.hero__sound-toggle.is-unmuted .icon-muted {
  display: none;
}

.hero__sound-toggle.is-unmuted .icon-unmuted {
  display: block !important;
}

.hero__text {
  max-width: 80%;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero__text p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.hero__text a {
  font-weight: 600;
  letter-spacing: 0.05em;
}

.hero__text a:hover {
  opacity: 0.8;
}

.hero__scroll {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Project Grid (Homepage)
   ============================================ */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}

.project-grid__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f0f0f0;
}

.project-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.project-grid__item:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}

.project-grid__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-grid__item:hover .project-grid__label {
  opacity: 1;
}

/* Placeholder cards (visible label before real images are added) */
.project-grid__item--placeholder .project-grid__label {
  opacity: 1;
}

/* ============================================
   Page Content (Subpages)
   ============================================ */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 30px 60px;
}

/* Two-column header layout (like Cargo) */
.project-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.project-header__left h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.project-header__left p,
.project-header__right p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.project-header__right h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Section within a page */
.section {
  margin-bottom: 60px;
}

.section__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section__subtitle {
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 16px;
  opacity: 0.7;
}

.section__text {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 900px;
}

.section__text strong {
  font-weight: 700;
}

/* Video embeds */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-embed--small {
  max-width: 560px;
}

/* Image gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 30px 0;
}

.image-gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.image-single {
  margin: 30px 0;
  max-width: 800px;
}

.image-single img {
  width: 100%;
}

.image-caption {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 8px;
  font-style: italic;
}

/* ============================================
   Bio / CV Page
   ============================================ */
.bio-intro {
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 900px;
  margin-bottom: 40px;
}

.cv-section {
  margin-bottom: 40px;
}

.cv-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 8px;
}

.cv-section ul {
  list-style: none;
  padding: 0;
}

.cv-section li {
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 3px 0;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding-top: 20px;
}

.contact-photo img {
  width: 100%;
  max-width: 600px;
}

.contact-info {
  padding-top: 40px;
}

.contact-info h2 {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.contact-info h2 span {
  font-size: 0.95rem;
  opacity: 0.5;
  margin-left: 12px;
}

.contact-info p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-top: 20px;
}

.contact-info a {
  text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 40px 30px;
  text-align: right;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ============================================
   Texts Hero (book photo)
   ============================================ */
.teksty-hero {
  margin-bottom: 50px;
}

.teksty-hero img {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    z-index: 99;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__hamburger {
    display: flex;
    z-index: 101;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero__text {
    max-width: 100%;
  }

  .nav__name {
    font-size: 1.1rem;
  }

  .nav__links a {
    font-size: 1.3rem;
  }

  .page-content {
    padding: 80px 20px 40px;
  }
}

/* ============================================
   Separator / Divider
   ============================================ */
.divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 50px 0;
}

/* Quote styling */
.quote {
  font-style: italic;
  padding: 20px 30px;
  border-left: 3px solid rgba(0,0,0,0.15);
  margin: 20px 0;
  font-size: 0.92rem;
  line-height: 1.7;
  opacity: 0.8;
}

.quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Soundcloud embed */
.soundcloud-embed {
  margin: 30px 0;
  max-width: 800px;
}

.soundcloud-embed iframe {
  width: 100%;
  border: none;
}

/* ============================================
   Article / Essay Pages
   ============================================ */

/* Back link */
.article__back {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 40px;
  transition: opacity 0.2s;
}
.article__back:hover { opacity: 1; }
.article__back::before { content: '← '; }

/* Article header */
.article__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 12px;
}

.article__header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  max-width: 700px;
}

.article__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-style: italic;
  font-weight: 400;
  opacity: 0.55;
  margin-bottom: 30px;
  max-width: 600px;
}

.article__meta {
  font-size: 0.82rem;
  line-height: 1.7;
  opacity: 0.5;
  margin-bottom: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.article__meta strong {
  opacity: 1;
  font-weight: 600;
}

/* Language toggle */
.article__lang-toggle {
  margin-top: 16px;
}
.article__lang-toggle a {
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.article__lang-toggle a:hover {
  opacity: 1;
}

/* Article body */
.article {
  max-width: 720px;
}

.article__section {
  padding: 40px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.article__section:last-child {
  border-bottom: none;
}

.article p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.2em;
  text-align: justify;
  hyphens: auto;
}

.article p.first-para::first-letter {
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin: 0.05em 0.1em 0 0;
  font-weight: 700;
  opacity: 0.8;
}

/* Section headers within article */
.article h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 30px;
  padding-top: 8px;
}

/* Separator stars */
.sep {
  text-align: center;
  padding: 1.5em 0;
  opacity: 0.2;
  font-size: 1.2rem;
  letter-spacing: 1em;
  user-select: none;
}

/* Block quotes within article */
.article blockquote {
  margin: 1.5em 0 1.5em 1.2em;
  padding-left: 1.2em;
  border-left: 2px solid rgba(0,0,0,0.15);
  font-style: italic;
  opacity: 0.8;
}

.article blockquote p {
  text-align: left;
}

/* English text blocks (bilingual publications) */
.text-en {
  margin-top: 1.5em;
  padding-top: 1.5em;
  border-top: 1px dashed rgba(0,0,0,0.08);
  opacity: 0.7;
}
.text-en p {
  font-size: 0.9rem;
}
.text-en blockquote {
  opacity: 1;
}

/* Performance entry blocks */
.performance-entry {
  margin: 1.5em 0;
  padding: 0;
}
.performance-entry h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2em;
  line-height: 1.4;
}
.performance-entry .performance-date {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 0.6em;
}

/* Thesis blocks */
.article .thesis {
  margin: 1em 0;
  padding: 0.8em 1.2em;
  background: rgba(0,0,0,0.03);
  border-radius: 3px;
  font-size: 0.92rem;
  line-height: 1.7;
}
.article .thesis strong {
  font-weight: 700;
}

/* Footnote references (superscript) */
.footnote-ref {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  opacity: 0.5;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0 0.1em;
  transition: opacity 0.15s;
}
.footnote-ref:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Footnotes section */
.footnotes-section {
  max-width: 720px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid rgba(0,0,0,0.12);
}

.footnotes-section h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 30px;
}

.footnote-item {
  font-size: 0.82rem;
  line-height: 1.65;
  margin-bottom: 1em;
  padding-left: 2.2em;
  position: relative;
  opacity: 0.6;
  text-align: left;
  scroll-margin-top: 80px;
}
.footnote-item:target {
  background: rgba(0,0,0,0.04);
  border-radius: 3px;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  opacity: 1;
}

.footnote-num {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  font-size: 0.75rem;
  width: 1.8em;
  text-align: right;
  opacity: 0.7;
}

.footnote-back {
  text-decoration: none;
  font-size: 0.8em;
  margin-left: 0.3em;
  opacity: 0.5;
}
.footnote-back:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Reading progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: rgba(0,0,0,0.4);
  width: 0%;
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* Footnote tooltip */
.fn-tooltip {
  display: none;
  position: absolute;
  background: rgba(0,0,0,0.9);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.55;
  padding: 0.8em 1em;
  border-radius: 4px;
  max-width: 26em;
  z-index: 150;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  pointer-events: none;
  font-style: normal;
  text-align: left;
}
.fn-tooltip.active { display: block; }

/* Article responsive */
@media (max-width: 768px) {
  .article p { text-align: left; hyphens: none; }
  .article blockquote { margin-left: 0.3em; padding-left: 1em; }
  .article .thesis { margin-left: 0; margin-right: 0; }
}
