/* ============================================
   Una Ursprung - Portfolio
   Clean, minimal style inspired by artist sites
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #222;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
}

/* Site Title */
.site-title a {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  letter-spacing: 0.15em;
  font-size: 22px;
  font-weight: 300;
  text-transform: uppercase;
}

.site-title .name-line {
  display: block;
}

/* Navigation */
.nav-list {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-list a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.nav-list a:hover {
  opacity: 0.5;
}

.nav-list a.active {
  opacity: 0.5;
}

.nav-instagram {
  display: flex;
  align-items: center;
}

.nav-instagram svg {
  vertical-align: middle;
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid #eee;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li {
  padding: 0;
}

.dropdown a {
  display: block;
  padding: 6px 20px;
  font-size: 13px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: #222;
  position: absolute;
  left: 0;
  transition: all 0.3s;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; }
.menu-toggle span:nth-child(3) { bottom: 0; }

.menu-toggle.active span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  bottom: 50%;
  transform: rotate(-45deg);
}

/* --- Hero Slideshow --- */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-placeholder {
  font-size: 18px;
  color: #999;
  letter-spacing: 0.1em;
}

/* Slide Indicators */
.slide-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #555;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}

.indicator.active {
  background: #222;
}

/* --- Page Content (for sub-pages) --- */
.page-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 140px 40px 80px;
}

.page-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 40px;
  color: #222;
}

.section-subtitle {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: #555;
}

.publications-section {
  margin-bottom: 60px;
  --publication-book-shadow: 2px 3px 10px rgba(0, 0, 0, 0.24), 6px 0 9px rgba(0, 0, 0, 0.14);
}

.publications-section .work-item {
  overflow: visible;
  cursor: default;
}

.works-gallery.publications-quarter-gallery {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 80px;
  --publication-cover-size: clamp(120px, 16vw, 180px);
}

.group-publications-gallery {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 40px;
}

.group-publications-gallery .work-item {
  width: calc(clamp(120px, 16vw, 180px) * 0.711);
  min-width: 0;
}

.group-publications-gallery .work-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.group-publications-gallery .work-item img.group-cover-match-height {
  aspect-ratio: 1788 / 2532;
}

.group-publications-gallery .work-info {
  padding: 10px 0 0;
  margin: 0;
  text-align: left;
}

.group-publications-gallery .work-info.group-info-relaxed {
  line-height: inherit;
}

.group-publications-gallery .work-info.group-info-lower {
  line-height: inherit;
}

.group-publications-gallery .work-item.group-item-lower {
  margin-top: 56px;
}

.publications-quarter-gallery .work-item {
  flex: 0 0 auto;
  width: var(--publication-cover-size);
  min-width: 0;
}

.publication-card {
  position: relative;
}

.publications-quarter-gallery .publication-main-card {
  width: calc(var(--publication-cover-size) * 0.711);
  min-width: 0;
  overflow: visible;
  z-index: 1;
}

.publications-quarter-gallery .publication-pair-card {
  width: calc(var(--publication-cover-size) * 2 + 4px);
  min-width: 0;
  overflow: visible;
}

.publications-quarter-gallery .publication-third-card {
  width: var(--publication-cover-size);
  min-width: 0;
}

.publication-pair-images {
  display: flex;
  gap: 4px;
}

.work-item .publication-pair-images img {
  width: var(--publication-cover-size);
  flex: 0 0 var(--publication-cover-size);
  height: var(--publication-cover-size);
  object-fit: contain;
}

.publication-card > img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.publication-main-card > img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.publication-main-card .work-info {
  padding: 10px 0 0;
  margin: 0;
  text-align: left;
}

.publication-download {
  position: absolute;
  top: -8px;
  right: -34px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s ease, background 0.2s ease;
}

.publication-download:hover {
  transform: scale(1.06);
  background: #fff;
}

.publications-section:last-child {
  margin-bottom: 0;
}

.series-header {
  margin-bottom: 12px;
}

.series-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 40px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.series-nav a {
  color: #777;
  transition: opacity 0.2s;
}

.series-nav a:first-child::after {
  content: "—";
  margin-left: 16px;
  color: #777;
  pointer-events: none;
}

.series-nav a:hover {
  opacity: 0.5;
}

.series-nav a.active {
  color: #222;
}

.series-nav a[data-year] {
  position: relative;
}

.series-nav a.active[data-year]::before {
  content: attr(data-year);
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #222;
  white-space: nowrap;
}

.series-back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 24px;
  transition: opacity 0.2s;
}

.series-back:hover {
  opacity: 0.5;
}

.series-title {
  margin-bottom: 0;
}

/* Bio Page */
.bio-section {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.bio-text {
  flex: 1;
}

.bio-text p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #444;
}

.bio-portrait {
  flex: 0 0 300px;
}

.bio-portrait {
  padding-top: calc(14px * 1.2 + 40px); /* align with first paragraph: page-title line-height + margin-bottom */
}

.bio-portrait img {
  width: 100%;
}

/* CV Link */
.cv-link {
  margin-top: 50px;
}

.cv-link a {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #222;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.cv-link a:hover {
  opacity: 0.5;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  font-size: 13px;
}

.lang-toggle a {
  padding: 4px 12px;
  border: 1px solid #ddd;
  transition: all 0.2s;
}

.lang-toggle a.active,
.lang-toggle a:hover {
  background: #222;
  color: #fff;
  border-color: #222;
}

.page-title a {
  transition: opacity 0.2s;
}

.page-title a:hover {
  opacity: 0.5;
}

/* Works Page - Series Description */
.series-description {
  max-width: 800px;
  margin-bottom: 50px;
}

.series-description p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  color: #444;
}

.series-description p:last-child {
  margin-bottom: 0;
}

/* Works Page - Series List */
/* Series overview grid */
.series-overview {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 40px;
}

.series-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.series-card-image {
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.series-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.series-card:hover .series-card-image img {
  transform: scale(1.03);
  opacity: 0.85;
}

.series-card-title {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.series-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.series-card.is-highlighted {
  transform: translateY(-4px);
}

.series-card.is-dimmed {
  opacity: 0.35;
}

/* Legacy layout (keep for sub-pages) */
.works-layout {
  display: flex;
  gap: 60px;
}

.series-list {
  flex: 0 0 240px;
}

.series-list a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
  transition: opacity 0.2s;
}

.series-list a:hover,
.series-list a.active {
  opacity: 0.5;
}

.works-gallery {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gemstone-gallery {
  display: block;
  column-count: 2;
  column-gap: 16px;
}

.gemstone-gallery .work-item {
  height: auto;
  overflow: visible;
  display: block;
  margin-bottom: 16px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.gemstone-gallery .work-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.gemstone-gallery .work-item:hover img {
  transform: none;
}

.work-item {
  overflow: hidden;
  cursor: pointer;
}

.work-item img {
  width: 100%;
  transition: transform 0.4s ease;
}

.publications-section .work-item img {
  box-shadow: var(--publication-book-shadow);
}

.publications-section .publication-pair-images img {
  box-shadow: var(--publication-book-shadow);
}

.publications-section .work-item:hover img {
  transform: none;
}

.press-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.press-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.press-item:first-child {
  border-top: 1px solid #eee;
}

.press-item:hover {
  opacity: 0.7;
}

.press-date {
  flex: 0 0 72px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #666;
}

.press-title {
  font-size: 13px;
  line-height: 1.55;
  color: #444;
}

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

.work-info {
  padding: 10px 0;
  font-size: 12px;
  color: #888;
}

.publications-section .work-info {
  margin: 0;
  padding: 12px 0 0;
  line-height: 1.55;
}

/* Exhibitions Page */
.exhibitions-section {
  margin-bottom: 60px;
}

.exhibitions-section h2 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.exhibition-entry {
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

.exhibition-year {
  font-weight: 600;
  color: #222;
  margin-right: 12px;
}

/* Contact Page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.contact-item h3 {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: #222;
}

.contact-item p {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

.contact-item a {
  transition: opacity 0.2s;
}

.contact-item a:hover {
  opacity: 0.5;
}

/* --- Lightbox (for viewing artworks) --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.lightbox-info {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #aaa;
  font-size: 13px;
  text-align: center;
}

/* Textes Page */
.textes-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  margin-top: 28px;
}

.textes-press-section {
  margin-top: 56px;
}

.textes-list {
  flex: 0 0 300px;
}

.texte-entry {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  line-height: 1.6;
  transition: opacity 0.2s;
  cursor: pointer;
}

.texte-entry:hover {
  opacity: 0.5;
}

.texte-entry.active {
  opacity: 0.5;
}

.texte-meta {
  font-size: 13px;
  color: #888;
}

.texte-content {
  flex: 1;
  min-width: 0;
}

.texte-article p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  color: #444;
}

.texte-article p:last-child {
  margin-bottom: 0;
}

.texte-article blockquote {
  font-size: 15px;
  line-height: 1.8;
  color: #666;
  font-style: italic;
  margin-bottom: 24px;
  padding-left: 20px;
  border-left: 2px solid #ddd;
}

/* --- Footer --- */
.site-footer {
  padding: 40px;
  text-align: center;
  font-size: 12px;
  color: #999;
  letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner {
    padding: 16px 20px;
  }

  .site-title a {
    font-size: 18px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-bottom: 1px solid #eee;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    padding-left: 20px;
    margin-top: 0;
  }

  /* Bio */
  .bio-section {
    flex-direction: column-reverse;
    gap: 30px;
  }

  .bio-portrait {
    flex: none;
    width: 100%;
  }

  /* Works */
  .works-layout {
    flex-direction: column;
    gap: 30px;
  }

  .series-list {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .series-list a {
    border-bottom: none;
    border: 1px solid #eee;
    padding: 6px 14px;
    font-size: 12px;
  }

  .works-gallery {
    grid-template-columns: 1fr;
  }

  .publications-quarter-gallery {
    flex-wrap: wrap;
    gap: 44px;
    --publication-cover-size: min(42vw, 180px);
  }

  .group-publications-gallery {
    gap: 24px;
  }

  .press-item {
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .press-date {
    flex: none;
  }

  .group-publications-gallery .work-item {
    width: calc(min(42vw, 180px) * 0.711);
  }

  .publications-quarter-gallery .work-item {
    width: var(--publication-cover-size);
  }

  .publications-quarter-gallery .publication-main-card {
    width: calc(var(--publication-cover-size) * 0.711);
  }

  .publications-quarter-gallery .publication-pair-card {
    width: calc(var(--publication-cover-size) * 2 + 4px);
  }

  .publications-quarter-gallery .publication-third-card {
    width: var(--publication-cover-size);
  }

  .publication-download {
    width: 26px;
    height: 26px;
    top: -6px;
    right: -32px;
  }

  .gemstone-gallery {
    column-count: 1;
    column-gap: 0;
  }

  .textes-layout {
    flex-direction: column;
    gap: 30px;
  }

  .textes-list {
    flex: none;
  }

  .page-content {
    padding: 100px 20px 60px;
  }
}
