:root {
    --bg: #050505;
    --bg-surface: #0a0a0c;
    --bg-card: rgba(18, 18, 22, 0.7);
    --bg-glass: rgba(10, 10, 14, 0.75);
    --text: #ffffff;
    --dim: #8e8e93;
    --dimmer: #545458;
    --accent: #eb4d4b;
    --accent-glow: rgba(235, 77, 75, 0.4);
    --accent-subtle: rgba(235, 77, 75, 0.12);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.25);
    --border-accent: rgba(235, 77, 75, 0.5);
    --green: #2ecc71;
    --font-heading: 'Syncopate', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- GLOBAL RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-width: none;
    background-color: var(--bg);
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    background-color: transparent;
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    selection-background-color: var(--accent);
    selection-color: #000;
}

body.intro-active {
    overflow: hidden !important;
    height: 100vh !important;
}

::selection {
    background: var(--accent);
    color: #000;
}

@media (min-width: 769px) {
    body, a, button, input, textarea {
        cursor: none;
    }
}

/* --- TOP SCROLL PROGRESS BAR --- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--accent), #ff7675, #ffffff);
    z-index: 10005;
    box-shadow: 0 0 12px var(--accent-glow);
    pointer-events: none;
    will-change: transform;
}

/* --- MINIMALIST CYBER TOP HUD --- */
.cyber-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    padding: 0 5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 6, 8, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 9990;
    transform: translateZ(0);
    transition: transform 0.4s var(--ease-out-expo), background-color 0.3s;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: color 0.3s, transform 0.25s var(--ease-out-expo);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.hud-brand:hover {
    color: var(--accent);
}

.hud-brand:hover .hud-status-dot {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    transform: scale(1.3);
}

.brand-text {
    color: #fff;
    letter-spacing: 2px;
    display: inline-flex;
    transition: color 0.2s;
}

.brand-char {
    display: inline-block;
    transition: transform 0.2s var(--ease-out-expo), color 0.15s;
    will-change: transform;
}

.brand-char.char-mystery {
    color: #ff3b30 !important;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(255, 59, 48, 0.75);
    display: inline-block;
    animation: mystery-subtle-pulse 2.2s infinite ease-in-out;
}

@keyframes mystery-subtle-pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 8px rgba(255, 59, 48, 0.6);
    }
    50% {
        transform: scale(1.18) translateY(-1px);
        text-shadow: 0 0 18px #ff3b30, 0 0 30px rgba(255, 59, 48, 0.9);
    }
}

.hud-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.pulse-dot {
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.hud-nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--dim);
    text-decoration: none;
    letter-spacing: 1.5px;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s;
}

.hud-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out-expo);
}

.hud-nav-link:hover, .hud-nav-link.active {
    color: #ffffff;
}

.hud-nav-link:hover::after, .hud-nav-link.active::after {
    width: 100%;
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hud-telemetry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    color: var(--dim);
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
}

.hud-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-action-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    padding: 5px 10px;
    border-radius: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s var(--ease-out-expo);
}

.hud-action-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.hud-action-btn .btn-tag {
    color: var(--dimmer);
}

.hud-action-btn:hover .btn-tag {
    color: var(--accent);
}

.status-on {
    color: var(--green);
    font-weight: 600;
}

.status-off {
    color: var(--dimmer);
}

/* --- INTRO OVERLAY SYSTEM INITIALIZATION --- */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.intro-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(235, 77, 75, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(235, 77, 75, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.4;
}

.intro-content {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 2;
}

.intro-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: var(--dim);
    padding: 4px 12px;
    border: 1px solid var(--border);
}

.intro-counter {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(4rem, 16vw, 12rem);
    color: var(--text);
    line-height: 1;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    letter-spacing: -2px;
}

.intro-line {
    width: 0%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.intro-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 8px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
}

.intro-subtext {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--dimmer);
}

/* --- CANVAS BACKGROUND --- */
#dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transform: translateZ(0);
    will-change: transform;
}

/* --- NOISE OVERLAY --- */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.38;
    contain: strict;
    transform: translateZ(0);
}

/* --- CUSTOM CURSOR --- */
.cursor-dot,
.cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    will-change: transform;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    margin: -3px 0 0 -3px;
    transition: opacity 0.2s;
}

.cursor-circle {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    margin: -18px 0 0 -18px;
    transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), background-color 0.25s, border-color 0.25s, margin 0.25s var(--ease-out-expo);
}

body.hovering .cursor-circle {
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

body.targeting .cursor-circle {
    width: 78px;
    height: 78px;
    margin: -39px 0 0 -39px;
    border: 1px dashed var(--accent);
    background: rgba(235, 77, 75, 0.08);
    transform: rotate(45deg);
    border-radius: 4px;
}

.cursor-hud-coord {
    position: fixed;
    top: 0;
    left: 0;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 1.5px;
    color: var(--dim);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s;
    user-select: none;
    white-space: nowrap;
    will-change: transform;
}

body.hovering .cursor-hud-coord,
body.targeting .cursor-hud-coord {
    opacity: 1;
    color: var(--accent);
}

/* --- FLOATING PROJECT HOVER PREVIEW (DESKTOP) --- */
.project-hover-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 180px;
    pointer-events: none;
    z-index: 9995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    will-change: transform, opacity;
}

.project-hover-preview.active {
    opacity: 1;
    visibility: visible;
}

.preview-inner {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(235, 77, 75, 0.2);
    background: #000;
}

.preview-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
}

.preview-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 3px;
    letter-spacing: 1px;
}

/* --- CUSTOM SCROLLBAR (DESKTOP) --- */
.custom-scrollbar-container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 22px;
    z-index: 9998;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    transform: translateZ(0);
}

.custom-scrollbar-track {
    position: relative;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    transition: width 0.25s;
    pointer-events: auto;
}

.custom-scrollbar-container:hover .custom-scrollbar-track {
    width: 5px;
    background: rgba(255, 255, 255, 0.18);
}

.custom-scrollbar-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 90px;
    background: #fff;
    border-radius: 4px;
    cursor: grab;
    transition: background-color 0.2s;
    pointer-events: auto;
    will-change: transform;
}

.custom-scrollbar-thumb:active {
    background: var(--accent);
    cursor: grabbing;
}

.scroll-percent-float {
    position: absolute;
    top: 0;
    right: 28px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
    will-change: transform, opacity;
}

.scroll-percent-float.visible,
.custom-scrollbar-container:hover .scroll-percent-float {
    opacity: 1;
}

/* --- MAIN CONTENT & SECTIONS --- */
.scroll-content {
    position: relative;
    width: 100%;
    z-index: 2;
    transform: translateZ(0);
}

section {
    padding: 130px 6vw 90px;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    contain: layout style;
}

.section-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
}

.section-line {
    flex-grow: 1;
    height: 1px;
    background: var(--border);
}

/* --- REVEAL ANIMATIONS --- */
.reveal-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-up.in-view {
    opacity: 1;
    transform: none;
}

/* --- 01. HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    padding-top: 140px;
    justify-content: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.terminal-prompt {
    color: var(--dimmer);
}

.hero-badge {
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--dim);
    font-size: 0.65rem;
    border-radius: 2px;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.4rem, 10vw, 9.5rem);
    line-height: 0.92;
    text-transform: uppercase;
    color: #ffffff;
    -webkit-text-stroke: 0;
    margin-top: 24px;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.hero-name-title {
    display: inline-block;
    cursor: crosshair;
    position: relative;
    user-select: none;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: filter 0.3s;
}

.hero-name-title .scramble-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.hero-char {
    display: inline-block;
    position: relative;
    transform-origin: center center;
    transition: color 0.15s, text-shadow 0.2s, transform 0.15s ease-out;
    user-select: none;
    cursor: pointer;
}

.hero-char:hover {
    color: #ffffff;
}

/* ==========================================================================
   THE ICONIC CRIMSON QUESTION MARK '?' ANIMATION & STYLING
   ========================================================================== */
.hero-char.char-mystery {
    color: #ff3b30 !important;
    display: inline-block;
    margin-left: 6px;
    transform-origin: 50% 85%;
    cursor: pointer;
    position: relative;
    font-weight: 800;
    will-change: transform;
    animation: mystery-levitate 3s infinite ease-in-out, mystery-glow-breathe 2.4s infinite alternate ease-in-out, mystery-cyber-twitch 5.5s infinite;
}

/* Radar pulse beacon on the dot of the ? */
.hero-char.char-mystery::after {
    content: '';
    position: absolute;
    bottom: 8%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #ff3b30;
    border-radius: 50%;
    transform: translate(-50%, 50%);
    box-shadow: 0 0 10px #ff3b30;
    animation: mystery-beacon-radar 2.4s infinite cubic-bezier(0.1, 0.7, 0.1, 1);
    pointer-events: none;
    z-index: -1;
}

@keyframes mystery-levitate {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-14px) rotate(4deg);
    }
}

@keyframes mystery-glow-breathe {
    0% {
        text-shadow: 0 0 16px rgba(255, 59, 48, 0.75), 0 0 35px rgba(235, 77, 75, 0.45);
    }
    100% {
        text-shadow: 0 0 32px #ff3b30, 0 0 65px rgba(255, 59, 48, 0.9), 0 0 90px rgba(235, 77, 75, 0.7);
    }
}

@keyframes mystery-cyber-twitch {
    0%, 91%, 100% {
        text-shadow: 0 0 16px rgba(255, 59, 48, 0.75);
    }
    92% {
        transform: translateY(-10px) skewX(-16deg) scale(1.15);
        text-shadow: -5px 0 #ff0055, 5px 0 #00ffff, 0 0 35px #ff3b30;
    }
    94% {
        transform: translateY(-12px) skewX(12deg);
        text-shadow: 4px 0 #ff0055, -4px 0 #00ffff;
    }
    96% {
        transform: translateY(-11px) skewX(0deg);
    }
}

@keyframes mystery-beacon-radar {
    0% {
        transform: translate(-50%, 50%) scale(0.8);
        opacity: 0.9;
    }
    70%, 100% {
        transform: translate(-50%, 50%) scale(4.5);
        opacity: 0;
    }
}

.hero-char.char-mystery:hover,
.hero-char.char-mystery.active {
    color: #ff3b30 !important;
    animation-play-state: paused;
    transform: translateY(-16px) scale(1.32) rotate(14deg) !important;
    text-shadow: 0 0 40px #ff2a2a, 0 0 80px #ff3b30, 0 0 120px rgba(255, 59, 48, 0.95) !important;
    filter: brightness(1.45) !important;
}

.hero-char.is-repelled {
    color: #fff;
}

.footer-mystery-glyph {
    color: #ff3b30 !important;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 59, 48, 0.7);
    display: inline-block;
    transition: transform 0.3s var(--ease-out-expo);
}

.secret-trigger-target:hover .footer-mystery-glyph {
    transform: scale(1.3) rotate(12deg);
    text-shadow: 0 0 20px #ff3b30;
}

h1 span {
    display: none;
}

p.lead {
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    max-width: 640px;
    color: var(--dim);
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 40px;
}

.hero-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

/* --- MINIMALIST BUTTONS --- */
.cyber-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--ease-out-expo);
    border-radius: 2px;
}

.cyber-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.cyber-btn-accent {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 600;
}

.cyber-btn-accent:hover {
    background: #eeeeee;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.cyber-btn-danger {
    background: rgba(235, 77, 75, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.cyber-btn-danger:hover {
    background: var(--accent);
    color: #000;
}

/* --- 02. THE ARCHITECT (ABOUT) --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    margin-top: 10px;
}

.about-bio {
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.75;
    color: #d1d1d6;
}

.about-bio strong {
    color: #ffffff;
    font-weight: 600;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-left: 1px solid var(--border);
    padding-left: 40px;
}

.stat-row {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.stat-key {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 6px;
    font-weight: 500;
}

/* --- ARCHITECTURAL FOUNDATIONS & PHILOSOPHY --- */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.philosophy-card {
    background: rgba(14, 14, 18, 0.45);
    border: 1px solid var(--border);
    padding: 30px 24px;
    border-radius: 2px;
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-style: preserve-3d;
}

.philosophy-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 26, 0.7);
    will-change: transform;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(235, 77, 75, 0.14), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.philosophy-card:hover::before {
    opacity: 1;
}

.philosophy-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease-out-expo);
    z-index: 2;
}

.philosophy-card:hover::after {
    width: 100%;
}

.philosophy-card:hover::before {
    width: 100%;
}

.p-card-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 14px;
}

.p-card-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.p-card-desc {
    font-size: 0.88rem;
    color: var(--dim);
    line-height: 1.65;
    flex-grow: 1;
}

/* --- 03. CORE COMPETENCIES (SKILLS) --- */
.marquee-wrapper {
    width: 100%;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow: hidden;
}

.marquee-row {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    contain: strict;
    content-visibility: auto;
    contain-intrinsic-size: 150px;
}

.marquee-row::before,
.marquee-row::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    pointer-events: none;
    z-index: 2;
}

.marquee-row::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg), transparent);
}

.marquee-row::after {
    right: 0;
    background: linear-gradient(-90deg, var(--bg), transparent);
}

.marquee-track {
    display: flex;
    animation: scroll-track 28s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.marquee-row.reverse .marquee-track {
    animation: scroll-track-reverse 28s linear infinite;
}

.marquee-row:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.22);
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.25);
    margin: 0 28px;
    transition: color 0.3s, -webkit-text-stroke 0.3s, text-shadow 0.3s;
    display: inline-flex;
    align-items: center;
}

.marquee-item span {
    font-size: 0.8rem;
    vertical-align: middle;
    color: var(--accent);
    margin-right: 14px;
    display: inline-block;
}

.marquee-item:hover {
    color: #ffffff;
    -webkit-text-stroke: 0px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

@keyframes scroll-track {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-track-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* --- ARCHITECTURAL STACK & COMPETENCY MATRIX --- */
.stack-matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 45px;
    width: 100%;
}

.stack-category-card {
    background: rgba(12, 12, 16, 0.4);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 2px;
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.stack-category-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(18, 18, 24, 0.65);
    will-change: transform;
}

.stack-category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(235, 77, 75, 0.12), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.stack-category-card:hover::before {
    opacity: 1;
}

.cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.cat-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-title::before {
    content: '//';
    color: var(--accent);
}

.cat-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--dimmer);
    text-transform: uppercase;
}

.stack-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.matrix-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #d1d1d6;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 2px;
    letter-spacing: 1px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.matrix-tag:hover {
    color: #ffffff;
    border-color: var(--accent);
    background: rgba(235, 77, 75, 0.08);
    transform: translateY(-1px);
}

/* --- 03. EXPERIENCE & ARCHITECTURE MILESTONES --- */
.timeline-container {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    position: relative;
    border-left: 1px solid var(--border);
    padding-left: 36px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    padding-bottom: 45px;
    transition: all 0.3s;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -42px;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--dimmer);
    transition: all 0.3s;
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-role {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.timeline-period {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 500;
}

.timeline-company {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--dim);
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.timeline-points {
    list-style: none;
    margin-bottom: 16px;
}

.timeline-points li {
    font-size: 0.9rem;
    color: #b5b5be;
    line-height: 1.65;
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
}

.timeline-points li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

.timeline-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-tech-tags span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--dimmer);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 2px;
}

/* --- PROJECT FILTER BAR --- */
.project-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-pill {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.25s var(--ease-out-expo);
}

.filter-pill:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-pill.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 600;
}

/* --- 04. SELECTED WORKS (PROJECTS) --- */
.project-list {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 12px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    position: relative;
    transition: all 0.35s var(--ease-out-expo);
}

.project-list:hover .project-item {
    opacity: 0.35;
}

.project-list .project-item:hover {
    opacity: 1;
    padding-left: 20px;
    padding-right: 20px;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.p-left {
    display: flex;
    align-items: baseline;
    gap: 24px;
}

.p-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--dimmer);
    transition: color 0.3s;
}

.project-item:hover .p-num {
    color: var(--accent);
}

.p-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: #ffffff;
    transition: color 0.3s;
}

.p-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.p-stack-preview {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.p-cat {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--dimmer);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.p-arrow {
    font-size: 1.1rem;
    color: var(--dimmer);
    transition: transform 0.3s, color 0.3s;
}

.project-item:hover .p-arrow {
    transform: translate(3px, -3px);
    color: #fff;
}

/* --- 05. FOOTER & CONNECT --- */
.footer-section {
    min-height: 75vh;
    padding-bottom: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
}

.footer-split-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    margin-bottom: 25px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.05;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.email-minimal-wrap {
    margin: 10px 0 25px;
}

.minimal-email-link {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.8vw, 2.5rem);
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s, border-color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    display: inline-block;
}

.minimal-email-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.location-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: var(--dim);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
}

.social-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.footer-right {
    display: flex;
    flex-direction: column;
}

.contact-form-minimal {
    background: rgba(14, 14, 18, 0.4);
    border: 1px solid var(--border);
    padding: 32px 28px;
    border-radius: 2px;
}

.contact-form-header {
    margin-bottom: 22px;
}

.contact-form-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.contact-form-subtitle {
    font-size: 0.82rem;
    color: var(--dimmer);
    line-height: 1.5;
}

.contact-field-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.contact-line-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.25s;
    border-radius: 0;
}

.contact-line-input::placeholder {
    color: var(--dimmer);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.contact-line-input:focus {
    border-bottom-color: var(--accent);
}

.contact-line-textarea {
    resize: vertical;
    min-height: 65px;
}

.form-status-note {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--dimmer);
    letter-spacing: 1px;
    margin-top: 12px;
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--dimmer);
    letter-spacing: 1px;
}

.back-to-top-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.25s;
}

.back-to-top-btn:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* --- PROJECT DETAIL MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px);
    z-index: 10000;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.5s var(--ease-out-expo), opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.modal-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-header {
    padding: 24px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.8);
}

.modal-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 2px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    letter-spacing: 2px;
    transition: color 0.25s;
}

.close-btn:hover {
    color: var(--accent);
}

.modal-body {
    flex-grow: 1;
    display: flex;
    overflow-y: auto;
}

.modal-img-container {
    width: 55%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    border-right: 1px solid var(--border);
}

.modal-img-frame {
    width: 100%;
    max-height: 80vh;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #08080a;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.modal-info {
    width: 45%;
    padding: 60px 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.modal-meta-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
}

.modal-meta-cat {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 20px;
    line-height: 1.05;
    color: #fff;
}

.modal-stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.stack-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--accent);
    border-radius: 2px;
}

.modal-desc {
    font-size: 1.05rem;
    color: var(--dim);
    margin-bottom: 40px;
    line-height: 1.65;
}

.modal-action-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 600;
    border-radius: 2px;
    transition: all 0.25s;
}

.modal-btn-primary {
    background: var(--accent);
    color: #000;
    border: 1px solid var(--accent);
}

.modal-btn-primary:hover {
    background: #ff5e57;
    box-shadow: 0 0 25px var(--accent-glow);
}

.modal-btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid var(--border);
}

.modal-btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* --- CMS MODAL & DASHBOARD --- */
.cms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cms-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cms-window {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    background: #0d0d11;
    border: 1px solid var(--border-hover);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(235, 77, 75, 0.15);
}

/* CMS LOCK SCREEN */
.cms-lockscreen {
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-card {
    max-width: 440px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lock-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.lock-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.lock-desc {
    color: var(--dim);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.lock-error {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-top: 10px;
    min-height: 18px;
}

.lock-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

.lock-btn-row .cyber-btn {
    flex: 1;
    justify-content: center;
}

.lock-hint {
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--dimmer);
}

.lock-hint code {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 2px;
}

/* CMS DASHBOARD MAIN */
.cms-dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
}

.cms-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 24, 0.5);
}

.cms-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 2px;
}

.cms-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #fff;
    margin-top: 2px;
}

.cms-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cms-data-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 2px;
}

.cms-close-btn {
    background: transparent;
    border: none;
    color: var(--dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.cms-close-btn:hover {
    color: var(--accent);
}

/* CMS TABS */
.cms-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 15, 18, 0.8);
    overflow-x: auto;
}

.cms-tab-btn {
    padding: 14px 22px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.cms-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.cms-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--accent-subtle);
}

/* CMS BODY & PANELS */
.cms-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
}

.cms-panel {
    display: none;
}

.cms-panel.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 20px;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 4px;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--dim);
}

/* CMS FORMS */
.cms-form-card {
    background: rgba(20, 20, 26, 0.85);
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 30px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-header h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 1.5px;
}

.form-close {
    background: transparent;
    border: none;
    color: var(--dim);
    font-size: 1rem;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--dim);
    letter-spacing: 1px;
}

.cyber-input, .cyber-textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(5, 5, 8, 0.8);
    border: 1px solid var(--border);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 2px;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.cyber-input:focus, .cyber-textarea:focus {
    border-color: var(--accent);
    background: rgba(10, 10, 14, 0.95);
}

.cyber-textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* IMAGE UPLOADER GRID IN CMS */
.image-uploader-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 100px;
    gap: 14px;
    align-items: center;
}

.upload-box {
    border: 1px dashed var(--border-hover);
    padding: 16px;
    text-align: center;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.25s;
}

.upload-box:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.upload-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.upload-text {
    font-size: 0.75rem;
    color: var(--dim);
}

.url-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: var(--dimmer);
}

.preset-pill {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    cursor: pointer;
    border-radius: 2px;
}

.preset-pill:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.img-preview-box {
    width: 100px;
    height: 70px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.img-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CMS PROJECT ITEMS LIST */
.cms-project-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cms-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.25s;
}

.cms-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.cms-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cms-item-thumb {
    width: 50px;
    height: 38px;
    border-radius: 2px;
    object-fit: cover;
    background: #000;
    border: 1px solid var(--border);
}

.cms-item-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #fff;
}

.cms-item-sub {
    font-size: 0.75rem;
    color: var(--dim);
}

.cms-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cms-action-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}

.cms-action-btn:hover {
    color: #fff;
    border-color: var(--border-hover);
}

.cms-action-btn.btn-delete:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(235, 77, 75, 0.15);
}

/* BACKUP & SETTINGS TAB */
.backup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.backup-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.backup-card h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 1px;
}

.backup-card p {
    font-size: 0.82rem;
    color: var(--dim);
    line-height: 1.5;
}

.backup-card.danger-zone {
    border-color: rgba(235, 77, 75, 0.3);
    background: rgba(235, 77, 75, 0.03);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10005;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid var(--border-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-radius: 3px;
    animation: toastIn 0.3s var(--ease-out-expo) forwards;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-out {
    animation: toastOut 0.25s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-8px); }
}

/* --- RESPONSIVE OPTIMIZATIONS (MOBILE & TABLET) --- */
@media (max-width: 900px) {
    .hud-nav {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 25px;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-img-container {
        width: 100%;
        height: 280px;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .modal-info {
        width: 100%;
        padding: 30px 20px;
    }

    .image-uploader-grid {
        grid-template-columns: 1fr;
    }

    .backup-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stack-matrix-grid {
        grid-template-columns: 1fr;
    }

    .footer-split-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 90px 5vw 60px;
        min-height: auto;
    }

    .cyber-hud {
        padding: 0 5vw;
        height: 56px;
    }

    h1 {
        font-size: clamp(2.5rem, 11vw, 4rem);
        margin-bottom: 20px;
    }

    p.lead {
        font-size: 1.05rem;
    }

    .hero-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-action-row .cyber-btn {
        justify-content: center;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 28px 0;
    }

    .p-title {
        font-size: 1.8rem;
    }

    .p-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .project-list:hover .project-item {
        opacity: 1;
        filter: none;
    }

    .project-item:hover {
        transform: none;
    }

    .cursor-dot,
    .cursor-circle,
    .custom-scrollbar-container,
    .project-hover-preview {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .cms-item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cms-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .footer-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-actions {
        width: 100%;
        justify-content: space-between;
    }
}