#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#splash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%); /* Safari */
    z-index: 0;
    /* Start as a circle big enough to cover the screen */
    clip-path: circle(150% at 50% 50%);
    transition: clip-path 1.2s cubic-bezier(0.7, 0, 0.3, 1);
    will-change: clip-path, backdrop-filter;
}

/* Hint text on splash */
#splash-hint {
    z-index: 1;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
#splash-hint .hint-title { font-size: 1.1rem; font-weight: 600; }
#splash-hint .hint-sub { font-size: 0.95rem; color: rgba(255,255,255,0.85); margin-top: 4px; }

#splash-overlay.animate-out {
    clip-path: circle(0% at 50% 50%);
}

#enter-button {
    background: var(--background-color);
    border: 3px solid var(--accent-color);
    color: var(--accent-color);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 40px;
    z-index: 1;
    padding-left: 10px;
    transition: opacity 0.5s ease-out, transform 0.5s ease;
}

#enter-button.hidden {
    opacity: 0;
    transform: scale(0.5);
}

#audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(13, 17, 23, 0.8);
    padding: 10px 15px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: opacity 0.5s ease-in-out;
}

#audio-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

#mute-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
}

#mute-button svg {
    width: 100%;
    height: 100%;
    fill: white;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: #444;
    outline: none;
    border-radius: 2px;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
}

#volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}


.social-links {
    margin-top: calc(var(--spacing-unit) * 1.5);
    display: flex;
    gap: 25px;
    justify-content: center;
}

.social-links a {
    color: var(--secondary-color);
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.social-links svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}


.me-photo img {
    display: block;
    width: 25vmin;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}


.background-gigachad {
    position: fixed;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
    width: 250px;
    height: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.background-gigachad.right {
    display: none;
}


@media (min-width: 768px) {
    .social-links {
        justify-content: flex-start;
    }
}

/* Switch from one to two gigachads when aspect ratio passes 1x1 (square) */
@media (min-aspect-ratio: 1/1) {
    /* Landscape or wider than square: show two */
    .background-gigachad {
        width: 300px;
    }
    .background-gigachad.left {
        left: 20px;
        transform: none;
    }
    .background-gigachad.right {
        display: block;
        left: auto;
        right: 20px;
        transform: scaleX(-1);
    }
}

@media (max-aspect-ratio: 1/1) {
    /* Portrait or narrower than square: show one centered */
    .background-gigachad {
        left: 50%;
        transform: translateX(-50%);
    }
    .background-gigachad.right { display: none; }
}

/* === Compact audio controls tweaks === */
#audio-controls { display: flex; align-items: center; gap: 10px; }
.current-track { flex: 1 1 auto; min-width: 0; }

/* Clamp title to two lines with ellipsis */
.track-clip {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
@media (max-width: 380px) {
    .track-clip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Bigger, tappable mute button on mobile */
#mute-button.icon-button {
    width: 44px; height: 44px; padding: 8px; border-radius: 999px;
    background: rgba(255,255,255,0.06);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#mute-button.icon-button svg { width: 22px; height: 22px; }
@media (pointer: coarse) and (max-width: 480px) {
    #mute-button.icon-button { width: 48px; height: 48px; padding: 10px; }
    #mute-button.icon-button svg { width: 24px; height: 24px; }
}

/* Optional: shorter slider on small screens to free space */
@media (max-width: 480px) { #volume-slider { max-width: 38vw; } }

/* Optional marquee-on-touch */
.track-marquee { white-space: nowrap; overflow: hidden; }
.track-marquee .scroll { display: inline-block; padding-left: 100%; animation: track-scroll 12s linear infinite; }
@keyframes track-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* About page header row: image aligned with title, single underline under both */
.about-block { width: 100%; }
.about-header-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 14px;
}
.about-title {
    margin: 0;
    line-height: 1.15;
}
.instructor-section {
    max-width: 1000px;
}

/* Books */
.books-section { margin: 48px 0; }
.section-title { margin: 0 0 16px 0; font-size: 1.5rem; }
.books-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px;
}
.book-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; }
.book-card a { display: grid; gap: 8px; padding: 10px; color: inherit; text-decoration: none; height: 100%; }
.book-cover { width: 100%; aspect-ratio: 3 / 4; background: rgba(255,255,255,0.04); border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #111, #1a1f2e);
  color: #cbd5e1; font-weight: 700; font-size: 3rem;
  letter-spacing: 0.03em; position: relative;
}
.book-cover-fallback::after {
  content: attr(data-ext);
  position: absolute; bottom: 6px; right: 6px;
  font-size: 0.7rem; opacity: 0.7; background: rgba(0,0,0,0.4);
  border-radius: 4px; padding: 2px 6px;
}
.book-title { font-size: 0.95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 480px) {
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .book-cover-fallback { font-size: 2.4rem; }
}

.section {
    padding-top: calc(var(--spacing-unit) * 3);
    padding-bottom: calc(var(--spacing-unit) * 3);
}
