/* Manifest Labs — "Spec Sheet" homepage redesign, scoped entirely under #site-new
   so it never collides with style.css (the classic design's stylesheet). */

#site-new, #site-new * { box-sizing: border-box; }

#site-new {
    font-family: 'Space Mono', monospace;
    min-height: 100vh;
    background: var(--bg);
    transition: background 0.25s ease;
}

/* ---- Theme tokens ---- */
#site-new[data-theme="light"] {
    --bg: #f2f0eb;
    --ink: #191919;
    --rule: #191919;
    --accent: var(--accent-light, #d02b20);
    --muted: #55524b;
    --faint: #8d897f;
    --desc: #6b675f;
    --hover-bg: #e0dbcd;
    --hover-bg-flat: #e7e3d8;
    --row-bg: #ece9e1;
    --footer-bg: #191919;
    --footer-ink: #f2f0eb;
    --footer-muted: #b7b3aa;
    --badge-off: #8d897f;
    --arrow-off: #c4bfb4;
    --logo-dim: #a8a49b;
    --logo-mid: #55524b;
}

#site-new[data-theme="dark"] {
    --bg: #0b0d0e;
    --ink: #f2f4f4;
    --rule: var(--accent-dark, #2dd4cf);
    --accent: var(--accent-dark, #2dd4cf);
    --muted: #9ba1a3;
    --faint: #61686a;
    --desc: #868c8e;
    --hover-bg: #131719;
    --hover-bg-flat: #101314;
    --row-bg: #0e1011;
    --footer-bg: var(--accent-dark, #2dd4cf);
    --footer-ink: #0b0d0e;
    --footer-muted: rgba(11, 13, 14, 0.55);
    --badge-off: #61686a;
    --arrow-off: #3a4042;
    --logo-dim: #55555E;
    --logo-mid: #9C9CA4;
}

#site-new a { text-decoration: none; }
#site-new a:hover { opacity: 0.9; }

@keyframes ml-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes ml-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ml-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ml-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

#site-new .ml2-frame {
    max-width: 960px;
    margin: 0 auto;
    min-height: 100vh;
    border-left: 2px solid var(--rule);
    border-right: 2px solid var(--rule);
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease;
}

/* ---- Header ---- */
#site-new header {
    border-bottom: 2px solid var(--rule);
    padding: 16px clamp(20px, 5vw, 48px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
    transition: background 0.25s ease, border-color 0.25s ease;
}

#site-new .ml2-logo-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

#site-new .ml2-logo-svg rect.dim { stroke: var(--logo-dim); }
#site-new .ml2-logo-svg rect.mid { stroke: var(--logo-mid); }
#site-new .ml2-logo-svg rect.fill { fill: var(--ink); transition: fill 0.25s ease; }

#site-new .ml2-logo-divider {
    width: 2px;
    height: 26px;
    background: var(--logo-dim);
    transition: background 0.25s ease;
}

#site-new .ml2-wordmark {
    font: 700 26px 'Space Mono', monospace;
    color: var(--ink);
    letter-spacing: 0.06em;
    transition: color 0.25s ease;
}

#site-new .ml2-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

#site-new .ml2-est {
    font: 400 12px 'Space Mono', monospace;
    color: var(--accent);
}

#site-new .ml2-swatches {
    display: flex;
    gap: 8px;
    align-items: center;
}

#site-new .ml2-swatch {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid transparent;
    cursor: pointer;
    outline-offset: 2px;
    transition: border-color 0.18s ease, transform 0.12s ease;
    transform: scale(1);
}

#site-new .ml2-swatch.active {
    border-color: var(--ink);
    transform: scale(1.15);
}

#site-new .ml2-btn {
    font: 700 11px 'Space Mono', monospace;
    color: var(--ink);
    background: transparent;
    border: 2px solid var(--rule);
    padding: 6px 12px;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: all 0.25s ease;
    min-height: 32px;
}

#site-new .ml2-btn:hover {
    background: var(--ink);
    color: var(--bg);
}

/* ---- Hero ---- */
#site-new .ml2-hero {
    border-bottom: 2px solid var(--rule);
    padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 5vw, 48px);
    animation: ml-rise 0.6s ease-out both;
    transition: border-color 0.25s ease;
}

#site-new .ml2-marquee-mask {
    overflow: hidden;
    white-space: nowrap;
}

#site-new .ml2-marquee-track {
    display: inline-flex;
    animation: ml-marquee 22s linear infinite;
    will-change: transform;
}

#site-new .ml2-marquee-text {
    font: 900 clamp(20px, 3vw, 38px)/1.1 'Chivo', sans-serif;
    color: var(--ink);
    letter-spacing: -0.015em;
    text-transform: uppercase;
    padding-right: 0.6em;
    transition: color 0.25s ease;
}

#site-new .ml2-hero-sub {
    font: 400 clamp(13px, 1.4vw, 16px)/1.7 'Space Mono', monospace;
    color: var(--muted);
    margin-top: 24px;
    max-width: 560px;
    padding: 0 clamp(20px, 5vw, 48px);
    transition: color 0.25s ease;
}

/* ---- Section label ---- */
#site-new .ml2-section-label {
    padding: 13px clamp(20px, 5vw, 48px);
    border-bottom: 2px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.25s ease;
}

#site-new .ml2-section-title {
    font: 700 clamp(26px, 3vw, 32px) 'Space Mono', monospace;
    color: var(--accent);
    letter-spacing: 0.14em;
}

#site-new .ml2-section-count {
    font: 400 12px 'Space Mono', monospace;
    color: var(--faint);
}

/* ---- Project rows ---- */
#site-new .ml2-projects {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#site-new .ml2-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px clamp(18px, 3.5vw, 44px);
    align-items: start;
    padding: 26px clamp(20px, 5vw, 48px) 28px;
    border-bottom: 2px solid var(--rule);
    background: var(--row-bg);
    cursor: default;
    transition: background 0.18s ease, border-color 0.25s ease;
    text-decoration: none;
}

#site-new .ml2-row.clickable { cursor: pointer; }
#site-new .ml2-row.clickable:hover { background: var(--hover-bg); }
#site-new .ml2-row:not(.clickable):hover { background: var(--hover-bg-flat); }

#site-new .ml2-row-meta {
    display: flex;
    flex-direction: column;
    gap: 10px 14px;
    align-items: flex-start;
    width: clamp(88px, 12vw, 140px);
    grid-column: auto;
}

#site-new .ml2-icon-tile {
    width: 44px;
    height: 44px;
    border: 2px solid var(--badge-off);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.18s ease;
}

#site-new .ml2-row.clickable:hover .ml2-icon-tile {
    border-color: var(--accent);
    background: var(--accent);
}

#site-new .ml2-icon-tile svg path {
    stroke: var(--ink);
    transition: stroke 0.18s ease;
}

#site-new .ml2-row.clickable:hover .ml2-icon-tile svg path {
    stroke: var(--bg);
}

#site-new .ml2-icon-tile .ml2-spin-group {
    animation: ml-spin 5s linear infinite;
    transform-origin: 12px 12px;
}

#site-new .ml2-icon-tile img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

#site-new .ml2-icon-danorama .ml2-icon-black { display: block; }
#site-new .ml2-icon-danorama .ml2-icon-white { display: none; }
#site-new[data-theme="dark"] .ml2-icon-danorama .ml2-icon-black { display: none; }
#site-new[data-theme="dark"] .ml2-icon-danorama .ml2-icon-white { display: block; }
#site-new .ml2-row.clickable:hover .ml2-icon-danorama .ml2-icon-black { display: none; }
#site-new .ml2-row.clickable:hover .ml2-icon-danorama .ml2-icon-white { display: block; }
#site-new[data-theme="dark"] .ml2-row.clickable:hover .ml2-icon-danorama .ml2-icon-white { display: none; }
#site-new[data-theme="dark"] .ml2-row.clickable:hover .ml2-icon-danorama .ml2-icon-black { display: block; }

#site-new .ml2-row-num {
    font: 900 clamp(18px, 2vw, 22px) 'Chivo', sans-serif;
    color: var(--faint);
    letter-spacing: -0.01em;
}

#site-new .ml2-row.clickable:hover .ml2-row-num { color: var(--accent); }

#site-new .ml2-badge {
    font: 700 10px 'Space Mono', monospace;
    color: var(--badge-off);
    background: transparent;
    border: 1.5px solid var(--badge-off);
    padding: 3px 7px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

#site-new .ml2-badge.live {
    color: var(--footer-ink);
    background: var(--accent);
    border-color: var(--accent);
}

#site-new .ml2-badge-dot {
    display: inline-block;
    animation: ml-blink 2s infinite;
}

#site-new .ml2-row-body { min-width: 0; }

#site-new .ml2-row-title {
    font: 400 clamp(20px, 2.4vw, 27px)/1.1 'Chivo', sans-serif;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: -0.015em;
    transition: color 0.18s ease;
    display: block;
}

#site-new .ml2-row.clickable:hover .ml2-row-title { color: var(--accent); }

#site-new .ml2-row-desc {
    font: 400 13px/1.65 'Space Mono', monospace;
    color: var(--desc);
    margin-top: 8px;
    max-width: 560px;
    display: block;
}

#site-new .ml2-row-arrow {
    font: 700 16px 'Space Mono', monospace;
    color: var(--arrow-off);
    transition: color 0.18s ease, transform 0.18s ease;
    display: inline-block;
}

#site-new .ml2-row.clickable:hover .ml2-row-arrow {
    color: var(--accent);
    transform: translate(3px, -3px);
}

/* ---- Contact strip ---- */
#site-new .ml2-contact {
    border-bottom: 2px solid var(--rule);
    padding: 22px clamp(20px, 5vw, 48px);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.25s ease;
}

#site-new .ml2-contact-text {
    font: 400 12px/1.6 'Space Mono', monospace;
    color: var(--muted);
}

#site-new .ml2-mail-btn {
    font: 700 13px 'Space Mono', monospace;
    color: var(--accent);
    background: transparent;
    border: 2px solid var(--accent);
    padding: 10px 18px;
    letter-spacing: 0.04em;
    transition: background 0.18s ease, color 0.18s ease;
    display: inline-block;
}

#site-new .ml2-mail-btn:hover {
    background: var(--accent);
    color: var(--bg);
    opacity: 1;
}

/* ---- Footer ---- */
#site-new footer {
    padding: 13px clamp(20px, 5vw, 48px);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    align-items: center;
    background: var(--footer-bg);
    transition: background 0.25s ease;
}

#site-new .ml2-footer-copy {
    font: 400 11px 'Space Mono', monospace;
    color: var(--footer-muted);
}

#site-new .ml2-footer-mail {
    font: 700 11px 'Space Mono', monospace;
    color: var(--footer-ink);
}

/* ---- Narrow layout (< 640px) ---- */
@media (max-width: 640px) {
    #site-new .ml2-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    #site-new .ml2-row-meta {
        flex-direction: row;
        align-items: center;
        width: auto;
        gap: 14px;
        grid-column: 1 / -1;
    }
}
