/* Universal Updater - Projects Manager - Stylesheet - Dark Theme */

:root {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #9ca3af;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --bg: #0b0b0c;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: grid;
    height: 100vh;
    overflow: hidden;
    grid-template-rows: 1fr auto;
    grid-template-columns: auto 1fr;
}

#main-wrapper {
    overflow: auto;
}
#main-content{
    min-height: 88vh;
    width: 100%;
    display: flex;
    justify-content: center;
}

#main-content.htmx-swapping > * {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity 140ms ease, transform 180ms ease;
}

#main-content .htmx-added {
    animation: htmx-slide-in-from-right 220ms ease;
}

@keyframes htmx-slide-in-from-right {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.home-container{
    padding: 20px;
}
footer{
    display: flex;
    justify-content: center;
    padding: 5px;
    opacity: 0.2;
}

.content-page {
    width: min(1120px, 100%);
    padding: 28px 24px 40px;
}

.contact-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-panel {
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    border: 1px solid rgba(96, 96, 96, 0.35);
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.contact-panel-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(96, 96, 96, 0.2);
    background: linear-gradient(180deg, rgba(44, 44, 44, 0.92) 0%, rgba(32, 32, 32, 0.92) 100%);
    overflow: hidden;
}

.contact-panel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5c5c5c;
}

.contact-panel-dot:first-child {
    background: #ff5f57;
}

.contact-panel-dot:nth-child(2) {
    background: #febc2e;
}

.contact-panel-dot:nth-child(3) {
    background: #28c840;
}

.contact-panel-title {
    margin-left: 4px;
    color: #c8c8c8;
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    gap: 22px;
    padding: 22px;
}

.contact-panel{
    overflow: hidden;
}

.contact-kicker,
.contact-section-index,
.contact-status-label,
.contact-terminal-label {
    color: #63b3ed;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-hero h1 {
    margin-top: 8px;
    font-size: clamp(1rem, 5vw, 2.2rem);
    line-height: 1.04;
    max-width: 20ch;
}

.contact-lead {
    margin-top: 16px;
    max-width: 60ch;
    color: #a6adbb;
    font-size: 1rem;
}

.contact-status-grid {
    display: grid;
    gap: 12px;
}

.contact-status-card,
.contact-card {
    padding: 18px;
}

.contact-status-card {
    border: 1px solid rgba(122, 162, 255, 0.16);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(23, 30, 42, 0.95) 0%, rgba(13, 17, 23, 0.95) 100%);
}

.contact-status-card strong {
    display: block;
    margin-top: 8px;
    color: #f3f4f6;
    font-size: 1rem;
}

.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form-card {
    grid-column: auto;
    grid-row: auto;
}

.contact-section-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.contact-section-head h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.contact-section-head p {
    color: #a6adbb;
}

.contact-terminal-block {
    border: 1px solid rgba(87, 87, 87, 0.38);
    border-radius: 10px;
    background: #0f1115;
    padding: 16px;
    font-family: Consolas, 'Courier New', monospace;
    color: #d2d6dc;
    display: grid;
    gap: 8px;
}

.contact-inline-link {
    color: #7dd3fc;
    text-decoration: none;
    width: fit-content;
}

.contact-inline-link:hover {
    color: #bae6fd;
}

.contact-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-tag {
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(104, 132, 179, 0.35);
    background: rgba(27, 40, 60, 0.65);
    color: #dce8ff;
    font-size: 0.88rem;
}

.contact-scope-list {
    display: grid;
    gap: 14px;
}

.contact-scope-list div {
    padding: 14px 16px;
    border-left: 2px solid #63b3ed;
    background: rgba(22, 25, 31, 0.92);
}

.contact-scope-list span {
    display: block;
    margin-bottom: 4px;
    color: #f3f4f6;
    font-weight: 600;
}

.contact-scope-list p {
    color: #a6adbb;
}

.contact-intake-form {
    display: grid;
    gap: 18px;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-intake-form label,
.contact-intake-form fieldset {
    display: grid;
    gap: 8px;
}

.contact-intake-form span,
.contact-intake-form legend {
    color: #d7dce5;
    font-size: 0.84rem;
    font-weight: 600;
}

.contact-intake-form fieldset {
    border: 1px solid rgba(87, 87, 87, 0.38);
    border-radius: 10px;
    padding: 14px;
}

.contact-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.contact-check-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-check-grid label {
    display: grid;
    grid-template-columns: 20px auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(87, 87, 87, 0.38);
    border-radius: 8px;
    background: rgba(17, 18, 22, 0.9);
}

.contact-intake-form input,
.contact-intake-form textarea {
    width: 100%;
    border: 1px solid rgba(87, 87, 87, 0.42);
    border-radius: 8px;
    background: #101216;
    color: #eef2f7;
    padding: 12px 14px;
    font: inherit;
}

.contact-intake-form input:focus,
.contact-intake-form textarea:focus {
    outline: 1px solid #63b3ed;
    border-color: #63b3ed;
}

.contact-intake-form input::placeholder,
.contact-intake-form textarea::placeholder {
    color: #77808f;
}

.contact-submit {
    width: fit-content;
    min-height: 44px;
    border: 1px solid rgba(99, 179, 237, 0.45);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 60, 92, 0.95) 0%, rgba(14, 36, 56, 0.95) 100%);
    color: #f8fbff;
    padding: 0 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.contact-submit:hover {
    background: linear-gradient(180deg, rgba(32, 76, 115, 0.95) 0%, rgba(17, 45, 70, 0.95) 100%);
}

.profile-page {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-hero,
.profile-panel {
    overflow: hidden;
}

.profile-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.95fr);
    gap: 28px;
    padding: 28px;
}

.profile-kicker,
.profile-section-index,
.profile-signal-label,
.profile-group-head span,
.profile-stack-block span {
    color: #63b3ed;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-hero h1 {
    margin-top: 8px;
    font-size: clamp(1.15rem, 5vw, 2.5rem);
    line-height: 1.04;
    max-width: 18ch;
}

.profile-lead {
    margin-top: 18px;
    max-width: 54ch;
    color: #a6adbb;
    font-size: 1rem;
    line-height: 1.75;
}

.profile-signal-grid {
    display: grid;
    gap: 12px;
}

.profile-signal-card,
.profile-panel {
    padding: 18px;
}

.profile-signal-card {
    border: 1px solid rgba(122, 162, 255, 0.16);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(23, 30, 42, 0.95) 0%, rgba(13, 17, 23, 0.95) 100%);
}

.profile-signal-card strong {
    display: block;
    margin-top: 8px;
    color: #f3f4f6;
    font-size: 1rem;
}

.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.profile-panel {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 24px;
}

.profile-section-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.profile-section-head h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.profile-section-head p,
.profile-group-head p,
.profile-project-card p,
.profile-research-card p,
.profile-stack-block p {
    color: #a6adbb;
}

.profile-capability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-capability-card,
.profile-project-card,
.profile-research-card {
    border: 1px solid rgba(87, 87, 87, 0.38);
    border-radius: 10px;
    background: rgba(17, 18, 22, 0.92);
}

.profile-capability-card {
    padding: 20px;
}

.profile-capability-card h3,
.profile-project-card h3,
.profile-research-card h3 {
    margin-bottom: 10px;
    color: #f3f4f6;
    font-size: 1rem;
}

.profile-capability-card ul,
.profile-project-card ul {
    display: grid;
    gap: 10px;
    padding-left: 18px;
    color: #d7dce5;
    line-height: 1.7;
}

.profile-stack-block {
    display: grid;
    gap: 16px;
    border: 1px solid rgba(87, 87, 87, 0.38);
    border-radius: 10px;
    background: #0f1115;
    padding: 20px;
    font-family: Consolas, 'Courier New', monospace;
}

.profile-group {
    display: grid;
    gap: 18px;
}

.profile-group-head {
    display: grid;
    gap: 4px;
}

.profile-project-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.profile-project-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-project-card {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.profile-research-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-research-card {
    padding: 20px;
}

.systems-page {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.systems-hero,
.systems-panel {
    overflow: hidden;
}

.systems-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr);
    gap: 28px;
    padding: 28px;
}

.systems-kicker,
.systems-section-index,
.systems-signal-label,
.systems-meta-row span {
    color: #63b3ed;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.systems-hero h1 {
    margin-top: 8px;
    font-size: clamp(1.15rem, 5vw, 2.5rem);
    line-height: 1.04;
    max-width: 17ch;
}

.systems-lead {
    margin-top: 18px;
    max-width: 56ch;
    color: #a6adbb;
    font-size: 1rem;
    line-height: 1.75;
}

.systems-signal-grid {
    display: grid;
    gap: 12px;
}

.systems-signal-card,
.systems-panel {
    padding: 24px;
}

.systems-signal-card {
    border: 1px solid rgba(122, 162, 255, 0.16);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(23, 30, 42, 0.95) 0%, rgba(13, 17, 23, 0.95) 100%);
}

.systems-signal-card strong {
    display: block;
    margin-top: 8px;
    color: #f3f4f6;
    font-size: 1rem;
}

.systems-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.systems-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.systems-section-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.systems-section-head h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.systems-section-head p,
.systems-project-card p {
    color: #a6adbb;
}

.systems-card-stack,
.systems-card-grid {
    display: grid;
    gap: 18px;
}

.systems-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.systems-project-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(87, 87, 87, 0.38);
    border-radius: 10px;
    background: rgba(17, 18, 22, 0.92);
    scroll-margin-top: 24px;
}

.systems-project-head {
    display: grid;
    gap: 10px;
}

.systems-project-card h3 {
    color: #f3f4f6;
    font-size: 1rem;
}

.systems-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.systems-meta-row span {
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid rgba(104, 132, 179, 0.35);
    background: rgba(27, 40, 60, 0.55);
    color: #dce8ff;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.systems-project-card ul {
    display: grid;
    gap: 10px;
    padding-left: 18px;
    color: #d7dce5;
    line-height: 1.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .content-page {
        padding: 18px 14px 28px;
    }

    .navbar {
        padding: 1rem;
    }

    .contact-hero-body,
    .profile-hero-body,
    .systems-hero-body,
    .contact-layout,
    .contact-form-grid,
    .contact-check-grid,
    .contact-check-grid.compact {
        grid-template-columns: 1fr;
    }

    .profile-capability-grid,
    .profile-project-list,
    .profile-project-list.compact,
    .profile-research-grid,
    .systems-card-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        grid-column: auto;
        grid-row: auto;
    }

    .contact-hero h1,
    .profile-hero h1,
    .systems-hero h1 {
        max-width: none;
    }

    .container {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .device-grid {
        grid-template-columns: 1fr;
    }

    .device-detail {
        grid-template-columns: 1fr;
    }

    .sensors-grid {
        grid-template-columns: 1fr;
    }
}

