/* Tina Valentinetti — static gallery */

:root {
  --bg: #f7f6f3;
  --bg-soft: #eeece7;
  --ink: #1c1c1a;
  --ink-muted: #5a5a54;
  --line: #d4d1c9;
  --accent: #3d5a4c;
  --accent-hover: #2a4036;
  --white: #ffffff;
  --gap: 0.65rem;
  --max: 68rem;
  --font-display: "Libre Baskerville", "Palatino Linotype", Palatino, serif;
  --font-ui: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, #e8ebe6 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Header */

.site-header {
  position: relative;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}

.brand:hover {
  color: var(--accent);
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.85rem;
  max-width: 100%;
  row-gap: 0.45rem;
}

.primary-nav a {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Main */

.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4rem;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  text-align: center;
  margin: 0 0 1.75rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  animation: rise-in 0.7s ease both;
}

.page-lede {
  text-align: center;
  max-width: 36rem;
  margin: -0.85rem auto 2rem;
  color: var(--ink-muted);
  font-size: 1.02rem;
  animation: rise-in 0.7s ease 0.08s both;
}

/* Gallery grid */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery li {
  margin: 0;
  opacity: 0;
  animation: fade-up 0.65s ease forwards;
}

.gallery li:nth-child(1) { animation-delay: 0.05s; }
.gallery li:nth-child(2) { animation-delay: 0.1s; }
.gallery li:nth-child(3) { animation-delay: 0.15s; }
.gallery li:nth-child(4) { animation-delay: 0.2s; }
.gallery li:nth-child(5) { animation-delay: 0.25s; }
.gallery li:nth-child(6) { animation-delay: 0.3s; }
.gallery li:nth-child(7) { animation-delay: 0.35s; }
.gallery li:nth-child(8) { animation-delay: 0.4s; }
.gallery li:nth-child(9) { animation-delay: 0.45s; }
.gallery li:nth-child(n+10) { animation-delay: 0.5s; }

.gallery a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--line);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.35s ease;
}

.gallery a:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

/* Bio */

.bio-layout {
  display: grid;
  gap: 2.5rem;
  max-width: 40rem;
  margin: 0 auto;
}

.bio-portrait {
  width: min(100%, 18rem);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  animation: fade-up 0.7s ease both;
}

.bio-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-copy {
  animation: rise-in 0.7s ease 0.1s both;
}

.bio-copy p {
  margin: 0 0 1.15rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.bio-copy blockquote {
  margin: 1.5rem 0;
  padding: 1rem 0 1rem 1.15rem;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.65;
}

.contact {
  margin-top: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  animation: rise-in 0.7s ease 0.18s both;
}

.contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  margin: 0 0 0.65rem;
  text-align: center;
}

.contact-note {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.contact-form .row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 560px) {
  .contact-form .row {
    grid-template-columns: 1fr 1fr;
  }
}

.btn {
  justify-self: center;
  margin-top: 0.35rem;
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--accent);
  padding: 0.85rem 1.75rem;
  transition: background 0.25s ease, transform 0.2s ease;
}

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

.btn:active {
  transform: translateY(1px);
}

/* Admin bar (logged-in editors) */

.admin-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #1c1c1a;
  color: #f5f4f1;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}

.admin-bar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
}

.admin-bar strong {
  font-weight: 650;
  letter-spacing: 0.04em;
}

.admin-bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
}

.admin-bar a,
.admin-bar button {
  color: #d7d4cd;
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.admin-bar a:hover,
.admin-bar button:hover {
  color: #fff;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.site-footer p {
  margin: 0;
}

/* Motion */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .gallery li {
    opacity: 1;
  }
}

/* Lightbox */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 2.5rem 4.5rem 3.25rem;
  background: #fff;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 0;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ececec;
}

.lightbox-meta {
  flex: 0 0 auto;
  text-align: center;
  max-width: min(40rem, 100%);
}

.lightbox-caption {
  margin: 0;
  font-family: "Great Vibes", "Segoe Script", cursive;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  color: #111;
  line-height: 1.2;
}

.lightbox-description {
  margin: 0.35rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.lightbox-description[hidden] {
  display: none;
}

.lightbox-close,
.lightbox-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: #444;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 1.15rem;
  font-size: 2.35rem;
  font-weight: 300;
  z-index: 2;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  color: #111;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.25rem;
  font-weight: 300;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
}

.lightbox-prev {
  left: 0.85rem;
}

.lightbox-next {
  right: 0.85rem;
}

/* Responsive */

@media (max-width: 800px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox {
    padding: 3rem 3.25rem 2.5rem;
  }

  .lightbox-image {
    max-height: calc(100vh - 7rem);
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .header-inner {
    padding: 1rem 1rem 0.75rem;
  }

  .site-main {
    padding: 1.75rem 1rem 3rem;
  }

  .lightbox {
    padding: 3.25rem 2.75rem 2.25rem;
  }

  .lightbox-nav {
    font-size: 2.5rem;
  }

  .lightbox-prev {
    left: 0.25rem;
  }

  .lightbox-next {
    right: 0.25rem;
  }
}
