/* Itai Blitzer — Fine Art Photography
   Clean rebuild of the Adobe Portfolio site. Dark, minimal, fast. */

:root {
  --bg:      #0e0e0e;
  --bg-2:    #171717;
  --fg:      #ededed;
  --muted:   #8c8c8c;
  --line:    rgba(255, 255, 255, 0.12);
  --line-2:  rgba(255, 255, 255, 0.22);
  --maxw:    1500px;
  --gap:     10px;
  --ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h:   64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-y: scroll; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 42px);
  z-index: 50;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.solid {
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
}
.brand span { color: var(--muted); font-weight: 300; }

.nav { display: flex; gap: clamp(18px, 3vw, 34px); align-items: center; }
.nav a {
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s var(--ease);
  padding: 6px 0;
  position: relative;
}
.nav a:hover, .nav a.active { color: var(--fg); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--fg);
}
.nav-toggle, .nav-close { display: none; background: none; border: 0; color: var(--fg);
  cursor: pointer; padding: 8px; }
.nav-toggle svg, .nav-close svg { width: 24px; height: 24px; }

/* ---------- hero / home ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  animation: heroZoom 22s var(--ease) both;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,0.18));
}
.hero__inner { position: relative; z-index: 2; padding: 20px; transform: translateY(-4cm); }
.hero__title {
  margin: 0;
  font-weight: 200;
  font-size: clamp(38px, 8vw, 88px);
  letter-spacing: 0.14em;
  color: #f4f4f4;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
.hero__tag {
  margin: 14px 0 34px;
  font-size: clamp(13px, 2.2vw, 17px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #e6e6e6;
}
.btn {
  display: inline-block;
  background: #fff;
  color: #141414;
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 14px 48px;
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, 0.86); transform: translateY(-2px); }
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: rgba(255,255,255,0.6); animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,7px)} }

/* ---------- page shell ---------- */
main { padding-top: var(--nav-h); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(14px, 3vw, 34px); }
.page-head { text-align: center; padding: clamp(40px, 7vw, 84px) 0 clamp(26px, 4vw, 46px); }
.page-head h1 {
  margin: 0;
  font-weight: 200;
  font-size: clamp(28px, 5vw, 46px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.page-head p { margin: 12px 0 0; color: var(--muted); letter-spacing: 0.28em;
  text-transform: uppercase; font-size: 12px; }
.page-head--tight { padding-top: clamp(18px, 3vw, 38px); }
.back-link { display:inline-block; margin-bottom: 8px; color: var(--muted);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.back-link:hover { color: var(--fg); }

/* ---------- portfolio cover grid ---------- */
.covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
  padding-bottom: 80px;
}
.cover {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-2);
}
.cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease), opacity 0.4s var(--ease);
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%);
  opacity: 0.85; transition: opacity 0.4s var(--ease);
}
.cover:hover img { transform: scale(1.05); }
.cover__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; padding: 20px;
  text-align: center;
  font-size: 15px; letter-spacing: 0.26em; text-transform: uppercase;
  transition: letter-spacing 0.4s var(--ease);
}
.cover:hover .cover__label { letter-spacing: 0.34em; }

/* ---------- justified photo gallery ---------- */
.gallery { padding-bottom: 90px; }
.row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.shot {
  position: relative; overflow: hidden; background: var(--bg-2);
  cursor: zoom-in; flex: 0 0 auto;
}
.shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.5s var(--ease);
  opacity: 0;
}
.shot img.loaded { opacity: 1; }
.shot:hover img { transform: scale(1.04); }
/* graceful pre-JS fallback: single column */
.gallery:not(.justified) .row { display: block; }
.gallery:not(.justified) .shot { width: 100% !important; margin-bottom: var(--gap); }

/* ---------- video gallery ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 26px; padding-bottom: 90px; }
.video-embed { position: relative; padding-top: 56.25%; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 8, 8, 0.97);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.lb.open { display: flex; opacity: 1; }
.lb__img {
  max-width: 94vw; max-height: 90vh; object-fit: contain;
  box-shadow: 0 10px 60px rgba(0,0,0,0.6);
  user-select: none; -webkit-user-drag: none;
}
.lb__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: rgba(255,255,255,0.7);
  cursor: pointer; padding: 20px; transition: color 0.2s var(--ease);
}
.lb__btn:hover { color: #fff; }
.lb__btn svg { width: 34px; height: 34px; }
.lb__prev { left: max(6px, 2vw); }
.lb__next { right: max(6px, 2vw); }
.lb__close { top: 16px; right: 20px; transform: none; }
.lb__count {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  color: var(--muted); font-size: 12px; letter-spacing: 0.24em;
}

/* ---------- contact ---------- */
.contact { max-width: 620px; margin: 0 auto; padding-bottom: 100px; }
.contact form { display: grid; gap: 18px; }
.field label {
  display: block; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--fg); padding: 14px 16px; font: inherit; font-weight: 300;
  transition: border-color 0.25s var(--ease);
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--line-2); }
.field textarea { min-height: 160px; resize: vertical; }
.contact button {
  justify-self: start; margin-top: 6px; cursor: pointer;
  border: 1px solid var(--line-2); background: none; color: #fff;
  padding: 13px 44px; font-size: 12.5px; letter-spacing: 0.26em; text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.contact button:hover { background: #fff; color: #111; }
.form-note { color: var(--muted); font-size: 13px; text-align: center; }
.form-status { text-align: center; letter-spacing: 0.1em; min-height: 22px; }
.form-status.ok { color: #7fd18b; }
.form-status.err { color: #e08585; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 20px; text-align: center;
  color: var(--muted); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
}
.site-footer a:hover { color: var(--fg); }
.to-top { display:inline-block; margin-bottom: 10px; }

/* ---------- mobile nav ---------- */
@media (max-width: 640px) {
  .nav-toggle, .nav-close { display: inline-flex; }
  /* the long "— Fine art photography" tagline doesn't fit a narrow header,
     so show just the name on phones (tagline stays on wider screens) */
  .brand { font-size: 13px; letter-spacing: 0.2em; }
  .brand span { display: none; }
  .nav {
    position: fixed; inset: 0; top: 0;
    flex-direction: column; justify-content: center; gap: 30px;
    background: rgba(10,10,10,0.98); transform: translateY(-100%);
    transition: transform 0.4s var(--ease); z-index: 60;
  }
  .nav.open { transform: translateY(0); }
  .nav a { font-size: 16px; }
  .nav-close { position: absolute; top: 20px; right: 22px; }
  .covers { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
