@import url('https://fonts.googleapis.com/css2?family=Share+Tech&display=swap');

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

:root {
  --bg: #080808;
  --text: #f0f0f0;
  --text-muted: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.1);
  --font:         "Share Tech", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Share Tech", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    "Share Tech", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nav-gap: 2rem;
  --header-height: 80px;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
}

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

/* ─── Header ────────────────────────────────────── */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border);
}

.header-logo {
  font-family: var(--font-display);
  font-size: 2.0rem;
  font-weight: 100;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.header-subtitle {
  font-size: 1.00rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--nav-gap);
}

.header-nav a {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 100;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  opacity: 1;
}

.header-nav .instagram-link {
  display: flex;
  align-items: center;
}

.header-nav .instagram-link svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.header-nav .instagram-link:hover svg {
  opacity: 1;
}

/* ─── Page layout ───────────────────────────────── */

main {
  padding-top: var(--header-height);
}

/* ─── Work grid ─────────────────────────────────── */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
}

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #111;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.04);
  filter: brightness(0.55);
}

.project-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover .project-preview-video {
  opacity: 1;
}

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.25rem 1.25rem;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.project-card:hover .project-info {
  opacity: 1;
  transform: translateY(0);
}

.project-festival-logo {
  position: absolute;
  right: 1.25rem;
  top: 0.9rem;
  display: flex;
  pointer-events: none;
  z-index: 1;
}

.project-festival-logo img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  opacity: 0.35;
}

.festival-logo-red .project-festival-logo img {
  visibility: hidden;
}

.festival-logo-red .project-festival-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #e3342f;
  opacity: 0.35;
  -webkit-mask: url(../images/NFF.png) center / contain no-repeat;
  mask: url(../images/NFF.png) center / contain no-repeat;
}

.project-title {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 1.00rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* ─── Contact page ──────────────────────────────── */

.contact-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.contact-layout {
  display: flex;
  align-items: center;
  gap: 6rem;
  max-width: 860px;
  width: 100%;
}

.contact-photo {
  flex-shrink: 0;
  width: 400px;
}

.contact-photo img {
  width: 100%;
  display: block;
}

.contact-content {
  max-width: 420px;
  width: 100%;
}

.contact-name {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 100;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.contact-role {
  font-family: var(--font-mono);
  font-size: 1.20rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
}

.contact-list .label {
  font-family: var(--font-mono);
  width: 70px;
  font-size: 1.00rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.contact-list a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-list a:hover {
  border-color: var(--text);
}

.contact-bio {
  margin-top: 2.5rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
}


/* ─── Landing page ──────────────────────────────── */

body.landing-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 68vw;
}

.landing-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.landing-name-group {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
}

.landing-subtitle {
  font-size: 1.50rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.landing-name {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 100;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #ffffff;
}

.landing-contact-link {
  font-family: var(--font-mono);
  font-size: 1.50rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}

.landing-contact-link:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.landing-panels {
  display: flex;
  gap: 1rem;
  height: 54vh;
}

.panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: flex 0.82s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel.is-expanded { flex: 1.3; }
.panel.is-shrunk   { flex: 0.7; }

.panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.60);
  transition: filter 0.45s ease, transform 0.82s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel.is-expanded .panel-bg {
  filter: brightness(0.72);
  transform: scale(1.04);
}

.panel.is-shrunk .panel-bg {
  filter: brightness(0.40);
}

.panel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.panel.is-expanded .panel-video {
  opacity: 1;
}

.panel--photo {
  background: transparent;
}

.panel--photo .panel-bg {
  object-position: center 80%;
}

.panel-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: #fff;
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 1.50rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.4s ease;
}

.panel.is-expanded .panel-label {
  color: rgba(255, 255, 255, 0.95);
}

.panel-cta {
  font-family: var(--font-mono);
  font-size: 1.00rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.38s ease 0.1s, transform 0.38s ease 0.1s;
}

.panel.is-expanded .panel-cta {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Photography empty state ───────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  gap: 0.6rem;
}

.empty-state p {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── Project detail page ───────────────────────── */

.project-page {
  padding-top: var(--header-height);
}

.project-hero {
  width: 100%;
  margin-bottom: 2px;
}

.project-hero img {
  width: 100%;
  display: block;
}

.project-detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.project-detail-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project-detail-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 100;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.project-detail-meta {
  font-family: var(--font-mono);
  font-size: 1.00rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-credits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem 3rem;
}

.credit-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.credit-label {
  font-family: var(--font-mono);
  font-size: 1.00rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.credit-value-festival {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.credit-value-festival img {
  height: 2rem;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  position: relative;
  z-index: 0;
}

.credit-value-festival span {
  position: relative;
  z-index: 1;
}

.credit-value-festival.festival-logo-red img {
  visibility: hidden;
}

.credit-value-festival.festival-logo-red::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 2rem;
  aspect-ratio: 1161 / 2045;
  background-color: #e3342f;
  opacity: 0.8;
  -webkit-mask: url(../images/NFF.png) center / contain no-repeat;
  mask: url(../images/NFF.png) center / contain no-repeat;
}

.credit-value {
  font-size: 1.2rem;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.project-nav a {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.project-nav a:hover {
  opacity: 1;
}

.project-nav .back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.project-nav .arrow {
  font-size: 1rem;
}

/* ─── Project video ─────────────────────────────── */

.project-video {
  padding: 0 2rem 3rem;
  max-width: 1640px;
  width: 60%;
  margin: 0 auto;
}

.project-video video {
  width: 100%;
  display: block;
  outline: none;
}

.project-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}

/* ─── Project gallery ───────────────────────────── */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
}

.project-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}

.project-gallery--full img {
  aspect-ratio: unset;
  object-fit: unset;
}

.project-gallery-grid2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  grid-column: span 2;
}

.project-gallery-grid2x2 img {
  width: 100%;
  aspect-ratio: unset;
  object-fit: cover;
  display: block;
}

/* ─── Photography project card ──────────────────── */

.photo-project-card {
  display: block;
  text-decoration: none;
  cursor: pointer;
  will-change: transform;
  backface-visibility: hidden;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.photo-project-card-img {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.photo-project-card-img img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  transition: filter 0.45s ease, transform 0.45s ease;
}

.photo-project-card:hover .photo-project-card-img img {
  filter: brightness(0.85);
  transform: scale(1.03);
}

.photo-project-card-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 100;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-project-card-year {
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.photo-project-card-meta {
  font-family: var(--font-mono);
  font-size: 1.0rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ─── Photo caption ─────────────────────────────── */

.photo-captioned {
  position: relative;
  display: block;
}

.photo-captioned img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-captioned.portrait {
  height: 60vh;
  width: auto;
}

.photo-captioned.portrait img {
  width: auto;
  height: 100%;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  font-family: var(--font-mono);
  font-size: 1.00rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.photo-caption--r { left: calc(100% + 0.8rem); }
.photo-caption--l { right: calc(100% + 0.8rem); }

/* ─── Collage layout ────────────────────────────── */

.collage-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 6rem 2rem;
}

.collage-layout img,
.parallax-item {
  display: block;
  height: auto;
  max-width: 100%;
  will-change: transform;
  backface-visibility: hidden;
}

.collage-layout > img:nth-child(1) { width: 38%; align-self: flex-start; margin-left: 8%; }
.collage-layout > img:nth-child(2) { width: 28%; align-self: flex-end; margin-right: 5%; }
.collage-layout > img:nth-child(3) { width: 34%; align-self: flex-start; margin-left: 18%; }
.collage-layout > img:nth-child(4) { width: 42%; align-self: flex-end; margin-right: 3%; }
.collage-layout > img:nth-child(5) { width: 26%; align-self: flex-start; margin-left: 6%; }
.collage-layout > img:nth-child(6) { width: 32%; align-self: flex-end; margin-right: 14%; }
.collage-layout > img:nth-child(7) { width: 30%; align-self: flex-start; margin-left: 22%; }

@media (max-width: 700px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }
}

/* ─── Mobile nav toggle ──────────────────────────── */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
  line-height: 0;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── Mobile portrait (≤640px) ───────────────────── */

@media (max-width: 640px) {

  /* Header: stack name + subtitle, show hamburger */
  .header-logo {
    font-size: 1.4rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
  }

  .header-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
  }

  .nav-toggle { display: block; }

  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    z-index: 99;
  }

  .header-nav.is-open { display: flex; }
  .header-nav a { font-size: 1.5rem; }

  /* Landing: wider wrap, scaled-down name */
  .landing-wrap { width: 90vw; gap: 1.25rem; }

  .landing-name-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .landing-name { font-size: 1.8rem; white-space: nowrap; }

  .landing-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
  }

  .landing-contact-link { font-size: 0.85rem; }

  /* Stack panels vertically */
  .landing-panels {
    flex-direction: column;
    height: auto;
    gap: 0.5rem;
  }

  .panel {
    flex: none !important;
    height: 38vh;
    width: 100%;
  }

  .panel-label { font-size: 1.25rem; }

  /* Allow body to scroll if content overflows */
  body.landing-page {
    height: auto;
    overflow: visible;
    min-height: 100vh;
    padding: 1.5rem 0;
  }

  /* Project credits: two equal columns when there's room */
  .project-credits {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
  }

  /* Project video */
  .project-video {
    width: 100%;
    padding: 0 0 2rem;
  }

  /* Contact page */
  .contact-page {
    padding: 2rem 1.5rem;
    align-items: flex-start;
  }

  .contact-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .contact-photo {
    width: 100%;
  }

  .contact-photo img {
    width: 100%;
    height: 72vw;
    object-fit: cover;
    object-position: center 20%;
  }

  .contact-name { font-size: 2rem; }
  .contact-role { margin-bottom: 1.75rem; }

  .contact-list li { font-size: 1.1rem; }

  .contact-list a { word-break: break-all; }
}

/* ─── Mobile landscape ───────────────────────────── */

@media (orientation: landscape) and (max-height: 500px) {

  /* Revert stacking — name + subtitle on one row */
  .header-logo {
    flex-direction: row;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 1.1rem;
  }

  .header-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
  }

  /* Show nav inline, hide hamburger */
  .nav-toggle { display: none; }

  .header-nav {
    display: flex;
    position: static;
    background: none;
    border-bottom: none;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 1.25rem;
  }

  .header-nav a { font-size: 1rem; }
}
