/* ===== CSS Variables ===== */
:root {
    --color-bg: #0a0f1a;
    --color-bg-alt: #0f1626;
    --color-bg-card: #141c2f;
    --color-bg-card-hover: #1a2540;
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-accent: #f43f5e;
    --color-accent-alt: #ec4899;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-dim: #64748b;
    --color-border: #1e293b;
    --color-border-light: #334155;
    --color-success: #10b981;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
    
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text);
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.logo-dot {
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--color-text);
}

.nav-cta {
    background: var(--color-primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--color-primary-dark);
    color: white !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(244, 63, 94, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero h1 .accent {
    color: var(--color-accent);
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-dim);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

.hero-scroll svg {
    width: 20px;
    height: 20px;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.4);
}

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

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

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Services Section ===== */
.services {
    background: var(--color-bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
}

.service-card:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.service-tags li {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-full);
}

/* ===== Projects Section ===== */
.projects {
    background: var(--color-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-base);
}

.project-card:hover {
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-md);
}

.project-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.project-logo.presearch { background: rgba(30, 144, 255, 0.15); color: #1e90ff; }
.project-logo.storj { background: rgba(40, 167, 69, 0.15); color: #28a745; }
.project-logo.chia { background: rgba(60, 170, 99, 0.15); color: #3caa63; }
.project-logo.flux { background: rgba(47, 128, 237, 0.15); color: #2f80ed; }
.project-logo.fluxedge { background: rgba(156, 39, 176, 0.15); color: #9c27b0; }
.project-logo.radio { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.project-logo.embra { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

.project-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-success);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.project-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-bottom: 12px;
}

.project-card > p:not(.project-subtitle) {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.project-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-primary);
}

.project-links a:hover {
    color: var(--color-accent);
}

/* ===== Portfolio Section ===== */
.portfolio {
    background: var(--color-bg-alt);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.portfolio-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: all var(--transition-base);
}

.portfolio-item:hover {
    border-color: var(--color-border-light);
    transform: translateY(-2px);
}

.portfolio-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.portfolio-item p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    background: var(--color-bg);
    color: var(--color-text-dim);
    border-radius: var(--radius-sm);
}

.portfolio-note {
    text-align: center;
    color: var(--color-text-muted);
}

.portfolio-note a {
    font-weight: 600;
}

/* ===== About Section ===== */
.about {
    background: var(--color-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-content .section-label {
    text-align: left;
}

.about-content h2 {
    font-size: 2.25rem;
    margin-bottom: 24px;
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.about-content strong {
    color: var(--color-text);
}

.about-certs {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.about-certs h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-dim);
}

.about-certs ul {
    list-style: none;
}

.about-certs li {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.about-certs li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

.about-resources h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.resource-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    text-decoration: none;
}

.resource-link:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-card-hover);
}

.resource-link svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.resource-link div {
    display: flex;
    flex-direction: column;
}

.resource-link strong {
    color: var(--color-text);
    font-size: 0.95rem;
}

.resource-link span {
    color: var(--color-text-dim);
    font-size: 0.8rem;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--color-bg-alt);
    padding-bottom: 60px;
}

.contact-card {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, rgba(59, 130, 246, 0.03) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-content .section-label {
    text-align: left;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.contact-content p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.contact-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    text-decoration: none;
}

.contact-method:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-icon.ai { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.contact-icon.teams { background: rgba(88, 86, 214, 0.15); color: #5856d6; }
.contact-icon.email { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.contact-icon.linkedin { background: rgba(10, 102, 194, 0.15); color: #0a66c2; }

.contact-method div {
    display: flex;
    flex-direction: column;
}

.contact-method strong {
    color: var(--color-text);
    font-size: 0.95rem;
}

.contact-method span {
    color: var(--color-text-dim);
    font-size: 0.8rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand p {
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-dim);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-card {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px;
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 26, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-scroll {
        display: none;
    }
    
    .projects-grid,
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
