/* ── This Portfolio · case study page ─────────────────────────────── */

/* Cover SVG fits without cropping (unlike photo covers) */
.this-site-cover img {
    object-fit: contain;
    background: #0a0a12;
    padding: 24px;
}

/* Architecture diagram section */
.this-site-arch-intro {
    margin-bottom: 2.5rem;
}

.arch-interactive {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: stretch;
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .arch-interactive {
        grid-template-columns: 1fr;
    }
}

.arch-stage {
    background: linear-gradient(135deg, #0a0a12 0%, #16161e 100%);
    border: 1px solid #25252e;
    border-radius: 12px;
    padding: 16px;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arch-svg {
    width: 100%;
    height: auto;
    display: block;
    max-height: 540px;
}

/* Clickable nodes */
.arch-node {
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.arch-node:hover {
    opacity: 0.85;
}

.arch-node.active circle,
.arch-node.active rect {
    stroke-width: 2.5;
}

.arch-node:not(.active) {
    opacity: 0.75;
}

.arch-svg.has-active .arch-node:not(.active) {
    opacity: 0.35;
}

/* Lines dim except for the active node's flow */
.arch-line {
    transition: opacity 0.25s ease;
}

.arch-svg.has-active .arch-line {
    opacity: 0.2;
}

.arch-svg.has-active .arch-line.arch-active-flow {
    opacity: 1;
}

/* Detail panel */
.arch-panel {
    background: #16161e;
    border: 1px solid #25252e;
    border-radius: 12px;
    padding: 28px 30px;
    display: flex;
    align-items: flex-start;
    min-height: 420px;
}

.arch-panel-content {
    width: 100%;
}

.arch-panel-eyebrow {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.arch-panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    color: #e6e6ec;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.arch-panel p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #c0c0c8;
    font-weight: 300;
}

.arch-panel p + p {
    margin-top: 0.85rem;
}

.arch-panel .why-row {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #25252e;
}

.arch-panel .why-row strong {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
}

.arch-panel .why-row p {
    color: #c0c0c8;
    font-size: 0.9rem;
}

/* ── Features grid (Investment Assistant) ─────────────────────── */

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 2.5rem;
}

@media (min-width: 768px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

.feature {
    background: #16161e;
    border: 1px solid #25252e;
    border-radius: 12px;
    padding: 26px 24px;
}

.feature-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: #888888;
    letter-spacing: 0.22em;
    margin-bottom: 14px;
    opacity: 0.75;
}

.feature-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: #e6e6ec;
    line-height: 1.35;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.feature-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #aaa;
    font-weight: 300;
}

/* ── Investment Demo · all-black, self-contained mini dashboard ─── */

.demo-frame {
    margin-top: 2.5rem;
    background: #0a0a12;
    border: 1px solid #25252e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 56px rgba(0,0,0,0.55), 0 2px 12px rgba(0,0,0,0.45);
}

.demo-chrome {
    background: #16161e;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #25252e;
}
.demo-dot { width: 11px; height: 11px; border-radius: 50%; }
.demo-dot.red { background: #ff5f57; }
.demo-dot.yellow { background: #febc2e; }
.demo-dot.green { background: #28c840; }
.demo-url {
    margin-left: auto; margin-right: auto;
    font-family: ui-monospace, monospace;
    font-size: 11px; color: #888; letter-spacing: 0.02em;
}

.demo-app {
    padding: 22px 24px 24px;
    background: #0a0a12;
    color: #e6e6ec;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
}

/* ── Header ─────────────────────────────── */
.demo-header {
    display: flex; flex-direction: column; gap: 14px;
    margin-bottom: 20px;
}
@media (min-width: 760px) {
    .demo-header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.demo-title {
    font-size: 18px; font-weight: 600; margin: 0; color: #e6e6ec;
    font-family: 'Orbitron', sans-serif; letter-spacing: 0.02em;
}
.demo-subtitle {
    color: #666; font-weight: 400; font-size: 12px; margin-left: 8px;
    letter-spacing: 0.15em; text-transform: uppercase;
}
.demo-meta {
    font-size: 11px; color: #777; margin-top: 5px;
    font-family: ui-monospace, monospace;
}
.demo-actions {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.demo-ccy-switch {
    display: inline-flex;
    background: #16161e; border: 1px solid #25252e;
    border-radius: 8px; padding: 2px;
}
.demo-ccy {
    padding: 5px 11px; border: none; background: transparent;
    cursor: pointer; color: #888; border-radius: 6px;
    transition: all 0.15s; font-family: inherit; font-weight: 500;
    font-size: 12px;
}
.demo-ccy.active { background: #ffffff; color: #0a0a12; }
.demo-ccy:not(.active):hover { background: #1f1f2c; color: #e6e6ec; }

.demo-btn-primary, .demo-btn-ghost {
    padding: 7px 13px; border-radius: 8px; font-size: 12.5px;
    cursor: pointer; font-family: inherit; font-weight: 500;
    transition: all 0.15s;
}
.demo-btn-primary {
    background: #ffffff; color: #0a0a12; border: 1px solid #ffffff;
}
.demo-btn-primary:hover { background: #cccccc; border-color: #cccccc; }
.demo-btn-primary:disabled { opacity: 0.55; cursor: progress; }
.demo-btn-ghost {
    background: transparent; color: #aaa; border: 1px solid #25252e;
}
.demo-btn-ghost:hover { background: #16161e; color: #e6e6ec; }

/* ── Cards (totals + section panels) ────── */
.demo-totals {
    display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px;
}
@media (min-width: 760px) {
    .demo-totals { grid-template-columns: 2fr 1fr 1fr; }
}
.demo-card {
    background: #16161e; border: 1px solid #25252e;
    border-radius: 12px; padding: 14px 16px;
}
.demo-card-total {
    background: linear-gradient(135deg, #16161e 0%, #1d1d29 100%);
    border-color: #2e2e3e;
}
.demo-card-pnl.pos { border-color: #14532d; background: linear-gradient(135deg, #16161e 0%, #0f2820 100%); }
.demo-card-pnl.neg { border-color: #5c1313; background: linear-gradient(135deg, #16161e 0%, #2a1414 100%); }

.demo-label {
    font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
    color: #888; font-weight: 500; font-family: ui-monospace, monospace;
}
.demo-total-amount {
    font-size: 26px; font-weight: 600; margin-top: 6px; color: #e6e6ec;
    font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
    font-family: 'Orbitron', sans-serif;
}
.demo-total-pnl {
    font-size: 11.5px; margin-top: 5px; color: #999;
    font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace;
}
.demo-pnl-value {
    font-size: 20px; font-weight: 600; margin-top: 6px;
    font-variant-numeric: tabular-nums; font-family: 'Orbitron', sans-serif;
}
.demo-pnl-value.pos { color: #4ade80; }
.demo-pnl-value.neg { color: #f87171; }
.demo-pnl-pct {
    font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace;
}
.demo-pnl-pct.pos { color: #4ade80; opacity: 0.8; }
.demo-pnl-pct.neg { color: #f87171; opacity: 0.8; }

.demo-panel {
    background: #16161e; border: 1px solid #25252e;
    border-radius: 12px; padding: 16px 18px; margin-bottom: 14px;
}
.demo-panel-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 12px;
}
.demo-hint {
    font-size: 11px; color: #666; font-style: italic;
}

/* ── Two-column rows ──────────────────────── */
.demo-two-col {
    display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px;
}
@media (min-width: 760px) {
    .demo-two-col { grid-template-columns: 1.4fr 1fr; }
}
.demo-two-col-equal {
    display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px;
}
@media (min-width: 760px) {
    .demo-two-col-equal { grid-template-columns: 1fr 1fr; }
}

/* ── Equity curve chart ───────────────────── */
.demo-curve-wrap { position: relative; }
.demo-curve-svg { width: 100%; height: 160px; display: block; }
.demo-curve-legend {
    display: flex; gap: 16px; font-size: 11px; color: #888;
    margin-top: 8px; font-family: ui-monospace, monospace; letter-spacing: 0.05em;
}
.demo-curve-legend .legend-dot {
    display: inline-block; width: 10px; height: 2px; margin-right: 6px;
    vertical-align: middle;
}

/* ── Holdings table ───────────────────────── */
.demo-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.demo-table th {
    text-align: left; font-weight: 500; color: #777;
    font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 7px 8px; border-bottom: 1px solid #25252e;
    font-family: ui-monospace, monospace;
}
.demo-table th:nth-child(n+2), .demo-table td:nth-child(n+2) {
    text-align: right; font-variant-numeric: tabular-nums;
}
.demo-table td {
    padding: 10px 8px; border-bottom: 1px solid #1f1f2c; color: #c0c0c8;
}
.demo-table tr:last-child td { border-bottom: none; }
.demo-name-main { font-weight: 500; color: #e6e6ec; }
.demo-name-sub { font-size: 10.5px; color: #777; margin-top: 1px; font-family: ui-monospace, monospace; }
.demo-day-chip {
    display: inline-block; padding: 2px 7px; border-radius: 4px;
    font-size: 11px; font-family: ui-monospace, monospace;
}
.demo-day-chip.pos { background: rgba(74,222,128,0.15); color: #4ade80; }
.demo-day-chip.neg { background: rgba(248,113,113,0.15); color: #f87171; }
.demo-row-flash { animation: priceFlash 0.7s ease-out; }
@keyframes priceFlash {
    0% { background: rgba(108,138,255,0.18); }
    100% { background: transparent; }
}

/* ── AI advice body ───────────────────────── */
.demo-advice-body {
    min-height: 80px; font-size: 13px; line-height: 1.65; color: #c0c0c8;
}
.demo-advice-placeholder { color: #666; font-style: italic; margin: 8px 0; }
.demo-advice-body p { margin: 0 0 10px; }
.demo-advice-body strong { color: #e6e6ec; font-weight: 600; }
.demo-advice-body em {
    color: #888; font-style: normal; font-size: 11px;
    letter-spacing: 0.08em; text-transform: uppercase;
    font-family: ui-monospace, monospace;
}
.demo-cursor::after {
    content: '▍'; color: #ffffff; animation: blink 0.9s infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Alignment donuts ─────────────────────── */
.demo-align {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-top: 4px;
}
.demo-align-cell {
    text-align: center; padding: 12px 8px;
    background: #1a1a25; border: 1px solid #25252e; border-radius: 10px;
}
.demo-align-num {
    font-size: 28px; font-weight: 600; font-family: 'Orbitron', sans-serif;
    line-height: 1.1; font-variant-numeric: tabular-nums;
}
.demo-align-num.pos { color: #4ade80; }
.demo-align-num.neg { color: #f87171; }
.demo-align-num.neutral { color: #888; }
.demo-align-label {
    font-size: 10px; color: #888; letter-spacing: 0.1em;
    text-transform: uppercase; margin-top: 6px;
    font-family: ui-monospace, monospace;
}
.demo-align-foot {
    font-size: 11px; color: #777; margin-top: 12px; line-height: 1.5;
}

/* ── Action log ───────────────────────────── */
.demo-log-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.demo-log-item {
    background: #1a1a25; border: 1px solid #25252e; border-radius: 8px;
    padding: 9px 12px; display: flex; justify-content: space-between; align-items: center;
    gap: 10px; font-size: 12.5px;
}
.demo-log-item .tag {
    font-family: ui-monospace, monospace; font-size: 10px;
    padding: 2px 7px; border-radius: 4px; letter-spacing: 0.05em;
}
.demo-log-item .tag.buy { background: rgba(74,222,128,0.15); color: #4ade80; }
.demo-log-item .tag.sell { background: rgba(248,113,113,0.15); color: #f87171; }
.demo-log-item .body { flex: 1; color: #c0c0c8; }
.demo-log-item .date {
    font-size: 11px; color: #666; font-family: ui-monospace, monospace;
}
.demo-log-empty { color: #666; font-style: italic; font-size: 12.5px; padding: 8px 0; }

.demo-log-form {
    margin-top: 10px; padding: 12px; background: #1a1a25;
    border: 1px solid #25252e; border-radius: 8px;
    display: grid; gap: 8px; grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
}
@media (max-width: 640px) {
    .demo-log-form { grid-template-columns: 1fr 1fr; }
}
.demo-log-form label {
    display: flex; flex-direction: column; font-size: 10px;
    color: #888; letter-spacing: 0.08em; text-transform: uppercase;
    gap: 4px; font-family: ui-monospace, monospace;
}
.demo-log-form select, .demo-log-form input {
    background: #0a0a12; border: 1px solid #25252e; color: #e6e6ec;
    border-radius: 6px; padding: 6px 9px; font-size: 13px;
    font-family: inherit; font-variant-numeric: tabular-nums;
}
.demo-log-form button {
    background: #ffffff; color: #0a0a12; border: none;
    border-radius: 6px; padding: 7px 14px; font-size: 12.5px;
    font-weight: 500; cursor: pointer;
}
.demo-log-form button:hover { background: #cccccc; }

/* ── Monthly buy/sell stats ──────────────── */
.demo-month-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin-top: 12px;
}
.demo-month-cell {
    background: #1a1a25; border: 1px solid #25252e;
    border-radius: 6px; padding: 8px 10px;
}
.demo-month-num {
    font-family: 'Orbitron', sans-serif; font-size: 16px; font-weight: 500;
    margin-top: 3px;
}
.demo-month-num.buy { color: #4ade80; }
.demo-month-num.sell { color: #f87171; }

/* ── News feed ───────────────────────────── */
.demo-news-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 9px;
}
.demo-news-item {
    background: #1a1a25; border: 1px solid #25252e; border-radius: 8px;
    padding: 10px 12px;
}
.demo-news-tag {
    font-family: ui-monospace, monospace; font-size: 9.5px;
    color: #ffffff; letter-spacing: 0.1em; text-transform: uppercase;
}
.demo-news-title {
    color: #e6e6ec; font-size: 13px; margin-top: 4px; line-height: 1.4;
}
.demo-news-meta {
    color: #666; font-size: 11px; margin-top: 3px;
    font-family: ui-monospace, monospace;
}

