:root {
  --bg: #ffffff;
  --surface: #fffdf8;
  --text: #000000;
  --muted: #52606d;
  --accent: #000000;
  --accent-contrast: #212222;
  --border: #d9e2ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
}

.layout {
  height: 100vh;
  display: grid;
  grid-template-columns: 40% 60%;
}

.left-column {
  height: 100vh;
  overflow-y: auto;
  padding: 1rem 0;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  scrollbar-width: none;
  border-right: 1px solid #000000;
}

.left-column::-webkit-scrollbar {
  display: none;
}

.right-column {
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem;
  scrollbar-width: none;
}

.right-column::-webkit-scrollbar {
  display: none;
}

.wiki-panel {
  max-width: 920px;
  margin: 0 auto;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  padding: 1rem 1.25rem;
}

.wiki-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.wiki-status {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.wiki-article {
  line-height: 1.55;
}

.wiki-article img {
  max-width: 100%;
  height: auto;
}

.wiki-article .infobox {
  max-width: 320px;
  float: right;
  margin: 0 0 1rem 1rem;
}

.site-header,
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
}

.site-header h1 {
  margin: 0;
  letter-spacing: 0.02em;
}

.site-header p,
.site-footer {
  color: var(--muted);
}

.container {
  width: min(900px, 92%);
  margin: 2rem auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
}

.btn:hover {
  filter: brightness(1.06);
}

code {
  background: #eef2f7;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}


.logo-wrap {
  width: 50%;
  margin: 1em auto;
  display: block;
  cursor: pointer;
}

.logo-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.smoke-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}

.music-player {
  width: 100%;
  margin: 0;
  padding: 0 1rem;
  box-sizing: border-box;
}

.player-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, var(--text));
  margin: 0 0 0.3rem;
  opacity: 0.6;
}

.music-player iframe {
  width: 400px;
  height: 42px;
  border: 0;
}

.instrument-description {
  width: 95%;
  text-align: justify;
  padding: 1rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.instrument-description p {
  margin: 0.75rem 0;
}

.instrument-description a {
  color: var(--text) !important;
  text-decoration: none;
  font-weight: bold;
}

.instrument-description a:hover {
  font-weight: normal;
}

.video-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.playlist-container {
  width: 95%;
  position: relative;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.playlist-container .video-poster,
.playlist-container .video-embed {
  aspect-ratio: 16 / 9;
}

.playlist-caption {
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.playlist-caption a {
  color: inherit;
  text-decoration: none;
}

.playlist-caption a:hover {
  color: #000000;
}

.video-embed,
.video-poster {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

.video-poster {
  display: block;
  position: relative;
  padding: 0;
  cursor: pointer;
  background-color: #111;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.video-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
}

.video-poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 46px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.video-poster-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.video-poster:hover .video-poster-play {
  background: rgba(255, 0, 0, 0.92);
}

.instagram-gallery {
  width: 95%;
  max-width: 100%;
  margin: 0 auto;
}

.instagram-label {
  display: block;
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.instagram-label:hover {
  color: #000000;
}

.gallery-title {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.instagram-gallery .elfsight-app-REPLACE_WITH_YOUR_WIDGET_ID {
  width: 100%;
  min-height: 460px;
}

/* Instagram feed grid */
.insta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.insta-post {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee;
  text-decoration: none;
  cursor: pointer;
}

.insta-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.insta-post:hover img {
  transform: scale(1.04);
}

.insta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.5rem;
  transition: background 0.25s ease;
  pointer-events: none;
}

.insta-post:hover .insta-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.insta-caption,
.insta-date {
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.insta-post:hover .insta-caption,
.insta-post:hover .insta-date {
  opacity: 1;
  transform: translateY(0);
}

.insta-date {
  font-size: 0.6rem;
  opacity: 0;
  margin-top: 2px;
  color: #ccc;
}

.insta-post:hover .insta-date {
  opacity: 0.8;
}

.insta-error {
  font-size: 0.85rem;
  color: #888;
  text-align: center;
  padding: 1rem 0;
}

.side-nav {
  width: 95%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 2rem;
}

.nav-label {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.nav-label:hover {
  color: #000000;
}

@keyframes slideOutBlur {
  0% {
    opacity: 1;
    filter: blur(0);
  }
  40% {
    filter: blur(5px);
  }
  100% {
    opacity: 0;
    filter: blur(8px);
  }
}

@keyframes slideInFromBlur {
  0% {
    opacity: 0;
    filter: blur(8px);
  }
  60% {
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

@media (max-width: 900px) {
  body {
    height: auto;
    overflow: auto;
  }

  .layout {
    height: auto;
    grid-template-columns: 1fr;
  }

  .left-column {
    height: auto;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .right-column {
    height: auto;
    overflow-y: visible;
  }

  .wiki-panel {
    padding: 0.9rem;
  }

  .wiki-article .infobox {
    float: none;
    margin: 0 0 1rem;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.instrument-photo {
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
}

.instrument-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.instrument-photo figcaption {
  text-align: center;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.instrument-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}

.instrument-table td {
  padding: 0.075rem 0.5rem 0.075rem 0;
  vertical-align: top;
  line-height: 1.2;
}

.instrument-entry a {
  text-align: left;
}

.instrument-table td:first-child {
  width: 6rem;
  white-space: nowrap;
  color: var(--muted);
  padding-right: 1rem;
  font-weight: 500;
}

.spinning-wheel {
  width: 160px;
  height: 160px;
  margin: 0 auto 2rem;
  animation: spin-slow 60s linear infinite reverse;
}

/* Flame animation link */
.flame-link {
  display: block;
  width: 10.5ch;
  opacity: 0.1;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.flame-link:hover {
  opacity: 0.8;
}

#flame-anim {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
}
