/* ==========================================================================
   Omer Abramson — Portfolio
   Shared stylesheet
   ========================================================================== */

:root {
  /* ---- Palette (measured directly from the live Wix site) ---- */
  --color-bg: #ffffff;
  --color-text: #181717;
  --color-heading: #333333;
  --color-text-muted: #666666;
  --color-border: #e5e5e5;
  --color-accent: #181717;
  --color-accent-active: #ff4040;

  /* ---- Type (the Wix site uses Jura for nearly everything) ---- */
  --font-heading: 'Jura', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Jura', 'Helvetica Neue', Arial, sans-serif;

  /* ---- Layout ---- */
  --max-width: 1000px;
  --nav-height: 138px;
  --gutter: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Skip link (accessibility) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: static;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  z-index: 100;
  padding: 26px 0 22px;
}

.site-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  position: relative;
}

.logo {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  letter-spacing: normal;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--color-heading);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-sep {
  color: #d6d6d6;
  font-weight: 300;
}

.nav-links a {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-accent-active);
}

.nav-links a.is-active {
  color: var(--color-accent-active);
}

.nav-toggle {
  display: none;
  position: absolute;
  right: var(--gutter);
  top: 4px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--color-text);
  width: 100%;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* ==========================================================================
   Hero (home page)
   ========================================================================== */

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  padding: 0 var(--gutter) 64px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero-photo {
  position: relative;
  width: min(680px, 40vw);
  height: min(680px, 40vw);
  overflow: hidden;
  background: #f2f2f2;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tagline {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin: -18px 0 0;
}

.btn {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--color-text);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Plain-text hero CTA — overlaid on the lower part of the hero photo,
   matching the real site's white "ENTER" link. Letters spread apart
   on hover instead of changing color. */
.enter-link {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  display: inline-block;
  line-height: 1;
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 4.7vw, 2.9rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  transition: letter-spacing 0.3s ease;
  z-index: 2;
}

.enter-link:hover {
  letter-spacing: 0.16em;
}

/* ==========================================================================
   Section headers (list pages)
   ========================================================================== */

.page-header {
  padding: 72px var(--gutter) 32px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-header p {
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ==========================================================================
   Project rows (Student Work + Paintings listings)
   ========================================================================== */

.project-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px var(--gutter) 40px;
}

.project-row {
  display: flex;
  align-items: stretch;
  gap: 22px;
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
}

.project-list .project-row:first-child {
  padding-top: 16px;
}

.project-row .row-image {
  flex: 0 1 400px;
  max-width: 400px;
  position: relative;
  background: #f7f7f7;
}

.project-row .row-image img {
  width: 100%;
  height: auto;
  display: block;
}

.project-row .row-info {
  flex: 1;
  min-width: 0;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.row-info h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--color-heading);
  margin-bottom: 6px;
}

.row-year {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 22px;
}

.row-status {
  display: inline-block;
  color: var(--color-accent-active, #c0392b);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}

/* Professional Work rows: a larger preview photo than Student Work/Paintings */
.project-row-professional .row-image {
  flex: 0 1 560px;
  max-width: 560px;
}

.row-info p {
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
  font-size: 1rem;
  font-weight: 400;
}

.row-info p em {
  font-style: italic;
}

.view-btn {
  display: inline-block;
  margin-top: auto;
  background: var(--color-accent);
  color: #ffffff;
  padding: 11px 26px;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  letter-spacing: 1.3px;
  text-transform: none;
  transition: background 0.2s ease;
}

.view-btn:hover {
  background: var(--color-accent-active);
}

/* Placeholder (no image yet) */
.placeholder-label {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #9a9a9a;
  background: repeating-linear-gradient(
    45deg,
    #f7f7f7,
    #f7f7f7 10px,
    #f0f0f0 10px,
    #f0f0f0 20px
  );
}

/* ==========================================================================
   Detail pages — Student Work: single-row horizontal scroll gallery
   ========================================================================== */

.gallery-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 44px var(--gutter) 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gallery-row .gallery-item {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  height: 460px;
}

.gallery-row .gallery-item img {
  height: 460px;
  width: auto;
  max-width: none;
  object-fit: cover;
  display: block;
}

.gallery-row .gallery-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ==========================================================================
   Detail pages — Paintings: uniform grid gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
  padding: 44px var(--gutter) 28px;
}

.gallery-grid .gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f2f2f2;
  cursor: pointer;
}

.gallery-grid .gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.gallery-grid .gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.35);
}

.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   Detail pages — Professional Work: larger tiles, natural (uncropped)
   photo proportions, centered on the page
   ========================================================================== */

.gallery-professional {
  /* A rigid 2-column grid forces every row to the height of its tallest
     item, so pairing a wide/short render (an aerial panorama) with a
     narrow/tall one (a street elevation) leaves the shorter image
     stranded in a lot of dead white space — it reads as if the photos
     were cropped to different sizes, even though nothing is cropped.
     A CSS-columns masonry avoids that: each image keeps its full,
     uncropped natural proportions, and the next one simply continues
     wherever the column has room, so mismatched aspect ratios flow
     together instead of fighting a grid. */
  display: block;
  column-count: 2;
  column-gap: 18px;
  max-width: 1100px;
  width: 100%;
}

.gallery-professional .gallery-item {
  aspect-ratio: auto;
  background: none;
  break-inside: avoid;
  margin-bottom: 18px;
  display: block;
}

.gallery-professional .gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.detail-center {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}

/* ==========================================================================
   Gallery row navigation (Student Work — looping horizontal scroll)
   ========================================================================== */

.gallery-row-wrap {
  position: relative;
}

.gallery-row {
  /* No scroll-snap: it was fighting the seamless-loop position corrections
     during a fast swipe, which is what caused the glitch. */
  scrollbar-width: none;
}

.gallery-row::-webkit-scrollbar {
  display: none;
  height: 0;
}

.gallery-row .gallery-item img {
  cursor: pointer;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.gallery-nav:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

.gallery-nav-prev {
  left: 8px;
}

.gallery-nav-next {
  right: 8px;
}

@media (max-width: 640px) {
  .gallery-nav {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Lightbox (click any gallery image to expand, arrow-key / swipe through)
   ========================================================================== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-stage {
  max-width: 88vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #f2f2f2;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.lightbox-counter {
  color: #999999;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  padding: 8px;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  opacity: 1;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}

body.lightbox-locked {
  overflow: hidden;
}

@media (max-width: 640px) {
  .lightbox-arrow {
    width: 40px;
    height: 40px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}

/* ==========================================================================
   Detail page intro (title + longer write-up) — shown only for projects
   that supply a longer description alongside the gallery
   ========================================================================== */

.detail-intro {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px var(--gutter) 0;
}

.detail-intro h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 6px;
}

.detail-intro .detail-year {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.detail-intro p {
  max-width: 720px;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Intro note on a list page (e.g. Professional Work before projects are
   added) — reuses .detail-intro's paragraph styling, with extra bottom
   space since it sits above a project list rather than a gallery. */
.list-intro {
  padding-bottom: 36px;
}

/* ==========================================================================
   Back link (shared)
   ========================================================================== */

.back-link {
  display: block;
  text-align: center;
  margin: 12px auto 80px;
  font-size: 0.85rem;
  color: var(--color-text);
}

.back-link:hover {
  color: var(--color-accent-active);
}

/* ==========================================================================
   About page
   ========================================================================== */

.about-section {
  padding: 56px var(--gutter) 96px;
}

.about-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}

.about-photo {
  position: relative;
  width: 325px;
  max-width: 100%;
  aspect-ratio: 325 / 360;
  overflow: hidden;
  background: #f2f2f2;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 1rem;
  color: var(--color-text);
}

.about-name {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-accent-active);
  margin: 0;
}

.about-placeholder-note {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  max-width: 420px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px var(--gutter);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.site-footer a {
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-bottom-color: currentColor;
}

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .project-row {
    flex-direction: column;
    gap: 24px;
    padding: 36px 0;
  }

  .project-row .row-image {
    flex-basis: auto;
    width: 100%;
    max-width: none;
  }

  .gallery-row .gallery-item,
  .gallery-row .gallery-item img {
    height: 320px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  :root {
    --nav-height: 108px;
  }

  .site-header {
    padding: 18px 0 16px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-toggle {
    display: flex;
    top: 2px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.is-open {
    max-height: 320px;
  }

  .nav-sep {
    display: none;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
  }

  .hero-photo {
    width: 40vw;
    height: 40vw;
  }

  .about-photo {
    width: 140px;
    height: 140px;
  }

  .gallery-row {
    gap: 20px;
  }

  .gallery-row .gallery-item,
  .gallery-row .gallery-item img {
    height: 260px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
  }

  .gallery-professional {
    column-count: 1;
    column-gap: 14px;
  }

  .gallery-professional .gallery-item {
    margin-bottom: 14px;
  }
}

@media (max-width: 420px) {
  .btn {
    padding: 13px 30px;
    font-size: 0.76rem;
  }
}
