:root {
    --color-bg: #0a0a0a;
    --color-accent: #FF9E1B;
    --color-text: #E6E6E6;
    --color-dark-gray: #1a1a1a;
    --color-panel-bg: rgba(10, 10, 10, 0.85);
    --font-header: 'Black Ops One', cursive;
    --font-body: 'Chakra Petch', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 18px;
    /* Prevent horizontal scroll on mobile */
    width: 100%;
    position: relative;
}

/* Typography - Fluid Scaling */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.accent-text {
    color: var(--color-accent);
}

.highlight {
    color: var(--color-accent);
    font-weight: bold;
}

/* Floating Logo Button (Left) */
.floating-logo-btn {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 70px;
    height: 70px;
    background: rgba(10, 10, 10, 0.8);
    border: 2px solid var(--color-accent);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 158, 27, 0.2);
    transition: all 0.3s ease;
    border-radius: 10px;
}

.floating-logo-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(255, 158, 27, 0.6);
    background: rgba(20, 20, 20, 0.9);
}

.floating-logo-btn img {
    width: 40px;
    height: auto;
}

/* Floating Contact Button (Right) */
.floating-contact-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--color-accent);
    color: #000;
    padding: 15px 30px;
    z-index: 1000;
    font-family: var(--font-header);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(255, 158, 27, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #000;
}

.floating-contact-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(255, 158, 27, 0.6);
    color: #000;
}

.btn-icon {
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-text {
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Overlays */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAA5OTkAAABERERmZmYzMzOZmZlVVVUAAAB5273lAAAACHRSTlMAMwAzzMzMzM8K7uO1AAAAJUlEQVQ4y2NgGAWjYBSMglEwCkbBKBgFo2AUjIJRMApGwSgYBQQAABCWAXHwvRkAAAAASUVORK5CYII=');
    opacity: 0.03;
    pointer-events: none;
    z-index: 999;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 998;
}

.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, #000 100%);
    pointer-events: none;
    z-index: 997;
}

/* Header */
.main-header {
    padding: 30px 0;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text-only {
    font-family: var(--font-header);
    font-size: clamp(1.5rem, 4vw, 2rem);
    /* Fluid font size */
    color: var(--color-accent);
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 158, 27, 0.3);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.main-nav a {
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    /* Ensure height on mobile */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    z-index: -1;
    transform: translate(-5%, -5%);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
}

.hero-split-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.slogan-container h1 {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    /* Fluid font size */
    line-height: 1.1;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    word-break: break-word;
    /* Prevent overflow */
}

/* Nav Grid Section */
.nav-grid-section {
    background: #0f0f0f;
    padding: 20px 0;
    border-bottom: 1px solid #222;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.nav-card {
    background: #1a1a1a;
    padding: 15px;
    text-align: center;
    border: 1px solid #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-card:hover {
    background: #222;
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.nav-icon {
    font-family: var(--font-header);
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 5px;
}

.nav-label {
    font-size: 0.8rem;
    color: #888;
    font-family: monospace;
}

/* VRN Code Section */
.vrn-code-section {
    padding: 100px 0;
    background: #0f0f0f;
}

.section-header-center {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 10px;
}

.section-subtitle {
    font-family: monospace;
    color: var(--color-accent);
    letter-spacing: 3px;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.vrn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.vrn-card {
    height: 500px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.vrn-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #141414;
}

.card-front {
    border-top: 5px solid var(--color-accent);
}

.letter-big {
    font-family: var(--font-header);
    font-size: 12rem;
    line-height: 1;
    color: #222;
    text-shadow: 0 0 20px rgba(255, 158, 27, 0.1);
}

.letter-title {
    font-size: 2rem;
    font-weight: bold;
    margin-top: -20px;
    color: #fff;
}

.letter-sub {
    color: var(--color-accent);
    font-family: monospace;
    margin-top: 10px;
}

.card-back {
    transform: rotateY(180deg);
    background: #1a1a1a;
    padding: 40px;
    align-items: flex-start;
    border-bottom: 5px solid var(--color-accent);
}

.card-back h4 {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.protocol-desc {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #ccc;
}

.protocol-specs {
    list-style: none;
    width: 100%;
}

.protocol-specs li {
    border-bottom: 1px solid #333;
    padding: 10px 0;
    color: #888;
    font-family: monospace;
}

.protocol-specs li:last-child {
    border-bottom: none;
    color: #fff;
    font-style: italic;
    margin-top: 20px;
}

/* Philosophy Section */
.philosophy-section {
    position: relative;
    padding: 100px 0;
    background: #0a0a0a;
    border-top: 1px solid #222;
    overflow: hidden;
}

.philo-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.philo-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.philo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #0a0a0a 0%, rgba(10, 10, 10, 0.8) 50%, #0a0a0a 100%);
    z-index: 1;
}

.philo-content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: left;
    margin-top: 60px;
}

.philo-item {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.philo-item:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
}

.philo-icon {
    font-family: monospace;
    color: var(--color-accent);
    margin-bottom: 20px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.philo-item h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.philo-item p {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.6;
}

/* Capabilities Panels (Expert Polish) */
.capabilities-section {
    background: #000;
}

.capability-panel {
    position: relative;
    min-height: 80vh;
    /* Changed to min-height for flexibility */
    overflow: hidden;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.panel-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    transform: scale(1.1);
}

.capability-panel:hover .panel-bg img {
    transform: scale(1.0);
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
}

.panel-right .panel-overlay {
    background: linear-gradient(-90deg, #000 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
}

.panel-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.panel-right {
    display: flex;
    justify-content: flex-end;
    text-align: right;
}

.panel-text {
    max-width: 700px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    border-left: 5px solid var(--color-accent);
    backdrop-filter: blur(5px);
    position: relative;
}

.panel-text::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--color-accent);
    border-right: 2px solid var(--color-accent);
    opacity: 0.5;
}

.panel-right .panel-text {
    border-left: none;
    border-right: 5px solid var(--color-accent);
}

.panel-right .panel-text::before {
    left: -2px;
    right: auto;
    border-right: none;
    border-left: 2px solid var(--color-accent);
}

.panel-code {
    display: block;
    font-family: monospace;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.panel-text h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.panel-tags {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-right .panel-tags {
    justify-content: flex-end;
}

.tech-tag {
    background: #222;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-family: monospace;
    border: 1px solid #444;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    border-color: var(--color-accent);
    color: #fff;
    background: #333;
}

/* Partnership */
.partnership-section {
    padding: 100px 0;
    background: #111;
}

.partnership-box {
    border: 1px solid #333;
    background: #0a0a0a;
}

.box-header {
    padding: 40px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping on mobile */
    gap: 20px;
}

.flag-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ua-flag {
    width: 40px;
    height: 25px;
    background: linear-gradient(to bottom, #0057B8 50%, #FFD700 50%);
    opacity: 0.8;
}

.flag-text {
    font-family: monospace;
    color: #888;
    font-weight: bold;
}

.box-body {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0;
}

.deal-col {
    padding: 60px;
}

.deal-divider {
    background: #333;
}

.deal-col h4 {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.deal-col ul {
    list-style: none;
}

.deal-col li {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #ccc;
}

.deal-col li::before {
    content: '✓';
    color: var(--color-accent);
    margin-right: 15px;
}

.requirement-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 30px;
    border: 1px solid var(--color-accent);
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 158, 27, 0.05);
}

.box-footer {
    padding: 40px;
    border-top: 1px solid #333;
    text-align: center;
    background: #0f0f0f;
}

.contact-line-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-line {
    font-family: monospace;
    font-size: 1.2rem;
    color: #888;
}

.contact-line a {
    color: var(--color-accent);
    text-decoration: underline;
}

.linkedin-icon {
    font-family: var(--font-header);
    color: #0077B5;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.linkedin-icon:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Contact Form Section */
.contact-section {
    padding: 100px 0;
    background: #0f0f0f;
    border-top: 1px solid #222;
}

.contact-terminal {
    max-width: 700px;
    margin: 0 auto;
    font-family: monospace;
    width: 100%;
}

.terminal-header {
    color: var(--color-accent);
    margin-bottom: 20px;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
}

.contact-badge-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.contact-email-section {
    margin-top: 40px;
    border-top: 1px solid #333;
    padding-top: 30px;
}

.contact-email-link {
    display: block;
    margin-top: 20px;
    font-size: 1.5rem;
    color: var(--color-accent);
    font-family: var(--font-body);
    text-shadow: 0 0 10px rgba(255, 158, 27, 0.3);
    text-align: center;
}

/* LinkedIn Badge Font Override */
.LI-profile-badge,
.LI-profile-badge *,
.badge-base,
.badge-base * {
    font-family: var(--font-body) !important;
}

.contact-box-compact {
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 40px;
    position: relative;
}

.contact-box-compact::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--color-accent);
    border-left: 2px solid var(--color-accent);
}

.contact-box-compact::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--color-accent);
    border-right: 2px solid var(--color-accent);
}

.contact-header-compact h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.contact-form-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group-compact input,
.form-group-compact textarea {
    width: 100%;
    background: #141414;
    border: 1px solid #333;
    color: var(--color-text);
    padding: 15px;
    font-family: monospace;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group-compact input:focus,
.form-group-compact textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #1a1a1a;
}

.submit-btn-compact {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 15px;
    font-family: monospace;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.submit-btn-compact:hover {
    background: var(--color-accent);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 158, 27, 0.4);
}

/* Footer */
.main-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #222;
    color: #444;
    font-family: monospace;
}

/* Glitch Large */
.glitch-large {
    position: relative;
}

/* =========================================
   RESPONSIVE DESIGN (World-Class)
   ========================================= */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .vrn-grid {
        grid-template-columns: 1fr;
        /* Stack cards */
        max-width: 600px;
        margin: 0 auto;
    }

    .vrn-card {
        height: 400px;
        /* Shorter cards on tablet */
    }

    .box-body {
        grid-template-columns: 1fr;
        /* Stack partnership columns */
    }

    .deal-divider {
        height: 1px;
        width: 100%;
        margin: 0;
    }

    .deal-col {
        padding: 40px;
    }

    .nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        max-width: 700px;
        margin: 60px auto 0;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav a {
        font-size: 0.8rem;
    }

    .hero-section {
        min-height: 100vh;
    }

    .capability-panel {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        padding: 60px 0;
    }

    .panel-right {
        justify-content: center;
        text-align: left;
        /* Reset text align for mobile readability */
    }

    .panel-text {
        max-width: 90%;
        margin: 0 auto;
        border-left: none;
        border-top: 5px solid var(--color-accent);
        /* Top border for mobile */
        padding: 30px 20px;
    }

    .panel-right .panel-text {
        border-right: none;
        border-left: none;
        border-top: 5px solid var(--color-accent);
    }

    .panel-right .panel-tags {
        justify-content: flex-start;
        /* Align tags left on mobile */
    }

    .contact-box-compact {
        padding: 20px;
    }

    .form-group-compact input,
    .form-group-compact textarea {
        font-size: 0.9rem;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .main-nav a {
        font-size: 0.75rem;
    }

    .deal-col {
        padding: 30px 20px;
    }

    .requirement-text {
        font-size: 1rem;
        padding: 10px;
    }
}

/* Mobile Floating Button Override (Square with [ + ]) */
/* Mobile Floating Button Override (Square with +) */
@media (max-width: 768px) {
    .floating-contact-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        /* Match logo button size */
        height: 50px;
        /* Match logo button size */
        padding: 0;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        background: var(--color-accent);
        /* Yellow Background */
        border: 2px solid var(--color-accent);
        box-shadow: 0 0 20px rgba(255, 158, 27, 0.4);
    }

    .btn-text {
        display: none;
    }

    .btn-icon {
        margin: 0;
        font-size: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-icon::before {
        content: '+';
        /* No brackets */
        font-size: 2rem;
        font-family: var(--font-header);
        color: #000;
        /* Black Plus */
        font-weight: bold;
        line-height: 1;
        margin-top: -2px;
        /* Optical centering */
    }
}

/* Mobile Floating Buttons Override (Symmetrical Squares) */
@media (max-width: 768px) {

    /* Contact Button (Right) */
    .floating-contact-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        padding: 0;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        background: var(--color-accent);
        border: 2px solid var(--color-accent);
        box-shadow: 0 0 20px rgba(255, 158, 27, 0.4);
    }

    .btn-text {
        display: none;
    }

    .btn-icon {
        margin: 0;
        font-size: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-icon::before {
        content: '+';
        font-size: 2rem;
        font-family: var(--font-header);
        color: #000;
        font-weight: bold;
        line-height: 1;
        margin-top: -2px;
    }

    /* Logo Button (Left) - Enforce Symmetry */
    .floating-logo-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        border-radius: 10px;
        padding: 0;
        background: rgba(10, 10, 10, 0.9);
        border: 2px solid var(--color-accent);
    }

    .floating-logo-btn img {
        width: 25px;
        height: auto;
    }
}