:root {
    --bg:       #0a0a0a;
    --surface:  #111111;
    --border:   #1e1e1e;
    --accent:   #00d4ff;
    --text:     #f0f0f0;
    --muted:    #555555;
    --nav-h:    56px;
}

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

html {
    height: 100%;
}

body {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

body.is-home {
    height: 100%;
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

#app {
    position: relative;
}

body.is-home #app {
    height: calc(100vh - var(--nav-h));
    overflow: hidden;
}

.view {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.navbar {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    position: relative;
    z-index: 50;
    transition: background 0.3s, border-bottom 0.3s;
}

.navbar.solid {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}

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

.hero {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #ffffff09 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.hero-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.hero-title {
    font-size: clamp(3.5rem, 9vw, 8.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

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

.hero-sub {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--muted);
    max-width: 440px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    width: fit-content;
}

.hero-cta::after {
    content: '↗';
}

.hero-cta:hover {
    background: var(--accent);
    color: #000;
}

#view-projects {
    display: flex;
    flex-direction: column;
}

.proj-tabs-bar {
    height: 50px;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    flex-shrink: 0;
}

.proj-tab {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
    user-select: none;
}

.proj-tab:hover {
    color: var(--text);
}

.proj-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.viewer-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.video-panel {
    flex: 1;
    background: #000;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.video-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.video-wrap video,
.feed-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#poseCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.overlay-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.overlay-toggle:hover {
    border-color: var(--muted);
    color: var(--text);
}

.overlay-toggle.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 255, 0.08);
}

.video-no-file {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #2a2a2a;
    pointer-events: none;
}

.vp-icon {
    font-size: 2.5rem;
}

.video-no-file p {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.pipeline-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.pipeline-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
}

.pipeline-bar {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: var(--bg);
    min-height: 50px;
}

.pipe-step {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.pipeline-overlay .pipe-step {
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
    color: var(--text);
    border-color: #2a2a2a;
}

.pipe-arrow {
    color: #333;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.pipeline-overlay .pipe-arrow {
    font-size: 0.9rem;
    color: #2a2a2a;
}

.feed-source {
    font-size: 0.65rem;
    color: var(--muted);
    margin-top: 0.6rem;
    opacity: 0.6;
}

.feed-source a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Architecture display ─────────────────────────────────────────────────── */

.arch-display {
    display: none;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2.5rem 3rem;
    overflow-y: auto;
    gap: 0;
}

.arch-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bbb;
    margin-bottom: 2.5rem;
}

.arch-two-stream {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.arch-stream {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.arch-merge {
    margin-top: 1rem;
    padding-left: 2rem;
}

.arch-node {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    border: 1px solid #2e2e2e;
    white-space: nowrap;
    line-height: 1.4;
    color: #ccc;
}

.arch-input  { color: #aaa; border-color: #252525; }
.arch-model  { border-color: rgba(0,212,255,0.55); color: #e8e8e8; }
.arch-data   { background: #141414; color: #bbb; }
.arch-op     { background: #141414; color: #ccc; }
.arch-output { border-color: rgba(0,212,255,0.75); color: var(--accent); }

.arch-arr {
    color: #777;
    font-size: 1rem;
    flex-shrink: 0;
}

.arch-note {
    margin-top: 2.5rem;
    font-size: 0.85rem;
    color: #999;
    line-height: 1.8;
    max-width: 460px;
    border-left: 2px solid #222;
    padding-left: 1.1rem;
}

/* ── Mode visibility ──────────────────────────────────────────────────────── */

.video-panel.mode-video .pipeline-overlay  { display: none; }
.video-panel.mode-video .pipeline-bar      { display: flex; }
.video-panel.mode-video .vlm-display       { display: none; }
.video-panel.mode-video .arch-display      { display: none; }

.video-panel.mode-pipeline .pipeline-overlay { display: flex; }
.video-panel.mode-pipeline .pipeline-bar     { display: none; }
.video-panel.mode-pipeline .vlm-display      { display: none; }
.video-panel.mode-pipeline .arch-display     { display: none; }

.video-panel.mode-arch .video-wrap        { display: none; }
.video-panel.mode-arch .pipeline-overlay  { display: none; }
.video-panel.mode-arch .pipeline-bar      { display: none; }
.video-panel.mode-arch .vlm-display       { display: none; }
.video-panel.mode-arch .arch-display      { display: flex; }

.video-panel.mode-vlm .video-wrap        { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.video-panel.mode-vlm .pipeline-overlay  { display: none; }
.video-panel.mode-vlm .pipeline-bar      { display: none; }
.video-panel.mode-vlm .vlm-display       { display: flex; }
.video-panel.mode-vlm .arch-display      { display: none; }

.vlm-display {
    display: none;
    flex-direction: column;
    flex: 1;
}

.vlm-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.vlm-thumb {
    width: 72px;
    height: 54px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.vlm-thumb:hover {
    border-color: var(--muted);
}

.vlm-thumb.active {
    border-color: var(--accent);
}

.vlm-main-img {
    flex: 1;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a2a2a;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-panel {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sub-tab {
    padding: 0.3rem 0.8rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.sub-tab:hover {
    border-color: var(--text);
    color: var(--text);
}

.sub-tab.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.project-info {
    flex: 1;
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    transition: opacity 0.2s ease;
}

.project-info.fade {
    opacity: 0;
}

.info-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.info-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.9rem;
}

.info-desc {
    font-size: 0.88rem;
    color: #999;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.vlm-prompt {
    font-size: 0.83rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.75rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.vlm-output {
    font-size: 0.83rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.75rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--border);
    color: var(--muted);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.status-live {
    color: var(--muted);
}

.feed-btns {
    display: flex;
    gap: 0.3rem;
}

.feed-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.feed-btn:hover {
    border-color: var(--muted);
    color: var(--text);
}

.feed-btn.active {
    border-color: #39ff14;
    color: #39ff14;
    background: rgba(57, 255, 20, 0.05);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #39ff14;
    box-shadow: 0 0 6px #39ff14;
    animation: blink 2s infinite;
    flex-shrink: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.about-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.about-header {
    margin-bottom: 3.5rem;
}

.about-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.about-label::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.about-name {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.about-role {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
}

.about-bio {
    margin-bottom: 3rem;
}

.about-bio p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1rem;
    max-width: 620px;
}

.about-bio p:last-child {
    margin-bottom: 0;
}

.about-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.about-img-me {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.about-cats {
    display: flex;
    gap: 1rem;
}

.about-cat-item {
    flex: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.about-img-cat {
    width: 100%;
    height: auto;
    display: block;
}

.about-cat-item figcaption {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.about-skills {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.about-skills-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}


