﻿/* =========================================================
   PerceptMX - site.css
   Mobile-first with desktop refinements
   ========================================================= */

/* -----------------------------
   Navbar positioning
------------------------------ */
.navbar {
    position: relative;
}

    .navbar .container {
        position: relative;
    }

/* Popup dropdown (does not push layout, not full width on desktop) */
.nav-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: rgba(0,0,0,.95);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
    z-index: 1050;
    padding: 6px;
}

    /* Improve link hit area and spacing inside popup */
    .nav-overlay .nav-link {
        border-radius: 10px;
        padding: 10px 12px;
    }

        .nav-overlay .nav-link:hover {
            background: rgba(255,255,255,.06);
        }

/* Mobile: make overlay fit viewport and avoid clipping */
@media (max-width: 576px) {
    .nav-overlay {
        width: calc(100vw - 24px);
        left: 12px;
        right: 12px;
    }
}

/* -----------------------------
   Fonts / Branding
------------------------------ */
@font-face {
    font-family: 'Cubeology';
    src: url('fonts/Cubeology.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

.logo {
    font-family: 'Cubeology', sans-serif;
    font-size: 36px;
    line-height: 1;
    font-weight: normal;
}

/* Make brand text normal (not bold) and remove underline */
.navbar-brand {
    font-weight: 400 !important;
    text-decoration: none;
}

    .navbar-brand span {
        font-weight: 400 !important;
    }

/* If you still use the class-based login link anywhere */
.navbar .login-link {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 8px;
    text-decoration: none;
}

    .navbar .login-link:hover {
        background: rgba(255,255,255,.08);
    }

/* -----------------------------
   Layout wrapper
------------------------------ */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Desktop: allow page to align with container */
@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}

/* -----------------------------
   Forms: mobile-friendly defaults
   (avoid global fixed widths on mobile)
------------------------------ */
input,
select,
textarea {
    max-width: 100%;
}

/* Desktop: optionally cap default controls */
@media (min-width: 768px) {
    input,
    select,
    textarea {
        max-width: 280px;
    }
}

/* -----------------------------
   Shared page styling
------------------------------ */
.pmx-hero {
    margin-top: 22px;
    padding: 26px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.35);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.pmx-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 400;
    color: rgba(255,255,255,.95);
}

.pmx-lead {
    margin: 0 0 16px 0;
    max-width: 95ch;
    line-height: 1.6;
    color: rgba(255,255,255,.75);
}

.pmx-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pmx-brain-feature {
    margin-top: 18px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.35);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.pmx-brain-feature-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.pmx-feature-kicker {
    margin-bottom: 5px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.56);
}

.pmx-feature-title {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 400;
    color: rgba(255,255,255,.95);
}

.pmx-feature-copy {
    margin: 0;
    max-width: 78ch;
    line-height: 1.55;
    color: rgba(255,255,255,.72);
}

.pmx-feature-copy + .pmx-feature-copy {
    margin-top: 8px;
}

.pmx-brain-frame {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 1000px;
    min-height: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
}

@media (max-width: 768px) {
    .pmx-brain-feature-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .pmx-brain-feature-head .btn {
        width: 100%;
        padding: 12px 14px;
        font-size: 16px;
    }

    .pmx-brain-frame {
        height: 820px;
        min-height: 820px;
    }
}

/* Phone: stack actions and increase tap targets */
@media (max-width: 576px) {
    .pmx-hero {
        padding: 18px;
    }

    .pmx-title {
        font-size: 22px;
    }

    .pmx-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .pmx-actions .btn {
            width: 100%;
            padding: 12px 14px;
            font-size: 16px;
        }
}

/* -----------------------------
   Card grids
------------------------------ */
.pmx-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.pmx-card {
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.28);
}

.pmx-card-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,.92);
}

.pmx-card-text {
    margin: 0;
    line-height: 1.6;
    color: rgba(255,255,255,.72);
}

    /* Automatic spacing between stacked paragraphs */
    .pmx-card-text + .pmx-card-text {
        margin-top: 10px;
    }

.pmx-footer-note {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.22);
    color: rgba(255,255,255,.72);
    line-height: 1.6;
}

/* Full-width card inside pmx-grid */
.pmx-card-full {
    grid-column: 1 / -1;
}

/* Only stretch a designated card when it is stranded alone on the last row */
.pmx-grid > .pmx-card-stretch-if-orphan:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Mobile responsiveness for grids */
@media (max-width: 768px) {
    .pmx-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------
   Login page
------------------------------ */
.login-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.35);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.login-title {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 400;
}

.login-subtext {
    margin: 0 0 18px 0;
    font-size: 14px;
    color: rgba(255,255,255,.7);
}

.login-links {
    text-align: center;
    font-size: 13px;
}

    .login-links a {
        text-decoration: none;
        color: rgba(255,255,255,.8);
    }

        .login-links a:hover {
            text-decoration: underline;
        }

    .login-links .divider {
        margin: 0 8px;
        color: rgba(255,255,255,.4);
    }

/* -----------------------------
   Products page list layout
------------------------------ */
.pmx-grid-products {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 768px) {
    .pmx-grid-products {
        grid-template-columns: 1fr;
    }
}

.pmx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.18);
    margin-top: 10px;
}

.pmx-item-name {
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255,255,255,.9);
}

.pmx-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* -----------------------------
   Lists / Projects / Publications
------------------------------ */
.pmx-list {
    margin: 10px 0 0 18px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
}

.pmx-project {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.18);
}

.pmx-project-title {
    font-size: 14px;
    color: rgba(255,255,255,.92);
}

.pmx-project-meta {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-top: 2px;
}

.pmx-pub {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.18);
}

.pmx-pub-title {
    font-size: 14px;
    color: rgba(255,255,255,.92);
}

.pmx-pub-meta {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-top: 2px;
}

.pmx-pub-actions {
    margin-top: 10px;
}

/* -----------------------------
   Collaboration styling
------------------------------ */
.pmx-collab-feature {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(0,0,0,.32);
}

.pmx-collab-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pmx-collab-item {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.22);
    border-left: 3px solid rgba(255,255,255,.22);
}

.pmx-collab-item-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25;
    color: rgba(255,255,255,.95);
}

.pmx-collab-item-meta {
    font-size: 12.5px;
    opacity: .75;
    margin-top: 2px;
    letter-spacing: .1px;
}

.pmx-collab-item-desc {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,.75);
}

/* -----------------------------
   Research page layout
------------------------------ */
.pmx-research-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 14px;
    align-items: start;
}

.pmx-research-left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pmx-research-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 768px) {
    .pmx-research-layout {
        grid-template-columns: 1fr;
    }
}
