/* =========================================
   VANDARIS — SHARED DESIGN SYSTEM
   ========================================= */

/* 1. GLOBAL VARIABLES */
/* Change these to globally update the color palette across the site */
:root {
    --bg: #060807; /* The absolute darkest background color */
    --surface: #0c0d0c; /* Slightly lighter background for cards/panels */
    --border: rgba(255, 255, 255, 0.08); /* Faint white borders */
    --text: #fafafa; /* Pure white text */
    --muted: #a1a1aa; /* Dimmed gray text */
    --accent: #4ade80; /* The Vandaris neon green accent color */
    --accent-dim: rgba(74, 222, 128, 0.12); /* A transparent version of the green for glows */
}

/* 2. BASE STYLES */
body {
    background-color: var(--bg); /* Sets the entire page background */
    color: var(--text); /* Sets the default text color */
}

/* Enables smooth scrolling when clicking navigation links */
html {
    scroll-behavior: smooth;
}

/* =========================================
   BACKGROUND TEXTURES & EFFECTS
   ========================================= */

/* The signature tactical background (Grid + Noise + Soft Green Glows) */
.bg-grid {
    background-color: var(--bg);
    background-image:
        /* The soft green glow at the top */
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(74, 222, 128, 0.07), transparent 55%),
        /* The soft white glow on the right */
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 255, 255, 0.02), transparent 50%),
        /* The soft green glow at the bottom left */
        radial-gradient(ellipse 50% 35% at 0% 80%, rgba(74, 222, 128, 0.04), transparent 45%),
        /* The static "noise" texture */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E"),
        /* The vertical grid lines */
        linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        /* The horizontal grid lines */
        linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size:
        100% 100%, 100% 100%, 100% 100%,
        180px 180px, /* Size of the noise pattern */
        44px 44px, /* Spacing of the grid squares */
        44px 44px;
    background-attachment: fixed; /* Keeps the background still while scrolling */
}

/* Specific green glow for the hero section */
.bg-radial-hero {
    background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(74, 222, 128, 0.09), transparent);
}


/* =========================================
   TYPOGRAPHY & BUTTONS
   ========================================= */

/* The small, spaced-out category labels (e.g., "APPLICATION") */
/* Grayscale by default — green is reserved for live telemetry only */
.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d4d4d8;
}

/* A grayed-out version of the section label */
.section-label-muted {
    color: #71717a;
}

/* The active state for the top navigation links (adds the green underline) */
.nav-link-active {
    color: #fff !important;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
}

/* Solid white primary button (e.g., "SUBMIT APPLICATION") */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff; /* White background */
    color: #000; /* Black text */
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.875rem 1.75rem;
    transition: background 0.2s ease;
}

/* Hover state for primary button */
.btn-primary:hover {
    background: #e4e4e7; /* Shifts to a light gray on hover */
}

/* Outlined secondary button (e.g., "All roles") */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Faint white outline */
    color: #fff; /* White text */
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.875rem 1.75rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Hover state for secondary button */
.btn-secondary:hover {
    border-color: rgba(74, 222, 128, 0.4); /* Border turns green */
    background: rgba(74, 222, 128, 0.06); /* Background gets a faint green tint */
}


/* =========================================
   CARDS & UI ELEMENTS
   ========================================= */

/* Used to group content (like the application form container) */
.card {
    border: 1px solid var(--border);
    /* Faint white gradient background */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.18); /* Border brightens to crisp white on hover */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 100%);
}

/* Semi-transparent frosted glass bar */
.stat-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

/* Tactical corner brackets framing the viewer — all four corners, perfectly
   aligned, drawn from a single pseudo-element (no extra DOM). */
.hud-frame {
    position: relative;
    --hud-c: rgba(255, 255, 255, 0.25); /* Neutral white; green reserved for telemetry */
    --hud-arm: 22px; /* Length of each bracket arm */
}
.hud-frame::before {
    content: '';
    position: absolute;
    inset: 12px;
    pointer-events: none;
    z-index: 20;
    background:
        linear-gradient(var(--hud-c), var(--hud-c)) left top / var(--hud-arm) 1px no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) left top / 1px var(--hud-arm) no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) right top / var(--hud-arm) 1px no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) right top / 1px var(--hud-arm) no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) left bottom / var(--hud-arm) 1px no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) left bottom / 1px var(--hud-arm) no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) right bottom / var(--hud-arm) 1px no-repeat,
        linear-gradient(var(--hud-c), var(--hud-c)) right bottom / 1px var(--hud-arm) no-repeat;
}


/* =========================================
   3D PROTOTYPE VIEWER
   ========================================= */

#prototype-viewer {
    position: absolute;
    inset: 0;
    z-index: 10;
}
#prototype-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}
#prototype-viewer canvas:active {
    cursor: grabbing;
}
#model-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #71717a;
    z-index: 15;
    pointer-events: none;
}


/* =========================================
   APPLICATION FORM STYLING
   ========================================= */

/* The titles sitting above each input field (e.g., "FIRST NAME") */
.form-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffffff; /* White text */
    margin-bottom: 0.5rem;
}

/* The asterisk indicating a field is required */
.form-label .required {
    color: var(--accent); /* Neon green asterisk */
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* DEFAULT STATE: The dark gray input boxes */
#application-form .form-input,
#application-form .form-textarea,
#application-form .form-select {
    width: 100%;
    background-color: #1c1e1d; /* Dark gray background */
    border: 1px solid rgba(255, 255, 255, 0.14); /* Faint whitish border */
    color: #b8bcc4; /* Color of the text the user types */
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.55;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* The faded example text inside the empty boxes */
#application-form .form-input::placeholder,
#application-form .form-textarea::placeholder {
    color: #6b7280; /* Medium-dark gray */
}

/* ACTIVE STATE: When the user clicks inside an input box */
#application-form .form-input:focus,
#application-form .form-textarea:focus,
#application-form .form-select:focus {
    outline: none;
    border-color: rgba(74, 222, 128, 0.5); /* Glowing green border */
    background-color: #242726; /* Slightly lighter gray background */
    color: #d4d4d8; /* Makes the typed text brighter white */
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.15); /* Soft green outer glow */
}

/* Fixes the ugly yellow/blue backgrounds Chrome applies to auto-filled passwords/emails */
#application-form .form-input:-webkit-autofill,
#application-form .form-input:-webkit-autofill:hover,
#application-form .form-input:-webkit-autofill:focus,
#application-form .form-textarea:-webkit-autofill,
#application-form .form-textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1c1e1d inset; /* Forces background back to dark gray */
    -webkit-text-fill-color: #b8bcc4;
    caret-color: #b8bcc4;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Sizing for the text area boxes */
#application-form .form-textarea {
    min-height: 120px;
    resize: vertical; /* Allows the user to drag the box taller, but not wider */
}
#application-form .form-textarea-lg {
    min-height: 22rem;
    height: 22rem;
    padding: 1rem 1.125rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    overflow-y: auto;
}

/* Dropdown menu styling */
#application-form .form-select {
    color-scheme: dark; /* Forces the browser's native dropdown UI into dark mode */
    background-color: #1c1e1d;
    color: #b8bcc4;
}
#application-form .form-select option {
    background-color: #1c1e1d;
    color: #b8bcc4;
}
/* Custom color for dropdown category headers */
#application-form .form-select optgroup {
    color: #ffffff; /* Brighter white color */
    font-weight: 600; /* Makes the text slightly bolder */
}

/* The Resume file upload styling */
#application-form .form-input[type="file"] {
    padding: 0.65rem 1rem;
    color: #9ca3af; /* Color of the "No file chosen" text */
}

/* The actual "Choose File" button inside the upload input */
#application-form .form-input::file-selector-button {
    margin-right: 1rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background-color: #2a2d2b; /* Elevated gray button background */
    color: #9ca3af; /* Text color inside button */
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

/* Small helper text below inputs (e.g., "PDF preferred · Max 10 MB") */
.form-hint {
    font-size: 0.75rem;
    color: #71717a; /* Medium gray text */
    margin-top: 0.35rem;
    font-weight: 300;
}


/* =========================================
   OPERATIONAL METRICS / SPECS
   ========================================= */

.spec-cell {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 1.5rem;
}

.spec-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.spec-unit {
    font-size: 0.95rem;
    color: #71717a;
    margin-left: 0.25rem;
    letter-spacing: 0;
}

.spec-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a1a1aa;
    margin-top: 0.75rem;
}


/* =========================================
   IBVS — ARCHITECTURE STACK + LOOP DIAGRAM
   ========================================= */

/* Pulse used by the live telemetry dot in the tactical demo bar */
@keyframes ibvs-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.ibvs-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ibvs-stack-item {
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
}

.ibvs-stack-item dt {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #71717a;
    margin-bottom: 0.375rem;
}

.ibvs-stack-item dd {
    font-size: 0.875rem;
    color: #e4e4e7;
    font-weight: 400;
    line-height: 1.5;
}

.ibvs-loop-diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #71717a;
}

.ibvs-loop-step {
    padding: 0.375rem 0.625rem;
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: #a1a1aa;
}

.ibvs-loop-arrow {
    color: rgba(74, 222, 128, 0.5);
}


/* =========================================
   DUAL-PANE TACTICAL DEMO
   ========================================= */

.tac-device {
    position: relative;
    background: #080809;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.05),
        0 24px 48px rgba(0, 0, 0, 0.45);
}

.tac-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.5);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #71717a;
}

.tac-bar .live {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: rgba(74, 222, 128, 0.85);
}

.tac-bar .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    animation: ibvs-pulse 1.4s ease-in-out infinite;
}

.tac-panes {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.tac-pane {
    position: relative;
    background: #070a09;
    line-height: 0;
}

.tac-pane canvas {
    display: block;
    width: 100%;
    height: auto; /* preserve each canvas's intrinsic aspect ratio at any width */
}

/* Telemetry strip — shared instrument cluster for both panes */
.tac-telemetry {
    display: flex;
    align-items: stretch;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.55);
    font-family: 'IBM Plex Mono', monospace;
}

.tac-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.tac-status .tac-tdot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex: none;
}

.tac-status .tac-tval {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: #4ade80;
}

.tac-readout {
    display: flex;
    flex: 1;
    min-width: 0;
}

.tac-cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.7rem 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.tac-cell:last-child {
    border-right: none;
}

.tac-tlabel {
    font-size: 8px;
    letter-spacing: 0.14em;
    color: #6b7280;
    text-transform: uppercase;
    white-space: nowrap;
}

.tac-num {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.tac-tval {
    color: #fafafa;
    font-weight: 500;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.tac-tunit {
    font-size: 8px;
    color: #52525b;
}

.tac-cell-conf {
    flex: 1.6 1 0;
}

.tac-conf-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.tac-conf-track {
    flex: 1;
    height: 4px;
    min-width: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.tac-conf-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: #4ade80;
    transition: width 0.12s ease-out, background 0.2s;
}

.tac-tmeta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.tac-tmeta span {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.tac-tmeta .tac-tval {
    color: #a1a1aa;
    font-size: 11px;
}

@media (max-width: 760px) {
    .tac-panes {
        grid-template-columns: 1fr;
    }
    .tac-telemetry {
        flex-wrap: wrap;
    }
    .tac-status {
        flex-basis: 100%;
        justify-content: center;
        padding: 0.6rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }
    .tac-readout {
        flex-wrap: wrap;
        flex-basis: 100%;
    }
    .tac-cell {
        flex: 1 1 33%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .tac-cell-conf {
        flex-basis: 100%;
    }
    .tac-tmeta {
        flex-basis: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        padding: 0.6rem;
        border-left: none;
    }
}