/* Static fonts fallback for older browsers */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-LightItalic.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Variable font for modern browsers */
@supports (font-variation-settings: normal) {
    @font-face {
        font-family: 'InterVariable';
        src: url('../fonts/InterVariable.woff2') format('woff2');
        font-weight: 100 900;
        font-style: normal;
        font-display: swap;
    }
    @font-face {
        font-family: 'InterVariable';
        src: url('../fonts/InterVariable-Italic.woff2') format('woff2');
        font-weight: 100 900;
        font-style: italic;
        font-display: swap;
    }
}

/* Color Scheme Variables */
:root {
    /* Primary Colors */
    --primary-blue: #4a9eff;
    --primary-blue-dark: #3b82f6;
    --accent-cyan: #22d3ee;
    --accent-teal: #14b8a6;
    
    /* Background Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #121313;
    --bg-tertiary: #2d2d2d;
    
    /* Text Colors */
    --text-primary: #e4e4e4;
    --text-secondary: #c4c4c4;
    --text-muted: #b0b0b0;
    --text-accent: #88888;
    
    /* Border Colors */
    --border-primary: #2b2b2b;
    --border-secondary: #444;
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(45deg, var(--primary-blue), var(--accent-cyan));
    --gradient-hero: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    --gradient-section-even: linear-gradient(135deg, var(--bg-primary) 0%, #0d0d10 30%, #0a1012 70%, #0c0c0f 100%);
    --gradient-section-odd: linear-gradient(135deg, var(--bg-secondary) 0%, #151618 25%, #181f26 60%, #16191a 85%, var(--bg-tertiary) 100%);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
}

@supports (font-variation-settings: normal) {
    body {
        font-family: 'InterVariable', 'Inter', sans-serif;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
}

html {
    scroll-behavior: smooth;
}

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

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-primary);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand h1 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    font-size: 12px;
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    /* transition: color 0.3s ease; */
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle:hover span {
    background: var(--primary-blue);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.nav-toggle.active span {
    background: var(--accent-cyan);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    height: 100vh;
    max-height: 1080px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Background image set dynamically in front-page.php */
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeInHero 1s ease-out 0.1s forwards;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, #ff6b35 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #4ecdc4 0%, transparent 50%);
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.motto {
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Glitch effect for [redacted] text */
.glitch-container {
    position: relative;
    display: inline-block;
}

.glitch-text {
    position: relative;
    z-index: 1;
}

.glitch-canvas {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
}

.cta-button {
    display: inline-block;
    color: var(--accent-cyan);
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-cyan);
    transform: skewX(-10deg);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2);
    z-index: -1;
}

.cta-button:hover {
    color: white;
}

.cta-button:hover::before {
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.4);
}

/* Content Sections */
.content-section {
    padding: 5rem 0;
    background: var(--gradient-section-even);
}

.content-section:nth-child(odd) {
    background: var(--gradient-section-odd);
}

.content-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    color: var(--primary-blue);
    text-align: center;
}

.content-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* About Grid - Two rows with alternating layout */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.about-row.reverse {
    direction: rtl;
}

.about-row.reverse > * {
    direction: ltr;
}

.about-row .founder-info {
    text-align: right;
}

.about-row.reverse .founder-info {
    text-align: left;
}

.founder-info h3 {
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.role {
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: 200;
    margin-bottom: 0 !important;
}

.founder-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.founder-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    clip-path: polygon(40px 0, 100% 0, calc(100% - 40px) 100%, 0 100%);
}

/* Space Background */
.space-bg {
    position: relative;
    overflow: hidden;
}

.stars-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.space-bg .container {
    position: relative;
    z-index: 2;
}

/* Projects Grid */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 3rem;
    height: 400px;
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.project-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.project-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
    padding: 3rem 2rem;
}

.project-card:hover {
    z-index: 10;
    outline: 1px solid var(--accent-cyan);
}

.project-card h3 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 400;
}

.game-type {
    color: var(--accent-cyan);
    font-weight: 200;
    font-size: 1.1rem;
    margin: 0 !important;
    min-height: 4rem;
    line-height: 1.1rem;
}

.design-quote {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.7;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 4rem;
    color: var(--text-primary);
    position: relative;
    border-left: 4px solid var(--accent-cyan);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.05) 0%, transparent 100%);
    border-radius: 0 15px 15px 0;
}

.design-quote::before {
    content: '"';
    font-size: 6rem;
    color: var(--accent-cyan);
    opacity: 0.3;
    position: absolute;
    top: -1rem;
    left: 1rem;
    line-height: 1;
    font-weight: bold;
}

.design-quote::after {
    content: '"';
    font-size: 6rem;
    color: var(--accent-cyan);
    opacity: 0.3;
    position: absolute;
    bottom: -2rem;
    right: 1rem;
    line-height: 1;
    font-weight: bold;
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: center;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.contact-info a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    color: var(--primary-blue);
}

/* Footer */
footer {
    background: #0f0f0f;
    border-top: 1px solid var(--border-primary);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: var(--accent-cyan);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: 0;
        top: 0;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        padding: 2rem 0;
        padding-top: calc(80px + 2rem);
        border-bottom: 1px solid var(--border-primary);
        z-index: -1;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .navbar {
        padding: 1rem;
    }

    .about-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-row.reverse {
        direction: ltr;
    }

    .about-row .founder-info,
    .about-row.reverse .founder-info {
        text-align: center;
    }

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

    .project-card {
        height: 200px;
    }

    .content-section {
        padding: 3rem 0;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .design-quote {
        font-size: 1.2rem;
        padding: 2rem 1.5rem;
        margin: 2rem auto;
    }

    .design-quote::before {
        font-size: 4rem;
        top: -0.5rem;
        left: 0.5rem;
    }

    .design-quote::after {
        font-size: 4rem;
        bottom: -1.5rem;
        right: 0.5rem;
    }

    .game-type {
        min-height: unset;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
}

/* Content Page Styles */
.content-hero {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.content-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.content-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 700;
}

.content-hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--accent-cyan);
    font-weight: 500;
}

.content-body {
    padding: 4rem 0;
    padding-top: 8rem;
}

.content-body h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    margin-top: 3rem;
}

.content-body h2:first-child {
    margin-top: 0;
}

.content-body h3 {
    font-size: 2rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.content-body h4 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-body h5 {
    font-size: 1.25rem;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.content-body h6 {
    font-size: 1.1rem;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    margin-top: 1.25rem;
    font-weight: 600;
}

.content-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: left;
    max-width: none;
}

.content-body ul,
.content-body ol {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    margin-left: 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.content-body .page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--primary-blue);
    margin-bottom: 2rem;
    margin-top: 0;
    font-weight: 700;
}

.content-body a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.content-body a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Toned-down typography for regular Page pages (not Project pages) */
.page-content .content-body h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-weight: 600;
}

.page-content .content-body h2:first-child {
    margin-top: 0;
}

.page-content .content-body h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    margin-top: 1.75rem;
    font-weight: 600;
}

.page-content .content-body h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    font-weight: 600;
}

.page-content .content-body h5 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    margin-top: 1.25rem;
    font-weight: 600;
}

.page-content .content-body h6 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    font-weight: 600;
}

.page-content .content-body p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.page-content .content-body ul,
.page-content .content-body ol {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    margin-left: 1.5rem;
}

.page-content .content-body li {
    margin-bottom: 0.35rem;
}

/* Slideshow Styles */
.slideshow-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: 0 auto;
    background: var(--bg-primary);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.slide {
    display: none;
    position: relative;
    width: 100%;
    height: 500px;
}

.slide.active {
    display: block;
}

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

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 3rem 2rem 1.5rem;
    text-align: center;
}

.slide-caption h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slide-caption p {
    font-size: 1.2rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem 1.2rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 0 5px 5px 0;
}

.slide-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-cyan);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.slide-dots {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 8px;
    background-color: var(--border-primary);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-blue);
    transform: scale(1.2);
}

/* Mobile responsiveness for content page */
@media (max-width: 768px) {
    .content-hero {
        height: 250px;
        margin-top: 70px;
    }
    
    .content-body {
        padding: 2rem 0;
    }
    
    .content-body h2 {
        font-size: 2rem;
        margin-top: 2rem;
    }
    
    .content-body h3 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .slideshow-section {
        padding: 2rem 0;
    }
    
    .slideshow-container {
        margin: 0 1rem;
    }
    
    .slide {
        height: 300px;
    }
    
    .slide-caption {
        padding: 2rem 1rem 1rem;
    }
    
    .slide-caption h3 {
        font-size: 1.5rem;
    }
    
    .slide-caption p {
        font-size: 1rem;
    }
    
    .slide-btn {
        padding: 0.8rem 1rem;
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeInHero {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero::after {
        animation: none;
        opacity: 1;
    }
}
