/* Albert Dupuis — site stylesheet */

:root {
  --bg: #ffffff;
  --panel-bg: #e9e7e2;
  --text: #1a1a1a;
  --text-soft: #333333;
  --accent: #8a6d23;
  --border: #d8d5cd;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

/* Entrance effect — images zoom in from smaller to full size when the page first opens */
@keyframes imgEnter {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.article figure img,
.gallery-row img,
.card img,
.card .no-cover,
.video-card__frame {
  animation: imgEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Home page hero photo — slides in from outside the browser frame on the right */
@keyframes heroSlideIn {
  from { opacity: 0; transform: translateX(100vw); }
  to { opacity: 1; transform: translateX(0); }
}
.hero img {
  animation: heroSlideIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html, body { overflow-x: hidden; }

/* Floating mini Spotify player — as small as Spotify's embed allows (80px is its floor) */
.mini-player {
  position: fixed;
  right: 14px;
  top: 14px;
  width: 320px;
  max-width: calc(100vw - 24px);
  z-index: 1000;
  border-radius: 12px;
  overflow: hidden;
  background: #121212;
  box-shadow: 0 10px 26px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mini-player iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
}
.mini-player.is-collapsed {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.mini-player.is-collapsed iframe { display: none; }
.mini-player__toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 11px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}
@media (max-width: 480px) {
  .mini-player { right: 8px; width: calc(100vw - 16px); }
}

/* Site search */
.site-search {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  position: relative;
}
.site-search__input {
  width: 110px;
  font-size: 0.85rem;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-bg);
  color: var(--text);
  outline: none;
  transition: width 0.2s ease, border-color 0.2s ease;
}
.site-search__input:focus {
  width: 160px;
  border-color: var(--accent);
}
.site-search__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  padding: 2px;
}
.site-search__btn svg { width: 16px; height: 16px; }
.site-search__status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.site-search__status[hidden] { display: none; }
.site-search__next,
.site-search__clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85rem;
  padding: 0 2px;
  line-height: 1;
}
.site-search__clear { color: #999; font-size: 1rem; }
@media (max-width: 760px) {
  .site-search { margin-left: 0; width: 100%; order: 99; }
  .site-search__input { width: 100%; }
  .site-search__input:focus { width: 100%; }
}

mark.search-hit {
  background: #ffe58a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
mark.search-hit.search-hit--active {
  background: #f5a623;
  box-shadow: 0 0 0 2px #f5a623;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-logo {
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 400;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text);
  font-size: 0.98rem;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  text-decoration: none;
  border-bottom-color: var(--text);
}
.site-nav a.active {
  border-bottom-color: var(--text);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
}
.lang-switcher a {
  color: #888;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-switcher a:hover {
  text-decoration: none;
  color: var(--text);
  background: var(--panel-bg);
}
.lang-switcher a.active {
  color: #fff;
  background: var(--accent);
}
@media (max-width: 760px) {
  .lang-switcher { padding-left: 0; margin-left: 0; border-left: none; }
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 10px;
}
.social-icons a {
  color: var(--text);
  display: inline-flex;
}
.social-icons svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hero (home page) */
.hero {
  background: var(--panel-bg);
  padding: 60px 0;
}
.hero__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  color: var(--accent);
  font-size: 4rem;
  font-weight: 400;
  margin: 0 0 18px;
}
.hero p {
  margin: 10px 0;
  font-size: 1.05rem;
}
.hero .lead {
  font-size: 1.1rem;
  margin-bottom: 22px;
}
.hero__media {
  position: relative;
}
.hero__media::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  opacity: 0.35;
  z-index: 0;
}
.hero img {
  position: relative;
  z-index: 1;
  border-radius: 6px;
  width: 100%;
  height: auto;
  box-shadow: 0 24px 55px rgba(0,0,0,0.2), 0 0 0 8px #ffffff;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}
.hero img:hover {
  transform: scale(1.015) translateY(-2px);
  box-shadow: 0 32px 65px rgba(0,0,0,0.26), 0 0 0 8px #ffffff;
}

/* Page header */
.page-header {
  padding-top: 50px;
  padding-bottom: 10px;
}
.page-header h1 {
  color: var(--accent);
  font-weight: 400;
  font-size: 2.6rem;
  margin: 0;
}

/* Article / long-form text */
.article {
  padding-top: 20px;
  padding-bottom: 70px;
  max-width: 900px;
  margin: 0 auto;
}
.article p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-soft);
  margin: 0 0 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: 0 3px 10px rgba(20,16,4,0.05), 0 10px 26px rgba(20,16,4,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.article p:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(20,16,4,0.08), 0 18px 34px rgba(20,16,4,0.1);
  border-color: var(--accent);
}
.article p strong { color: var(--text); }
.article .credit {
  font-family: Georgia, serif;
  font-style: italic;
  color: #666;
  margin-bottom: 30px;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.article .credit:hover {
  transform: none;
  box-shadow: none;
}

/* Back to top button */
.back-to-top-wrap {
  text-align: center;
  margin-top: 12px;
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(138,109,35,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.back-to-top:hover {
  color: #fff;
  text-decoration: none;
  background: #6f5819;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(138,109,35,0.4);
}

/* Simple content pages */
.content {
  padding-top: 20px;
  padding-bottom: 70px;
}
.content p {
  font-size: 1.05rem;
  margin: 0 0 16px;
  max-width: 900px;
}
.content a.link-line {
  display: inline-block;
  margin-bottom: 34px;
  font-size: 1.05rem;
}

/* Cards grid (scores) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 30px;
}
.card {
  display: block;
}
.card img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #f4f4f2;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 30px rgba(0,0,0,0.16);
}
.card span {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.card .no-cover {
  width: 100%;
  height: 300px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f4f4f2;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover .no-cover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.16);
}
.card .no-cover em {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--accent);
  font-style: normal;
}

/* Recordings — per-work embed blocks (Spotify / Apple Music / Youtube) */
.rec-work {
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}
.rec-work:first-child { padding-top: 0; }
.rec-work__title {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  margin: 0 0 18px;
  text-align: center;
}
.rec-embeds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.rec-embed {
  flex: 1 1 300px;
  min-width: 260px;
  max-width: 380px;
}
.rec-embed__frame {
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: 4px;
}
@media (max-width: 760px) {
  .rec-embed { max-width: 100%; }
}

/* Gallery — justified rows replicating the original site's layout exactly:
   same order, same relative proportions per row (flex-grow = original
   rendered width in px), so every photo keeps its true, uncropped shape. */
.gallery-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 8px;
}
.gallery-row:first-child { margin-top: 20px; }
.gallery-row figure {
  margin: 0;
  flex-shrink: 1;
  flex-basis: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-row figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.18);
}
.gallery-row img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
}
@media (max-width: 760px) {
  .gallery-row {
    display: block;
    column-count: 2;
    column-gap: 8px;
    margin-top: 8px;
  }
  .gallery-row:first-child { margin-top: 20px; }
  .gallery-row figure {
    display: inline-block;
    width: 100%;
    margin: 0 0 8px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }
}

/* Inline figure inside article text (biography) */
.article figure {
  margin: 30px auto;
  max-width: 480px;
  background: none;
  box-shadow: none;
  border: none;
  padding: 0;
}
.article figure:hover {
  transform: none;
  box-shadow: none;
}
.article figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.article figure img:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 18px 34px rgba(0,0,0,0.2);
}
.article figure figcaption {
  margin-top: 8px;
  font-size: 0.88rem;
  color: #666;
  font-style: italic;
}

/* Youtube — embedded video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 30px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  justify-items: center;
}
.video-card {
  width: 100%;
  max-width: 420px;
}
.video-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0,0,0,0.14);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover .video-card__frame {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.22);
}
.video-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-card__title {
  margin-top: 12px;
  font-size: 0.98rem;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.4;
}

/* Competition numbered list */
.numbered {
  list-style: none;
  counter-reset: item;
  padding: 0;
  margin: 24px auto 0;
  max-width: 900px;
}
.numbered li {
  counter-increment: item;
  position: relative;
  padding: 0 0 20px 40px;
  font-size: 1.02rem;
}
.numbered li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 600;
}

/* Works catalogue — transcribed text */
.catalog {
  margin: 20px auto 0;
  max-width: 900px;
}
.catalog-section {
  margin-top: 38px;
}
.catalog-section:first-child { margin-top: 0; }
.catalog-section h2 {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin: 0 0 14px;
}
.catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.catalog-list > li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0;
  border-bottom: 1px solid #f0efe9;
  font-size: 0.96rem;
  line-height: 1.55;
}
.catalog-list .work { flex: 1; min-width: 0; }
.catalog-list .work .title { font-style: italic; color: var(--text); }
.catalog-list .pub {
  flex: 0 0 auto;
  color: #999;
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
  padding-top: 2px;
}
.catalog-sub {
  list-style: none;
  counter-reset: sub;
  margin: 4px 0 2px 18px;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.catalog-sub li {
  counter-increment: sub;
  position: relative;
  padding-left: 20px;
}
.catalog-sub li::before {
  content: counter(sub) ")";
  position: absolute;
  left: 0;
  color: #aaa;
}
.catalog-source {
  margin-top: 30px;
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
}
@media (max-width: 640px) {
  .catalog-list > li { flex-direction: column; gap: 2px; }
  .catalog-list .pub { text-align: left; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* Mobile */
@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.6rem; }
  .site-nav { gap: 12px 16px; }
  .page-header h1 { font-size: 2rem; }
}
