:root {
    --bg: #111111;
    --bg-alt: #1a1a1a;
    --card-bg: #1e1e1e;
    --accent: #4da6ff;
    --text: #f5f5f5;
    --text-muted: #b3b3b3;
    --border: #2a2a2a;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Soft blurred color fields behind the content, used to give glass surfaces depth */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 45vmax;
    height: 45vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

body::before {
    top: -10vmax;
    left: -10vmax;
    background: radial-gradient(circle, var(--accent), transparent 70%);
}

body::after {
    bottom: -15vmax;
    right: -10vmax;
    background: radial-gradient(circle, #a64dff, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        display: none;
    }
}

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

a:hover {
    text-decoration: underline;
}

/* Skip link (keyboard accessibility) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background-color: var(--accent);
    color: #111;
    padding: 0.75rem 1.25rem;
    z-index: 100;
    border-radius: 0 0 6px 0;
}

.skip-link:focus {
    left: 0;
}

/* Header (rendered inside header-*.html via an iframe — see assets/css/header.css) */
.header-frame {
    display: block;
    width: 100%;
    height: 76px;
    border: none;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Main content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

/* Scroll reveal: elements stay visible but ease upward into position as they cross the viewport */
.reveal {
    transform: translateY(28px);
    transition: transform 0.6s ease;
    will-change: transform;
}

.reveal.in-view {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
        transform: none;
    }
}

/* Stagger grid children so they cascade in rather than popping in together */
.card-grid .reveal:nth-child(2),
.gallery-grid .reveal:nth-child(2) {
    transition-delay: 0.08s;
}

.card-grid .reveal:nth-child(3),
.gallery-grid .reveal:nth-child(3) {
    transition-delay: 0.16s;
}

.gallery-grid .reveal:nth-child(4) {
    transition-delay: 0.24s;
}

.gallery-grid .reveal:nth-child(5) {
    transition-delay: 0.32s;
}

.gallery-grid .reveal:nth-child(6) {
    transition-delay: 0.4s;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 2.5rem;
}
.page-subtitle1 {
    color: blue;
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* Hero carousel (homepage) */
.hero-carousel {
    position: relative;
    max-width: 900px;
    margin: 2.5rem auto 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(30, 30, 30, 0.55);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.carousel-viewport {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.5s ease;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    object-fit: fill;
}

.carousel-slide img {
    width: 90%;
    height: 90%;
    opacity: 0.7;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(17, 17, 17, 0.55);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #111;
}

.carousel-btn.prev {
    left: 0.75rem;
}

.carousel-btn.next {
    right: 0.75rem;
}

.carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 85%;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.carousel-dot[aria-selected="true"] {
    background-color: var(--accent);
    border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        transition: none;
    }
}

@media (max-width: 600px) {
    .carousel-slide {
        aspect-ratio: 4 / 3;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
    }
}

/* Full-image carousel variant (project pages): always shows the whole image, letterboxed, never cropped */
.hero-carousel.full-image {
    max-width: 700px;
    background-color: #000;
}

.full-image .carousel-slide {
    aspect-ratio: auto;
    height: 75vh;
    max-height: 700px;
    background: #000;
}

.full-image .carousel-slide img {
    width: auto;
    height: 100%;
    max-width: 100%;
    opacity: 1;
    object-fit: contain;
}

@media (max-width: 600px) {
    .full-image .carousel-slide {
        height: 60vh;
    }
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.page-actions {
    text-align: center;
    margin-top: 1.5rem;
}

/* Video showcase (project pages) */
.project-intro {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    padding: 1.5rem;
    border-left: 3px solid var(--accent);
    background-color: rgba(30, 30, 30, 0.55);
}

.project-intro p {
    margin: 0;
    color: var(--text-muted);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.video-card {
    margin: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background-color: rgba(30, 30, 30, 0.55);
}

.youtube-card {
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.video-card:hover,
.video-card:focus-visible {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.video-card-thumb {
    display: block;
    position: relative;
}

.video-card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    object-fit: cover;
}

.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background-color: rgba(17, 17, 17, 0.85);
    color: var(--text);
    font-size: 0.85rem;
}

.video-card-title {
    display: block;
    padding-top: 0.85rem;
    color: var(--text-muted);
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.8);
}

.video-modal[hidden] {
    display: none;
}

.video-modal-content {
    position: relative;
    width: min(900px, 100%);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background-color: var(--card-bg);
}

.video-modal-content h2 {
    margin-top: 0;
    padding-right: 2rem;
}

.video-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.video-player {
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.video-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-card figcaption {
    padding-top: 0.85rem;
    color: var(--text-muted);
}

/* Hero (homepage) */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
}

.hero-tagline {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text) !important;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: bold;
    border: 2px solid var(--accent);
    color: var(--text);
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--accent);
    color: #111;
    text-decoration: none;
}

.btn.primary {
    background-color: var(--accent);
    color: #111;
}

.btn.primary:hover {
    opacity: 0.85;
    background-color: var(--accent);
}

/* Card grid (homepage highlights) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.card {
    background-color: rgba(30, 30, 30, 0.55);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--text-muted);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(30, 30, 30, 0.55);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.gallery-link {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gallery-link:hover,
.gallery-link:focus {
    text-decoration: none;
}

.gallery-thumb {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item figcaption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.game-embed {
    width: 800px;
    max-width: 100%;
    height: 450px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
}

.game-preview-mark {
    width: 80px;
    height: 80px;
    opacity: 0.6;
}

@media (max-width: 850px) {
    .game-embed {
        height: 400px;
    }
}

/* Gallery lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: 700px;
    width: 100%;
    padding: 3rem 2rem 2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 60vh;
}

.lightbox-caption {
    margin: 1rem 0 0;
    color: var(--text-muted);
}

.lightbox-link {
    margin-top: 1.25rem;
}

.lightbox-link[hidden] {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(17, 17, 17, 0.55);
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #111;
}

/* Footer (rendered inside footer.html via an iframe — see assets/css/footer.css) */
.footer-frame {
    display: block;
    width: 100%;
    height: 150px;
    border: none;
    background: transparent;
}

@media (max-width: 600px) {
    .footer-frame {
        height: 190px;
    }
}
