/* ============================================================
   Pearl Westfall · Mixed Media Art — Site Stylesheet
   Color scheme preserved from original Weebly theme.
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul { list-style: none; }
a { color: #66cccc; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

body {
  background: #282c2f;
  color: #d0e3e6;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Site Header ---------- */
header {
  background: #1c2023;
  padding: 0 24px;
}

.site-name {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 0;
  font-size: 36px;
  font-style: italic;
  line-height: 1;
}

.site-name a {
  color: #fff;
  text-decoration: none;
}

/* ---------- Navigation ---------- */
nav {
  background: #1c2023;
  border-top: 1px solid #25292c;
}

nav > ul {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
}

nav li {
  position: relative;
}

nav a {
  display: block;
  color: #6a7c7f;
  font-size: 14px;
  padding: 11px 16px 9px;
  white-space: nowrap;
  text-decoration: none;
}

nav a:hover,
nav li.active > a {
  color: #fff;
  background: #32373a;
}

/* Dropdown menus */
nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #32373a;
  z-index: 100;
  min-width: 220px;
}

nav .submenu .submenu {
  top: 0;
  left: 100%;
}

nav li:hover > .submenu,
nav li:focus-within > .submenu {
  display: block;
}

nav .submenu a {
  border-bottom: 1px solid #25292c;
  padding: 7px 15px;
}

nav .submenu a:hover {
  background: #6a7c7f;
  color: #fff;
}

/* ---------- Main Content ---------- */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  min-height: 400px;
}

h1, h2 {
  line-height: 1.3;
  padding: 0.3em 0;
  color: #d0e3e6;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }

p { padding: 0.5em 0; }

/* ---------- Page Headings ---------- */
.page-title {
  text-align: center;
  margin-bottom: 24px;
}

.page-title h1 {
  font-size: 32px;
  font-style: italic;
}

.page-title .subtitle {
  color: #6a7c7f;
  font-size: 16px;
}

/* ---------- Collection Index (2- or 3-column previews) ---------- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 24px;
}

.collection-card {
  text-align: center;
}

.collection-card h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.collection-card a {
  display: block;
}

.collection-card img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: opacity 0.2s;
}

.collection-card a:hover img {
  opacity: 0.85;
}

/* ---------- Artwork Gallery Grid ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gallery-item {
  cursor: pointer;
}

.gallery-item a {
  display: block;
  overflow: hidden;
  background: #1c2023;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.25s, opacity 0.25s;
}

.gallery-item a:hover img {
  transform: scale(1.04);
  opacity: 0.9;
}

.gallery-item figcaption {
  padding: 8px 4px 4px;
  font-size: 13px;
  color: #a0b8bc;
  line-height: 1.4;
}

/* ---------- Lightbox ---------- */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  padding: 20px;
  border: none;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
}

#lightbox::backdrop {
  background: rgba(0,0,0,0.85);
}

#lightbox[open] {
  display: flex;
}

#lightbox:not([open]) {
  display: none;
}

#lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid #3a3f43;
}

#lightbox-caption {
  margin-top: 14px;
  color: #a0b8bc;
  font-size: 14px;
  text-align: center;
  max-width: 700px;
}

#lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: 1px solid #6a7c7f;
  color: #d0e3e6;
  font-size: 24px;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
}

#lightbox-close:hover {
  background: #32373a;
}

/* ---------- Home Page ---------- */
.home-feature {
  text-align: right;
  margin-bottom: 20px;
}

.home-feature img {
  max-width: 100%;
  margin-left: auto;
}

.home-artwork-title {
  text-align: right;
  margin-top: 10px;
  font-style: italic;
  color: #6a7c7f;
}

/* ---------- About Page ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.about-photo img {
  width: 100%;
  border: 1px solid #3a3f43;
  padding: 3px;
}

.about-text h2 {
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid #3a3f43;
  padding-bottom: 4px;
}

.about-text h2:first-child {
  margin-top: 0;
}

.about-text p {
  margin-bottom: 10px;
}

.cv-section {
  margin-top: 24px;
}

.cv-section h3 {
  text-decoration: underline;
  font-size: 15px;
  margin-bottom: 8px;
  color: #d0e3e6;
}

.cv-entry {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}

.cv-year {
  min-width: 80px;
  color: #6a7c7f;
  font-size: 14px;
}

@media (max-width: 640px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-photo img {
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ---------- Contact Form ---------- */
.contact-form {
  max-width: 500px;
  margin-top: 20px;
}

.contact-form label {
  display: block;
  font-size: 15px;
  color: #d0e3e6;
  margin-bottom: 4px;
  margin-top: 16px;
}

.contact-form .required {
  color: #e06c75;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: #fff;
  color: #333;
  border: 1px solid #d2d2d2;
  border-radius: 3px;
  padding: 8px 10px;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.contact-form textarea {
  height: 200px;
  resize: vertical;
}

.contact-form button[type="submit"] {
  margin-top: 20px;
  background: #3a3f43;
  color: #d0e3e6;
  border: 1px solid #6a7c7f;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.contact-form button[type="submit"]:hover {
  background: #6a7c7f;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .site-name { font-size: 24px; padding: 20px 0; }
  nav > ul { flex-wrap: wrap; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .collection-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .collection-grid { grid-template-columns: 1fr; }
}
