:root {
    /* Colors - Monochrome Base */
    --bg-pure: #000000;
    --bg-base: #0A0A0A;
    --bg-surface: #111111;
    --bg-surface-hover: #1A1A1A;
    
    /* Typography Colors */
    --text-primary: #EDEDED;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 255, 255, 0.2);
    
    /* Accents */
    --accent-glow: rgba(255, 255, 255, 0.1);
    
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-pure);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.mono-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.text-accent {
    color: var(--text-primary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-pure);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-focus);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.overline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Diagram (Pure CSS/SVG) */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram-container {
    position: relative;
    width: 400px;
    height: 400px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%);
}

.node {
    position: absolute;
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border-focus);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    z-index: 10;
}

.central-node {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bg-pure);
    border-color: var(--text-primary);
}

.node-1 { top: 50%; left: 0; transform: translate(-50%, -50%); }
.node-2 { top: 0; left: 85%; transform: translate(-50%, -50%); }
.node-3 { top: 100%; left: 85%; transform: translate(-50%, -50%); }

.connections {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.line {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.data-packet {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    border-radius: 50%;
    z-index: 20;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    opacity: 0;
}

/* Stack Section */
.stack-section {
    padding: 3rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.stack-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.stack-logos {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.stack-logos:hover {
    opacity: 1;
}

.stack-item {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
}

/* Services (Bento Grid) */
.services-section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.bento-card:hover {
    border-color: var(--border-focus);
    background: var(--bg-surface-hover);
    transform: translateY(-2px);
}

.card-large {
    grid-column: span 2;
}

.card-wide {
    grid-column: span 3;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.card-wide p {
    max-width: 50%;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
}

.bento-card h3 {
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Mini wireframe animation */
.wireframe-mini {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-base);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.wf-box {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.wf-box.active {
    background: var(--text-primary);
    color: var(--bg-pure);
    border-color: var(--text-primary);
}

.wf-line {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
    position: relative;
}

.wf-line::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-primary);
    animation: flowData 2s infinite linear;
}

@keyframes flowData {
    0% { left: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Terminal Contact Section */
.contact-section {
    padding: 4rem 0 8rem;
}

.terminal-container {
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border: 1px solid var(--border-focus);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.terminal-header {
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.term-buttons {
    display: flex;
    gap: 0.5rem;
}

.term-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close { background: #FF5F56; }
.min { background: #FFBD2E; }
.max { background: #27C93F; }

.term-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.terminal-body {
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.term-line {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--text-tertiary);
    margin-right: 0.5rem;
}

.term-output {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.term-input-container {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.term-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    flex: 1;
    outline: none;
}

.term-input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.btn-terminal {
    background: var(--text-primary);
    color: var(--bg-pure);
    border: none;
    padding: 0.25rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.term-input:focus + .btn-terminal, .term-input:not(:placeholder-shown) + .btn-terminal {
    opacity: 1;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.footer-meta {
    display: flex;
    gap: 1.5rem;
}

/* Animations */
@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.1); }
    70% { box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.glow {
    animation: glowPulse 2s infinite;
}

/* Data Packets Anim */
.packet-1 { animation: travel1 3s infinite cubic-bezier(0.4, 0, 0.2, 1); }
.packet-2 { animation: travel2 4s infinite cubic-bezier(0.4, 0, 0.2, 1); animation-delay: 1s; }
.packet-3 { animation: travel3 3.5s infinite cubic-bezier(0.4, 0, 0.2, 1); animation-delay: 2s; }

@keyframes travel1 {
    0% { top: 50%; left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 50%; left: 50%; opacity: 0; }
}

@keyframes travel2 {
    0% { top: 50%; left: 50%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 0; left: 85%; opacity: 0; }
}

@keyframes travel3 {
    0% { top: 50%; left: 50%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; left: 85%; opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        margin: 0 auto;
        align-items: center;
    }
    
    .hero-subtitle {
        margin: 0 auto;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-wide {
        grid-column: span 2;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-wide p {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .diagram-container {
        width: 300px;
        height: 300px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .card-large, .card-wide {
        grid-column: span 1;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
