/* ============================================
   Player One Space — Website Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --text-primary: #f0f0f0;
    --text-secondary: #94a3b8;
    --accent: #a0aec0;
    --accent-glow: rgba(160, 174, 192, 0.25);
    --accent-hover: #cbd5e1;
    --border: rgba(255, 255, 255, 0.08);
    --nav-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1.8;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
}

.nav-logo-icon {
    height: 44px;
    max-height: 44px;
    width: auto;
    max-width: 44px;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: contain;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nav-logo .logo-line2 {
    display: block;
    text-align: center;
    width: 100%;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: min(90vw, 90vh);
    height: min(90vw, 90vh);
    border-radius: 50%;
    background: url('../images/earth.jpg') center center / cover no-repeat;
    opacity: 0.5;
    filter: blur(1px);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(10, 14, 26, 0.3) 0%,
        rgba(10, 14, 26, 0.6) 35%,
        rgba(10, 14, 26, 0.95) 65%
    );
}

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

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero h1 span {
    color: var(--accent);
}

/* Pac-Man typing animation */
.hero-typing {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 1.2em;
    text-align: center;
}

#typed-text {
    color: var(--text-primary);
}

.pacman-cursor {
    display: inline-flex;
    align-items: center;
    margin-left: 0.1em;
    animation: pacman-chomp 0.3s steps(2) infinite;
}

.pacman-cursor img {
    height: clamp(2rem, 5vw, 3.5rem);
    width: auto;
}

@keyframes pacman-chomp {
    0%   { transform: scaleX(1); }
    50%  { transform: scaleX(0.85); }
    100% { transform: scaleX(1); }
}

.blink-cursor {
    color: var(--accent);
    animation: blink 0.7s step-end infinite;
    font-weight: 400;
    margin-left: 0.05em;
}

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

.hero .tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* --- Stats Bar --- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    background: var(--bg-secondary);
    padding: 2rem 1rem;
    text-align: center;
}

.stat-number {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* --- Sections --- */
.section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card .card-subtitle {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- How It Works (steps) --- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -1rem;
    width: calc(100% - 48px);
    height: 2px;
    background: var(--border);
    transform: translateX(50%);
}

/* --- Team --- */
.team-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.team-photo {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.team-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.team-socials a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.team-socials a:hover {
    border-color: var(--accent);
    background: rgba(160, 174, 192, 0.1);
}

.team-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.team-info .team-title {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.team-highlights {
    list-style: none;
    margin-top: 1rem;
}

.team-highlights li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.team-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateY(-50%);
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info-block h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.contact-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.contact-cta-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- Intro text block --- */
.intro-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
}

.intro-text p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
}

/* --- Architecture diagram --- */
.architecture {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    max-width: 700px;
    margin: 2rem auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre;
    overflow-x: auto;
}

/* --- Multi-payload table --- */
.payload-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.payload-table th,
.payload-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.payload-table th {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.payload-table td {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Platform Diagram --- */
.platform-diagram {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.diagram-layer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-align: center;
}

.diagram-layer-highlight {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.diagram-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.diagram-nodes {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.diagram-node {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.diagram-connector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    justify-content: center;
}

.connector-line {
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: var(--border);
}

.connector-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* --- Platform Audience --- */
.platform-audience {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.audience-item {
    background: var(--bg-card);
    padding: 2rem;
}

.audience-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.audience-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Fade-in animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Page header (non-home pages) --- */
.page-header {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.98);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .team-card {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-typing {
        min-height: 2.4em;
    }

    .pacman-cursor img {
        height: 1.8rem;
    }

    .card-grid,
    .card-grid-3 {
        grid-template-columns: 1fr;
    }

    .platform-audience {
        grid-template-columns: 1fr;
    }
}

/* --- Careers / Job Description pages --- */
.careers-page .page-header {
    background: linear-gradient(180deg, rgba(160, 174, 192, 0.08) 0%, var(--bg-primary) 100%),
                radial-gradient(ellipse at top, var(--accent-glow), transparent 60%);
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);
}

.careers-page .page-header h1 {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.careers-page .section {
    max-width: 880px;
    padding: 2.5rem 2rem;
}

.careers-page .section-header {
    text-align: left;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.careers-page .section-header h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    margin-bottom: 0;
}

.careers-page .intro-text {
    max-width: none;
    text-align: left;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 2.25rem;
}

.careers-page .intro-text p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.careers-page .intro-text p:last-child {
    margin-bottom: 0;
}

.careers-page .intro-text strong {
    color: var(--text-primary);
}

.careers-page .intro-text h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.careers-page .intro-text h3:first-child {
    margin-top: 0;
}

.careers-page .intro-text .team-highlights {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.careers-page .intro-text .team-highlights li {
    font-size: 0.98rem;
    line-height: 1.7;
    padding: 0.6rem 0 0.6rem 1rem;
    border-bottom: 1px solid rgba(160, 174, 192, 0.08);
}

.careers-page .intro-text .team-highlights li:last-child {
    border-bottom: none;
}

.careers-page .intro-text .team-highlights li::before {
    top: 1.2rem;
    transform: none;
    width: 7px;
    height: 7px;
}

.careers-page .intro-text a {
    color: var(--accent);
    border-bottom: 1px solid rgba(160, 174, 192, 0.3);
}

.careers-page .intro-text a:hover {
    border-bottom-color: var(--accent);
}

.careers-page .back-link {
    max-width: 880px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}

.careers-page .back-link a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.careers-page .back-link a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .careers-page .intro-text {
        padding: 1.5rem 1.25rem;
    }
    .careers-page .section {
        padding: 1.5rem 1rem;
    }
}
