:root {
    color-scheme: light;
    --primary: #0a0a0a;
    --primary-active: #1f1f1f;
    --ink: #0a0a0a;
    --body: #3a3a3a;
    --body-strong: #1a1a1a;
    --muted: #6a6a6a;
    --hairline: #e5e5e5;
    --canvas: #fffaf0;
    --surface-soft: #faf5e8;
    --surface-card: #f5f0e0;
    --surface-strong: #ebe6d6;
    --on-primary: #ffffff;
    --pink: #ff4d8b;
    --teal: #1a3a3a;
    --lavender: #b8a4ed;
    --peach: #ffb084;
    --ochre: #e8b94a;
    --mint: #a4d4c5;
    --coral: #ff6b5a;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
    --section: 96px;
    --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--sans);
    letter-spacing: 0;
}

.nicegui-content,
.q-page,
.q-layout,
.q-page-container,
.portfolio-root,
.portfolio-root > div {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--canvas);
}

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

.site-shell {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(245, 240, 224, 0.56), rgba(255, 250, 240, 0) 28rem),
        var(--canvas);
}

.section-inner {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    min-height: 64px;
    padding: 0 28px;
    border-bottom: 1px solid var(--hairline);
    background: rgba(255, 250, 240, 0.94);
    backdrop-filter: blur(18px);
}

.brand,
.topbar nav,
.nav-actions,
.hero-actions,
.profile-actions,
.button,
.card-action {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: var(--radius-md);
    color: var(--on-primary);
    background: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.topbar nav {
    justify-content: center;
    gap: 8px;
}

.topbar nav a {
    min-height: 40px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    color: var(--body);
    font-size: 14px;
    font-weight: 600;
}

.topbar nav a:hover {
    color: var(--ink);
    background: var(--surface-card);
}

.nav-actions {
    justify-content: flex-end;
}

.button {
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.button.primary {
    color: var(--on-primary);
    background: var(--primary);
}

.button.primary:hover {
    background: var(--primary-active);
}

.button.secondary {
    color: var(--ink);
    background: rgba(255, 250, 240, 0.88);
    border-color: var(--hairline);
}

.button:active,
.card-action:active {
    transform: translateY(1px);
}

.material-symbols-rounded {
    max-width: 24px;
    overflow: hidden;
    font-size: 20px;
    line-height: 1;
}

.hero-band {
    padding: 84px 0 68px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 6fr 6fr;
    gap: 56px;
    align-items: center;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow,
.card-kicker {
    display: block;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-shell h1,
.site-shell h2,
.site-shell h3,
.site-shell p {
    margin-top: 0;
}

.site-shell h1 {
    max-width: 740px;
    margin-bottom: 24px;
    color: var(--ink);
    font-size: 72px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
}

.site-shell h2 {
    margin-bottom: 18px;
    color: var(--ink);
    font-size: 56px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0;
}

.site-shell h3 {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.24;
    letter-spacing: 0;
}

.lede {
    max-width: 540px;
    margin-bottom: 0;
    color: var(--body);
    font-size: 19px;
    line-height: 1.55;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-art-card {
    position: relative;
    justify-self: stretch;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--surface-soft);
}

.clay-scene {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border-radius: inherit;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.74), transparent 34%),
        var(--surface-soft);
    isolation: isolate;
}

.hero-clay-scene {
    min-height: 520px;
}

.personal-clay-scene {
    min-height: 340px;
}

.contact-clay-scene {
    min-height: 280px;
}

.clay-scene canvas,
.clay-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.clay-scene canvas {
    z-index: 2;
    display: block;
}

.clay-fallback {
    z-index: 1;
    display: block;
    max-width: none;
    object-fit: cover;
    transition: opacity 180ms ease;
    transform: scale(1.14);
}

.clay-scene.is-three-ready .clay-fallback {
    opacity: 0;
}

body.story-locked {
    overflow: hidden;
}

.story-gate,
.story-replay {
    font-family: var(--sans);
}

.story-gate[hidden],
.story-replay[hidden] {
    display: none;
}

.story-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 176, 132, 0.28), transparent 28%),
        radial-gradient(circle at 80% 78%, rgba(164, 212, 197, 0.32), transparent 30%),
        var(--canvas);
}

.story-shell {
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 24px;
    width: min(1180px, 100%);
    min-height: min(760px, calc(100dvh - 40px));
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid rgba(10, 10, 10, 0.08);
    border-radius: 32px;
    background: rgba(255, 250, 240, 0.94);
}

.story-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-self: center;
}

.story-eyebrow {
    display: block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    text-transform: uppercase;
}

.story-copy h2 {
    max-width: 720px;
    margin: 0 0 22px;
    color: var(--ink);
    font-size: clamp(42px, 5vw, 64px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-wrap: balance;
}

.story-copy p {
    max-width: 520px;
    margin: 0;
    color: var(--body);
    font-size: 19px;
    line-height: 1.55;
}

.story-stage-panel {
    position: relative;
    min-width: 0;
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.78), transparent 34%),
        var(--surface-card);
    isolation: isolate;
}

.story-stage,
.story-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.story-stage canvas {
    display: block;
    cursor: pointer;
}

.story-footer {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.story-progress {
    display: flex;
    gap: 8px;
    align-items: center;
}

.story-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-strong);
}

.story-dot.is-active {
    width: 32px;
    border-radius: var(--radius-pill);
    background: var(--primary);
}

.story-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.story-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.story-button.primary {
    color: var(--on-primary);
    background: var(--primary);
}

.story-button.secondary,
.story-button.ghost {
    color: var(--ink);
    background: rgba(255, 250, 240, 0.92);
}

.story-button.ghost {
    border-color: transparent;
    background: transparent;
}

.story-button:disabled {
    cursor: default;
    opacity: 0.36;
}

.story-button:active,
.story-replay:active {
    transform: translateY(1px);
}

.story-replay {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 24;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(10, 10, 10, 0.12);
    border-radius: var(--radius-md);
    color: var(--ink);
    background: rgba(255, 250, 240, 0.9);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(16px);
}

.signal-row {
    padding: 0 0 72px;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.signal-grid article {
    min-width: 0;
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    background: var(--surface-card);
}

.signal-grid span,
.footer-grid span,
.route-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.signal-grid strong {
    display: block;
    color: var(--body-strong);
    font-size: 17px;
    line-height: 1.4;
}

.section {
    padding: var(--section) 0;
}

.profile-section,
.footer {
    background: var(--surface-soft);
}

.section-heading {
    max-width: 820px;
    margin-bottom: 40px;
}

.section-heading p,
.stack-copy p,
.route-card p,
.skill-card p,
.footer p,
.clay-card p {
    color: var(--body);
    font-size: 16px;
    line-height: 1.58;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.clay-card {
    display: flex;
    min-width: 0;
    min-height: 560px;
    flex-direction: column;
    padding: 32px;
    border-radius: var(--radius-xl);
    color: var(--ink);
    background: var(--surface-card);
}

.clay-card.card-1 {
    grid-column: span 2;
}

.clay-card.pink {
    color: var(--on-primary);
    background: var(--pink);
}

.clay-card.teal {
    color: var(--on-primary);
    background: var(--teal);
}

.clay-card.lavender {
    background: var(--lavender);
}

.clay-card.peach {
    background: var(--peach);
}

.clay-card.ochre {
    background: var(--ochre);
}

.clay-card.cream {
    background: var(--surface-card);
}

.clay-card .card-kicker,
.clay-card p {
    color: currentColor;
}

.clay-card h3 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.12;
}

.clay-card.card-1 h3 {
    font-size: 40px;
    font-weight: 600;
}

.card-copy {
    max-width: 620px;
}

.project-artifact {
    position: relative;
    overflow: hidden;
    min-height: 286px;
    margin: 28px 0 22px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 240, 0.9);
    color: var(--ink);
}

.clay-card.card-1 .project-artifact {
    min-height: 320px;
}

.project-artifact::before {
    position: absolute;
    inset: auto -20% -46% 28%;
    height: 70%;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.08);
    content: "";
}

.artifact-title {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.artifact-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.artifact-title strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}

.cgm-flow {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(110px, 1fr) 32px minmax(112px, 1fr) 32px minmax(96px, 0.8fr);
    gap: 10px;
    align-items: center;
}

.cgm-node,
.cgm-board,
.cgm-lamp,
.brain-page,
.browser-window,
.readme-card,
.terminal-card,
.desktop-card {
    min-width: 0;
    border-radius: var(--radius-md);
    background: #102323;
    color: var(--on-primary);
}

.cgm-node {
    padding: 16px;
}

.cgm-node span,
.reading-strip span,
.terminal-card span,
.desktop-card span,
.browser-window span,
.readme-card span,
.brain-page span {
    display: block;
    font-size: 12px;
    line-height: 1.35;
}

.cgm-node b,
.brain-page b,
.browser-window b,
.readme-card b,
.terminal-card b,
.desktop-card b,
.cgm-lamp b {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.25;
}

.flow-rail {
    height: 8px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--mint), var(--ochre));
}

.cgm-board {
    position: relative;
    display: grid;
    min-height: 112px;
    grid-template-columns: repeat(2, 18px) 1fr;
    gap: 9px;
    align-content: center;
    padding: 18px;
    background: #174545;
}

.cgm-board i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ochre);
}

.cgm-board i:nth-child(2),
.cgm-board i:nth-child(3) {
    background: var(--mint);
}

.cgm-board strong {
    grid-column: 1 / -1;
    margin-top: 10px;
    font-size: 15px;
}

.cgm-lamp {
    display: grid;
    min-height: 132px;
    place-items: center;
    padding: 14px;
    background: #285050;
    text-align: center;
}

.cgm-lamp span {
    display: block;
    width: 58px;
    height: 76px;
    border-radius: 22px 22px 16px 16px;
    background: var(--mint);
    box-shadow: 0 0 28px rgba(164, 212, 197, 0.9);
}

.reading-strip {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(10, 10, 10, 0.08);
}

.reading-strip strong {
    color: var(--ink);
    font-size: 13px;
}

.brain-layout,
.archive-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 0.72fr 1fr;
    gap: 12px;
    align-items: stretch;
}

.brain-page,
.readme-card {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.brain-page span,
.readme-card span {
    padding: 7px 9px;
    border-radius: var(--radius-pill);
    background: rgba(255, 250, 240, 0.16);
}

.brain-graph {
    position: relative;
    min-height: 160px;
    border-radius: var(--radius-md);
    background: rgba(10, 10, 10, 0.1);
}

.brain-graph::before,
.brain-graph::after {
    position: absolute;
    inset: 34% 18%;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--mint);
    content: "";
    transform: rotate(34deg);
}

.brain-graph::after {
    inset: 54% 20%;
    background: var(--ochre);
    transform: rotate(-28deg);
}

.brain-graph i {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mint);
}

.brain-graph i:nth-child(1) { top: 22%; left: 18%; }
.brain-graph i:nth-child(2) { top: 54%; left: 28%; background: var(--peach); }
.brain-graph i:nth-child(3) { top: 32%; right: 20%; background: var(--lavender); }
.brain-graph i:nth-child(4) { right: 34%; bottom: 18%; background: var(--ochre); }
.brain-graph i:nth-child(5) { right: 12%; bottom: 36%; }

.desktop-shell {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #102323;
}

.waybar,
.theme-swatches {
    display: flex;
    gap: 8px;
}

.waybar {
    align-items: center;
    padding: 10px;
    background: rgba(255, 250, 240, 0.12);
}

.waybar span {
    height: 12px;
    border-radius: var(--radius-pill);
    background: var(--mint);
}

.waybar span:nth-child(1) { width: 22%; }
.waybar span:nth-child(2) { width: 14%; background: var(--lavender); }
.waybar span:nth-child(3) { width: 18%; background: var(--peach); }
.waybar span:nth-child(4) { margin-left: auto; width: 16%; background: var(--ochre); }

.desktop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.terminal-card,
.desktop-card {
    min-height: 90px;
    padding: 15px;
    background: #1c3030;
}

.terminal-card b {
    color: var(--mint);
}

.desktop-card.wide {
    grid-column: 1 / -1;
    min-height: 60px;
}

.theme-swatches {
    position: relative;
    z-index: 1;
    margin-top: 14px;
}

.theme-swatches span {
    width: 42px;
    height: 18px;
    border-radius: var(--radius-pill);
    background: var(--mint);
}

.theme-swatches span:nth-child(2) { background: var(--lavender); }
.theme-swatches span:nth-child(3) { background: var(--peach); }
.theme-swatches span:nth-child(4) { background: var(--ochre); }
.theme-swatches span:nth-child(5) { background: var(--coral); }

.browser-window {
    grid-column: span 2;
    min-height: 136px;
    padding: 16px;
    background: #102323;
}

.browser-window::before {
    display: block;
    width: 72px;
    height: 12px;
    margin-bottom: 24px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--coral) 0 18px, var(--ochre) 18px 42px, var(--mint) 42px);
    content: "";
}

.archive-stack {
    position: relative;
    min-height: 136px;
}

.archive-stack i {
    position: absolute;
    inset: 18px 6px auto 14px;
    height: 76px;
    border-radius: var(--radius-md);
    background: var(--lavender);
    transform: rotate(-8deg);
}

.archive-stack i:nth-child(2) {
    inset: 36px 14px auto 4px;
    background: var(--mint);
    transform: rotate(7deg);
}

.archive-stack i:nth-child(3) {
    inset: 54px 0 auto 22px;
    background: var(--ochre);
    transform: rotate(-2deg);
}

.readme-card {
    grid-column: 1 / -1;
    background: #1c3030;
}

.proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.proof-row span {
    padding: 7px 10px;
    border-radius: var(--radius-pill);
    color: var(--ink);
    background: rgba(255, 250, 240, 0.78);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.project-stack {
    display: grid;
    gap: 9px;
    margin-top: 0;
}

.project-stack-label {
    color: currentColor;
    font-size: 12px;
    font-weight: 800;
}

.project-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(10, 10, 10, 0.12);
    border-radius: var(--radius-md);
    color: var(--ink);
    background: rgba(255, 250, 240, 0.82);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: inset 0 -1px 0 rgba(10, 10, 10, 0.04);
}

.chip {
    max-width: 100%;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    color: var(--ink);
    background: rgba(255, 250, 240, 0.86);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.card-bottom {
    margin-top: 20px;
}

.card-action {
    gap: 8px;
    width: fit-content;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--ink);
    background: var(--canvas);
    font-size: 14px;
    font-weight: 800;
}

.card-action.muted {
    color: var(--ink);
    background: rgba(255, 250, 240, 0.78);
}

.route-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr 0.95fr;
    gap: 24px;
}

.route-card {
    min-width: 0;
    min-height: 250px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--surface-card);
}

.route-card.mint {
    background: var(--mint);
}

.route-card.ochre {
    background: var(--ochre);
}

.route-card.peach {
    background: var(--peach);
}

.personal-object-band {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 24px;
    align-items: center;
    margin-top: 24px;
    padding: 32px;
    border-radius: var(--radius-xl);
    background: var(--surface-card);
}

.personal-object-copy {
    min-width: 0;
}

.personal-object-copy h3 {
    max-width: 420px;
    font-size: 32px;
    font-weight: 600;
}

.personal-object-copy p {
    max-width: 440px;
    color: var(--body);
    font-size: 16px;
    line-height: 1.58;
}

.cv-section {
    background: var(--canvas);
}

.cv-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 56px;
    align-items: start;
}

.cv-intro {
    position: sticky;
    top: 96px;
}

.cv-actions,
.cv-strengths {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cv-actions {
    margin-top: 28px;
}

.cv-strengths {
    margin-top: 24px;
}

.cv-board {
    display: grid;
    gap: 18px;
}

.cv-experience {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cv-card,
.education-card {
    min-width: 0;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--surface-card);
}

.cv-card.mint {
    background: var(--mint);
}

.cv-card.lavender {
    background: var(--lavender);
}

.cv-card span,
.education-card > span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.cv-card p,
.education-card p,
.cv-intro p {
    color: var(--body);
    font-size: 16px;
    line-height: 1.58;
}

.cv-card ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.cv-card li {
    position: relative;
    padding-left: 18px;
    color: var(--body-strong);
    font-size: 14px;
    line-height: 1.45;
}

.cv-card li::before {
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    content: "";
}

.education-card {
    background: var(--surface-soft);
}

.education-item {
    padding: 18px 0;
    border-top: 1px solid var(--hairline);
}

.education-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
}

.education-item p,
.reference-note {
    margin-bottom: 0;
}

.reference-note {
    padding-top: 18px;
    border-top: 1px solid var(--hairline);
    font-weight: 700;
}

.stack-section {
    background: var(--surface-soft);
}

.stack-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 56px;
    align-items: start;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.skill-card {
    min-width: 0;
    min-height: 178px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface-card);
}

.skill-card.mint {
    background: var(--mint);
}

.skill-card.ochre {
    background: var(--ochre);
}

.skill-card.lavender {
    background: var(--lavender);
}

.skill-card.peach {
    background: var(--peach);
}

.skill-card.pink {
    color: var(--on-primary);
    background: var(--pink);
}

.skill-card.pink p {
    color: var(--on-primary);
}

.skill-card.cream {
    background: var(--surface-card);
}

.skill-pin {
    display: block;
    width: 36px;
    height: 14px;
    margin-bottom: 38px;
    border-radius: var(--radius-pill);
    background: rgba(255, 250, 240, 0.78);
}

.profile-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.contact-section {
    padding: var(--section) 0;
    background: var(--canvas);
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: 32px;
    align-items: stretch;
    overflow: hidden;
    padding: 80px;
    border-radius: var(--radius-xl);
    background: var(--peach);
}

.contact-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.contact-copy p {
    max-width: 560px;
    color: var(--body-strong);
    font-size: 17px;
    line-height: 1.55;
}

.contact-copy .contact-direct {
    width: fit-content;
    margin: 18px 0 0;
    padding: 11px 13px;
    border-radius: var(--radius-md);
    background: rgba(255, 250, 240, 0.48);
    font-size: 14px;
    font-weight: 700;
}

.contact-direct a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.contact-aside {
    overflow: hidden;
    margin-top: auto;
    border-radius: var(--radius-xl);
    background: rgba(255, 250, 240, 0.5);
}

.contact-form {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: rgba(255, 250, 240, 0.86);
}

.contact-form label {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.contact-form label > span {
    color: var(--body-strong);
    font-size: 13px;
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    outline: none;
    background: var(--canvas);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

.contact-form input {
    min-height: 44px;
    padding: 10px 14px;
}

.contact-form textarea {
    min-height: 184px;
    padding: 14px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

.contact-message,
.contact-form .button,
.form-status {
    grid-column: 1 / -1;
}

.contact-form .button {
    width: fit-content;
}

.contact-form .button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.contact-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    min-height: 24px;
    margin: 0;
    color: var(--body-strong);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

.form-status.success {
    color: #14532d;
}

.form-status.error {
    color: #7f1d1d;
}

.footer {
    padding: 80px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
}

.footer strong {
    display: block;
    margin-bottom: 12px;
    font-size: 18px;
}

@media (max-width: 1120px) {
    .hero-layout,
    .stack-layout,
    .contact-panel,
    .cv-layout,
    .personal-object-band {
        grid-template-columns: 1fr;
    }

    .cv-intro {
        position: static;
    }

    .hero-art-card,
    .personal-object-band {
        max-width: 820px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clay-card.card-1 {
        grid-column: 1 / -1;
    }

    .route-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .story-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(320px, 1fr) auto;
        overflow-y: auto;
    }

    .story-stage-panel {
        min-height: 390px;
    }
}

@media (max-width: 767px) {
    .section-inner {
        width: min(100%, calc(100% - 28px));
    }

    .topbar {
        grid-template-columns: auto 1fr;
        gap: 10px;
        min-height: 60px;
        padding: 0 14px;
    }

    .brand span:last-child,
    .nav-actions {
        display: none;
    }

    .topbar nav {
        justify-content: flex-end;
        gap: 2px;
    }

    .topbar nav a {
        min-height: 34px;
        padding: 8px 7px;
        font-size: 13px;
    }

    .story-gate {
        align-items: start;
        padding: 12px;
        overflow-y: auto;
    }

    .story-shell {
        min-height: calc(100dvh - 24px);
        max-height: none;
        gap: 14px;
        padding: 18px;
        border-radius: var(--radius-xl);
    }

    .story-copy h2 {
        font-size: 38px;
    }

    .story-copy p {
        font-size: 16px;
    }

    .story-stage-panel {
        min-height: 310px;
    }

    .story-footer,
    .story-actions {
        width: 100%;
    }

    .story-actions {
        display: grid;
        grid-template-columns: 1fr 0.7fr 1fr;
    }

    .story-button {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .story-replay {
        right: 12px;
        bottom: 12px;
    }

    .hero-band,
    .section,
    .contact-section {
        padding: 64px 0;
    }

    .signal-row {
        padding-bottom: 52px;
    }

    .site-shell h1 {
        font-size: 42px;
        line-height: 1.04;
    }

    .site-shell h2 {
        font-size: 36px;
        line-height: 1.08;
    }

    .site-shell h3,
    .clay-card h3,
    .clay-card.card-1 h3 {
        font-size: 24px;
    }

    .lede {
        font-size: 17px;
    }

    .hero-actions,
    .profile-actions {
        width: 100%;
    }

    .button {
        width: 100%;
    }

    .hero-clay-scene {
        min-height: 390px;
    }

    .personal-clay-scene,
    .contact-clay-scene {
        min-height: 250px;
    }

    .signal-grid,
    .feature-grid,
    .skills-grid,
    .cv-experience,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .clay-card {
        min-height: auto;
        padding: 24px;
    }

    .project-artifact {
        padding: 14px;
        min-height: 0;
    }

    .cgm-flow,
    .brain-layout,
    .archive-layout,
    .desktop-grid {
        grid-template-columns: 1fr;
    }

    .flow-rail {
        width: 8px;
        height: 28px;
        justify-self: center;
        background: linear-gradient(180deg, var(--mint), var(--ochre));
    }

    .browser-window,
    .readme-card,
    .desktop-card.wide {
        grid-column: auto;
    }

    .personal-object-band {
        padding: 22px;
    }

    .contact-panel {
        padding: 28px;
    }

    .contact-form {
        padding: 20px;
    }

    .contact-form .button {
        width: 100%;
    }

    .chip,
    .project-chip,
    .proof-row span {
        white-space: normal;
    }
}
