/* ─────────────────────────────────────────────────────────────────
   MAYA KAPLUN PORTFOLIO — style.css  v2
   Aesthetic: Bold editorial. High contrast. All-serif. Deep blue accent.
   Palette: #000 / #fff / --blue: #1a2c6b
   Typefaces: Playfair Display (headlines) + EB Garamond (body/nav)
   ───────────────────────────────────────────────────────────────── */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --black:      #0a0a0a;
  --white:      #f5f5f3;
  --blue:       #1a2c6b;
  --blue-light: #2a3f9a;
  --mid:        #6b6b6b;
  --divider:    rgba(10,10,10,0.15);
  --rule:       var(--divider);

--font-head:  'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  --font-body:  'EB Garamond', Georgia, serif;

  --nav-h:      68px;
  --ease:       cubic-bezier(0.25, 0, 0, 1);
}

/* ── RESET ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

/* ── NAV ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s;
}
.nav-index {
  justify-content: flex-end;
}
.nav.scrolled {
  background: var(--white);
  border-color: var(--rule);
}
.nav-logo {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8f0404;
  transition: color 0.2s;
}
.nav-logo:hover { color: #8f0404; }

.nav-links {
  display: flex;
  gap: 44px;
}
.nav-link {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  color: var(--mid);
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--blue);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--black); }
.nav-link.active { color: var(--black); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── REVEAL ANIMATIONS ───────────────────────────────────────────── */
.r-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s var(--ease) var(--d, 0s),
    transform 0.75s var(--ease) var(--d, 0s);
}
.r-fade {
  opacity: 0;
  transition: opacity 0.8s ease var(--d, 0s);
}
.in-view.r-up,
.in-view.r-fade,
.hero-fired .r-up,
.hero-fired .r-fade {
  opacity: 1;
  transform: none;
}

/* ── HOME HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

/* Hero background letter removed for a cleaner layout */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 80px 56px 100px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 64px;
}

.hero-left {
  width: 100%;
  max-width: 760px;
  margin-right: auto;
}

.hero-tag {
  display: block;
  width: 100%;
  max-width: 760px;
  font-family: var(--font-head);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--black);
  border: none;
  padding: 0;
  margin-bottom: 28px;
}
.hero-tag::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--black);
  margin-top: 14px;
}

.hero-name {
  width: 100%;
  max-width: 760px;
  font-family: var(--font-head);
  font-size: clamp(72px, 10vw, 136px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin-bottom: 48px;
  color: #8f0404;
}
.hero-name em {
  display: inline;
  font-style: normal;
  font-weight: 400;
  color: var(--black);
}

.hero-bio {
  font-size: 18px;
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}

.hero-bio p {
  margin: 0;
}

.hero-cta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  padding: 12px 30px;
  transition: background 0.25s, color 0.25s;
}
.btn-primary:hover {
  background: #8f0404;
}
.btn-outline {
  display: inline-block;
  background: var(--black);
  border: 1px solid var(--black);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  padding: 12px 30px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-outline:hover {
  background: #8f0404;
  border-color: #8f0404;
  color: var(--white);
}

/* Right side: photo */
.hero-right {
  align-self: stretch;
  margin-top: 211.5px;
}
.hero-photo-wrap {
  position: relative;
  width: 300px;
  height: 100%;
  display: flex;
}
.hero-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.hero-photo-placeholder {
  width: 300px;
  height: 100%;
  min-height: 390px;
  background: rgba(10,10,10,0.03);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
}
.hero-photo-placeholder img {
  width: 100%; height: 100%; object-fit: cover;
}
/* Photo frame removed for a cleaner, more minimal presentation */
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Bottom bar */
.hero-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--blue);
}

/* ── SECTION HEADER (work pages) ─────────────────────────────────── */
.section-head {
  padding: 96px 56px 56px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  border-bottom: 2px solid var(--black);
  gap: 32px;
}
.section-head-left {
  width: 100%;
}
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--blue);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(56px, 8vw, 100px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.section-sub {
  font-size: 17px;
  font-style: italic;
  color: var(--mid);
  max-width: 360px;
  text-align: right;
  line-height: 1.55;
}

/* ── PROJECT GRID (index list) ───────────────────────────────────── */
.projects-wrap {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 56px 120px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
  gap: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.project-row:first-child { border-top: none; }

.project-row-img {
  position: relative;
  overflow: hidden;
}
.project-row-img .placeholder-img,
.project-row-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.65s var(--ease), filter 0.4s;
}
.placeholder-img {
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.placeholder-img::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.05) 0, rgba(0,0,0,0.05) 1px,
    transparent 1px, transparent 16px
  );
}
.placeholder-label {
  font-family: var(--font-head);
  font-size: 16px;
  font-style: italic;
  color: rgba(0,0,0,0.35);
  position: relative; z-index: 1;
}
.project-row:hover .project-row-img img,
.project-row:hover .project-row-img .placeholder-img {
  transform: scale(1.04);
  filter: brightness(0.92);
}

/* Blue overlay on hover */
.project-row-img::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--blue);
  opacity: 0;
  transition: opacity 0.4s;
  mix-blend-mode: multiply;
}
.project-row:hover .project-row-img::after { opacity: 0.18; }

/* View arrow badge */
.project-row-img .view-badge {
  position: absolute;
  bottom: 20px; right: 20px;
  width: 52px; height: 52px;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 22px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s, transform 0.35s var(--ease);
  z-index: 2;
}
.project-row:hover .view-badge {
  opacity: 1;
  transform: scale(1);
}

.project-row-info {
  padding: 48px 48px 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.project-row:nth-child(even) .project-row-img { order: 2; }
.project-row:nth-child(even) .project-row-info { order: 1; padding: 48px 56px 48px 48px; }

.proj-num {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--blue);
  margin-bottom: 16px;
}
.proj-name {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  transition: color 0.25s;
}
.project-row:hover .proj-name { color: var(--blue); }

.proj-desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--mid);
  margin-bottom: 28px;
}
.proj-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.proj-tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-style: italic;
  border: 1px solid var(--rule);
  padding: 3px 10px;
  color: var(--mid);
}

/* scroll reveal for rows */
.r-row {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.r-row.in-view { opacity: 1; transform: none; }

/* ── PROJECT DETAIL PAGE ─────────────────────────────────────────── */
.detail-main {
  flex: 1;
  padding-top: var(--nav-h);
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 80px 56px 0;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  color: var(--mid);
  margin-bottom: 48px;
  transition: color 0.2s;
}
.detail-back:hover { color: var(--blue); }

.detail-meta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--black);
  margin-bottom: 28px;
}
.detail-title {
  font-family: var(--font-head);
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.detail-title em { font-style: italic; color: var(--blue); }

.detail-tags-col {
  text-align: right;
  flex-shrink: 0;
}
.detail-cat {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--blue);
  display: block;
  margin-bottom: 8px;
}
.detail-year {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
}

/* Lead image */
.detail-lead-image {
  max-width: 1280px;
  margin: 0 auto 80px;
  padding: 0 56px;
  width: 100%;
}
.detail-lead-image .placeholder-img {
  width: 100%;
  aspect-ratio: 16/9;
}
.detail-lead-image .placeholder-img,
.detail-lead-image img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
}

/* Overview text */
.detail-overview {
  max-width: 1280px;
  margin: 0 auto 96px;
  padding: 0 56px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.detail-overview-label {
  font-family: var(--font-head);
  font-size: 13px;
  font-style: italic;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 6px;
}
.detail-overview-text {
  font-size: 20px;
  line-height: 1.7;
}
.detail-overview-text p + p { margin-top: 1em; }

/* Secondary images with captions */
.detail-gallery {
  max-width: 1280px;
  margin: 0 auto 96px;
  padding: 0 56px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.detail-gallery-item {}
.detail-gallery-item-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.detail-gallery-item-wide .dg-img-wrap { }
.detail-gallery-item-wide .dg-text { padding-top: 16px; }

.dg-img-wrap { position: relative; overflow: hidden; }
.dg-img-wrap .placeholder-img,
.dg-img-wrap img {
  width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block;
}
.dg-img-wrap .placeholder-img { aspect-ratio: 3/2; }

.dg-text {}
.dg-caption {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  margin-top: 20px;
}
.dg-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--mid);
}
.dg-body p + p { margin-top: 0.8em; }

/* Full-width gallery image */
.detail-gallery-full {
  max-width: 1280px;
  margin: 0 auto 96px;
  padding: 0 56px;
  width: 100%;
}
.detail-gallery-full .placeholder-img,
.detail-gallery-full img {
  width: 100%; aspect-ratio: 21/9; object-fit: cover; display: block;
}

/* Specs / info strip */
.detail-specs {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 1280px;
  margin: 0 auto 96px;
  padding: 48px 56px;
  width: 100%;
  display: flex;
  gap: 64px;
}
.detail-spec {}
.detail-spec dt {
  font-size: 12px;
  font-style: italic;
  color: var(--blue);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.detail-spec dd {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

/* Next project link */
.detail-next {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px 100px;
  width: 100%;
}
.detail-next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0;
  border-top: 2px solid var(--black);
  transition: color 0.25s;
}
.detail-next-link:hover { color: var(--blue); }
.detail-next-label {
  font-size: 13px;
  font-style: italic;
  color: var(--mid);
  margin-bottom: 8px;
}
.detail-next-name {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.detail-next-arrow {
  font-size: 48px;
  font-family: var(--font-head);
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
.detail-next-link:hover .detail-next-arrow { transform: translateX(12px); }

/* ── CONTACT PAGE ────────────────────────────────────────────────── */
.contact-main {
  flex: 1;
  padding-top: var(--nav-h);
}
.contact-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 96px 56px 120px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
  align-items: start;
}
.contact-left {}
.contact-label { margin-bottom: 12px; }
.contact-heading {
  font-family: var(--font-head);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  white-space: nowrap;
  color: #000000;
  font-style: normal;
}
.contact-heading em { font-style: normal; color: #000000; }
.contact-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--mid);
  margin-bottom: 48px;
  max-width: 380px;
}
.contact-direct-label {
  font-size: 12px;
  font-style: italic;
  color: var(--blue);
  margin-bottom: 8px;
  display: block;
  letter-spacing: 0.04em;
}
.contact-email {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 3px;
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
}
.contact-email:hover { color: var(--blue); }

/* form */
.contact-form { display: flex; flex-direction: column; gap: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  font-size: 12px;
  font-style: italic;
  color: var(--mid);
  letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(10,10,10,0.25);
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--black);
  outline: none;
  resize: none;
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #aaa; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--blue); }

.form-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 16px 44px;
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  cursor: pointer;
  transition: background 0.25s;
  margin-top: 8px;
}
.form-submit:hover { background: var(--blue); }
.submit-arrow { transition: transform 0.3s var(--ease); }
.form-submit:hover .submit-arrow { transform: translateX(6px); }

.form-success:not([hidden]) {
  display: flex; flex-direction: column; gap: 16px; padding: 32px 0;
}
.success-icon {
  width: 52px; height: 52px;
  border: 2px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--blue);
}
.form-success p {
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.4;
}

/* ── FOOTER ──────────────────────────────────────────────────────── */
.footer {
  padding: 24px 56px;
  border-top: 1px solid rgba(10, 10, 10, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  font-style: italic;
  color: var(--mid);
  margin-top: auto;
}
.footer a { color: var(--mid); transition: color 0.2s; }
.footer a:hover { color: var(--blue); }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --nav-h: 60px; }
  .nav { padding: 0 24px; }
  .nav-links { gap: 28px; }

  .hero-inner { grid-template-columns: 1fr; padding: 60px 24px 80px; gap: 56px; }
  .hero-left { max-width: 100%; }
  .hero-right {
    display: flex;
    justify-content: center;
    margin-top: 0;
    width: 100%;
  }
  .hero-photo-wrap,
  .hero-photo-placeholder {
    width: 100%;
    max-width: 100%;
  }
  .hero-photo-placeholder {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .hero::before { font-size: 60vw; }

  .section-head { flex-direction: column; align-items: flex-start; padding: 72px 24px 40px; }
  .section-sub { text-align: left; max-width: 100%; }

  .projects-wrap { padding: 0 24px 80px; }
  .project-row { grid-template-columns: 1fr; }
  .project-row:nth-child(even) .project-row-img { order: 0; }
  .project-row:nth-child(even) .project-row-info { order: 0; }
  .project-row-info { padding: 36px 24px !important; }

  .detail-hero { padding: 60px 24px 0; }
  .detail-lead-image, .detail-overview, .detail-gallery,
  .detail-gallery-full, .detail-specs, .detail-next { padding-left: 24px; padding-right: 24px; }
  .detail-meta-row { flex-direction: column; align-items: flex-start; }
  .detail-tags-col { text-align: left; }
  .detail-overview { grid-template-columns: 1fr; gap: 24px; }
  .detail-gallery-item-wide { grid-template-columns: 1fr; }
  .detail-specs { flex-wrap: wrap; gap: 32px; }

  .contact-inner { grid-template-columns: 1fr; gap: 56px; padding: 72px 24px 80px; }
  .form-row { grid-template-columns: 1fr; }

  .footer {
    padding: 20px 24px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .nav-links { gap: 18px; }
  .nav-link { font-size: 15px; }

  .hero-inner { padding: 48px 16px 64px; gap: 18px; }
  .hero-name { font-size: clamp(48px, 16vw, 72px); margin-bottom: 16px; }
  .hero-tag { margin-bottom: 12px; }
  .hero-bio { font-size: 17px; margin-bottom: 24px; }
  .hero-cta { flex-direction: column; gap: 14px; margin-bottom: 4px; }
  .btn-primary,
  .btn-outline { width: 100%; text-align: center; }

  .hero-right,
  .hero-photo-wrap,
  .hero-photo-placeholder {
    width: 100%;
    max-width: 100%;
  }
  .hero-photo-wrap {
    height: auto;
  }
  .hero-photo-placeholder {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .footer { padding: 18px 16px; }
}
