:root {
    --soil-0: #0a0604;
    --soil-1: #140b07;
    --soil-2: #1f110a;
    --clay: #3a1f12;
    --rust: #7a3a1a;
    --ochre: #b56a2b;
    --sand: #d8a264;
    --bone: #e8c79a;
    --ember: #c45a22;
    --neon: #ff6b35;
    --cyber: #d8a264;
    --alert: #ff3333;
    --secure: #4a9d4a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Fonts ===== */
@font-face {
    font-family: Poppins;
    src: url('../fonts/poppins/Poppins-Regular.ttf');
}

@font-face {
    font-family: Poppins-Light;
    src: url('../fonts/poppins/Poppins-Light.ttf');
}

@font-face {
    font-family: Poppins-Medium;
    src: url('../fonts/poppins/Poppins-Medium.ttf');
}

@font-face {
    font-family: Poppins-SemiBold;
    src: url('../fonts/poppins/Poppins-SemiBold.ttf');
}

@font-face {
    font-family: Poppins-Bold;
    src: url('../fonts/poppins/Poppins-Bold.ttf');
}

@font-face {
    font-family: Helvetica;
    src: url('../fonts/helvetica-255/Helvetica.ttf');
}

@font-face {
    font-family: Helvetica-Bold;
    src: url('../fonts/helvetica-255/Helvetica-Bold.ttf');
}

@font-face {
    font-family: LucidaSans;
    src: url('../fonts/lucida-sans/LTYPE.TTF');
}

/* ===== BASE (mobile-first) ===== */
html,
body {
    min-height: 100vh;
    background: var(--soil-0);
    color: var(--bone);
    font-family: 'Poppins', 'Courier New', monospace;
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* ===== CANVASES ===== */
#matrixCanvas,
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#matrixCanvas {
    opacity: 0.35;
}

#particleCanvas {
    opacity: 0.6;
    z-index: 1;
}

/* ===== NOISE & GRID ===== */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hex-pattern {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='none' stroke='%23c45a22' stroke-width='0.5' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 2;
    pointer-events: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(196, 90, 34, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196, 90, 34, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 1;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    
    100% {
        transform: translate(50px, 50px);
    }
}

/* ===== SCAN LINE ===== */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ember), var(--neon), var(--ember), transparent);
    animation: scan 3s ease-in-out infinite;
    z-index: 9998;
    box-shadow: 0 0 30px var(--ember);
}

@keyframes scan {

    0%,
    100% {
        top: 0;
        opacity: 0;
    }
    
    10% {
        opacity: 1;
    }
    
    90% {
        opacity: 1;
    }
    
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ===== BOOT OVERLAY ===== */
.boot-overlay {
    position: fixed;
    inset: 0;
    background: var(--soil-0);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.boot-overlay.skip-boot {
    display: none !important;
}

.boot-text {
    font-family: 'Courier New', monospace;
    color: var(--ember);
    font-size: 0.85rem;
    text-align: left;
    width: 600px;
    max-width: 90%;
}

.core-directive {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 3px solid var(--secure);
    font-family: 'Courier New', monospace;
    line-height: 1.8;
}

.directive-line {
    display: block;
    opacity: 0;
    animation: fadeInLine 0.15s forwards;
}

.core-directive .directive-line:nth-child(1) {
    animation-delay: 0.1s;
}

.core-directive .directive-line:nth-child(2) {
    animation-delay: 0.3s;
}

.boot-line {
    opacity: 0;
    animation: fadeInLine 0.15s forwards;
}

.boot-lines-container .boot-line:nth-child(1) {
    animation-delay: 0.6s;
}

.boot-lines-container .boot-line:nth-child(2) {
    animation-delay: 0.8s;
}

.boot-lines-container .boot-line:nth-child(3) {
    animation-delay: 1.0s;
}

.boot-lines-container .boot-line:nth-child(4) {
    animation-delay: 1.2s;
}

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.boot-progress {
    margin-top: 1.5rem;
    height: 3px;
    background: var(--secure);
    width: 0;
    animation: fillProgress 1.5s linear forwards;
    box-shadow: 0 0 10px var(--secure);
}

@keyframes fillProgress {
    to {
        width: 100%;
    }
}

.boot-overlay {
    animation: fadeOutOverlay 0.5s forwards 1.8s;
}

@keyframes fadeOutOverlay {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* ===== SECURITY HEADER ===== */
.security-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 6, 4, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rust);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    font-size: 0.65rem;
    animation: slideDown 0.5s ease 2s both;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.7rem;
    background: rgba(196, 90, 34, 0.1);
    border: 1px solid var(--ember);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ember);
    font-weight: 600;
}

.badge-pulse {
    width: 6px;
    height: 6px;
    background: var(--ember);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 8px var(--ember);
}

.security-level {
    display: flex;
    gap: 0.8rem;
    color: var(--ochre);
    font-size: 0.6rem;
}

.sep {
    opacity: 0.3;
}

/* ===== CONTAINER ===== */
.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 3rem;
    gap: 1.2rem;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.container.boot-skipped {
    opacity: 1 !important;
    animation: none !important;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== TITLE ===== */
.title-wrap {
    position: relative;
    text-align: center;
    flex-shrink: 0;
}

.classified-badge {
    position: absolute;
    top: 0.3rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.2rem 1rem;
    background: rgba(255, 51, 51, 0.1);
    border: 2px solid var(--alert);
    color: var(--alert);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: alertPulse 2s infinite;
    white-space: nowrap;
    z-index: 5;
}

@keyframes alertPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
    }
    
    50% {
        box-shadow: 0 0 25px rgba(255, 51, 51, 0.8), 0 0 50px rgba(255, 51, 51, 0.3);
    }
}

/* Holographic title with shimmer */
.title {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--bone);
    position: relative;
    display: inline-block;
    font-family: 'Poppins-Bold', sans-serif;
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    3% { opacity: 0.7; }
    6% { opacity: 1; }
    7% { opacity: 0.85; }
    10% { opacity: 1; }
    92% { opacity: 1; }
    94% { opacity: 0.75; }
    96% { opacity: 1; }
}

/* Glitch layers - no backdrop, just offset glitch text */
.title::before,
.title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    color: var(--bone);
    opacity: 0.85;
}

.title::before {
    left: 2px;
    color: var(--neon);
    animation: glitch-1 1.6s infinite linear alternate-reverse;
    clip-path: inset(0);
}

.title::after {
    left: -2px;
    color: var(--ember);
    animation: glitch-2 1.4s infinite linear alternate-reverse;
    clip-path: inset(0);
}

@keyframes glitch-1 {

    0%,
    85%,
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    
    86% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(-3px, 3px);
    }
    
    88% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(3px, -3px);
    }
    
    90% {
        clip-path: inset(40% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    
    92% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {

    0%,
    85%,
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    
    87% {
        clip-path: inset(30% 0 50% 0);
        transform: translate(3px, -3px);
    }
    
    89% {
        clip-path: inset(70% 0 5% 0);
        transform: translate(-3px, 3px);
    }
    
    91% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(2px, -2px);
    }
    
    93% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(-2px, 2px);
    }
}

/* Subtitle typing effect */
.subtitle {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--ochre);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    min-height: 1.2em;
    opacity: 0;
    animation: fadeIn 0.5s ease 2.2s forwards;
}

.subtitle.boot-skipped {
    opacity: 1 !important;
    animation: none !important;
}

.cursor {
    display: none;
    animation: blink 0.8s infinite;
    color: var(--ember);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }
    
    51%,
    100% {
        opacity: 0;
    }
}

/* Access code */
.access-code {
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.6rem;
    color: var(--ember);
    opacity: 0.6;
    letter-spacing: 0.15em;
}

.access-link {
    color: var(--ember);
    text-decoration: none;
    transition: all 0.3s ease;
}

.access-link:hover {
    color: var(--neon);
    opacity: 1;
    text-shadow: 0 0 8px var(--ember);
}

.code-flash {
    animation: blink 1.5s infinite;
}

.code-spacer {
    display: inline-block;
    width: 1rem;
}

/* Data readout */
.data-readout {
    position: absolute;
    top: -0.5rem;
    right: -1.5rem;
    font-size: 0.55rem;
    color: var(--ember);
    text-align: right;
    line-height: 1.8;
    font-family: 'Courier New', monospace;
}

.readout-line {
    display: block;
    opacity: 0;
    animation: readoutFade 0.3s ease forwards;
}

.readout-line[data-delay="0"] {
    animation-delay: 2.3s;
}

.readout-line[data-delay="200"] {
    animation-delay: 2.5s;
}

.readout-line[data-delay="400"] {
    animation-delay: 2.7s;
}

.readout-line[data-delay="600"] {
    animation-delay: 2.9s;
}

.readout-line[data-delay="800"] {
    animation-delay: 3.1s;
}

@keyframes readoutFade {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    
    to {
        opacity: 0.6;
        transform: translateX(0);
    }
}

/* ===== MENU ===== */
.main-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: linear-gradient(135deg, rgba(20, 11, 7, 0.8), rgba(10, 6, 4, 0.9));
    border: 1px solid var(--rust);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    animation: slideUp 0.8s ease 2.4s forwards;
    box-shadow: 0 0 30px rgba(196, 90, 34, 0.1), inset 0 0 30px rgba(122, 58, 26, 0.05);
    backdrop-filter: blur(5px);
}

.main-menu.boot-skipped {
    opacity: 1 !important;
    animation: none !important;
}

.main-menu::before,
.main-menu::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--ember);
    opacity: 0.6;
}

.main-menu::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.main-menu::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.menu-item {
    position: relative;
    padding: 0.4rem 0.8rem;
    color: var(--bone);
    text-decoration: none;
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid rgba(122, 58, 26, 0.3);
    background: rgba(10, 6, 4, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 2px;
}

.menu-icon {
    font-size: 0.55rem;
    color: var(--rust);
    transition: all 0.3s;
}

.menu-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--ember);
    box-shadow: 0 0 8px var(--ember);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.menu-item:hover {
    border-color: var(--ember);
    color: var(--ember);
    background: rgba(196, 90, 34, 0.08);
    box-shadow: 0 0 20px rgba(196, 90, 34, 0.3), inset 0 0 15px rgba(196, 90, 34, 0.1);
    transform: translateY(-2px) scale(1.03);
}

.menu-item:hover .menu-icon {
    color: var(--ember);
    text-shadow: 0 0 8px var(--ember);
    animation: iconSpin 0.5s ease;
}

@keyframes iconSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    
    50% {
        transform: rotate(180deg) scale(1.3);
    }
    
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.menu-item:hover::after {
    width: 80%;
}

.menu-item.active {
    border-color: var(--ember);
    color: var(--ember);
    background: rgba(196, 90, 34, 0.12);
    box-shadow: 0 0 15px rgba(196, 90, 34, 0.25);
}

.menu-item.active .menu-icon {
    color: var(--ember);
    text-shadow: 0 0 8px var(--ember);
}

/* External link button (DANIEL MOYO) */
.menu-item-external {
    border-color: var(--secure);
    background: rgba(74, 157, 74, 0.08);
    color: var(--secure);
}

.menu-item-external .menu-icon {
    color: var(--secure);
}

.menu-item-external:hover {
    border-color: var(--secure);
    color: var(--secure);
    background: rgba(74, 157, 74, 0.15);
    box-shadow: 0 0 20px rgba(74, 157, 74, 0.3), inset 0 0 15px rgba(74, 157, 74, 0.1);
}

.menu-item-external:hover::after {
    background: var(--secure);
    box-shadow: 0 0 8px var(--secure);
}

.external-icon {
    opacity: 0.6;
    transition: all 0.3s;
}

.menu-item-external:hover .external-icon {
    opacity: 1;
    transform: translate(2px, -2px);
}

.menu-scan {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
    animation: menuScan 3s linear infinite;
    pointer-events: none;
}

@keyframes menuScan {
    to {
        left: 100%;
    }
}

/* ===== CARDS ===== */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1400px;
    width: 100%;
    justify-content: center;
    flex: 1;
    min-height: 0;
    align-content: center;
    max-height: 50vh;
    margin-top: 1rem;
}

.cards.boot-skipped {
    opacity: 1 !important;
    animation: none !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    flex: 1 1 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    box-sizing: border-box;
    position: relative;
    background: linear-gradient(145deg, rgba(20, 11, 7, 0.95), rgba(10, 6, 4, 0.98));
    border: 1px solid var(--rust);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: cardEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.card-enter {
    opacity: 0;
    animation: cardEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9) rotateX(10deg);
    }
    
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

/* Card glow that follows cursor */
.card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 90, 34, 0.15) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* Card scan line */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
    animation: scanCard 3s linear infinite;
    z-index: 5;
}

@keyframes scanCard {
    to {
        left: 100%;
    }
}

/* Card shimmer overlay */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(196, 90, 34, 0.06) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
}

.card:hover {
    border-color: var(--ember);
}

.card:hover::after {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(122, 58, 26, 0.3);
    position: relative;
    z-index: 2;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--ember);
    text-shadow: 0 0 15px var(--ember);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    
    50% {
        transform: translateY(-3px) scale(1.05);
    }
}

.card-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    color: var(--ochre);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: 'Poppins-Medium', sans-serif;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--ember);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px var(--ember);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    
    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bone);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Poppins-Bold', sans-serif;
    position: relative;
    z-index: 2;
}

.card-desc {
    font-size: 0.7rem;
    color: var(--sand);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    font-family: 'Poppins-Light', sans-serif;
    flex: 1;
    position: relative;
    z-index: 2;
}

.card-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem;
    font-size: 0.58rem;
    color: var(--ochre);
    opacity: 0.8;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 2;
}

.data-item {
    display: flex;
    justify-content: space-between;
    padding: 0.15rem 0;
    border-bottom: 1px dotted rgba(122, 58, 26, 0.2);
}

.data-val {
    color: var(--ember);
    font-weight: 600;
}

/* Card action button */
.card-action {
    padding: 0.5rem 0.8rem;
    background: transparent;
    border: 1px solid var(--rust);
    color: var(--bone);
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    z-index: 2;
    border-radius: 2px;
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(196, 90, 34, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.card-action:hover {
    border-color: var(--ember);
    color: var(--ember);
    box-shadow: 0 0 25px rgba(196, 90, 34, 0.4);
    background: rgba(196, 90, 34, 0.05);
    transform: translateY(-1px);
}

.card-action:hover .btn-glow {
    transform: translateX(100%);
}

/* Card corners & radar */
.corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--ember);
    opacity: 0.5;
    z-index: 3;
}

.corner-tl {
    top: 5px;
    left: 5px;
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    top: 5px;
    right: 5px;
    border-left: none;
    border-bottom: none;
}

.corner-bl {
    bottom: 5px;
    left: 5px;
    border-right: none;
    border-top: none;
}

.corner-br {
    bottom: 5px;
    right: 5px;
    border-left: none;
    border-top: none;
}

.radar {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 35px;
    height: 35px;
    border: 1px solid var(--rust);
    border-radius: 50%;
    opacity: 0.25;
    z-index: 3;
}

.radar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 1.5px;
    background: linear-gradient(90deg, var(--ember), transparent);
    transform-origin: left center;
    animation: radarSweep 3s linear infinite;
}

@keyframes radarSweep {
    from {
        transform: rotate(0deg);
    }
    
    to {
        transform: rotate(360deg);
    }
}

/* ===== STATUS BAR ===== */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 6, 4, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--rust);
    padding: 0.4rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6rem;
    color: var(--ochre);
    z-index: 100;
    font-family: 'Courier New', monospace;
    animation: slideUp 0.5s ease 2.8s both;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-pulse {
    width: 5px;
    height: 5px;
    background: var(--secure);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 6px var(--secure);
}

.status-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
    animation: scanBar 3s linear infinite;
}

@keyframes scanBar {
    from {
        transform: translateX(-100%);
    }
    
    to {
        transform: translateX(100%);
    }
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 4, 0.95);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Nested overlay sits on top of the first modal */
.nested-overlay {
    z-index: 25000;
    background: rgba(10, 6, 4, 0.97);
}

.nested-overlay .modal-container {
    border-color: var(--ember);
}

.nested-overlay .modal-header {
    background: rgba(196, 90, 34, 0.15);
}

.modal-container {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 85vh;
    background: linear-gradient(145deg, rgba(20, 11, 7, 0.98), rgba(10, 6, 4, 0.99));
    border: 2px solid var(--rust);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-x: clip;
    opacity: 0;
    transform: translateY(80px) scale(0.92) rotateX(15deg);
    transform-origin: bottom center;
    border-radius: 4px;
}

.modal-overlay.active .modal-container {
    animation: modalSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-overlay.closing .modal-container {
    animation: modalSlideOut 0.4s ease-in forwards;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.9) rotateX(20deg);
        filter: blur(8px) brightness(1.5);
    }
    
    40% {
        opacity: 1;
        filter: blur(0) brightness(1.2);
    }
    
    70% {
        transform: translateY(-10px) scale(1.02) rotateX(0deg);
    }
    
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0) brightness(1);
    }
}

@keyframes modalSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    
    100% {
        opacity: 0;
        transform: translateY(80px) scale(0.9);
        filter: blur(6px);
    }
}

.modal-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(196, 90, 34, 0.03) 2px, rgba(196, 90, 34, 0.03) 4px);
    pointer-events: none;
    z-index: 2;
}

.modal-overlay::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 90, 34, 0.15) 50%, transparent 100%);
    pointer-events: none;
    z-index: 3;
}

.modal-overlay.active::after {
    animation: sweepLight 1.2s ease-out forwards;
}

@keyframes sweepLight {
    0% {
        left: -100%;
    }
    
    100% {
        left: 100%;
    }
}

.modal-container::before,
.modal-container::after {
    content: "";
    position: absolute;
    width: 25px;
    height: 25px;
    border: 3px solid var(--ember);
    opacity: 0.7;
    z-index: 10;
}

.modal-container::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.modal-container::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.modal-header {
    background: rgba(196, 90, 34, 0.1);
    border-bottom: 2px solid var(--rust);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ember);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: 'Poppins-Bold', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-title::before {
    content: "\25C9";
    animation: blink 1s infinite;
    color: var(--ember);
}

.modal-classification {
    padding: 0.25rem 0.6rem;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid var(--alert);
    color: var(--alert);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: alertPulse 2s infinite;
}

.modal-close {
    width: 35px;
    height: 35px;
    background: rgba(255, 51, 51, 0.1);
    border: 2px solid var(--alert);
    color: var(--alert);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 2px;
}

.modal-close:hover {
    background: rgba(255, 51, 51, 0.2);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.5);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--rust) var(--soil-1);
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--soil-1);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--rust);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--ember);
}

.modal-content .content-section {
    opacity: 0;
    transform: translateY(20px);
    animation: contentReveal 0.6s ease forwards;
}

.modal-content .content-section:nth-child(1) {
    animation-delay: 0.2s;
}

.modal-content .content-section:nth-child(2) {
    animation-delay: 0.4s;
}

.modal-content .content-section:nth-child(3) {
    animation-delay: 0.6s;
}

.modal-content .content-section:nth-child(4) {
    animation-delay: 0.8s;
}

.modal-content .content-section:nth-child(5) {
    animation-delay: 1.0s;
}

@keyframes contentReveal {
    0% {
        opacity: 0;
        transform: translateY(25px);
        filter: blur(4px);
    }
    
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ===== MODAL CONTENT STYLES ===== */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ember);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--rust);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: "\25B8";
    color: var(--ember);
}

.content-text {
    font-size: 0.8rem;
    color: var(--sand);
    line-height: 1.7;
    margin-bottom: 0.8rem;
    font-family: 'Poppins-Light', sans-serif;
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin: 1rem 0;
}

.image-card {
    background-size: cover;
    background-position: center;
    filter: sepia(0.3) contrast(1.1) brightness(0.7);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rust);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 120px;
}

.image-card:hover {
    border-color: var(--ember);
    box-shadow: 0 0 30px rgba(196, 90, 34, 0.4);
    transform: translateY(-3px) scale(1.01);
    filter: sepia(0.1) contrast(1.2) brightness(0.8);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(139, 69, 19, 0.2) 100%);
    pointer-events: none;
}

.image-label {
    position: relative;
    z-index: 2;
    padding: 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bone);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(transparent, rgba(10, 6, 4, 0.8));
}

.image-subtitle {
    font-size: 0.7rem;
    color: var(--ember);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
    font-weight: 600;
    opacity: 0.8;
}

.image-desc {
    font-size: 0.8rem;
    color: var(--sand);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.image-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--ember);
    opacity: 0.25;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
}

.data-table th {
    background: rgba(196, 90, 34, 0.1);
    border: 1px solid var(--rust);
    padding: 0.6rem;
    text-align: left;
    color: var(--ember);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table td {
    border: 1px solid rgba(122, 58, 26, 0.3);
    padding: 0.6rem;
    color: var(--sand);
}

.data-table tr {
    transition: background 0.3s;
}

.data-table tr:hover {
    background: rgba(196, 90, 34, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin: 1rem 0;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: rgba(20, 11, 7, 0.5);
    border: 1px solid var(--rust);
    padding: 1rem;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 0 25px rgba(204, 102, 0, 0.3);
    border-color: var(--ember);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ember), transparent);
    animation: scanStat 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes scanStat {
    0% {
        left: -100%;
    }
    
    50% {
        left: 100%;
    }
    
    100% {
        left: 100%;
    }
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ember);
    margin-bottom: 0.3rem;
    font-family: 'Poppins-Bold', sans-serif;
    text-shadow: 0 0 10px rgba(204, 102, 0, 0.5);
    animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        text-shadow: 0 0 8px rgba(204, 102, 0, 0.3);
    }
    
    50% {
        text-shadow: 0 0 20px rgba(204, 102, 0, 0.8), 0 0 30px rgba(139, 69, 19, 0.4);
    }
}

.stat-card:hover .stat-value {
    animation: glitch 0.3s ease forwards, pulse-glow 2.5s ease-in-out infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    
    20% {
        transform: translate(-2px, 1px);
    }
    
    40% {
        transform: translate(2px, -1px);
    }
    
    60% {
        transform: translate(-1px, -1px);
    }
    
    80% {
        transform: translate(1px, 1px);
    }
    
    100% {
        transform: translate(0);
    }
}

.stat-label {
    font-size: 0.65rem;
    color: var(--ochre);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.modal-footer {
    background: rgba(196, 90, 34, 0.1);
    border-top: 2px solid var(--rust);
    padding: 0.6rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6rem;
    color: var(--ochre);
    font-family: 'Courier New', monospace;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===== RESPONSIVE — MOBILE FIRST ===== */

/* Small phones (< 480px) */
@media (max-width: 480px) {
    .security-header {
        padding: 0.4rem 0.6rem;
    }
    
    .security-level {
        display: none;
    }
    
    .security-badge {
        font-size: 0.55rem;
        padding: 0.2rem 0.5rem;
    }
    
    .container {
        padding: 3.5rem 0.8rem 2.5rem;
        gap: 0.8rem;
    }
    
    .title {
        font-size: clamp(2.5rem, 14vw, 4rem);
        letter-spacing: 0.08em;
    }
    
    .classified-badge {
        font-size: 0.5rem;
        padding: 0.15rem 0.6rem;
        top: -1rem;
    }
    
    .subtitle {
        font-size: 0.55rem;
        letter-spacing: 0.1em;
    }
    
    .access-code {
        font-size: 0.5rem;
    }
    
    .data-readout {
        display: none;
    }
    
    .main-menu {
        gap: 0.3rem;
        padding: 0.4rem 0.5rem;
    }
    
    .menu-item {
        padding: 0.3rem 0.5rem;
        font-size: 0.55rem;
        letter-spacing: 0.08em;
        gap: 0.2rem;
    }
    
    .menu-icon {
        font-size: 0.45rem;
    }
    
    .cards {
        flex-direction: column;
        gap: 0.8rem;
        max-height: none;
        overflow-y: auto;
        padding: 0 0.5rem;
    }
    
    .card {
        flex: none;
        max-width: 100%;
        padding: 0.8rem;
    }
    
    .card-title {
        font-size: 0.85rem;
    }
    
    .card-desc {
        font-size: 0.65rem;
    }
    
    .card-data {
        font-size: 0.52rem;
    }
    
    .card-action {
        padding: 0.4rem 0.6rem;
        font-size: 0.6rem;
    }
    
    .radar {
        display: none;
    }
    
    .corner {
        width: 10px;
        height: 10px;
    }
    
    .modal-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .modal-header {
        padding: 0.6rem 0.8rem;
    }
    
    .modal-title {
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 1rem 0.8rem;
    }
    
    .modal-footer {
        padding: 0.5rem 0.8rem;
        font-size: 0.5rem;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .data-table {
        font-size: 0.6rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.4rem;
    }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .security-level {
        font-size: 0.55rem;
        gap: 0.5rem;
    }
    
    .container {
        padding: 3.5rem 1rem 2.5rem;
    }
    
    .title {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }
    
    .data-readout {
        display: none;
    }
    
    .cards {
        gap: 0.8rem;
    }
    
    .card {
        flex: 1 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
    
    .radar {
        display: none;
    }
}

/* Desktop (769px+) */
@media (min-width: 769px) {
    .security-level {
        font-size: 0.65rem;
    }
    
    .title {
        font-size: clamp(3rem, 8vw, 7rem);
    }
    
    .cards {
        flex-wrap: nowrap;
    }
    
    .card {
        flex: 1 1 calc(33.333% - 0.7rem);
        max-width: calc(33.333% - 0.7rem);
        min-width: 0;
        height: 300px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .cards {
        gap: 1.2rem;
    }
    
    .card {
        flex: 1 1 calc(33.333% - 1.2rem);
        max-width: calc(33.333% - 1.2rem);
    }
}

/* ===== UTILITY ANIMATIONS ===== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }
    
    50% {
        transform: translateY(-8px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    
    100% {
        background-position: 200% 0;
    }
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    
    100% {
        transform: rotate(360deg);
    }
}

/* ===== PORTFOLIO CARDS ===== */
.portfolio-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 160px;
    text-decoration: none;
    color: var(--bone);
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.portfolio-card::after {
    content: 'VIEW DETAILS →';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(10, 6, 4, 0.95));
    color: var(--ember);
    text-align: center;
    padding: 2rem 1rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.portfolio-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 40px rgba(196, 90, 34, 0.4);
    border-color: var(--ember);
}

.portfolio-card-content {
    position: relative;
    z-index: 2;
}

.portfolio-card-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(196, 90, 34, 0.9);
    color: var(--bone);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 0.4rem;
}

.portfolio-card .image-label {
    padding: 0;
    background: none;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.portfolio-card .image-subtitle {
    margin-top: 0;
    font-size: 0.65rem;
}

/* Portfolio detail hologram header */
.detail-hero {
    position: relative;
    padding: 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    background: linear-gradient(135deg, rgba(196, 90, 34, 0.15), rgba(10, 6, 4, 0.95));
    border-bottom: 2px solid var(--rust);
    overflow: hidden;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent, transparent 2px,
            rgba(196, 90, 34, 0.02) 2px,
            rgba(196, 90, 34, 0.02) 4px);
    pointer-events: none;
}

.detail-hero-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(196, 90, 34, 0.2);
    border: 1px solid var(--ember);
    color: var(--ember);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.detail-hero h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--bone);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
    font-family: 'Poppins-Bold', sans-serif;
}

.detail-hero-sub {
    font-size: 0.7rem;
    color: var(--ochre);
    font-family: 'Courier New', monospace;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-top: 1rem;
}

.detail-stat {
    padding: 0.5rem;
    background: rgba(10, 6, 4, 0.5);
    border: 1px solid rgba(122, 58, 26, 0.3);
    border-radius: 2px;
    text-align: center;
}

.detail-stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ember);
    font-family: 'Poppins-Bold', sans-serif;
}

.detail-stat-label {
    font-size: 0.5rem;
    color: var(--ochre);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.15rem;
}

/* Problem/Solution blocks */
.problem-block,
.solution-block,
.approach-block {
    padding: 1rem;
    border-radius: 3px;
    margin: 0.8rem 0;
    border-left: 3px solid;
}

.problem-block {
    background: rgba(255, 51, 51, 0.05);
    border-color: var(--alert);
}

.solution-block {
    background: rgba(74, 157, 74, 0.05);
    border-color: var(--secure);
}

.approach-block {
    background: rgba(196, 90, 34, 0.05);
    border-color: var(--ember);
}

.block-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.4rem;
}

.problem-block .block-label {
    color: var(--alert);
}

.solution-block .block-label {
    color: var(--secure);
}

.approach-block .block-label {
    color: var(--ember);
}

/* Tech stack tags */
.tech-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.tech-tag {
    padding: 0.2rem 0.5rem;
    background: rgba(196, 90, 34, 0.1);
    border: 1px solid rgba(122, 58, 26, 0.3);
    color: var(--ochre);
    font-size: 0.55rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    border-radius: 2px;
}

/* Responsive portfolio */
@media (min-width: 481px) and (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-card {
        min-height: 180px;
    }
}

@media (min-width: 769px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .portfolio-card {
        min-height: 200px;
    }
    
    .detail-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== PROOF / RECEIPTS ===== */
.receipts-block {
    padding: 1rem;
    background: rgba(74, 157, 74, 0.05);
    border: 1px solid rgba(74, 157, 74, 0.3);
    border-radius: 3px;
    margin: 0.8rem 0;
}

/* Redacted content block — full width */
.redacted-block {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 1.2rem 1.5rem;
    background: rgba(10, 6, 4, 0.5);
    border-top: 1px solid rgba(181, 106, 43, 0.15);
    border-bottom: 1px solid rgba(181, 106, 43, 0.15);
    color: var(--ochre);
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    line-height: 1.9;
    letter-spacing: 0.08em;
    opacity: 0.55;
    overflow: hidden;
    word-break: break-all;
}

@media (max-width: 480px) {
    .redacted-block {
        margin-left: -0.8rem;
        margin-right: -0.8rem;
        padding: 1rem;
        font-size: 0.6rem;
    }
}

.redacted-block span {
    display: block;
    margin-bottom: 0.15rem;
}

.receipts-block .block-label {
    color: var(--secure);
}

.receipt-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    margin: 0.4rem 0;
    background: rgba(10, 6, 4, 0.5);
    border: 1px solid rgba(74, 157, 74, 0.2);
    border-radius: 2px;
    text-decoration: none;
    color: var(--bone);
    transition: all 0.3s;
    font-size: 0.75rem;
}

.receipt-link:hover {
    border-color: var(--secure);
    background: rgba(74, 157, 74, 0.1);
    box-shadow: 0 0 15px rgba(74, 157, 74, 0.2);
    transform: translateX(3px);
}

.receipt-icon {
    font-size: 0.65rem;
    color: var(--secure);
    flex-shrink: 0;
}

.receipt-url {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    color: var(--ochre);
    word-break: break-all;
}

.receipt-label {
    font-size: 0.6rem;
    color: var(--sand);
    margin-left: auto;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.receipt-status {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 2px;
    margin-left: 0.3rem;
}

.receipt-status.live {
    background: rgba(74, 157, 74, 0.2);
    color: var(--secure);
    border: 1px solid var(--secure);
}

.receipt-status.demo {
    background: rgba(196, 90, 34, 0.2);
    color: var(--ember);
    border: 1px solid var(--ember);
}

.receipt-status.archived {
    background: rgba(181, 106, 43, 0.2);
    color: var(--ochre);
    border: 1px solid var(--ochre);
}

/* Live badge on portfolio cards */
.portfolio-card-tag.live-tag {
    background: rgba(74, 157, 74, 0.9);
}

.portfolio-card-tag.demo-tag {
    background: rgba(196, 90, 34, 0.9);
}

/* ===== PORTFOLIO CAROUSEL ===== */
.portfolio-carousel {
    position: relative;
    width: 100%;
    margin: 0.8rem 0;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--rust);
    background: var(--soil-1);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    filter: sepia(0.2) contrast(1.05) brightness(0.85);
    transition: filter 0.3s;
}

.carousel-slide img:hover {
    filter: sepia(0) contrast(1.1) brightness(0.95);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: linear-gradient(transparent, rgba(10, 6, 4, 0.9));
    font-size: 0.65rem;
    color: var(--sand);
    font-family: 'Courier New', monospace;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: rgba(10, 6, 4, 0.8);
    border: 1px solid var(--rust);
    color: var(--ember);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 5;
    transition: all 0.3s;
    border-radius: 2px;
}

.carousel-btn:hover {
    background: rgba(196, 90, 34, 0.3);
    border-color: var(--ember);
    box-shadow: 0 0 15px rgba(196, 90, 34, 0.3);
}

.carousel-btn.prev {
    left: 8px;
}

.carousel-btn.next {
    right: 8px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rust);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.carousel-dot.active {
    background: var(--ember);
    box-shadow: 0 0 8px var(--ember);
    transform: scale(1.3);
}

.carousel-proof-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: rgba(74, 157, 74, 0.1);
    border: 1px solid rgba(74, 157, 74, 0.3);
    color: var(--secure);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    border-radius: 2px;
}

/* Desktop modal improvements */
@media (min-width: 769px) {
    .modal-content {
        padding: 2rem 2.5rem;
    }
    
    .content-text {
        font-size: 0.85rem;
        line-height: 1.8;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .detail-hero h2 {
        font-size: 1.5rem;
    }
    
    .detail-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .carousel-slide img {
        height: 400px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
}

/* ===== CONTACT FORM ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    color: var(--ochre);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
    font-family: 'Poppins-Bold', sans-serif;
}

.form-input {
    width: 100%;
    background: rgba(10, 6, 4, 0.6);
    border: 1px solid rgba(196, 90, 34, 0.25);
    border-radius: 3px;
    color: var(--bone);
    font-size: 0.8rem;
    padding: 0.7rem 0.8rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--ember);
    box-shadow: 0 0 8px rgba(196, 90, 34, 0.2);
}

.form-input::placeholder {
    color: rgba(232, 199, 154, 0.3);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ===== PORTFOLIO TABS ===== */
.portfolio-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.6rem;
    background: rgba(10, 6, 4, 0.5);
    border: 1px solid rgba(196, 90, 34, 0.15);
    border-radius: 3px;
}

.portfolio-tab {
    background: rgba(196, 90, 34, 0.08);
    border: 1px solid rgba(196, 90, 34, 0.2);
    color: var(--ochre);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.5rem 0.8rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins-Bold', sans-serif;
}

.portfolio-tab:hover {
    background: rgba(196, 90, 34, 0.15);
    border-color: var(--ember);
}

.portfolio-tab.active {
    background: var(--ember);
    border-color: var(--ember);
    color: #fff;
}

.portfolio-section {
    transition: opacity 0.3s ease;
}
