/*
Theme Name: Artist Portfolio
Text Domain: Artist Portfolio
Version:1.0
Description: Minimal Artist Portfolio including 3 pages: Information, Works and Exhibitions.
Author: Daniel Tagliari
*/

/* ==========================================================================
   GLOBAL ATTRIBUTES
   ========================================================================== */

@font-face {
    font-family: 'Golos';
    src: url('assets/fonts/Golos-Text_Regular.woff2') format('woff2'),
         url('assets/fonts/Golos-Text_Regular.woff') format('woff');
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ApfelGrotezk';
    src: url('assets/fonts/ApfelGrotezk-Regular.woff2') format('woff2'),
         url('assets/fonts/ApfelGrotezk-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Telas';
    src: url('assets/fonts/TelasUnlicensedTrial-Regular.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Fragment';
    src: url('assets/fonts/FragmentMono-Regular.tff') format('ttf');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Public Sans';
    src: url('assets/fonts/public-sans-v21-latin-regular.woff2') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
  color: rgba(0, 0, 0, 0.8);
  font-size: 12px;
  font-family: "Public Sans", sans-serif;
  /* font-family: "ApfelGrotezk", sans-serif; */
  font-weight: 500;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-branding a {
  /* text-transform: lowercase; */
  /* text-transform: capitalize; */
  text-transform: uppercase;
  font-size: 2rem;
}

.main-navigation a {
  /* text-transform: lowercase; */
  text-transform: capitalize;
  font-size: 1.3rem;
}

h2 {
  text-transform: uppercase;
  font-size: 1.2rem;
}

p {
  font-size: 1.2rem;
}

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

a:hover {
  color: rgba(0, 0, 130, 0.9);
}

main {
  padding: 1rem;
}

header {
  padding: 1rem;
  /* border-bottom: solid 1px gray; */
}

/* ==========================================================================
   NAVIGATION (all screen sizes)
   ========================================================================== */

.main-navigation #primary-menu {
    display: none; /* hidden until toggled open */
    flex-direction: column;
}

.main-navigation.is-open #primary-menu {
    display: flex;
    align-items: center;
    padding-top: 1.5rem;
}

.menu-toggle {
    display: block; /* visible on mobile */
}

.menu-toggle {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.menu-toggle-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: black;
  position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: black;
  position: absolute;
  left: 0;
}

.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { top: 6px; }

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    margin: 0;
}

.language-switcher ul.lang-switch-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 1.2rem 0 0 0;
}

.lang-switch-item + .lang-switch-item::before {
    content: "/";
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* default: dim every language link */
.lang-switch-item a {
    opacity: 0.5;
}

/* full opacity only for the currently active one */
.lang-switch-item.is-current a {
    opacity: 1;
}

.language-switcher .lang-switch-item a {
    font-size: 1.4rem;
}

/* ==========================================================================
   YEAR FILTER (all screen sizes)
   ========================================================================== */

.works-filter-slider {
    font-size: 1rem;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0 0rem 0;
    margin-bottom: 24px;
    scrollbar-width: none; /* Firefox: hide scrollbar */
}

.works-filter-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari: hide scrollbar */
}

.works-filter-slider .year-filter-btn {
    flex: 0 0 auto;
    padding: 0rem 1rem 0 0;
    /* border-radius: 20px; */
    /* border: 1px solid #ccc; */
    background: transparent;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.year-filter-btn {
  border-style: none;
}

.works-filter-slider .year-filter-btn:hover {
    border-color: rgba(0, 0, 130, 0.9);
    color: rgba(0, 0, 130, 0.9);
}

.works-filter-slider .year-filter-btn.active {
    text-decoration: underline;
    /* border-color: #000; */
}

/* ==========================================================================
   EXHIBITIONS PAGE (all screen sizes)
   Shared rules: these apply on mobile AND desktop.
   Layout differences (the grid) are further down in the media queries.
   ========================================================================== */

.exhibition-entry {
    margin-bottom: 4rem;
}

.exhibition-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.exhibition-description {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.exhibition-gallery {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

.exhibition-gallery a.glightbox {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.exhibition-photo {
    width: 100%;
    display: block;
    border-radius: 4px;
    transition: transform 0.4s ease;
}

.exhibition-gallery a.glightbox:hover .exhibition-photo {
    transform: scale(1.05);
}

/* Type + artists (new side column) */
.exhibition-type,
.exhibition-artists {
    margin-bottom: 0.5rem;
}

/* PDF arrow next to the title */
.exhibition-pdf-link {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
}

.exhibition-pdf-link .arrow-icon {
    font-size: 0.7em;
    transition: transform 0.2s ease;
}

.exhibition-pdf-link:hover .arrow-icon {
    transform: translate(2px, -2px);
}

/* "LEIA O TEXTO" toggle */
.exhibition-extra-text {
    margin-top: 2rem;
    border-top: 1px solid #ddd;
    padding-top: 0.5rem;
}

.exhibition-extra-text summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.exhibition-extra-text summary::-webkit-details-marker {
    display: none;
}

.exhibition-extra-text summary::after {
    content: "＋";
    float: right;
}

.exhibition-extra-text[open] summary::after {
    content: "－";
}

.exhibition-extra-text-content {
    padding-top: 2rem;
    line-height: 1.6;
}

summary {
  font-size: 2rem;
  padding-top: 2rem;
}

/* ==========================================================================
   LIGHTBOX (GLightbox) (all screen sizes)
   ========================================================================== */

/* Overlay background */
.goverlay {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Close button - default icon is white, invert for visibility on light bg */
.gclose {
    filter: invert(1);
    opacity: 0.8;
}
.gclose:hover {
    opacity: 1;
}

/* Caption text - default is white, switch to dark for light overlay */
.glightbox-clean .gslide-description,
.lightbox-title,
.lightbox-description {
    display: none;
    margin: 0;
    padding: 0;
    color: #111;
    background: transparent;
}

.gslide-title {
    margin: 0;
    padding: 0;
    color: #111 !important;
    font-weight: bold;
    font-size: 1rem;
}

.gslide-desc {
    margin: 0;
    padding: 0;
    color: #333 !important;
    font-size: 0.9rem;
}

.glightbox-clean .gslide-media,
.gslide-image img,
.gslide-media {
    box-shadow: none !important;
}

/* ==========================================================================
   DESKTOP STYLING
   ========================================================================== */

@media ( min-width: 768px ) {

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

  a:hover {
    color: rgba(0, 0, 130, 0.9);
  }

  header {
    background-color: rgba(255, 255, 255, 0.9);
    position: -webkit-sticky; /* Safari support */
    position: sticky;
    top: 0;
    z-index: 9999;
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
    align-items: baseline;
    padding: 0.8rem;
  }

  .menu-toggle {
    display: none; /* hide hamburger */
  }

  .main-navigation #primary-menu {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .language-switcher {
    display: flex;
    justify-self: flex-end;
    text-align: right;
  }

  .language-switcher ul.lang-switch-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .lang-switch-item + .lang-switch-item::before {
    content: "/";
    margin: 0 0.5rem;
    opacity: 0.5;
  }

  /* default: dim every language link */
  .lang-switch-item a {
    opacity: 0.5;
  }

  /* full opacity only for the currently active one */
  .lang-switch-item.is-current a {
    opacity: 1;
  }

  .language-switcher .lang-switch-item a {
    font-size: 1rem;
  }

  .works-filter-slider {
    display: flex;
    gap: 1rem;
    flex-direction: row-reverse;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 1rem 0;
    margin-bottom: 22px;
    scrollbar-width: none; /* Firefox: hide scrollbar */
  }

  .works-filter-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari: hide scrollbar */
  }

  .works-filter-slider .year-filter-btn {
    flex: 0 0 auto;
    padding: 1rem 0.5rem 0 0;
    /* border-radius: 20px; */
    /* border: 1px solid #ccc; */
    background: transparent;
    color: #333;
    font-size: 1.3rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .works-filter-slider .year-filter-btn:hover {
    /* border-color: rgba(0, 0, 130, 0.9); */
    color: rgba(0, 0, 130, 0.9);
  }

  .works-filter-slider .year-filter-btn.active {
    text-decoration: underline;
    /* border-color: #000; */
  }

  /* WORKS PAGE (desktop) */

  .works-grid {
    grid-column: 1/4;
    padding-top: 0rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .work-item {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 4px;
  }

  .work-image {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
  }

  .work-image a {
    display: block;
    width: 100%;
    height: 100%;
  }

  .work-item .work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    display: block;
    transition: transform 0.4s ease;
  }

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

  .work-caption {
    padding: 0.8rem 0 1rem 0;
  }

  .work-title {
    padding: 0 0 0.2rem 0;
  }

  .work-description {
    color: rgba(0, 0, 0, 0.4);
  }

  /* EXHIBITIONS PAGE (desktop)
     6-column grid:
     [1] header  -> columns 1-4 (1 / 5)
     [2] gallery -> columns 1-4 (1 / 5)
     [3] side    -> columns 5-6 (5 / 7), spanning both rows
  */

  .exhibition-entry {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: 1rem;
    margin-bottom: 4rem;
  }

  .exhibition-side {
  grid-column: 5 / 7;
  grid-row: 1;
  padding-bottom:0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

  .exhibition-header  { grid-column: 1 / 3; grid-row: 1; padding-bottom: 1rem;}
  .exhibition-gallery { grid-column: 1/ 5; grid-row: 3; padding-bottom: 6rem; }

  /* .exhibition-header  { grid-column: 1/3; grid-row: 1; }
  .exhibition-gallery { grid-column: 3 / 7; grid-row: auto; padding-bottom: 6rem; }
  .exhibition-side    { grid-column: 1/ 3; grid-row:2; } */



  .exhibition-title {
    font-size: 1.5rem;
  }


  /* INFORMATION PAGE (desktop) */

  .info-page__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }

  .info-page__minibio { grid-column: 1/4; }

  .info-page__cv {
    grid-column: 5/7;
    max-height: 90vh;
    overflow: scroll;
  }

  br {
    padding: 1rem;
  }

  .info-page__grid li {
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    padding: 1rem 0.5rem 0 0;
    /* text-indent: 15px; */
  }

  .info-page__grid p {
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    padding: 1rem 0.5rem 0 0;
    /* text-indent: 15px; */
  }

  .info-page__grid h2 {
    font-size: clamp(1.2rem, 1.6vw, 1.6rem);
  }

} /* end desktop */

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

@media ( max-width: 767px ) {

  /* WORKS PAGE (mobile) */

  .works-grid {
    padding-top: 3.2rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .work-item img {
    overflow: hidden;
    width: 100%;
    display: block;
    border-radius: 4px;
  }

  .work-title {
    color: rgba(100, 100, 100, 0.7);
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0.8rem;
  }

  .work-description {
    font-size: 1rem;
    color: rgba(100, 100, 100, 0.3);
    padding-bottom: 2rem;
  }

  .work-caption {
    display: flex;
    flex-direction: column;
    align-items: baseline;
  }

  .work-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
  }

  /* EXHIBITIONS PAGE (mobile)
     No grid here: header, gallery and side text simply stack in the
     order they appear in the template. */

  /* INFORMATION PAGE (mobile) */

  .info-page__grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .info-page__grid li {
    font-size: 1rem;
    padding: 1rem 0.5rem 0 0;
    /* text-indent: 15px; */
  }

  .info-page__grid p {
    font-size: 1.2rem;
    padding: 1rem 0.5rem 0 0;
  }

  .info-page__grid h2 {
    margin-top: 3rem;
    font-size: 1.8rem;
  }

  .exhibition-entry {
    padding-bottom: 1rem;
  }
  .exhibition-header{ padding-bottom: 1rem;}
  .exhibition-gallery {padding-bottom: 1rem;}
  .works-filter-slider{flex-direction: row-reverse;}

} /* end mobile */
