:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --muted-color: #666666;
    --accent-color: #0000FF;
    --border-color: #eeeeee;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

html, body {
    overflow-x: hidden;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 60px 0 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.header-name {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 24px;
}

.site-nav a {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: var(--muted-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

.hero-headline {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: clamp(28px, 4.5vw, 38px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-color);
    letter-spacing: -1px;
    margin-bottom: 40px;
}

.hero {
    margin-bottom: 60px;
}

.click-me {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    color: #ccc;
    margin-left: 10px;
    cursor: pointer;
    text-decoration: underline;
}

.controls {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.view-toggle {
    display: flex;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 20px;
    align-items: center;
}

.view-toggle button {
    border: none;
    background: none;
    padding: 6px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: var(--muted-color);
    transition: all 0.2s;
}

.view-toggle button.active {
    background: var(--text-color);
    color: #fff;
}

.bio {
    font-size: 18px;
    color: var(--muted-color);
    max-width: 600px;
    margin-bottom: 30px;
}

.about-section {
    font-size: 16px;
    color: var(--muted-color);
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 40px 0;
}

.content-section {
    margin-bottom: 60px;
}

h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.items-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* LIST VIEW */
.items-container[data-view="list"] .item {
    display: flex;
    padding-left: 20px;
    position: relative;
}

.items-container[data-view="list"] .item::before {
    content: "•";
    position: absolute;
    left: 0;
}

.item-content {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: baseline;
}

.date {
    font-weight: 400;
    color: var(--muted-color);
}

.title {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.title:hover {
    text-decoration: underline;
}

.details {
    color: var(--muted-color);
    flex-basis: 100%;
    margin-top: 5px;
}

/* PROSE VIEW */
.items-container[data-view="prose"] {
    gap: 25px;
}

.items-container[data-view="prose"] .item {
    display: block;
}

.items-container[data-view="prose"] .item-content {
    display: block;
}

.items-container[data-view="prose"] .details {
    display: block;
    margin-top: 5px;
}

/* TIMELINE VIEW */
.items-container[data-view="timeline"] .item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
}

.items-container[data-view="timeline"] .date {
    text-align: right;
    font-weight: 600;
}

/* WORK ITEM STYLING */
.work-item {
    display: grid !important;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-left: 0 !important;
}

.work-item::before {
    content: none !important;
}

.work-meta {
    display: flex;
    flex-direction: column;
}

.company {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.work-meta .date {
    font-size: 13px;
    color: #999;
}

.work-content {
    display: flex;
    flex-direction: column;
}

.role {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.description {
    font-size: 15px;
    color: var(--muted-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

.description a {
    color: var(--text-color);
    text-decoration: underline;
}

.description a:hover {
    color: var(--muted-color);
}

.badges {
    display: flex;
    gap: 10px;
}

.badge {
    background-color: #f5f5f5;
    color: var(--muted-color);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #eee;
}

footer {
    padding: 40px 0;
    color: #ccc;
    font-size: 12px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px 16px;
    }

    .site-header {
        flex-direction: column;
        gap: 16px;
        padding: 30px 0 16px 0;
    }

    .site-nav {
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    .work-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .hero-headline {
        font-size: clamp(32px, 8vw, 48px);
        letter-spacing: -0.5px;
    }

    .items-container[data-view="timeline"] .item {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .items-container[data-view="timeline"] .date {
        text-align: left;
        margin-bottom: 5px;
    }

    .about-section {
        max-width: 100%;
    }

    .bio {
        max-width: 100%;
    }

    .test-row {
        flex-wrap: wrap;
        gap: 6px 12px;
    }
}

.snippets-list {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
}

.snippets-list a {
    color: var(--text-color);
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.1s;
}

.snippets-list a:hover {
    color: var(--muted-color);
}

/* ============================
   MLP SIMULATOR
   ============================ */

.mlp-intro {
    font-size: 15px;
    color: var(--muted-color);
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 650px;
}

.mlp-intro strong {
    color: var(--text-color);
}

.mlp-usage {
    font-size: 14px;
    color: var(--muted-color);
    margin-bottom: 24px;
    padding-left: 20px;
    line-height: 1.8;
}

.mlp-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.mlp-inputs-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mlp-label {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--muted-color);
}

.mlp-input-btn {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    color: var(--muted-color);
    cursor: pointer;
    transition: all 0.15s;
}

.mlp-input-btn.active {
    background: var(--text-color);
    color: #fff;
    border-color: var(--text-color);
}

.mlp-xor-symbol {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-color);
    letter-spacing: 1px;
}

.mlp-action-row {
    display: flex;
    gap: 8px;
}

.mlp-btn {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 20px;
    border: 1.5px solid var(--text-color);
    border-radius: 6px;
    background: var(--text-color);
    color: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.mlp-btn:hover {
    opacity: 0.85;
}

.mlp-btn-secondary {
    background: transparent;
    color: var(--text-color);
}

.mlp-btn-secondary:hover {
    background: #f5f5f5;
}

.mlp-status {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    width: 100%;
    margin-top: 10px;
}

.mlp-status strong {
    color: var(--text-color);
}

/* Layout: network on top, log below */
.mlp-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    background: #fafafa;
}

.mlp-viz {
    min-height: 360px;
    width: 100%;
}

#mlp-svg {
    width: 100%;
    height: 360px;
}

/* SVG text styles */
.weight-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    fill: #000;
}

.node-value {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
}

.node-label {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    fill: var(--muted-color);
}

.layer-label {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    fill: var(--text-color);
}

/* Calculation Log */
.mlp-log {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted-color);
    text-align: center;
}

.calc-row {
    padding: 2px 0;
}

.calc-row .calc-label {
    font-weight: 700;
    color: var(--text-color);
    margin-right: 10px;
    display: inline;
}

.calc-row strong {
    color: var(--text-color);
}

.calc-result-row {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

/* Test Results */
.mlp-test-results {
    margin-bottom: 16px;
}

.test-row {
    display: flex;
    gap: 16px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.test-row.correct {
    background: #f0f8f0;
    color: #2a7a2a;
}

.test-row.wrong {
    background: #fdf0f0;
    color: #8a2a2a;
}

/* Responsive */
@media (max-width: 700px) {
    .mlp-layout {
        padding: 16px;
    }

    .mlp-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .mlp-viz {
        min-height: 280px;
    }

    #mlp-svg {
        height: 280px;
    }

    .calc-detail {
        word-break: break-word;
    }

    .mlp-action-row {
        flex-wrap: wrap;
    }
}
