/* Self-hosted Google Fonts (SIL Open Font License) - latin + latin-ext subsets */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/caveat-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/caveat-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("assets/fonts/playfair-display-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("assets/fonts/playfair-display-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 
  Premium UI Styles 
  Inspired by Framer-style portfolios and minimalist tech creator sites 
*/

:root {
    --bg-base: #050505;
    --bg-card: #0d0d0d;
    --bg-card-hover: #141414;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    
    --accent: #ffffff;
    --accent-color: #3b82f6; /* Subtle blue for glows */

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-lg: 32px;
    --radius-md: 24px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle grain overlay for premium texture */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.dot {
    color: var(--accent-color);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text-main);
    color: var(--bg-base);
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
    transform: scale(1.02);
    background: #ffffff;
}

.btn-primary.small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

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

/* Navbar (Floating Pill Style) */
.top-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    z-index: 100;
    padding: 10px 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 100px;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-nav.scrolled {
    top: 16px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 85%;
}

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

.brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.05em;
    padding-left: 4px;
}

.links {
    display: flex;
    gap: 24px;
}

.links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
}

.links a:hover {
    color: var(--text-main);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.claude-gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 10px;
    border-radius: 100px;
    background: rgba(217, 119, 87, 0.12);
    border: 1px solid rgba(217, 119, 87, 0.35);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.claude-gh-btn .claude-logo {
    color: #D97757;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.claude-gh-btn:hover {
    background: rgba(217, 119, 87, 0.22);
    border-color: rgba(217, 119, 87, 0.6);
    transform: translateY(-1px);
}

.claude-gh-btn:hover .claude-logo {
    transform: rotate(45deg);
}

.claude-gh-btn:focus-visible {
    outline: 2px solid #D97757;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .claude-gh-btn {
        padding: 8px;
    }

    .claude-gh-btn span {
        display: none;
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding-right: 8px;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.pill-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-color);
}

.hero-greeting {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: -10px;
    font-weight: 400;
}

.hero-title-name {
    font-size: 6rem;
    font-weight: 800;
    margin-bottom: 0px;
    letter-spacing: -0.05em;
    font-family: 'Playfair Display', Georgia, serif;
}

.hero-role {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    font-family: 'Playfair Display', Georgia, serif;
}

.typewriter {
    color: #eab308;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--text-main);
    animation: blink 1s step-end infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icons a {
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    display: flex;
}

.social-icons a:hover {
    color: var(--text-main);
    transform: translateY(-2px);
}

.hero-right {
    display: flex;
    justify-content: flex-end;
}

.image-container {
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(1.1);
}

/* Base Card Style */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.hover-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.hover-card:hover::after {
    left: 150%;
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 100px;
    align-items: start;
}

.bento-col-left, .bento-col-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bento-services-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bento-about {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bento-about h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.bento-about p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.bento-about strong {
    color: var(--text-main);
}

.bento-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(145deg, var(--bg-card), #111);
    padding: 32px;
}

.bento-stat h3 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.05em;
}

.bento-stat p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.bento-experience h2 {
    font-size: 1.5rem;
    margin-bottom: 32px;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 0;
    width: 1px;
    background: var(--border-hover);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: var(--text-muted);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--bg-card);
}

.timeline-content h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.company {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bento-service {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    padding: 32px;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.bento-service h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.bento-service p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bento-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    gap: 24px;
}

.bento-cta h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* YouTube Section */
.youtube-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .thumbnail img {
    transform: none;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-btn {
    opacity: 1;
}

.video-meta {
    padding: 16px 20px;
}

.video-meta h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-duration {
    display: none !important;
}

/* Footer (Centered style) */
.site-footer {
    padding: 40px 0 60px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-brand h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.footer-nav {
    display: flex;
    gap: 32px;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--text-main);
}

.footer-social {
    display: flex;
    gap: 24px;
}

.footer-social a {
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social a:hover {
    color: var(--text-main);
    transform: translateY(-2px);
}

/* Events Carousel */
.events-carousel-container {
    position: relative;
    width: 100%;
}

.events-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 20px;
}

.events-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    position: relative;
    min-width: 300px;
    height: 380px;
    border-radius: var(--radius-md);
    overflow: hidden;
    scroll-snap-align: start;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.carousel-item:hover img {
    transform: scale(1.08);
}

.carousel-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 32px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: #fff;
    pointer-events: none;
    transform: translateY(10px);
    opacity: 0.9;
    transition: all 0.4s ease;
}

.carousel-item:hover .carousel-text {
    transform: translateY(0);
    opacity: 1;
}

.carousel-text h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.carousel-text p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev-btn {
    left: 24px;
}

.carousel-btn.next-btn {
    right: 24px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 140px;
        text-align: center;
    }
    
    .hero-right {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-col-left, .bento-col-right {
        gap: 24px;
    }
    
    .video-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 110%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 24px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        text-align: center;
        gap: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-greeting {
        font-size: 1.2rem;
    }

    .hero-title-name {
        font-size: 3.5rem;
    }

    .hero-role {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-services-row {
        grid-template-columns: 1fr;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-cta {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .carousel-item {
        min-width: 260px;
        height: 350px;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    .carousel-btn {
        display: none;
    }
}

/* ==========================================================================
   YouTube Playlists & View Switcher Styles
   ========================================================================== */

.view-mode-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.view-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.view-mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.view-mode-btn.active {
    background: var(--text-main);
    color: var(--bg-base);
    border-color: var(--text-main);
}

/* Playlist Card Component */
.playlist-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    text-decoration: none;
    color: inherit;
    position: relative;
    cursor: pointer;
}

.playlist-thumbnail-container {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 14px;
}

/* Stacked Layer Backgrounds (YouTube Stack Effect) */
.playlist-stack-layer-1 {
    position: absolute;
    top: -6px;
    left: 4%;
    right: 4%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 0;
    transition: transform 0.3s ease;
}

.playlist-stack-layer-2 {
    position: absolute;
    top: -11px;
    left: 8%;
    right: 8%;
    height: 100%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: -1;
    transition: transform 0.3s ease;
}

.playlist-card:hover .playlist-stack-layer-1 {
    transform: translateY(-3px);
}

.playlist-card:hover .playlist-stack-layer-2 {
    transform: translateY(-5px);
}

.playlist-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 1;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.playlist-card:hover .playlist-thumbnail,
.playlist-card:focus-visible .playlist-thumbnail {
    border-color: rgba(234, 179, 8, 0.6);
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.2);
}

.playlist-card:focus-visible {
    outline: none;
}

/* Loading placeholder for playlist cards */
.playlist-skeleton .playlist-thumbnail {
    background: rgba(255, 255, 255, 0.05);
    animation: pulse 1.5s infinite ease-in-out;
}

.playlist-skeleton .skeleton-line {
    height: 14px;
    margin-top: 14px;
    width: 70%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

.playlist-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* YouTube Side Overlay for Playlist Count */
.playlist-overlay-side {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    z-index: 2;
    padding: 12px;
    text-align: center;
    backdrop-filter: blur(2px);
}

.playlist-count-num {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.playlist-count-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #eab308;
}

/* Playlist Meta info */
.playlist-meta {
    padding: 14px 0 0 0;
}

.playlist-card h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--text-main);
    transition: color 0.3s;
}

.playlist-card:hover h3 {
    color: #fde047;
}

.playlist-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.playlist-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.btn-play-playlist {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eab308;
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-play-playlist:hover {
    background: #fde047;
    transform: scale(1.05);
}

.btn-view-playlist {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

/* Active Playlist Filter Header Banner */
.active-playlist-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 24px;
    border-radius: 16px;
    margin-bottom: 8px;
    gap: 16px;
    flex-wrap: wrap;
}

.active-playlist-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-playlist-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.clear-playlist-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.clear-playlist-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

/* YouTube Watch Page Style Lightbox Modal Player */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    overflow-y: auto;
}

/* ---------- Watch page: cinema layout ----------
   Big centred video with an ambient glow from its thumbnail, details under it,
   and "More to watch" as a horizontal row of cards. */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: #060607;
    z-index: 10005;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.watch-top-bar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: linear-gradient(180deg, rgba(6, 6, 7, 0.92), rgba(6, 6, 7, 0));
    z-index: 10020;
}

.watch-top-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.watch-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: watchPulse 1.8s ease-in-out infinite;
}

@keyframes watchPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); }
    50% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
}

.watch-top-bar .watch-btn-secondary {
    padding: 8px 10px 8px 14px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.watch-kbd {
    display: inline-block;
    margin-left: 2px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.watch-page-container {
    --watch-w: min(100%, calc((100vh - 200px) * 16 / 9));
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 10010;
}

/* Video + details */
.watch-main-col {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: var(--watch-w);
    min-width: 0;
}

/* Ambient light: a heavily blurred copy of the current thumbnail behind the player
   (the image is set from JS as --watch-ambient) */
.watch-main-col::before {
    content: '';
    position: absolute;
    left: -2%;
    right: -2%;
    top: -2%;
    aspect-ratio: 16 / 9;
    background: var(--watch-ambient, radial-gradient(circle, rgba(234, 179, 8, 0.35), transparent 70%)) center / cover no-repeat;
    filter: blur(70px) saturate(1.5);
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
    transition: background-image 0.6s ease;
}

.watch-player-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95);
    position: relative;
}

.watch-player-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.watch-video-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.watch-title {
    font-size: clamp(1.35rem, 2.1vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.watch-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px 24px;
    flex-wrap: wrap;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.watch-channel-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.watch-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 0;
    box-shadow: 0 0 0 2px #060607, 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.watch-channel-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
}

.watch-channel-sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.watch-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.watch-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    color: #0a0a0a;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.watch-btn-primary svg {
    color: #ef4444;
}

.watch-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -10px rgba(255, 255, 255, 0.45);
}

.watch-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.watch-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.2);
}

/* "More to watch" row */
.watch-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: var(--watch-w);
    min-width: 0;
    background: none;
    border: 0;
    padding: 0;
    position: static;
    max-height: none;
}

.watch-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0;
    border: 0;
}

.watch-sidebar-tabs {
    display: flex;
}

.watch-tab {
    background: none;
    border: 0;
    padding: 0;
    color: #fff;
    font: inherit;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: default;
}

.watch-tab.active {
    background: none;
    color: #fff;
}

.playlist-sidebar-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.playlist-sidebar-list {
    display: flex;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    padding: 6px 2px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
    mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.playlist-sidebar-list::-webkit-scrollbar {
    height: 6px;
}

.playlist-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.playlist-sidebar-item {
    flex: 0 0 264px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.25s ease;
}

.playlist-sidebar-item:hover,
.playlist-sidebar-item:focus-visible {
    transform: translateY(-4px);
    background: none;
}

.playlist-item-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #111;
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.9);
    transition: box-shadow 0.25s ease;
}

.playlist-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.playlist-sidebar-item:hover .playlist-item-thumb {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 20px 40px -14px rgba(0, 0, 0, 0.9);
}

.playlist-sidebar-item:hover .playlist-item-thumb img {
    transform: scale(1.06);
}

/* The video that's playing (playlist mode) */
.playlist-sidebar-item.active .playlist-item-thumb {
    box-shadow: 0 0 0 2px #eab308, 0 20px 40px -14px rgba(0, 0, 0, 0.9);
}

.playlist-sidebar-item.active .playlist-item-thumb::after {
    content: 'Now playing';
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 6px;
    background: #eab308;
    color: #0a0a0a;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.playlist-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 0 2px;
}

.playlist-item-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-sidebar-item:hover .playlist-item-title {
    color: #fff;
}

.playlist-sidebar-item.active .playlist-item-title {
    color: #eab308;
}

.playlist-item-duration {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.playlist-item-duration:empty {
    display: none;
}

/* Topic / length / date line above the title */
.watch-eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: -6px;
}

.watch-eyebrow[hidden],
.watch-about[hidden] {
    display: none;
}

.watch-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.watch-chip-accent {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.3);
    color: #facc15;
    letter-spacing: 0.02em;
}

/* About this video */
.watch-about {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.watch-about-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.watch-about-text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 80ch;
}

/* Header tools: counter + scroll arrows */
.watch-row-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.watch-row-tools .playlist-sidebar-counter {
    margin-right: 6px;
}

.watch-row-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.watch-row-btn:hover:not(:disabled) {
    background: #fff;
    color: #0a0a0a;
    transform: scale(1.06);
}

.watch-row-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Length badge on each card's thumbnail */
.playlist-item-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 1;
}

/* Play button that appears on hover */
.playlist-item-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='white'/%3E%3Cpath d='M9.5 7.5v9l7-4.5z' fill='%230a0a0a'/%3E%3C/svg%3E") center / 46px no-repeat,
        rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1;
}

.playlist-sidebar-item:hover .playlist-item-thumb::before,
.playlist-sidebar-item:focus-visible .playlist-item-thumb::before {
    opacity: 1;
    transform: scale(1);
}

/* Fade the page in when the player opens */
@keyframes watchRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.lightbox-modal.active .watch-main-col {
    animation: watchRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.lightbox-modal.active .watch-sidebar-col {
    animation: watchRise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both;
}

@media (max-width: 640px) {
    .watch-row-btn {
        display: none;
    }
    .watch-about {
        padding: 14px 16px;
    }
}

/* "Grab the resources" button */
.watch-btn-grab {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    background: #fff;
    color: #0a0a0a;
    box-shadow: 0 10px 30px -12px rgba(255, 255, 255, 0.45);
}

.watch-btn-grab:hover {
    background: #fff;
    box-shadow: 0 14px 34px -10px rgba(255, 255, 255, 0.6);
}

.watch-btn-grab svg {
    color: #0a0a0a;
}

.watch-btn-grab[hidden],
.watch-actions-bar .watch-btn-grab[hidden] {
    display: none;
}

/* Resources block flashes when "Grab the resources" is clicked */
@keyframes watchFlash {
    0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
    25% { box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.7); }
    100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

.watch-presentations.is-flash {
    border-radius: 14px;
    animation: watchFlash 1.4s ease-out;
}

/* The resources box takes its own card slot at the start of the row */
.playlist-sidebar-list > .video-resources {
    flex: 0 0 280px;
    align-self: flex-start;
}

/* ---------- Wide screens: video + details panel side by side ----------
   Everything that matters fits on one screen: the video, the title and
   buttons beside it, and the top of the "More to watch" row underneath. */
@media (min-width: 1101px) {
    .watch-top-bar {
        padding: 10px 28px;
    }

    .watch-page-container {
        --panel-w: clamp(320px, 24vw, 400px);
        /* Player is limited by both the screen width and the screen height */
        --player-w: min(calc(100vw - 64px - var(--panel-w) - 32px - 12px), calc((100vh - 250px) * 16 / 9));
        --watch-w: calc(var(--player-w) + 32px + var(--panel-w));
        gap: 30px;
        padding-top: 4px;
    }

    .watch-main-col {
        display: grid;
        grid-template-columns: var(--player-w) var(--panel-w);
        gap: 32px;
        align-items: start;
    }

    /* Details panel: same height as the video, scrolls inside if it's long */
    .watch-video-details {
        gap: 18px;
        max-height: calc(var(--player-w) * 9 / 16);
        overflow-y: auto;
        padding: 4px 6px 4px 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    }

    .watch-eyebrow {
        margin-bottom: -4px;
    }

    .watch-title {
        font-size: clamp(1.3rem, 1.55vw, 1.75rem);
        line-height: 1.25;
    }

    .watch-meta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 0;
        border: 0;
    }

    .watch-actions-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .watch-actions-bar .watch-btn-primary {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-content: center;
        padding: 14px 22px;
        font-size: 0.95rem;
    }

    .watch-actions-bar .watch-btn-secondary {
        justify-content: center;
    }

    /* Copy link spans the row unless Previous / Next are showing */
    .watch-actions-bar #btnCopyLink {
        grid-column: 1 / -1;
    }

    .watch-actions-bar #btnPrev:not([hidden]) ~ #btnCopyLink {
        grid-column: 1 / -1;
    }

    .watch-about {
        padding: 16px 18px;
    }

    .watch-about-text {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Glow sits behind the video only */
    .watch-main-col::before {
        left: -2%;
        right: auto;
        width: calc(var(--player-w) * 1.04);
    }
}

@media (max-width: 1100px) {
    .watch-page-container {
        --watch-w: 100%;
        padding: 0 16px 40px;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .watch-top-bar {
        padding: 10px 16px;
    }
    .watch-player-frame {
        border-radius: 14px;
    }
    .watch-actions-bar {
        width: 100%;
    }
    .watch-actions-bar .watch-btn-primary {
        flex: 1;
        justify-content: center;
    }
    .playlist-sidebar-item {
        flex-basis: 220px;
    }
}

.video-resources {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.3);
    flex-shrink: 0;
}

.video-resources-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #eab308;
}

.video-resource-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    word-break: break-word;
}

.video-resource-link svg {
    flex-shrink: 0;
    color: #eab308;
}

.video-resource-link:hover,
.video-resource-link:focus-visible {
    color: #eab308;
    text-decoration: underline;
}

/* Slides for this video (watch page): a quiet block with one clear button */
.watch-presentations {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.watch-presentations[hidden] {
    display: none;
}

.wp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.wp-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.wp-copy {
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.wp-copy:hover {
    color: var(--text-main);
}

.wp-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wp-row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.wp-thumb {
    position: relative;
    flex-shrink: 0;
    width: 150px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    border: 1px solid var(--border-color);
}

.wp-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-thumb iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 720px;
    max-width: none;
    border: 0;
    transform-origin: 0 0;
    pointer-events: none;
    background: #fff;
}

.wp-text {
    min-width: 0;
}

.wp-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.wp-row:hover .wp-title {
    color: #eab308;
}

.wp-desc {
    margin-top: 4px;
    font-size: 0.88rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wp-addr {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.wp-open:hover,
.wp-open:focus-visible {
    background: #f4f4f5;
    border-color: #f4f4f5;
    color: #09090b;
}

/* Links and files in the same Resources area */
.wp-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.wp-link:hover,
.wp-link:focus-visible {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.03);
}

.wp-link-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.wp-link .wp-text {
    flex: 1;
}

.wp-link .wp-title {
    font-size: 1rem;
}

.wp-go {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.wp-link:hover .wp-go {
    color: #eab308;
}

@media (max-width: 640px) {
    .wp-thumb {
        width: 112px;
    }
}

.resources-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lightbox-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 16px;
    z-index: 10010;
}

.lightbox-action-btn {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}




/* ==========================================================================
   UX Polish: shared utilities, accessibility & interaction states
   ========================================================================== */

::selection {
    background: rgba(234, 179, 8, 0.35);
    color: #fff;
}

/* Headline accents used across pages */
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.text-glow,
.text-glow-gradient {
    background: linear-gradient(120deg, #fde047 0%, #eab308 45%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.badge.pill {
    color: var(--text-muted);
}

/* Current page indicator in the navbar */
.links a {
    position: relative;
}

.links a.active {
    color: var(--text-main);
}

.links a.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #eab308;
    transform: translateX(-50%);
}

/* Hamburger turns into a close icon while the menu is open */
.menu-toggle svg line {
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: 12px 12px;
}

.links.active ~ .menu-toggle line:nth-child(1) {
    opacity: 0;
}

.links.active ~ .menu-toggle line:nth-child(2) {
    transform: translateY(6px) rotate(45deg);
}

.links.active ~ .menu-toggle line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Visible keyboard focus everywhere, invisible for mouse users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 3px;
    border-radius: 8px;
}

.btn-primary:focus-visible {
    border-radius: 100px;
}

/* Comfortable tap targets for icon links */
.social-icons a,
.footer-social a {
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-icons {
    gap: 8px;
}

.social-icons a:hover,
.footer-social a:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Video cards: clearer hover feedback */
.video-card .video-meta h3 {
    transition: color 0.2s;
}

.video-card:hover .video-meta h3 {
    color: #fde047;
}

.video-card:focus-visible .play-btn {
    opacity: 1;
}

/* Carousel arrows fade out at the ends */
.carousel-btn[disabled] {
    opacity: 0;
    pointer-events: none;
}

/* Inline form feedback (replaces alert popups) */
.form-error {
    display: none;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.9rem;
}

.form-error.visible {
    display: block;
}

.btn-primary[disabled] {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

button.btn-primary {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Hover lift only on devices that actually hover (avoids sticky states on touch) */
@media (hover: none) {
    .hover-card:hover {
        transform: none;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .top-nav,
    .top-nav.scrolled {
        width: calc(100% - 32px);
        top: 12px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .card {
        padding: 28px;
    }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cursor {
        display: none;
    }
}

/* Keep the closed video player out of the keyboard tab order */
.lightbox-modal {
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-modal.active {
    visibility: visible;
}

/* ==========================================================================
   Mobile & responsive refinements (shared by every page)
   ========================================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
video,
iframe {
    max-width: 100%;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    /* 44px hamburger tap target */
    .menu-toggle {
        display: flex;
        margin-right: -6px;
    }

    .top-nav {
        padding: 6px 12px 6px 16px;
    }

    /* Dropdown menu: full-height tap rows */
    .links {
        gap: 4px;
        padding: 16px;
    }

    .links a {
        padding: 12px 0;
    }

    .links a.active::after {
        bottom: 6px;
    }

    /* Footer links in a compact wrapped row with real tap areas */
    .footer-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0 4px;
    }

    .footer-nav a {
        display: inline-block;
        padding: 12px 10px;
    }

    .footer-centered-content {
        gap: 20px;
        padding: 0 16px;
    }

    .site-footer {
        padding: 24px 0 40px;
    }

    .link-btn {
        padding: 10px 0;
    }

    /* Tighter vertical rhythm on small screens */
    .hero {
        gap: 32px;
        padding-bottom: 48px;
    }

    .bento-grid {
        margin-bottom: 64px;
        gap: 16px;
    }

    .bento-col-left,
    .bento-col-right,
    .bento-services-row {
        gap: 16px;
    }

    #events {
        margin-bottom: 64px !important;
    }

    .section-header {
        margin-bottom: 24px;
    }

    .main-container {
        padding: 0 16px;
    }

    /* Buttons that wrap stay readable */
    .btn-primary {
        text-align: center;
        line-height: 1.3;
    }

    /* Inputs at 16px stop iOS Safari from zooming in on focus */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Bigger touch area for range sliders */
    input[type="range"] {
        height: 32px;
    }
}

@media (max-width: 400px) {
    .hero-title-name {
        font-size: 3rem;
    }

    .hero-role {
        font-size: 1.75rem;
    }

    .card {
        padding: 24px;
    }

    .carousel-item {
        min-width: 240px;
        height: 320px;
    }
}

/* Mobile dropdown menu: solid enough to read over page content */
@media (max-width: 768px) {
    .links {
        background: #0e0e10;
        /* A blur nested inside the navbar's own blur renders see-through in Chrome */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* Performance: the full-screen SVG noise filter is costly to paint on phones
   and is only 3% opaque, so skip it on small / touch screens */
@media (max-width: 768px), (hover: none) {
    .grain-overlay {
        display: none;
    }
}

/* Keep the navbar compact on small laptops and tablets */
@media (min-width: 769px) and (max-width: 1150px) {
    .links { gap: 14px; }
    .links a { font-size: 0.82rem; }
    .brand { font-size: 1rem; }
}

/* Slightly smaller type across the site (15px base instead of 16px).
   Sizes here are in rem, so text scales evenly while spacing stays the same. */
html { font-size: 93.75%; }
