:root {
    --bg-color: #f5efe5;
    --surface-color: #fffaf4;
    --surface-strong: #fffdf8;
    --text-primary: #241b18;
    --text-secondary: #75645b;
    --primary-color: #c95f43;
    --hover-primary: #b34d32;
    --secondary-color: #efe4d7;
    --border-color: #dfcfbf;
    --tab-inactive: #9b8a7d;
    --code-bg: #1d1f24;
    --code-border: #3b3f48;
    --code-text: #f8efe3;
    --code-muted: #a89e90;
    --code-highlight-bg: rgba(255, 196, 108, 0.17);
    --code-highlight-border: rgba(255, 196, 108, 0.4);
    --code-pane-bg: rgba(10, 12, 17, 0.44);
    --code-pane-border: rgba(255, 255, 255, 0.08);
    --token-keyword: #f98d6a;
    --token-string: #b8e07a;
    --token-comment: #8e9aaa;
    --token-function: #86d7ff;
    --token-decorator: #d6b4ff;
    --pill-bg: #f4dfcb;
    --pill-text: #8b452f;
    
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    --cam-color: #ffb3ba;
    --cam-border: #ff8c99;
    --pt-color: #ffdfba;
    --pt-border: #ffc280;
    --cam-jac-color: #c8e6c9;
    --cam-jac-border: #81c784;
    --pt-jac-color: #bbdefb;
    --pt-jac-border: #64b5f6;
    --res-color: #fff9c4;
    --res-border: #fff59d;
}

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 209, 179, 0.38), transparent 35%),
        radial-gradient(circle at top right, rgba(214, 225, 255, 0.45), transparent 28%),
        linear-gradient(180deg, #f8f2ea 0%, var(--bg-color) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.intro-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(201, 95, 67, 0.16);
    box-shadow: var(--box-shadow);
    background:
        radial-gradient(circle at top left, rgba(255, 196, 147, 0.48), transparent 26%),
        radial-gradient(circle at top right, rgba(173, 197, 255, 0.34), transparent 28%),
        linear-gradient(140deg, #fff8f1 0%, #f6ebde 52%, #ecdfd1 100%);
}

.intro-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(117, 100, 91, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(117, 100, 91, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 82%);
    pointer-events: none;
}

.intro-shell,
.intro-highlights {
    position: relative;
    z-index: 1;
}

.intro-shell {
    display: flex;
    justify-content: center;
    padding: 2.4rem 2.4rem 1.35rem;
}

.intro-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 880px;
}

.intro-title {
    max-width: 10ch;
    margin-bottom: 1rem;
    font-size: clamp(2.3rem, 5vw, 4rem);
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-weight: 700;
    line-height: 0.94;
    letter-spacing: -0.07em;
    color: var(--text-primary);
}

.intro-title-nowrap {
    display: inline-block;
    white-space: nowrap;
}

.intro-title-brand {
    display: inline-flex;
    align-items: baseline;
    vertical-align: -0.06em;
}

.intro-title-logo {
    display: block;
    width: auto;
    height: 0.92em;
}

.intro-subtitle {
    max-width: 58ch;
    font-size: 1.08rem;
}

.intro-paper-meta {
    margin-top: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    padding-left: 0.9rem;
    border-left: 2px solid rgba(201, 95, 67, 0.18);
    max-width: 62ch;
}

.intro-paper-label {
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.intro-paper-title {
    color: var(--text-primary);
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.intro-byline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.intro-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.intro-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(255, 250, 244, 0.82);
    border: 1px solid rgba(201, 95, 67, 0.16);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.intro-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: #fffaf4;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.intro-link:any-link {
    color: #fffaf4;
}

.intro-link:hover {
    background-color: var(--hover-primary);
    transform: translateY(-1px);
}

.intro-link.secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.intro-link.secondary:any-link {
    color: var(--text-primary);
}

.intro-link.secondary:hover {
    background-color: #e6d8c8;
}

.intro-link-icon {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}

.intro-link-icon-pair {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    flex-shrink: 0;
}

.intro-link-icon-image {
    display: block;
    object-fit: contain;
}

.intro-link-badge {
    margin-left: 0.15rem;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    background: rgba(36, 27, 24, 0.08);
    border: 1px solid rgba(36, 27, 24, 0.1);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intro-link-disabled,
.intro-link-disabled:hover {
    background: rgba(239, 228, 215, 0.72);
    color: var(--text-primary);
    border: 1px dashed rgba(117, 100, 91, 0.35);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.intro-link-disabled:disabled {
    opacity: 0.82;
}

.intro-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 2.4rem 2.3rem;
}

.intro-highlight-card {
    min-width: 0;
    border-radius: 22px;
    border: 1px solid rgba(201, 95, 67, 0.14);
    background: rgba(255, 250, 244, 0.72);
    backdrop-filter: blur(12px);
    padding: 1.1rem 1.1rem 1.15rem;
}

.intro-highlight-label {
    margin-bottom: 0.45rem;
    color: var(--primary-color);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.intro-highlight-card h3 {
    margin-bottom: 0.55rem;
    font-size: 1.12rem;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.intro-highlight-card p:last-child {
    color: var(--text-secondary);
}

.performance-hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    gap: 1.4rem;
    align-items: stretch;
}

.performance-copy,
.performance-chart-shell {
    background: rgba(255, 250, 244, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: var(--box-shadow);
}

.performance-copy {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.performance-copy h2 {
    font-size: clamp(1.55rem, 2.7vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 0.8rem;
}

.performance-copy .subtitle {
    max-width: 48ch;
}

.performance-stats {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
}

.performance-stat {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) max-content;
    gap: 0.8rem;
    align-items: center;
}

.performance-stat-value {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    text-align: right;
}

.performance-stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.performance-stat-bar {
    height: 0.9rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(201, 95, 67, 0.12);
    border: 1px solid rgba(201, 95, 67, 0.14);
}

.performance-stat-fill {
    display: block;
    width: var(--bar-fill);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f0b28d 0%, #c95f43 100%);
}

.performance-stat-ours .performance-stat-fill {
    background: linear-gradient(90deg, #e89067 0%, #b34d32 100%);
}

.performance-scale-note {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.performance-chart-shell {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow: hidden;
}

.performance-chart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.performance-chart-note {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.performance-replay-btn {
    flex-shrink: 0;
}

.performance-chart {
    min-height: 500px;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 197, 159, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 239, 229, 0.95));
    border: 1px solid rgba(36, 27, 24, 0.08);
}

.performance-chart svg {
    width: 100%;
    height: 100%;
    display: block;
    font-family: "Inter", sans-serif;
}

.perf-grid-line {
    stroke: rgba(117, 100, 91, 0.18);
    stroke-width: 1;
}

.perf-axis-line {
    stroke: rgba(36, 27, 24, 0.8);
    stroke-width: 2;
}

.perf-axis-label {
    fill: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.perf-tick-label {
    fill: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.perf-trend {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.92;
}

.perf-dot {
    opacity: 0;
}

.perf-point {
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 2.5;
}

.perf-legend {
    fill: rgba(255, 250, 244, 0.86);
    stroke: rgba(36, 27, 24, 0.12);
    stroke-width: 1.5;
}

.perf-legend-label {
    fill: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
}

.perf-trend-label {
    fill: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tabs-container {
    background: rgba(255, 250, 244, 0.92);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(251, 245, 238, 0.9));
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--tab-inactive);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(201, 95, 67, 0.08);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.88);
}

.tab-content {
    display: none;
    padding: 2rem;
    flex-direction: column;
    gap: 1.5rem;
}

.tab-content.active {
    display: flex;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background-color: var(--primary-color);
    color: white;
}

.action-btn:hover {
    background-color: var(--hover-primary);
    transform: translateY(-1px);
}

.action-btn.secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background-color: #e6d8c8;
}

.experience-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    gap: 1.25rem;
    align-items: stretch;
}

.viz-shell,
.code-panel {
    min-width: 0;
}

.viz-container {
    width: 100%;
    height: 600px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 241, 233, 0.95)),
        linear-gradient(135deg, rgba(235, 71, 88, 0.05), rgba(100, 181, 246, 0.06));
    border-radius: 8px;
    border: 1px dashed #ccb9a7;
    position: relative;
    overflow: hidden;
}

.code-panel {
    background: linear-gradient(180deg, rgba(35, 38, 43, 0.96), rgba(24, 26, 31, 0.98));
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-shadow: 0 16px 48px rgba(31, 24, 18, 0.16);
}

.code-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.panel-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d9b79e;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.panel-title a {
    color: inherit;
    text-decoration: none;
}

.panel-title a:hover {
    color: #ffd4b8;
}

.step-pill {
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--pill-bg);
    color: var(--pill-text);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.code-caption {
    color: #d8ccbf;
    font-size: 0.92rem;
    min-height: 2.6rem;
}

.code-block {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin: 0;
    padding: 0.15rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phase-card {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    padding: 0.65rem 0.7rem;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.phase-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 212, 184, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.code-block.has-active .phase-card {
    opacity: 0.48;
}

.code-block.has-active .phase-card.active {
    opacity: 1;
}

.phase-card.active {
    opacity: 1;
    background: var(--code-highlight-bg);
    border-color: var(--code-highlight-border);
    box-shadow: 0 0 0 1px rgba(255, 196, 108, 0.18);
    transform: translateX(2px);
}

.phase-card:focus-visible {
    outline: 2px solid rgba(255, 212, 184, 0.7);
    outline-offset: 2px;
}

.phase-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.phase-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #f5d6bf;
}

.phase-card-jump {
    font-size: 0.72rem;
    color: #c9b7a6;
}

.phase-card-code {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.84rem;
    line-height: 1.42;
    background: var(--code-pane-bg);
    border: 1px solid var(--code-pane-border);
    border-radius: 10px;
    overflow: hidden;
}

.phase-card-line {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: start;
}

.phase-card-line + .phase-card-line {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.phase-card-line-no {
    display: block;
    padding: 0.12rem 0.35rem 0.12rem 0.25rem;
    text-align: right;
    color: var(--code-muted);
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    user-select: none;
}

.phase-card-line-code {
    display: block;
    padding: 0.12rem 0.5rem;
    color: var(--code-text);
    white-space: pre;
}

.token-keyword {
    color: var(--token-keyword);
}

.token-string {
    color: var(--token-string);
}

.token-comment {
    color: var(--token-comment);
}

.token-function {
    color: var(--token-function);
}

.token-decorator {
    color: var(--token-decorator);
}

/* Visualization SVG Styles */
svg {
    width: 100%;
    height: 100%;
    font-family: 'JetBrains Mono', monospace;
}

.node-rect {
    rx: 4px;
    ry: 4px;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.cam-node { fill: var(--cam-color); stroke: var(--cam-border); }
.pt-node { fill: var(--pt-color); stroke: var(--pt-border); }
.cam-jac-node { fill: var(--cam-jac-color); stroke: var(--cam-jac-border); }
.pt-jac-node { fill: var(--pt-jac-color); stroke: var(--pt-jac-border); }
.res-node { fill: var(--res-color); stroke: var(--res-border); }

.fixed-node {
    opacity: 0.4;
    stroke-dasharray: 4;
}

.label {
    font-size: 14px;
    text-anchor: middle;
    dominant-baseline: central;
    fill: var(--text-primary);
    pointer-events: none;
}

.title-label {
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    fill: var(--text-primary);
    color: var(--text-primary);
}

.edge {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2px;
    stroke-dasharray: 4;
    opacity: 0.6;
}

.edge-flow {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2.5px;
    opacity: 0;
}

.math-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* KaTeX overrides for SVG foreignObject */
.math-label .katex-display,
.title-label .katex-display {
    margin: 0 !important;
}

.section-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.85rem;
}

.video-loop {
    background:
        radial-gradient(circle at top left, rgba(255, 209, 179, 0.28), transparent 34%),
        linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(244, 235, 225, 0.98));
    border: 1px solid var(--border-color);
    border-radius: 28px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.video-loop-shell {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.video-loop-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.video-loop-stage {
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: #140f0d;
    border: 1px solid rgba(36, 27, 24, 0.12);
}

.video-loop-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.video-slide {
    min-width: 100%;
    position: relative;
    background: #140f0d;
}

.video-slide video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #140f0d;
}

.video-slide-label,
.video-loop-dots {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-slide-label {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 15, 13, 0.74);
    color: #fff7f1;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.video-loop-dots {
    gap: 0.55rem;
}

.video-loop-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    border: none;
    background: rgba(117, 100, 91, 0.28);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-loop-dot.active {
    background: var(--primary-color);
    transform: scale(1.12);
}

.citation-section {
    background:
        linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(244, 235, 225, 0.98));
    border: 1px solid var(--border-color);
    border-radius: 28px;
    box-shadow: var(--box-shadow);
}

.citation-shell {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.citation-header h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.3rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.citation-code {
    margin: 0;
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--code-border);
    background: linear-gradient(180deg, rgba(35, 38, 43, 0.96), rgba(24, 26, 31, 0.98));
    color: var(--code-text);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    overflow: auto;
    box-shadow: 0 16px 48px rgba(31, 24, 18, 0.16);
}

@supports (corner-shape: squircle) {
    .intro-hero,
    .intro-highlight-card,
    .intro-chip,
    .citation-section,
    .citation-code,
    .tabs-container,
    .viz-container,
    .code-panel,
    .phase-card,
    .phase-card-code,
    .step-pill,
    .action-btn {
        corner-shape: squircle;
    }
}

@media (max-width: 1080px) {
    .intro-highlights,
    .performance-hero {
        grid-template-columns: 1fr;
    }

    .intro-title {
        max-width: 12ch;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .code-panel {
        min-height: 420px;
    }
}

@media (max-width: 720px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .intro-shell {
        padding: 1.35rem 1.1rem 1rem;
    }

    .intro-title {
        font-size: clamp(2.05rem, 9vw, 2.9rem);
    }

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

    .intro-link {
        width: 100%;
    }

    .intro-highlights {
        padding: 0 1.1rem 1.2rem;
    }

    .tab-content {
        padding: 1.1rem;
    }

    .performance-copy,
    .performance-chart-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .performance-chart {
        min-height: 380px;
    }

    .performance-chart-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .performance-stat {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .performance-stat-value {
        text-align: left;
    }

    .tabs {
        flex-direction: column;
    }

    .controls {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
    }

    .viz-container {
        height: 460px;
    }

    .code-panel-header {
        flex-direction: column;
    }

    .video-loop-shell {
        padding: 1rem;
    }

    .citation-shell {
        padding: 1rem;
    }

    .video-slide-label {
        left: 0.75rem;
        bottom: 0.75rem;
    }
}
