/* ============================================================
   Elisa Abeloff — Local Site Stylesheet
   Design: Minimalist art portfolio, replicating SquareSpace
   Fonts: Raleway (body), Lora (headings, Jubilat substitute)
   Color scheme: black/white with subtle gray accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,700&family=Lora:ital,wght@0,400;0,500;1,400;1,500&display=swap');

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

:root {
  --black: #000;
  --white: #fff;
  --off-white: #f9f9f9;
  --light-gray: #e0e0e0;
  --mid-gray: #888;
  --dark-gray: #3a3a3d;
  --accent: hsl(43, 4%, 65%);
  --light-accent: hsl(210, 3%, 88%);

  --font-body: 'Raleway', sans-serif;
  --font-heading: 'Lora', serif;

  --max-width: 1500px;
  --site-gutter: 4vw;
  --mobile-gutter: 6vw;
  --header-height: 90px;
  --transition: 0.3s ease;
}

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

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.4rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}
a:hover, a:active { text-decoration-style: solid; }

h1 a, h2 a, h3 a { text-decoration: none; }

strong { font-weight: 500; }
em { font-style: italic; }

/* ── Layout ── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding-top: var(--header-height);
}

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

/* ── Header / Navigation ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  color: var(--black);
  flex-shrink: 0;
}
.site-title:hover { opacity: 0.6; }

/* Main navigation */
.header-nav {
  display: flex;
  align-items: center;
}

.header-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
  gap: 0;
}

.nav-item {
  position: relative;
}

.nav-item > a,
.nav-folder-btn {
  display: block;
  padding: 0.4rem 0.9rem;
  font-size: 1.11rem;
  font-weight: 300;
  letter-spacing: normal;
  text-decoration: none;
  color: var(--black);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: opacity var(--transition);
}

.nav-item > a:hover,
.nav-folder-btn:hover { opacity: 0.5; }
.nav-item > a.active { border-bottom: 1px solid var(--black); }

/* Dropdown folder */
.nav-folder-btn::after {
  content: ' ▾';
  font-size: 0.6em;
  opacity: 0.6;
}

.nav-folder-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--light-gray);
  min-width: 220px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-folder-content.open { display: block; }

.nav-folder-item a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 1.11rem;
  font-weight: 300;
  letter-spacing: normal;
  text-decoration: none;
  color: var(--black);
  transition: background var(--transition);
  white-space: nowrap;
}
.nav-folder-item a:hover { background: var(--off-white); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--black);
  transition: var(--transition);
}

/* ── Home page: Hero banner ── */
.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 65vh;
}

.home-hero-img {
  position: absolute;
  inset: 0;
}

.home-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

.home-hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(8.5vmax) var(--site-gutter);
  min-height: 65vh;
}

.home-hero-text h1 {
  color: var(--white);
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 400;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 0.55rem 1.2rem 0.6rem;
}

.home-hero-text h1 a {
  color: var(--white);
  text-decoration: none;
}

/* ── Home page: Medium sections ── */
.home-section {
  padding-bottom: 5vw;
}

.home-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

.home-section h2 {
  text-align: center;
  font-size: clamp(1.3rem, 2.3vw, 1.9rem);
  font-weight: 400;
  padding: 3.5rem 0 2rem;
  letter-spacing: 0;
}

.home-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 14px;
}

.home-gallery-item {
  display: flex;
  flex-direction: column;
}

.home-gallery-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.home-gallery-item:hover img { opacity: 0.88; }

.home-gallery-caption {
  padding: 0.45rem 0 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--black);
}

/* ── Gallery Page: Banner image ── */
.gallery-banner {
  overflow: hidden;
  max-height: 65vh;
  display: flex;
  align-items: center;
}

.gallery-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 65vh;
  object-fit: cover;
  object-position: 50% 30%;
}

/* ── Gallery: Masonry (home page) ── */
.masonry-gallery {
  padding: 3vw var(--site-gutter);
}

.masonry-grid {
  column-count: 3;
  column-gap: 12px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  overflow: hidden;
}

.masonry-item a {
  display: block;
  position: relative;
  text-decoration: none;
  overflow: hidden;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.masonry-item a:hover img { transform: scale(1.02); }

/* ── Gallery Grid (portfolio pages) ── */
.gallery-section {
  padding: 0 var(--site-gutter);
  padding-bottom: 4vw;
}

.gallery-page-header {
  padding: 4vw var(--site-gutter) 2vw;
  text-align: center;
}

.gallery-page-header h1 {
  font-size: clamp(1.6rem, 2.5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.gallery-page-header .subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  font-style: italic;
  color: var(--mid-gray);
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-thumb {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb { transform: scale(1.02); }

.gallery-item-caption {
  padding: 0.5rem 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
}

.gallery-item-caption .title { display: block; }
.gallery-item-caption .description {
  display: block;
  font-style: italic;
  color: var(--mid-gray);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

/* ── Full-width image layout (Little Sack of Sugar style) ── */
.fullwidth-gallery {
  padding: 0 var(--site-gutter) 4vw;
}

.fullwidth-item {
  margin-bottom: 3vw;
}

.fullwidth-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity var(--transition);
}
.fullwidth-item img:hover { opacity: 0.92; }

.fullwidth-caption {
  text-align: center;
  padding: 0.6rem 0;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--mid-gray);
}

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.97);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.active { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-caption {
  margin-top: 0.8rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--dark-gray);
  max-width: 60ch;
}

.lightbox-caption .lb-title {
  display: block;
  font-weight: 400;
}

.lightbox-caption .lb-desc {
  display: block;
  font-style: italic;
  color: var(--mid-gray);
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-size: 1.8rem;
  font-weight: 300;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  line-height: 1;
  z-index: 10000;
  opacity: 0.6;
  transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  color: var(--black);
  opacity: 0.4;
  transition: opacity var(--transition);
  padding: 1rem;
  z-index: 10000;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { opacity: 0.9; }

/* ── About Page ── */
.about-section {
  padding: 5vw 3vw 5vw;
  overflow: hidden;
}

.about-section--gray {
  background-color: rgb(223, 224, 225);
}

.about-section--white {
  background-color: #fff;
}

.about-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 3vw;
}

.about-float-img {
  float: right;
  width: 55%;
  margin: 0 0 2rem 3rem;
}

.about-float-img--sm {
  width: 48%;
}

.about-float-img img {
  width: 100%;
  height: auto;
  display: block;
}

.about-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--black);
  margin: 0 0 1.8rem;
  line-height: 1.15;
}

.about-section p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--black);
  margin-bottom: 1.2rem;
}

.about-section strong { font-weight: 500; }

.about-cv p { margin-bottom: 0.5rem; }
.about-cv p + p { margin-top: 0; }

/* ── Contact Page ── */
.contact-hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.contact-hero-bg {
  position: absolute;
  inset: 0;
}

.contact-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  display: block;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: 5rem 3vw 5rem max(3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-heading {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 400;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}

.contact-form-area {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 1.6rem 1.8rem 1.8rem;
}

.form-field {
  margin-bottom: 0.75rem;
}

.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.3rem;
}

.form-field label em {
  font-style: italic;
  font-weight: 300;
  opacity: 0.85;
}

.form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgb(169, 169, 169);
  background: rgb(250, 250, 250);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--black);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: block;
}

.form-field input:focus,
.form-field textarea:focus { border-color: var(--black); }

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit-btn {
  background: rgb(168, 166, 161);
  color: #fff;
  border: none;
  padding: 0.65rem 2rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background var(--transition);
}
.form-submit-btn:hover { background: #888; }

.form-success {
  display: none;
  padding: 0.75rem;
  background: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  color: var(--black);
  margin-top: 0.75rem;
}
.form-success.show { display: block; }

.form-error {
  display: none;
  color: #ff6b6b;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}
.form-error.show { display: block; }

/* General submission error — more prominent banner */
#error-general.show {
  background: #c0272d;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 400;
  padding: 0.6rem 0.9rem;
  border-radius: 3px;
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
}

/* ── Blog ── */
.blog-page {
  padding: 4vw var(--site-gutter) 6vw;
  max-width: 1000px;
  margin: 0 auto;
}

.blog-post-list {
  list-style: none;
}

.blog-post-item {
  border-bottom: 1px solid var(--light-gray);
  padding: 2rem 0;
}
.blog-post-item:first-child { border-top: 1px solid var(--light-gray); }

.blog-post-date {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--mid-gray);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.blog-post-title {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.blog-post-title a { text-decoration: none; }
.blog-post-title a:hover { opacity: 0.6; }

.blog-post-excerpt {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--dark-gray);
  line-height: 1.65;
  max-width: 65ch;
}

.blog-post-readmore {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  border-bottom: 1px solid var(--black);
  padding-bottom: 1px;
  transition: opacity var(--transition);
}
.blog-post-readmore:hover { opacity: 0.5; }

/* ── Blog Single Post ── */
.blog-single {
  padding: 4vw var(--site-gutter) 6vw;
  max-width: 700px;
  margin: 0 auto;
}

.blog-single-header {
  margin-bottom: 2.5rem;
}

.blog-single-header h1 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.blog-single-meta {
  font-size: 0.78rem;
  color: var(--mid-gray);
  font-weight: 300;
}

.blog-body p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--dark-gray);
  margin-bottom: 1.2em;
}

.blog-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 3rem;
  margin-top: 3rem;
  border-top: 1px solid var(--light-gray);
  gap: 2rem;
}

.blog-nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--dark-gray);
}
.blog-nav a:hover { color: var(--black); }
.blog-nav .next { text-align: right; }

/* ── Folder / Earlier Work Page ── */
.folder-page {
  padding: 4vw var(--site-gutter) 6vw;
}

.folder-page-header {
  text-align: center;
  padding-bottom: 3vw;
}

.folder-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.folder-section-item {
  text-decoration: none;
  color: var(--black);
  display: block;
}

.folder-section-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.folder-section-item:hover img { transform: scale(1.02); }

.folder-section-item h3 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.7rem 0 0.2rem;
}

.folder-section-item .year {
  font-size: 0.75rem;
  color: var(--mid-gray);
  font-weight: 300;
}

/* ── Home / Recent Work page section dividers ── */
.section-divider {
  height: 1px;
  background: var(--light-gray);
  margin: 2rem var(--site-gutter);
}

/* ── Interstices / Recent Work main masonry ── */
.home-intro {
  padding: 4vw var(--site-gutter) 2vw;
  text-align: center;
}

.home-intro p {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--mid-gray);
}

/* Prior work section on home page */
.prior-work-section {
  padding: 3vw var(--site-gutter) 4vw;
}

.prior-work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.prior-work-col {
  padding: 0 1.5rem;
  border-right: 1px solid var(--light-gray);
}

.prior-work-col:last-child { border-right: none; }

.prior-work-col h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 0.8rem;
}

.prior-work-list {
  list-style: none;
}

.prior-work-list li {
  margin-bottom: 0.6rem;
}

.prior-work-list a {
  font-size: 0.82rem;
  font-weight: 300;
  text-decoration: none;
  color: var(--dark-gray);
  transition: color var(--transition);
}
.prior-work-list a:hover { color: var(--black); text-decoration-style: solid; }

/* ── Footer ── */
.site-footer {
  padding: 2rem var(--site-gutter);
  border-top: 1px solid var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--mid-gray);
  font-weight: 300;
}

.footer-left a, .footer-right a {
  color: var(--mid-gray);
  text-decoration: none;
}
.footer-left a:hover, .footer-right a:hover { color: var(--black); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .masonry-grid { column-count: 2; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .home-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .about-float-img { width: 45%; }
  .prior-work-grid { grid-template-columns: repeat(2, 1fr); }
  .prior-work-col { border-right: none; border-bottom: 1px solid var(--light-gray); padding: 1.2rem 0; }
  .prior-work-col:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
  :root {
    --site-gutter: var(--mobile-gutter);
    --header-height: 70px;
  }
  .masonry-grid { column-count: 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .home-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
  .home-hero { min-height: 40vh; }
  .home-hero-text { min-height: 40vh; padding: calc(5vmax) var(--site-gutter); }
  .header-nav { display: none; }
  .header-nav.mobile-open { display: block; position: fixed; top: var(--header-height); left: 0; right: 0; background: var(--white); padding: 1rem var(--mobile-gutter); border-bottom: 1px solid var(--light-gray); }
  .header-nav.mobile-open ul { flex-direction: column; }
  .header-nav.mobile-open .nav-item { display: block; }
  .header-nav.mobile-open .nav-item > a, .header-nav.mobile-open .nav-folder-btn { padding: 0.7rem 0; display: block; }
  .nav-folder-content { position: static; border: none; box-shadow: none; padding-left: 1rem; }
  .nav-folder-content.open { display: block; }
  .mobile-menu-toggle { display: flex; }
  .about-float-img, .about-float-img--sm { float: none; width: 100%; margin: 0 0 1.5rem; }
  .folder-section-grid { grid-template-columns: 1fr; }
  .blog-nav { flex-direction: column; }
}

/* ── Utility ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
