/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* General Reset */
html {
    min-height: 100%;
    height: 100%;
    background: linear-gradient(135deg,#161b22 0%, #32414f 50%, #445a6d 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #e5e7eb;
    background: transparent;
}

header {
    background: rgba(50, 63, 75, 0.98);
    padding: 1.2rem 2rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: #e5e7eb;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    bottom: -4px;
}

nav a:hover {
    color: #fbbf24;
}

nav a:hover::after {
    width: 100%;
}

/* Hero Header Styles */
.hero-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 28vh; /* was 60vh */
    margin: 0; /* negative bottom margin to pull up next section */
    z-index: 20;
    position: relative;
    animation: heroSlideDown 1.2s cubic-bezier(.77,0,.18,1) 0.1s both;
}

@keyframes heroSlideDown {
    0% { opacity: 0; transform: translateY(-60px) scale(0.95);}
    80% { opacity: 1; transform: translateY(8px) scale(1.04);}
    100% { opacity: 1; transform: translateY(0) scale(1);}
}

.main-title {
    font-size: clamp(3.5rem, 10vw, 8.5rem);
    font-weight: 900;
    letter-spacing: 2.5px;
    text-align: center;
    margin: 0;
    line-height: 1.05;
    position: relative;
    color: #fbbf24;
    filter: drop-shadow(0 0 12px #fbbf2477) drop-shadow(0 2px 8px #fbbf2444);
    animation: popIn 1.2s cubic-bezier(.77,0,.18,1) 0.2s both, floatTitle 7s ease-in-out infinite alternate;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8) translateY(-40px);}
    80% { opacity: 1; transform: scale(1.08) translateY(0);}
    100% { opacity: 1; transform: scale(1) translateY(0);}
}

@keyframes floatTitle {
    0% { transform: translateY(0) scale(1);}
    100% { transform: translateY(10px) scale(1.03);}
}

.main-title-glow {
    display: inline-block;
    background: linear-gradient(90deg, #fffbe6 0%, #fff9d6 40%, #ffe066 80%, #fbbf24 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: goldGlowBeat 2.2s cubic-bezier(.77,0,.18,1) infinite;
    filter:
        drop-shadow(0 0 10px #fbbf2477)
        drop-shadow(0 0 2px #fffbe6aa);
}

/* Section Title */
.section-title {
    text-align: center;
    color: #fbbf24;
    font-size: 3.2rem; /* was 2.8rem */
    margin: 2.5rem 0 2rem 0;
    letter-spacing: 1px;
}

/* Intro Card */
.intro-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    background: rgba(62, 76, 89, 0.97);
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.18);
    padding: 2.5rem 2rem;
    max-width: 900px;
    margin: 2.5rem auto 2rem auto;
    animation: fadeInDown 1s cubic-bezier(.77,0,.18,1) 0.2s both;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px);}
    to { opacity: 1; transform: translateY(0);}
}

.profile-picture-large {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid #fbbf24;
    object-fit: cover;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.intro-card h1 {
    font-size: 2.8rem; /* was 2.3rem */
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.3rem;
    letter-spacing: 1.5px;
}

.intro-card h2 {
    font-size: 1.5rem; /* was 1.2rem */
    font-weight: 400;
    color: #e5e7eb;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.intro-card p {
    font-size: 1.3rem; /* was 1.1rem */
    color: #e5e7eb;
    opacity: 0.8;
    margin-bottom: 0;
}

/* Tagline under name */
.tagline {
    font-size: 1.6rem; /* was 1.35rem */
    color: #fbbf24;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: left;
}

/* Projects Section */
.featured-projects {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 2rem 1rem;
}

.featured-projects h2 {
    text-align: center;
    font-size: 3.2rem; /* was 2.8rem */
    color: #fbbf24;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.projects {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.project {
    background: rgba(62, 76, 89, 0.98);
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.18);
    padding: 1.5rem 1rem 1rem 1rem;
    width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 40px rgba(251,191,36,0.15), 0 2px 16px rgba(0,0,0,0.18);
    background: rgba(62, 76, 89, 1);
}

.project iframe, .project video, .project img {
    border-radius: 12px;
    width: 100%;
    min-height: 220px;
    background: #222;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    transition: box-shadow 0.3s;
}

.project-info {
    width: 100%;
    text-align: center;
}

.project-title {
    font-size: 1.3rem; /* was 1.1rem */
    color: #fbbf24;
    font-weight: 600;
    margin: 0.5rem 0 0 0;
    letter-spacing: 0.5px;
}

/* Resume & Contact */
.resume-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 3rem 0 1rem 0;
    gap: 1.5rem;
}

.resume-btn-row {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.contact-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1.3rem; /* was 1.1rem */
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #fbbf24 60%, #f59e42 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(251,191,36,0.12);
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: linear-gradient(90deg, #f59e42 60%, #fbbf24 100%);
    transform: scale(1.06);
}

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.2rem; /* was 1rem */
    color: #e5e7eb;
    opacity: 0.7;
}

/* I Am Section */
.iam-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3.5rem 0 2.5rem 0;
}

.iam-container {
    background: rgba(62, 76, 89, 0.97);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    padding: 2rem 3.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 3rem; /* was 2.5rem */
    font-weight: 800;
    color: #fbbf24;
    z-index: 0;
}

.iam-label {
    color: #e5e7eb;
    font-size: 3rem; /* was 2.5rem */
    font-weight: 800;
    margin-right: 1rem;
}

.iam-role {
    min-width: 220px;
    text-align: center;
    transition: opacity 0.3s;
    font-size: 3rem; /* was 2.5rem */
}

.iam-arrow {
    background: none;
    border: none;
    color: #fbbf24;
    font-size: 2.8rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 0 0.7rem;
}

.iam-arrow:hover {
    color: #f59e42;
    transform: scale(1.2);
}

/* Hobbies Section */
.hobbies-row {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 2.5rem 0 3.5rem 0;
    transition: transform 0.5s cubic-bezier(.77,0,.18,1);
}

.hobby-card {
    position: relative;
    width: 420px;      /* Increased width */
    height: 280px;     /* Increased height */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.20);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    background: #3e4c59;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hobby-card:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 40px rgba(251,191,36,0.18), 0 2px 16px rgba(0,0,0,0.18);
    z-index: 2;
}

.hobby-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    transition: opacity 0.7s linear; /* Only opacity! */
    z-index: 1;
    will-change: background-image, opacity, transform;
}

.hobby-bg-current {
    opacity: 1;
    transform: scale(1);
}

.hobby-bg-next {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}


.hobby-label {
    position: relative;
    z-index: 2;
    color: #fbbf24;
    font-size: 2.5rem; /* was 2.1rem */
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.18);
    margin-bottom: 1.2rem;
    background: rgba(30, 36, 44, 0.7);
    padding: 0.4em 1.2em;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    transition: background 0.3s, border 0.3s;
}

.hobby-card:hover .hobby-label {
    background: rgba(251,191,36,0.13);
    border: 2px solid #fff;
    color: #fff;
}

/* Media List Layout */
.media-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1800px;
    margin: 0 auto 3rem auto;
    width: 95vw;
}

@media (max-width: 1200px) {
    .media-list {
        grid-template-columns: 1fr;
        max-width: 98vw;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .media-list {
        grid-template-columns: 1fr;
    }
}

.media-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(62, 76, 89, 0.97);
    border-radius: 28px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.16);
    padding: 3rem 2.5rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.media-desc {
    width: 100%;
    text-align: left;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
}

.media-desc h2,
.media-desc p {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

/* I Know Section */
.iknow-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0;
}

.iknow-container {
    background: rgba(62, 76, 89, 0.97);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.8rem; /* was 1.5rem */
    font-weight: 700;
    color: #fbbf24;
    z-index: 0;
}

.iknow-label {
    color: #e5e7eb;
    font-size: 1.8rem; /* was 1.5rem */
    font-weight: 700;
    margin-right: 1rem;
}

.iknow-arrow {
    background: none;
    border: none;
    color: #fbbf24;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 0 0.7rem;
}

.iknow-arrow:hover {
    color: #f59e42;
    transform: scale(1.2);
}

.iknow-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 60px;
    height: 60px;
}

.iknow-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    filter: drop-shadow(0 0 8px #fbbf2477) brightness(1.08) saturate(1.2) contrast(1.1);
    transition: opacity 0.3s cubic-bezier(.77,0,.18,1), filter 0.4s cubic-bezier(.77,0,.18,1);
    vertical-align: middle;
}

/* Make all background layers cover the viewport and not take up space */
.animated-bg,
.light-rays-bg,
.texture-overlay,
#dust-canvas,
#golden-trails-canvas,
.bg-shapes {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

/* Glowy, layered background shapes */
.bg-shapes {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: visible;
}

.bg-shape {
    position: absolute;
    filter: blur(8px) drop-shadow(0 0 32px #fbbf2444);
    opacity: 0.7;
}

/* Example positions for depth and layering */
.bg-shape.shape1 { top: 5%; left: 10%; }
.bg-shape.shape2 { top: 20%; left: 60%; }
.bg-shape.shape3 { top: 60%; left: 20%; }
.bg-shape.shape4 { top: 70%; left: 70%; }
.bg-shape.shape5 { top: 40%; left: 40%; }
.bg-shape.shape6 { top: 10%; left: 80%; }
.bg-shape.shape7 { top: 80%; left: 10%; }
.bg-shape.shape8 { top: 50%; left: 80%; }
.bg-shape.shape9 { top: 80%; left: 50%; }
.bg-shape.shape10 { top: 30%; left: 70%; }

.bg-shape.shapeA { top: 15%; left: 25%; }
.bg-shape.shapeB { top: 35%; left: 75%; }
.bg-shape.shapeC { top: 55%; left: 15%; }
.bg-shape.shapeD { top: 75%; left: 35%; }
.bg-shape.shapeE { top: 25%; left: 65%; }
.bg-shape.shapeF { top: 45%; left: 55%; }
.bg-shape.shapeG { top: 65%; left: 45%; }
.bg-shape.shapeH { top: 85%; left: 25%; }
.bg-shape.shapeI { top: 5%; left: 75%; }
.bg-shape.shapeJ { top: 90%; left: 60%; }

.bg-shape.shape1 { animation: floatShape 8s ease-in-out infinite; }
.bg-shape.shape2 { animation: floatShape 10s ease-in-out infinite 1s; }
.bg-shape.shape3 { animation: floatShape 12s ease-in-out infinite 0.5s; }
.bg-shape.shape4 { animation: floatShape 9s ease-in-out infinite 0.8s; }
.bg-shape.shape5 { animation: floatShape 11s ease-in-out infinite 1.2s; }
.bg-shape.shape6 { animation: floatShape 13s ease-in-out infinite 0.3s; }
.bg-shape.shape7 { animation: floatShape 14s ease-in-out infinite 1.5s; }
.bg-shape.shape8 { animation: floatShape 10s ease-in-out infinite 0.7s; }
.bg-shape.shape9 { animation: floatShape 12s ease-in-out infinite 1.1s; }
.bg-shape.shape10 { animation: floatShape 9s ease-in-out infinite 0.6s; }

/* Optionally, add slow rotation to a few for extra depth: */
.bg-shape.shape3 { animation: floatShape 12s ease-in-out infinite 0.5s, rotateShape 40s linear infinite; }
.bg-shape.shape7 { animation: floatShape 14s ease-in-out infinite 1.5s, rotateShape 60s linear infinite; }

.texture-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    background:
        url('https://www.transparenttextures.com/patterns/billie-holiday.png'),
        linear-gradient(120deg, rgba(251,191,36,0.08) 0%, rgba(50,63,75,0.15) 100%);
    opacity: 0.3;
    mix-blend-mode: lighten;
}

.light-rays-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: repeating-linear-gradient(
        105deg,
        rgba(251,191,36,0.07) 0px,
        rgba(251,191,36,0.07) 1px,    /* <-- thinner line */
        transparent 8px,
        transparent 48px              /* <-- more space between lines */
    );
    opacity: 0.1;                    /* slightly more subtle */
    mix-blend-mode: lighten;
    animation: lightRaysMove 8s linear infinite;
}

@keyframes lightRaysMove {
    0% { background-position: 0 0; }
    100% { background-position: -96px 0; }
}

@keyframes floatShape {
    0%   { transform: translateY(0) scale(1) rotate(0deg);}
    50%  { transform: translateY(-18px) scale(1.07) rotate(2deg);}
    100% { transform: translateY(0) scale(1) rotate(0deg);}
}

@keyframes rotateShape {
    0%   { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

/* About Section Styles */
.about-main-card {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 1100px;
    margin: 5vh auto;
    background: rgba(62, 76, 89, 0.98);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    padding: 3rem 2.5rem;
    min-height: 400px;      /* Ensures card is always tall enough */
    gap: 3rem;
    z-index: 2;
    position: relative;
}

.about-text {
    flex: 1.1;
    color: #e5e7eb;
    font-size: 1.35rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-image-fader {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    min-width: 320px;
    min-height: 320px;      /* Ensures image is always visible */
    /* Remove height: 100%; */
}

.about-fade-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 18px 18px 0;
    border: none;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    opacity: 0;
    transition: opacity 1s;
    z-index: 1;
}
.about-fade-img.visible {
    opacity: 1;
    z-index: 2;
}

/* Quiz Section Styles */
.about-quiz-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1100px;
    margin: 3vh auto 5vh auto;
    background: rgba(62, 76, 89, 0.98);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    padding: 2.5rem 2rem;
    min-height: 400px;
    position: relative;
    z-index: 2;
}

.quiz-content {
    width: 100%;
    text-align: center;
}

.quiz-content h2,
.quiz-content h3 {
    font-size: 2.4rem;
    color: #fbbf24;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 12px #fbbf2444, 0 0 8px #fffbe6aa;
}

.quiz-content p {
    font-size: 1.45rem;
    color: #e5e7eb;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-shadow: 0 1px 6px #161b2240;
}

.quiz-question {
    animation: fadeInUp 0.7s cubic-bezier(.77,0,.18,1);
}

.quiz-answer, .quiz-results, .quiz-intro {
    animation: fadeInUp 0.7s cubic-bezier(.77,0,.18,1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px);}
    to   { opacity: 1; transform: translateY(0);}
}

.quiz-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 2.2rem;
    margin-bottom: 2.2rem;
    align-items: center;
    justify-items: center;
}

.quiz-choice {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(50,63,75,0.95);
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 1rem 2.5rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s, transform 0.18s;
    box-shadow: 0 2px 12px rgba(251,191,36,0.10);
    outline: none;
}

.quiz-choice.selected,
.quiz-choice:focus {
    background: linear-gradient(90deg, #fbbf24 60%, #f59e42 100%);
    color: #222;
    border: 2px solid #fff;
    transform: scale(1.04);
}

.quiz-choice:hover:not(.selected) {
    background: rgba(251,191,36,0.13);
    color: #fff;
    border: 2px solid #fbbf24;
}

#quiz-confirm-btn,
#quiz-next-btn,
#quiz-retry-btn,
#quiz-begin-btn {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #fbbf24 60%, #f59e42 100%);
    border: none;
    border-radius: 10px;
    padding: 0.9rem 2.5rem;
    margin-top: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(251,191,36,0.12);
    transition: background 0.3s, transform 0.18s;
}

#quiz-confirm-btn:disabled {
    background: #b8b8b8;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

#quiz-confirm-btn:not(:disabled):hover,
#quiz-next-btn:hover,
#quiz-retry-btn:hover,
#quiz-begin-btn:hover {
    background: linear-gradient(90deg, #f59e42 60%, #fbbf24 100%);
    transform: scale(1.06);
}

.quiz-answer h3 {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
    color: #fff;
    text-shadow: 0 2px 12px #fbbf2444;
}

.quiz-results h2 {
    font-size: 2.5rem;
    color: #fbbf24;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 12px #fbbf2444;
}

.quiz-results p {
    font-size: 1.5rem;
    color: #e5e7eb;
    margin-bottom: 2rem;
}

/* Timer in top right of quiz panel */
.quiz-timer {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.timer-svg-wrap {
    position: relative;
    width: 60px;
    height: 60px;
}

#timer-seconds {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-43%, -50%);
    font-size: 2rem;
    color: #fbbf24;
    font-weight: bold;
    pointer-events: none;
    text-shadow: 0 2px 8px #222, 0 0 6px #fffbe6aa;
    letter-spacing: 1px;
    user-select: none;
}

/* Fade out animation for transitions */
.fade-out {
    animation: fadeOutDown 0.5s cubic-bezier(.77,0,.18,1) forwards;
}
@keyframes fadeOutDown {
    to { opacity: 0; transform: translateY(40px);}
}

/* Responsive adjustments for mobile devices */
@media (max-width: 900px) {
    .about-main-card,
    .about-quiz-card {
        flex-direction: column;
        padding: 1.2rem 0.5rem;
        min-height: unset;
        max-width: 98vw;
        gap: 1.2rem;
    }
    .about-image-fader {
        min-width: 100%;
        min-height: 180px;
        height: 220px;
        border-radius: 0 0 18px 18px;
    }
    .about-fade-img {
        border-radius: 0 0 18px 18px;
    }
    .about-text {
        font-size: 1.1rem;
        padding: 0.5rem 0.5rem;
    }
    .quiz-content h2,
    .quiz-content h3 {
        font-size: 1.5rem;
    }
    .quiz-content p {
        font-size: 1.1rem;
    }
    .quiz-choices {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .quiz-timer {
        top: 1rem;
        right: 1rem;
        transform: scale(0.85);
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .about-main-card,
    .about-quiz-card {
        padding: 0.5rem 0.1rem;
        border-radius: 12px;
    }
    .timer-svg-wrap {
        width: 40px;
        height: 40px;
    }
    #timer-seconds {
        font-size: 1.1rem;
    }
}

.films-page main,
.films-page header,
.films-page .media-list,
.films-page .media-item {
    position: relative;
    z-index: 2;
}

/* Ensure content stays above backgrounds on models and games pages */
.models-page main,
.models-page header,
.models-page .media-list,
.models-page .media-item,
.games-page main,
.games-page header,
.games-page .media-list,
.games-page .media-item {
    position: relative;
    z-index: 2;
}


.media-item > .media-visual {
    width: 100%;
    display: flex;
    justify-content: center;
}

.films-page .media-visual iframe,
.films-page .media-visual video,
.films-page .media-visual img,
.films-page .media-visual .video-thumbnail {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 18px;
    background: #222;
    box-shadow: 0 2px 24px rgba(0,0,0,0.18);
    display: block;
    margin: 0 auto 1.5rem auto;
    object-fit: cover;
    transition: box-shadow 0.3s;
}

.models-page .media-visual model-viewer,
.models-page .media-visual img,
.models-page .media-visual video,
.models-page .media-visual .model-thumbnail {
    width: 100%;
    max-width: 700px;   /* or your preferred value */
    aspect-ratio: 1 / 1; /* or adjust for your models */
    height: auto;
    border-radius: 18px;
    background: #222;
    box-shadow: 0 2px 24px rgba(0,0,0,0.18);
    display: block;
    margin: 0 auto 1.5rem auto;
    object-fit: cover;
    transition: box-shadow 0.3s;
}

@media (max-width: 600px) {
    .films-page .media-visual iframe,
    .films-page .media-visual video,
    .films-page .media-visual img,
    .films-page .media-visual .video-thumbnail {
        max-width: 100vw;
        height: auto;
    }
}

/* Games page: main game image styles */
.games-page .game-thumb-link {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(251,191,36,0.13), 0 2px 16px rgba(0,0,0,0.18);
    border: 4px solid #fbbf24;
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.25s;
}

.games-page .game-thumb {
    width: 100%;
    display: block;
    border-radius: 18px;
    transition: transform 0.25s, filter 0.25s;
    filter: brightness(0.98) saturate(1.1);
}

.games-page .game-thumb-link:hover,
.games-page .game-thumb-link:focus {
    box-shadow: 0 0 32px 8px #fbbf24cc, 0 4px 32px rgba(251,191,36,0.18);
    border-color: #fffbe6;
    transform: scale(1.045);
}

.games-page .game-thumb-link:hover .game-thumb,
.games-page .game-thumb-link:focus .game-thumb {
    transform: scale(1.06);
    filter: brightness(1.08) saturate(1.25) drop-shadow(0 0 16px #fbbf2477);
}

.games-page .game-screens-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
    justify-content: center;   /* Center the screenshots horizontally */
    align-items: center;
    min-height: 160px;
}

.games-page .game-screen-thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #fbbf24;
    box-shadow: 0 2px 8px rgba(251,191,36,0.10);
    transition: width 0.5s cubic-bezier(.77,0,.18,1), 
                height 0.5s cubic-bezier(.77,0,.18,1), 
                box-shadow 0.4s cubic-bezier(.77,0,.18,1), 
                border-color 0.4s cubic-bezier(.77,0,.18,1), 
                filter 0.4s cubic-bezier(.77,0,.18,1);
    cursor: pointer;
    filter: brightness(0.92) grayscale(0.2);
}

.games-page .game-screen-thumb.active,
.games-page .game-screen-thumb:hover,
.games-page .game-screen-thumb:focus {
    width: 150px;
    height: 150px;
    box-shadow: 0 0 16px 4px #fbbf24cc, 0 2px 12px rgba(251,191,36,0.18);
    border-color: #fffbe6;
    z-index: 2;
    filter: brightness(1.08) saturate(1.2);
}

.games-page main {
    padding-bottom: 4rem;
}

.models-page main {
    padding-bottom: 4rem;
}

.films-page main {
    padding-bottom: 4rem;
}

.home-page main {
    padding-bottom: 4rem;
}
