:root {
    --primary: #00ffcc;
    --primary-bright: #66ffeb;
    --primary-dim: rgba(0, 255, 204, 0.15);
    --primary-glow: rgba(0, 255, 204, 0.4);
    --bg-color: #08080c;
    --bg-blueprint: rgba(20, 20, 29, 0.7);
    --bg-slate: rgba(26, 26, 36, 0.8);
    --text-main: #e1e1e6;
    --text-dim: #8f8f9e;
    --secondary: #1a1a24;
    --accent: #ff0055; /* Emergency/Alert accent */
    --font-header: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --grid-size: 40px;
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--primary-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-dim) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    background-position: center center;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* CRT OVERLAY EFFECT */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    opacity: 0.3;
}

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 9998;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.02; }
    5% { opacity: 0.05; }
    10% { opacity: 0.03; }
    15% { opacity: 0.06; }
    20% { opacity: 0.02; }
    25% { opacity: 0.07; }
    30% { opacity: 0.03; }
    100% { opacity: 0.02; }
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* BLUEPRINT CARD WITH GLASSMORPHISM */
.blueprint-card {
    background: var(--bg-blueprint);
    border: 1px solid var(--primary-dim);
    border-radius: 4px;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.blueprint-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-dim);
}

.card-header {
    background: var(--primary-dim);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-dim);
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 2px;
    font-weight: bold;
}

.card-tag {
    background: var(--primary);
    color: var(--bg-color);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 2px 8px;
    font-weight: bold;
}

.card-body {
    padding: 2rem;
}

/* HEADER SECTION */
.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--primary-dim);
    padding-bottom: 1rem;
}

.logo-area h1 {
    font-family: var(--font-header);
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--primary-glow);
}

.system-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    display: flex;
    gap: 1.5rem;
}

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

.blink {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

/* ARCHITECTURE DIAGRAM */
.architecture-hero {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .architecture-hero {
        flex-direction: row;
        align-items: center;
    }
}

.diagram-container {
    flex: 1;
    position: relative;
}

.architecture-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 5px var(--primary-dim));
}

.diagram-node rect, .diagram-node ellipse {
    fill: var(--bg-color);
    stroke: var(--primary);
    stroke-width: 1px;
    transition: all 0.3s ease;
}

.diagram-node text {
    fill: var(--text-main);
    font-family: var(--font-mono);
    font-size: 12px;
    pointer-events: none;
}

.diagram-node:hover rect, .diagram-node:hover ellipse {
    fill: var(--primary-dim);
    stroke-width: 2px;
    filter: drop-shadow(0 0 10px var(--primary));
}

.architecture-specs {
    min-width: 280px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-left: 1px solid var(--primary-dim);
    padding: 2rem;
    background: rgba(0, 255, 204, 0.03);
    border-radius: 0 4px 4px 0;
}

.architecture-specs p {
    margin-bottom: 1.5rem;
}

.architecture-specs strong {
    color: var(--primary);
    display: block;
    font-size: 0.65rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

/* FLOW ANIMATIONS */
.flow-line {
    stroke-dasharray: 4, 4;
    animation: flow 30s linear infinite;
    stroke-width: 1.5px;
}

@keyframes flow {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

/* STATUS BAR BOTTOM */
.status-bar-bottom {
    background: linear-gradient(90deg, var(--primary), var(--primary-bright));
    color: var(--bg-color);
    padding: 10px 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 4rem;
    box-shadow: 0 5px 20px var(--primary-dim);
}

/* SECTION LABELS */
.section-label {
    background-color: var(--secondary);
    color: var(--primary);
    font-family: var(--font-header);
    font-size: 0.75rem;
    padding: 0.4rem 1.2rem;
    display: inline-block;
    margin-bottom: 2rem;
    border-left: 3px solid var(--primary);
}

/* ABOUT SECTION */
.about-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--secondary);
}

.about-section h3 {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about-section p {
    font-size: 1.1rem;
    max-width: 800px;
    color: var(--text-dim);
}

/* PROJECTS SECTION */
.projects-section {
    margin-top: 5rem;
}

.section-label-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.dimension-line {
    flex: 1;
    height: 1px;
    background: var(--primary-dim);
    position: relative;
}

.dimension-line::before, .dimension-line::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 1px;
    height: 10px;
    background: var(--primary-dim);
}

.dimension-line::after { right: 0; }

.dimension-text {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    background: var(--bg-color);
    padding: 0 15px;
    color: var(--primary-dim);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-mockup {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--primary-dim);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.project-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, var(--primary-dim) 50%, transparent 52%);
    background-size: 10px 10px;
    opacity: 0.1;
}

.mockup-svg {
    width: 100%;
    height: auto;
}

.project-info h3 {
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.tech-stack-line {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--primary-bright);
    border-top: 1px dashed var(--primary-dim);
    padding-top: 0.75rem;
    margin: 1rem 0;
}

.blueprint-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--primary);
    padding: 6px 15px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.blueprint-link:hover {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* CONTACT TERMINAL */
.terminal-body {
    background: rgba(0, 0, 0, 0.4);
    padding: 2.5rem;
}

.terminal-prefix {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.terminal-form {
    margin-top: 2.5rem;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.terminal-form input, .terminal-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--primary-dim);
    color: var(--text-main);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.terminal-form input:focus, .terminal-form textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 255, 204, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 255, 204, 0.1);
}

.terminal-submit {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.terminal-submit:hover {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* SOCIAL LINKS FOOTER */
.card-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--primary-dim);
    background: rgba(0, 255, 204, 0.03);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.social-links a {
    color: var(--primary);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.social-links a:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary-bright);
}

footer.system-footer {
    text-align: center;
    padding: 4rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.6;
}

/* LOG ENTRIES (Blog) */
.log-entry-blueprint {
    margin-bottom: 1.5rem;
    border: 1px solid var(--primary-dim);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.log-entry-blueprint:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 204, 0.03);
    transform: translateX(5px);
}

.log-header {
    padding: 6px 12px;
    font-size: 0.65rem;
}

.log-body h4 a {
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.log-body h4 a:hover {
    color: var(--primary-bright);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .logo-area h1 {
        font-size: 1.2rem;
    }
    
    .system-status {
        display: none;
    }
}
