/*
Theme Name: Salto
Author: Emil Salto
Description: Minimal portfolio theme for visual artist Emil Salto.
Version: 3.0
Text Domain: salto
*/

button { font-size: inherit; }

/* ===========================
   CSS RESET & BASE
   =========================== */

* {
  margin: 0;
  box-sizing: border-box;
}

:root {
  --primary-bg: #ffffff;
  --primary-text: #000000;
  --secondary-text: #777777;
  --nav-width: 280px;
  --transition: 0.3s ease;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  background: var(--primary-bg);
  color: var(--primary-text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
}

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

/* ===========================
   LAYOUT
   =========================== */

.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===========================
   SIDEBAR NAVIGATION
   =========================== */

.site-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--primary-bg);
  padding: 22px 36px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.6px;
  margin-bottom: 52px;
  line-height: 1.3;
  padding-top: 14px;
}
.admin-bar .site-title {
  padding-top: 58px;
}

.main-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-menu li {
  margin-bottom: 14px;
}

.main-menu a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2px;
  display: block;
  white-space: nowrap;
  color: var(--secondary-text);
  transition: color var(--transition);
}

.main-menu a:hover {
  color: var(--primary-text);
  opacity: 1;
}

.main-menu .current-menu-item a,
.main-menu .current-menu-parent a {
  color: var(--primary-text);
}

/* ===========================
   MAIN CONTENT
   =========================== */

.site-content {
  margin-left: var(--nav-width);
  width: calc(100% - var(--nav-width));
  min-height: 100vh;
}

/* ===========================
   HOMEPAGE CAROUSEL
   =========================== */

/* ===========================
   PAINTINGS GRID
   =========================== */

.paintings-grid {

}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 48px;
}

.painting-item {
  cursor: pointer;
}

.painting-item img {
  width: 100%;
  height: auto;
  transition: opacity var(--transition);
}


.painting-info {
  margin-top: 14px;
}

.painting-title {
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 3px;
}

.painting-meta {
  font-size: 13px;
  color: var(--secondary-text);
  line-height: 1.5;
}

/* ===========================
   LIGHTBOX
   =========================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 60px;
}

.lightbox.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 88vw;
  max-height: 88vh;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}

.lightbox-close:hover {
  color: rgba(255,255,255,0.9);
}

/* Prev / Next - only visible in slideshow mode */
.lightbox-prev,
.lightbox-next {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 32px;
  cursor: pointer;
  padding: 16px;
  line-height: 1;
  transition: color var(--transition);
  z-index: 10;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.paintings-grid ~ #lightbox .lightbox-prev,
.paintings-grid ~ #lightbox .lightbox-next { top: auto; bottom: 56px; transform: none; }

@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next {
    top: auto;
    bottom: 56px;
    transform: none;
    padding: 12px 20px;
    font-size: 28px;
  }
  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: rgba(255,255,255,0.9);
}

.lightbox.slideshow-mode .lightbox-prev,
.lightbox.slideshow-mode .lightbox-next {
  display: block;
  white-space: nowrap;
}


  margin-top: 16px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-style: italic;
}

.lightbox-count {
  display: none;
  position: absolute;
  top: -44px;
  left: 0;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.lightbox.slideshow-mode .lightbox-count {
  display: none;
}

/* ===========================
   EXHIBITIONS
   =========================== */

.exhibitions-container {
  font-style: normal;
  max-width: 1400px;
}

.exhibition-item {
  margin-bottom: 60px;
}

.exhibition-back {
  font-size: 13px;
  color: var(--secondary-text);
  margin-bottom: 16px;
}

.exhibition-back a {
  color: var(--secondary-text);
}

.exhibition-back a:hover {
  color: var(--primary-text);
  opacity: 1;
}

.exhibition-header {
  margin-bottom: 28px;
}

.exhibition-title {
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 6px 0;
}

.exhibition-title a {
  color: inherit;
}

.exhibition-info {
  font-size: 13px;
  color: var(--secondary-text);
}

.exhibition-thumb-link {
  display: block;
  white-space: nowrap;
}

.exhibition-thumb-link img {
  transition: opacity var(--transition);
}


.exhibition-images {
  display: block;
  white-space: nowrap;
}

.exhibition-images img {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: min(800px, 100%);
  max-height: 800px;
  cursor: pointer;
  transition: opacity var(--transition);
}


.exhibition-image-wrapper {
  margin-bottom: 32px;
}

.single-archive_work .exhibition-image-wrapper img {
  max-width: min(700px, 100%);
}

.image-caption {
  font-size: 13px;
  margin-top: 2px;
  white-space: normal;
  max-width: 700px;
}

/* ===========================
   ARCHIVE
   =========================== */

.archive-container {

  max-width: 1400px;
  overflow-x: hidden;
}

.archive-section {
  margin-bottom: 72px;
}

.archive-section-title {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.8px;
  color: var(--primary-text);
  margin-bottom: 32px;
}

.archive-grid {
  align-items: end;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 32px;
}
.archive-grid > * {
  min-width: 0;
}

.archive-item {
  min-width: 0;
  overflow: hidden;
}

.archive-item img,
.archive-item .wp-post-image {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
}

.archive-item-link {
  display: block;
  white-space: normal;
  text-decoration: none;
  color: inherit;
}

.archive-item {
  cursor: pointer;
}

.archive-item img {
  width: 100%;
  margin-bottom: 12px;
  transition: opacity var(--transition);
}


.archive-item-title {
  font-size: 14px;
  font-style: italic;
  margin-bottom: 3px;
}

.archive-item-meta {
  font-size: 13px;
  color: var(--secondary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===========================
   TEXTS PAGE
   =========================== */

.texts-container {

  max-width: 840px;
}

.text-item {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid #ebebeb;
}

.text-item:last-child {
  border-bottom: none;
}

.text-title {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 16px;
}

.text-excerpt {
  font-size: 15px;
  line-height: 1.85;
  color: var(--secondary-text);
}

/* ===========================
   CV PAGE + ABOUT PAGE
   =========================== */

.cv-container,
.about-container {

  max-width: 1100px;
}

.contact-section {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid #ebebeb;
}

.cv-section {
  margin-bottom: 52px;
}

.cv-section-title {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--secondary-text);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}

.cv-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

.cv-year {
  font-size: 14px;
  color: var(--secondary-text);
  padding-top: 1px;
}

.cv-detail {
  font-size: 14px;
  line-height: 1.7;
}

.cv-download {
  display: inline-block;
  margin-top: 44px;
  padding: 11px 22px;
  border: 1px solid #000;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: all var(--transition);
}

.cv-download:hover {
  background: #000;
  color: #fff;
  opacity: 1;
}

/* ===========================
   CONTACT PAGE
   =========================== */

.contact-container {

  max-width: 600px;
}

.contact-body {
  font-size: 15px;
  line-height: 2.1;
}

.contact-body a {
  border-bottom: 1px solid #ccc;
  transition: border-color var(--transition);
}

.contact-body a:hover {
  border-color: #000;
  opacity: 1;
}

/* ===========================
   HOME HEADER OVERLAYS
   =========================== */

.home-name {
  position: fixed;
  top: 38px;
  left: 44px;
  z-index: 100;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: color var(--transition);
}

.home-name:hover {
  color: rgba(255,255,255,1);
  opacity: 1;
}

.home-enter {
  position: fixed;
  bottom: 38px;
  right: 44px;
  z-index: 100;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition);
}

.home-enter:hover {
  color: rgba(255,255,255,0.9);
  opacity: 1;
}

/* ===========================
   MOBILE
   =========================== */

.mobile-toggle {
  display: none;
  position: fixed;
  top: 28px;
  left: 36px;
  width: 36px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0;
}

.mobile-toggle span {
  display: block !important;
  white-space: normal !important;
  width: 22px !important;
  height: 2px !important;
  background: var(--primary-text) !important;
  transition: all var(--transition);
}

/* On home page - white lines */
@media (max-width: 1024px) {
  :root {
    --nav-width: 0px;
  }

  .mobile-toggle {
    display: flex;
    left: 20px;
  }

  .site-nav {
    transform: translateX(-100%);
    transition: transform var(--transition);
    width: 170px;
    border-right: none;
    box-shadow: 2px 0 20px rgba(0,0,0,0.06);
    padding-top: 100px;
    padding-left: 20px;
    padding-right: 20px;
    background: rgba(255,255,255,0.92) !important;
  }

  .site-nav.open {
    transform: translateX(0);
  }

  .site-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
  }

  .site-nav-overlay.open {
    display: block;
  }

  .site-content {
    margin-left: 0;
    width: 100%;
    padding-top: 60px !important;
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .paintings-grid,
  .exhibitions-container,
  .archive-container,
  .page-container,
  .feed-container {
    padding: 24px 20px !important;
  }

  .exhibition-images {
    grid-template-columns: 1fr;
  }

  .archive-grid {
  align-items: end;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 12px;
  }

  .cv-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 400px) {
  .archive-grid {
  align-items: end;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 12px;
  }


  .lightbox {
    padding: 28px 16px;
  }
}

/* ===========================
   SINGLE POST / PAGE
   =========================== */

.single-post-container {

  max-width: 800px;
}

.single-post-title {
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 40px;
}

.single-post-content {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.single-post-nav {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid #ebebeb;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

/* ===========================
   PAGE TEMPLATE
   =========================== */

.page-container {

  max-width: 860px;
}

.page-title {
  font-size: 20px; /* Will use global title size from customizer */
  font-weight: 400;
  margin: 0 0 8px 0;
}

.page-content {
  font-size: 15px;
  line-height: 1.85;
}
/* ========================
   PAINTING FILTER BAR
   ======================== */
.painting-filter-bar {
    display: flex;
    gap: 24px;
    padding: 0 0 32px 0;
    flex-wrap: wrap;
    align-items: baseline;
}

.painting-filter-bar > button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
    font-size: 15px;
    font-weight: 400;
    font-style: normal;
    color: #0003bf;
    letter-spacing: 0.2px;
    line-height: 26px;
    padding: 0;
    opacity: 0.4;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.painting-filter-bar button:hover {
    opacity: 0.75;
}

.painting-filter-bar button.active {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.admin-bar .mobile-toggle { top: 74px; }

/* Hide title on front page */
.home .page-title {
  display: none;
}

/* ===========================
   HEADINGS - match site typography
   =========================== */

.page-content h1,
.page-content h2,
.page-content h3 {
  font-weight: 400;
  font-style: italic;
  margin: 0 0 6px 0;
}

.page-content h1 { font-size: 18px; font-style: normal; }
.page-content h1 em { font-style: italic; }
.page-content h2 { font-size: 16px; }
.page-content h3 { font-size: 15px; font-style: normal; }

.page-content p {
  font-size: 15px;
  color: var(--secondary-text);
  font-style: normal;
  margin: 0 0 4px 0;
}

.page-content figcaption {
  font-size: 15px;
  color: var(--secondary-text);
  font-style: normal;
  margin-top: 2px;
}

.page-content figcaption em {
  font-style: italic;
}

.page-content figure {
  margin: 16px 0;
}

.page-content figure img {
  display: inline-block;
  width: auto;
  max-width: min(800px, 100%);
  max-height: 800px;
  height: auto;
}

/* ===========================
   FEED ENTRIES
   =========================== */

.feed-container {
  max-width: 1400px;
}

.feed-entry {
  margin-bottom: 36px;
  max-width: 700px;
}
.feed-title,
.feed-body,
.feed-link,
.feed-caption {
  max-width: 700px;
}

.feed-title {
  margin-bottom: 6px;
  font-size: 0;
}

.feed-title-italic,
.feed-title-normal {
  font-size: 18px;
}

.feed-title-italic {
  font-style: italic;
  font-size: 18px;
}

.feed-title-normal {
  font-style: normal;
  font-size: 18px;
}



.feed-body {
  font-size: 15px;
  color: var(--secondary-text);
  margin-bottom: 6px;
  line-height: 1.6;
}

.feed-link a {
  font-size: 15px;
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feed-link a:hover {
  opacity: 0.7;
}

.feed-image-wrapper {
  margin-top: 16px;
}

.feed-image-wrapper img {
  display: block;
  width: auto;
  max-width: min(800px, 100%);
  max-height: 800px;
  height: auto;
}

.feed-caption {
  font-size: 15px;
  color: var(--secondary-text);
  margin-top: 2px;
}
.feed-caption em { margin-right: 0.05em; }


.feed-caption-italic {
  font-style: italic;
}

.feed-caption-italic { font-style: italic; font-size: 15px; }
.feed-caption-normal { font-style: normal; font-size: 15px; }
