/* ---- Reset & base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.6; }
h1, h2, h3 { font-weight: 400; letter-spacing: 0.01em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

/* ---- Page content wrapper + free-floating layer ----
   Every page wraps its main content in .page-content (position:relative)
   with a .free-canvas overlay inside it. Free text boxes / free images
   live in .free-canvas, positioned with inline left/top/width styles set
   by the visual editor -- this file only needs to establish the
   positioning context and stacking order. */
.page-content { position: relative; }
.free-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}
.free-canvas > * {
  pointer-events: auto;
  word-wrap: break-word;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header / Nav ---- */
.site-header {
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  z-index: 100;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #111;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  padding: 10px 0;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  text-transform: none;
  letter-spacing: 0;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid #eee;
    padding: 8px 24px 20px;
  }
  .site-nav.open { display: flex; }
  .nav-dropdown { width: 100%; }
  .dropdown-menu {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 12px;
    min-width: 0;
  }
  .site-nav > a, .nav-dropdown > a {
    padding: 12px 0;
    display: block;
    width: 100%;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  z-index: 0;
}
.hero-overlay {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-overlay p {
  display: inline-block;
  background: rgba(255,255,255,0.55);
  border-radius: 10px;
  padding: 8px 16px;
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.hero-overlay .see-more {
  display: inline-block;
  background: rgba(255,255,255,0.55);
  border-radius: 10px;
  margin-top: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid #111;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Section headers ---- */
.page-header {
  padding: 48px 0 24px;
  text-align: center;
}
.page-header h1 {
  font-size: 1.8rem;
  text-transform: lowercase;
}
.page-header hr {
  width: 60px;
  border: none;
  border-top: 1px solid #111;
  margin: 20px auto 0;
}

/* ---- Work grid (overview) ---- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 20px 0 80px;
}
.work-grid a { position: relative; overflow: hidden; aspect-ratio: 1; display: block; }
.work-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.work-grid a:hover img { transform: scale(1.04); opacity: 0.9; }
.work-grid .label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  color: #fff;
  font-size: 0.85rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}
@media (max-width: 760px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* when a grid only has 2 tiles, center them instead of leaving an empty third slot */
.work-grid:has(> a:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
}

/* ---- Project pages ---- */
.project-header {
  padding: 48px 0 16px;
  text-align: center;
}
.project-header h1 { font-size: 2rem; text-transform: lowercase; }
.project-meta {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}
.meta-sep {
  display: inline-block;
  width: 1px;
  height: 0.9em;
  background: currentColor;
  opacity: 0.5;
  margin: 0 4px;
  vertical-align: middle;
}
.project-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.project-media {
  max-width: 900px;
  margin: 0 auto 40px;
}
.project-media img, .project-media video { width: 100%; border-radius: 2px; }
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .media-row { grid-template-columns: 1fr; } }

.poem {
  max-width: 480px;
  margin: 0 auto 8px;
}
.poem p {
  margin: 0 0 0.25em;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 20px 0;
  border-top: 1px solid #eee;
  text-transform: lowercase;
  font-size: 0.9rem;
}

/* ---- Sub-work sections (paintings, zines, community, personal) ---- */
.subwork {
  max-width: 900px;
  margin: 0 auto 72px;
  padding-bottom: 48px;
  border-bottom: 1px solid #eee;
}
.subwork:last-child { border-bottom: none; }
.subwork h2 { font-size: 1.3rem; text-transform: lowercase; text-align: center; }
.subwork .project-meta { text-align: center; }
.subwork img { max-width: 640px; margin: 0 auto 20px; }
.subwork .subwork-text { max-width: 640px; margin: 0 auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 900px;
  margin: 0 auto 20px;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Carousel layout (opt-in via data-layout="carousel") ----
   A horizontal peek-carousel: the current photo is shown at ~85% width so
   the edge of the next one peeks in on the right. Prev/Next arrows sit on
   top of the current photo itself; clicking them slides the strip over. */
[data-layout="carousel"] {
  position: relative;
  max-width: 700px;
  margin: 0 auto 20px;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.35s ease;
}
.carousel-track > img,
.carousel-track > a {
  flex: 0 0 85%;
  width: 85%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
}
/* carousel--fit: size the frame to the image's own aspect ratio instead of cropping to 4:3 */
.carousel--fit {
  max-width: 420px;
}
.carousel--fit .carousel-track > img,
.carousel--fit .carousel-track > a {
  aspect-ratio: auto;
  object-fit: contain;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #6693F5;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 5;
}
.carousel-nav:hover { background: #4d7cf0; }
.carousel-nav-prev { left: 12px; }
.carousel-nav-next { right: calc(15% + 12px); }

/* ---- About page ---- */
.about-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 0 80px;
}
.about-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.about-images img { width: 100%; height: 260px; object-fit: cover; }
@media (max-width: 700px) { .about-images { grid-template-columns: 1fr; } .about-images img { height: auto; } }

/* ---- CV page ---- */
.cv-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 0 80px;
}
.cv-section h2 {
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin-top: 48px;
  padding-bottom: 8px;
  border-bottom: 1px solid #111;
}
.cv-section h2:first-child { margin-top: 0; }
.cv-entry {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.cv-entry:last-of-type { border-bottom: none; }
.cv-entry .cv-title { font-weight: 600; line-height: 1.4; }
.cv-entry .cv-meta { font-size: 0.85rem; color: #666; line-height: 1.5; margin-top: 4px; }
.cv-download { margin-top: 32px; text-align: center; }
.cv-download a {
  display: inline-block;
  border: 1px solid #111;
  padding: 10px 22px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Contact page ---- */
.contact-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 0 100px;
  text-align: center;
}
.contact-section h1 { font-size: 2rem; margin-bottom: 24px; text-transform: lowercase; }
.contact-section img { margin: 0 auto 32px; max-width: 420px; }
.contact-email {
  display: inline-block;
  margin-top: 12px;
  font-size: 1.1rem;
  border-bottom: 1px solid #111;
}
.social-links {
  margin-top: 24px;
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid #eee;
  padding: 32px 24px 48px;
  text-align: center;
  font-size: 0.8rem;
  color: #888;
}
.site-footer nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Mailing list signup block ---- */
.mailing-list-form {
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px 22px;
  font-family: inherit;
}
.mailing-list-heading { margin: 0 0 6px; font-size: 1.05rem; font-weight: 400; }
.mailing-list-sub { margin: 0 0 14px; font-size: 0.85rem; color: #666; }
.mailing-list-row { display: flex; gap: 8px; }
.mailing-list-row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.85rem;
  font-family: inherit;
}
.mailing-list-row button {
  padding: 9px 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

/* lightbox: click any in-page photo (that isn't itself a link) to view full size */
.page-content img:not(a img):not([data-layout="carousel"] img) { cursor: zoom-in; }
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.mailing-list-row button:hover { background: #333; }
