/* ========================================
   Jordan Hoelscher - AI Automation Architect
   Design System: Precision Engineering
   ======================================== */

/* --- Variables --- */
:root {
    --bg: #09090b;
    --bg-alt: #0f1012;
    --surface: #161618;
    --surface-high: #1e1e21;
    --surface-low: #0c0c0e;

    --text: #e3e2e3;
    --text-secondary: #8b8d98;
    --text-muted: #5c5e6a;

    --accent: #10b981;
    --accent-bright: #34d399;
    --accent-dim: rgba(16, 185, 129, 0.08);
    --accent-glow: rgba(16, 185, 129, 0.15);
    --accent-border: rgba(16, 185, 129, 0.25);

    --ghost-border: rgba(60, 74, 66, 0.15);
    --border-hover: rgba(60, 74, 66, 0.35);

    --warn: #f59e0b;
    --ok: #34d399;

    --font-display: 'Newsreader', 'Georgia', serif;
    --font-body: 'Manrope', -apple-system, sans-serif;
    --font-mono: 'Space Grotesk', 'JetBrains Mono', monospace;

    --radius: 4px;
    --radius-lg: 6px;
    --transition: 200ms ease;
    --max-width: 1120px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-bright); }
ul { list-style: none; }

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* stagger children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* --- Typography --- */
.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1rem;
}

.section-sub {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 3rem;
    line-height: 1.7;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #002113;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    color: #002113;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--ghost-border);
}

.btn-outline:hover {
    border-color: var(--accent-border);
    color: var(--accent-bright);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.06);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.8125rem;
}

.btn-full { width: 100%; }

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ghost-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.75rem;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-logo:hover { color: var(--accent); }

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

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-secondary);
    transition: all var(--transition);
}

.nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(2px, 3px);
}

.nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(2px, -3px);
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 9rem 0 5rem;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
    margin-bottom: 3.5rem;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent-bright);
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--ghost-border);
}

.stat { text-align: center; }

.stat-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.stat-desc {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- Capabilities Grid --- */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.cap-card {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}

.cap-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.03);
}

.cap-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}

.cap-card h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

.cap-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* --- Architecture Diagram --- */
.arch {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.arch-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.arch-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.arch-node {
    background: var(--surface-low);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius);
    padding: 0.875rem 1.25rem;
    text-align: center;
    min-width: 130px;
}

.arch-node-primary {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.arch-node-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.arch-node-sub {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.arch-arrow {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 0.6;
}

.arch-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arch-branch-line {
    width: 1px;
    height: 24px;
    background: var(--ghost-border);
}

.arch-branch-nodes {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.arch-node-sm {
    padding: 0.5rem 1rem;
    min-width: auto;
}

.arch-node-sm .arch-node-label {
    font-size: 0.75rem;
}

/* --- Terminal --- */
.terminal {
    background: var(--surface-low);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ghost-border);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface-high);
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.9;
}

.terminal-line {
    opacity: 0;
    transform: translateY(4px);
    color: var(--text-secondary);
}

.terminal-active .terminal-line {
    animation: termIn 0.4s ease forwards;
}

.terminal-active .terminal-line:nth-child(1) { animation-delay: 0.2s; }
.terminal-active .terminal-line:nth-child(2) { animation-delay: 0.7s; }
.terminal-active .terminal-line:nth-child(3) { animation-delay: 1.2s; }
.terminal-active .terminal-line:nth-child(4) { animation-delay: 1.7s; }
.terminal-active .terminal-line:nth-child(5) { animation-delay: 2.2s; }
.terminal-active .terminal-line:nth-child(6) { animation-delay: 2.7s; }
.terminal-active .terminal-line:nth-child(7) { animation-delay: 3.2s; }
.terminal-active .terminal-line:nth-child(8) { animation-delay: 3.7s; }

@keyframes termIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-prompt {
    color: var(--accent);
    margin-right: 0.5rem;
}

.terminal-line.cmd {
    color: var(--text);
    font-weight: 500;
}

.terminal-ts {
    color: var(--text-muted);
}

.terminal-cmd {
    color: var(--accent);
}

.terminal-str {
    color: var(--warn);
}

.terminal-warn {
    color: var(--warn);
}

.terminal-ok {
    color: var(--ok);
    font-weight: 500;
}

.terminal-line.result {
    padding-top: 0.25rem;
}

/* --- Cortex Metrics --- */
.cortex-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.cortex-metric {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.cortex-metric-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent-bright);
    margin-bottom: 0.375rem;
}

.cortex-metric-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- Cortex Capabilities --- */
.cortex-caps {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.cortex-caps h3 {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cortex-caps li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.875rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cortex-caps li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

.cortex-caps li strong {
    color: var(--text);
    font-weight: 600;
}

/* --- Work Grid (Business Applications) --- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.work-card {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

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

.work-screenshot {
    aspect-ratio: 16 / 10;
    background: var(--surface-low);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--ghost-border);
    overflow: hidden;
}

.work-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

.work-screenshot-contain {
    justify-content: center;
    align-items: center;
}

.work-screenshot-contain img {
    object-fit: contain;
    width: auto;
    height: 100%;
}

.work-screenshot span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.work-card h3 {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    padding: 1.5rem 1.5rem 0.5rem;
}

.work-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0 1.5rem;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 1rem 1.5rem 1.5rem;
}

.work-tags span {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--surface-low);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}

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

.project-card h3 {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

.project-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.contact-info > p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.contact-link:hover {
    color: var(--accent);
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.form-group .optional {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface-high);
    border: 1px solid var(--ghost-border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235c5e6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.125rem;
    padding-right: 2.5rem;
}

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

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

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

.footer p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px transparent; }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .cortex-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .work-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    .section { padding: 4rem 0; }

    /* Nav */
    .nav-links {
        display: none;
        position: absolute;
        top: 3.75rem;
        left: 0;
        right: 0;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--ghost-border);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
    }

    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }

    /* Hero */
    .hero { padding: 7rem 0 3rem; }
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .stat {
        display: flex;
        align-items: baseline;
        gap: 0.75rem;
        text-align: left;
    }
    .stat-num { font-size: 1.75rem; }

    /* Grids */
    .cap-grid,
    .work-grid,
    .projects-grid,
    .cortex-metrics {
        grid-template-columns: 1fr;
    }

    /* Architecture */
    .arch-flow {
        flex-direction: column;
    }
    .arch-arrow {
        transform: rotate(90deg);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.875rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}
