/* malyawka.com — portfolio site with Unity references (colors, inspector, console, scene grid). */
:root {
    --bg: #1b1b1b;
    --bg-2: #202020;
    --panel: #282828;
    --panel-2: #303030;
    --panel-head: #3c3c3c;
    --field: #232323;
    --border: #3a3a3a;
    --border-soft: rgba(255, 255, 255, 0.06);
    --text: #e4e4e4;
    --text-dim: #a8a8a8;
    --text-mute: #727272;
    --accent: #3a79bb;
    --accent-light: #5b9be0;
    --accent-glow: rgba(58, 121, 187, 0.35);
    --select: #f8a32b;
    --axis-x: #e8423f; --axis-y: #8cc63f; --axis-z: #3a8bdf;
    --ok: #67c23a; --info: #9dc3ec; --warn: #f3c13a; --error: #ff5a5a;
    --grid: rgba(255, 255, 255, 0.09);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --syntax-keyword: #6c95eb; --syntax-type: #c191ff; --syntax-comment: #85c46c; --syntax-string: #c9a26d;
    --syntax-number: #ed94c0; --syntax-method: #39cc8f; --syntax-preprocessor: #9b9b9b;
    --map-filter: grayscale(1) invert(0.9) contrast(1.1);
    --header-h: 52px;
    color-scheme: dark;
}
:root[data-theme="light"] {
    --bg: #ececec;
    --bg-2: #e2e2e2;
    --panel: #f7f7f7;
    --panel-2: #ffffff;
    --panel-head: #d6d6d6;
    --field: #ffffff;
    --border: #c4c4c4;
    --border-soft: rgba(0, 0, 0, 0.07);
    --text: #161616;
    --text-dim: #4d4d4d;
    --text-mute: #858585;
    --accent: #2f6db0;
    --accent-light: #2f6db0;
    --accent-glow: rgba(47, 109, 176, 0.25);
    --ok: #3d8f1d; --info: #1f5d99; --warn: #9b6c00; --error: #c42020;
    --grid: rgba(0, 0, 0, 0.08);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
    --syntax-keyword: #0033b3; --syntax-type: #871094; --syntax-comment: #3e7d2a; --syntax-string: #8a5b00;
    --syntax-number: #1750eb; --syntax-method: #00627a; --syntax-preprocessor: #6a6a6a;
    --map-filter: none;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.loading { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: 'Fira Code', 'JetBrains Mono', Menlo, monospace; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.ico { width: 16px; height: 16px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.kw { color: var(--syntax-keyword); } .tp { color: var(--syntax-type); } .cm { color: var(--syntax-comment); } .st { color: var(--syntax-string); }
.nm { color: var(--syntax-number); } .mt { color: var(--syntax-method); } .pp { color: var(--syntax-preprocessor); }
.log-info { color: var(--info); } .log-warn { color: var(--warn); } .log-error { color: var(--error); }
.si-icon { display: inline-block; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; vertical-align: middle; }
.inline-icon { display: inline-flex; align-items: center; justify-content: center; }
.inline-icon > svg { width: 100%; height: 100%; }
.h-6 { width: 24px; height: 24px; } .h-8 { width: 32px; height: 32px; } .h-10 { width: 40px; height: 40px; }
.object-contain { object-fit: contain; }

/* ---------- loader: Unity "Hold On" dialog ---------- */
.hold-on { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity 0.35s; }
.hold-on.hidden { opacity: 0; pointer-events: none; }
.hold-on-window { width: min(400px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; font-size: 13px; }
.hold-on-title { padding: 7px 12px; background: var(--panel-head); text-align: center; font-weight: 600; }
.hold-on-body { padding: 16px 18px 18px; }
.hold-on-body p { margin: 0 0 10px; display: flex; justify-content: space-between; gap: 12px; }
.hold-on-body p span:last-child { color: var(--text-mute); }
.progress { height: 6px; background: var(--field); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; }
.build-dialog { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; }
.build-dialog.open { opacity: 1; visibility: visible; transition: opacity 0.3s; }
.build-dialog .hold-on-window { transform: scale(0.94); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.build-dialog.open .hold-on-window { transform: none; }
.build-dialog .progress > div { transition: width 0.25s linear; }
.build-dialog.done .progress > div { background: var(--ok); }
.build-log { margin-top: 12px; height: 7.4em; flex-shrink: 0; -webkit-mask: linear-gradient(to bottom, transparent, #000 35%); mask: linear-gradient(to bottom, transparent, #000 35%); overflow: hidden; font-size: 11.5px; line-height: 1.6; color: var(--text-mute); display: flex; flex-direction: column; justify-content: flex-end; }
.build-log div { flex: 0 0 auto; height: 1.6em; font-size: 11.5px; animation: log-in 0.2s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-log .ok { color: var(--ok); }
@keyframes log-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- header with Unity window tabs ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg-2) 95%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.logo svg { width: 22px; height: 22px; }
.tabs { display: flex; align-items: flex-end; align-self: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 6px 6px 0 0; color: var(--text-dim); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.tab:hover { color: var(--text); background: var(--border-soft); }
.tab.active { color: var(--text); background: var(--panel); box-shadow: inset 0 2px 0 var(--accent); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; color: var(--text-dim); border: 1px solid transparent; }
.icon-btn:hover { color: var(--text); background: var(--panel-2); border-color: var(--border); }
.icon-btn svg { width: 17px; height: 17px; }
.play-group { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--panel); }
.play-group button { width: 32px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); }
.play-group button + button { border-left: 1px solid var(--border); }
.play-group button:hover { color: var(--text); background: var(--panel-2); }
.play-group button.on { color: #fff; background: var(--accent); }
.play-group svg { width: 13px; height: 13px; }

/* ---------- hero: scene view ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: calc(var(--header-h) + 40px) 0 80px; }
#code-background { position: absolute; inset: var(--header-h) 0 0; padding: 18px 22px; overflow: hidden; font: 13px/1.65 'Fira Code', Menlo, monospace; white-space: pre; opacity: 0.28; pointer-events: none; user-select: none; -webkit-mask: linear-gradient(to bottom, #000 40%, transparent 95%); mask: linear-gradient(to bottom, #000 40%, transparent 95%); }
#code-background > div { min-height: 1.65em; }
#code-background .cursor { background: var(--text-dim); }
.scene-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 70%; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 64px 64px; transform: perspective(500px) rotateX(62deg); transform-origin: bottom; -webkit-mask: linear-gradient(to top, #000 10%, transparent 90%); mask: linear-gradient(to top, #000 10%, transparent 90%); pointer-events: none; animation: grid-move 6s linear infinite; }
@keyframes grid-move { to { background-position: 0 64px; } }
.gizmo { position: absolute; top: calc(var(--header-h) + 18px); right: 22px; width: 76px; text-align: center; color: var(--text-mute); font-size: 11px; pointer-events: none; }
.gizmo svg { width: 64px; height: 64px; animation: gizmo-spin 18s ease-in-out infinite alternate; }
@keyframes gizmo-spin { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 0 20px; max-width: 900px; }
.profile-chip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--border); border-radius: 999px; font-size: 14px; color: var(--text-dim); backdrop-filter: blur(6px); }
.profile-chip img, .profile-chip .avatar-fallback { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--panel-head); display: flex; align-items: center; justify-content: center; }
.profile-chip b { color: var(--text); font-weight: 600; }
.profile-chip:empty { display: none; }
.hero h1 { margin: 22px 0 0; font-size: clamp(52px, 11vw, 120px); line-height: 1; font-weight: 900; letter-spacing: -0.04em; }
.hero h1 .tp { color: var(--accent-light); }
.tagline { min-height: 1.6em; margin: 22px auto 0; font: 18px/1.6 'Fira Code', Menlo, monospace; color: var(--syntax-comment); }
.cursor { display: inline-block; width: 0.55em; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 38px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 24px; border-radius: 8px; font-weight: 600; font-size: 16px; border: 1px solid var(--border); background: var(--panel); transition: transform 0.15s, background 0.15s, box-shadow 0.15s, border-color 0.15s; }
.btn:hover { transform: translateY(-2px); border-color: var(--text-mute); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 26px var(--accent-glow); }
.btn.primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn svg { width: 16px; height: 16px; }
.hero-stats { display: flex; justify-content: center; gap: 28px; margin-top: 40px; color: var(--text-mute); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-stats b { display: block; font-size: 26px; color: var(--text); letter-spacing: 0; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--text-mute); animation: bob 2s ease-in-out infinite; }
.scroll-hint svg { width: 22px; height: 22px; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- sections ---------- */
.section { padding: 96px 0; position: relative; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head h2 { margin: 0; font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 14px; }
.section-head h2 .file-ico { width: 34px; height: 34px; }
.section-head p { margin: 8px 0 0; font: 15px 'Fira Code', Menlo, monospace; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.build-card.reveal { transform: translateY(48px) scale(0.94); transition: opacity 0.6s ease var(--delay, 0s), transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) var(--delay, 0s), box-shadow 0.2s, border-color 0.2s; }
.build-card.reveal.visible { transform: none; }

/* ---------- Developer.md ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.about-text h3 { margin: 0 0 14px; font-size: 30px; letter-spacing: -0.02em; }
.about-text p { margin: 0; color: var(--text-dim); font-size: 18px; line-height: 1.75; white-space: pre-line; }
.dev-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.dev-profile:empty { display: none; }
.dev-profile .avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; background: var(--panel-head); display: flex; align-items: center; justify-content: center; color: var(--accent-light); }
.dev-profile .avatar svg { width: 36px; height: 36px; }
.dev-profile h4 { margin: 0; font-size: 22px; line-height: 1.2; }
.dev-profile p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-dim); font-size: 15px; }
.dev-profile p span { display: inline-flex; align-items: center; gap: 6px; }

/* Unity Inspector look */
.inspector { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); font-size: 13px; }
.inspector-tabbar { display: flex; align-items: center; justify-content: space-between; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 0 6px 0 0; height: 34px; font-size: 13px; }
.tabbar-right { display: flex; align-items: center; gap: 10px; color: var(--text-mute); }
.win-dots { color: var(--text-mute); font-size: 16px; line-height: 1; padding: 0 6px; }
.inspector-tabbar .itab { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--panel); box-shadow: inset 0 2px 0 var(--accent); font-weight: 600; }
.go-header { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.go-icon { width: 34px; height: 34px; color: var(--accent-light); }
.check { width: 15px; height: 15px; border-radius: 3px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.check svg { width: 11px; height: 11px; }
.field { background: var(--field); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-static { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
.go-tags { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px; align-items: center; color: var(--text-dim); }
.component { border-bottom: 1px solid var(--border); }
.component:last-child { border-bottom: 0; }
.component-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--panel-2); font-weight: 600; text-align: left; }
.component-head .twisty { width: 10px; height: 10px; color: var(--text-dim); transition: transform 0.2s; }
.component.collapsed .twisty { transform: rotate(-90deg); }
.component-head .comp-ico { width: 16px; height: 16px; }
.component-head .dots { margin-left: auto; color: var(--text-mute); letter-spacing: 1px; }
.component-body { padding: 12px 14px; }
.component.collapsed .component-body { display: none; }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; align-items: center; }
.props dt { color: var(--text-dim); }
.props dd { margin: 0; }
.vec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vec span { display: flex; align-items: center; gap: 5px; }
.vec i { font-style: normal; font-weight: 700; font-size: 11px; }
.vec .x { color: var(--axis-x); } .vec .y { color: var(--axis-y); } .vec .z { color: var(--axis-z); }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.skill { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 8px; background: var(--field); border: 1px solid var(--border); text-align: center; font-size: 13px; font-weight: 600; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.skill:hover { transform: translateY(-3px); border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.skill img, .skill .si-icon, .skill .inline-icon { width: 36px; height: 36px; }
.skill .si-icon, .skill .inline-icon { color: var(--text); }
.empty-hint { color: var(--text-mute); font-size: 14px; padding: 8px 0; }
.add-component { display: flex; justify-content: center; padding: 14px; }
.add-component a { padding: 6px 26px; border-radius: 5px; background: var(--panel-head); border: 1px solid var(--border); font-weight: 600; }
.add-component a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Builds/ ---------- */
.builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.build-card { position: relative; display: flex; flex-direction: column; text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; will-change: transform; }
.build-card::after { content: ''; position: absolute; inset: 0; border-radius: 12px; border: 2px solid var(--select); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.build-card:hover { box-shadow: var(--shadow); }
.build-card:hover::after, .build-card:focus-visible::after { opacity: 1; }
.build-cover { position: relative; aspect-ratio: 16 / 9; background: var(--panel-head) center / 28px 28px; background-image: linear-gradient(45deg, var(--border-soft) 25%, transparent 25%, transparent 75%, var(--border-soft) 75%), linear-gradient(45deg, var(--border-soft) 25%, transparent 25%, transparent 75%, var(--border-soft) 75%); background-position: 0 0, 14px 14px; overflow: hidden; }
.build-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.build-card:hover .build-cover img { transform: scale(1.04); }
.badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(0, 0, 0, 0.65); color: #fff; backdrop-filter: blur(4px); }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--badge, #9a9a9a); }
.build-info { display: flex; gap: 14px; align-items: center; padding: 16px; }
.build-info .app-icon { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--panel-head); }
.build-info h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.build-info p { margin: 3px 0 0; font-size: 14px; color: var(--text-dim); }
.build-info .open { margin-left: auto; color: var(--text-mute); transition: transform 0.2s, color 0.2s; }
.build-card:hover .open { color: var(--select); transform: translateX(3px); }

/* game inspector drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(560px, 100vw); background: var(--panel); border-left: 1px solid var(--border); box-shadow: var(--shadow); transform: translateX(100%); visibility: hidden; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.35s; display: flex; flex-direction: column; font-size: 14px; }
.drawer.open { transform: none; visibility: visible; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.drawer .inspector-tabbar { flex-shrink: 0; }
.drawer-body { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.drawer-title { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-title img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.drawer-title h3 { margin: 0; font-size: 20px; line-height: 1.2; }
.drawer-title p { margin: 2px 0 0; color: var(--text-dim); font-size: 13px; }
.media-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; scroll-snap-type: x mandatory; }
.media-strip > * { flex: 0 0 auto; height: 220px; border-radius: 8px; scroll-snap-align: start; background: var(--field); cursor: zoom-in; object-fit: cover; max-width: 85%; }
.media-strip video { cursor: default; }
.description { color: var(--text-dim); white-space: pre-line; margin: 0; line-height: 1.7; }
.lead { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.5; }
.description.clamped { max-height: 11em; overflow: hidden; -webkit-mask: linear-gradient(to bottom, #000 60%, transparent); mask: linear-gradient(to bottom, #000 60%, transparent); }
.more-btn { margin-top: 8px; color: var(--accent-light); font-weight: 600; font-size: 14px; }
.more-btn:hover { text-decoration: underline; }
.build-short { margin: -4px 16px 16px; color: var(--text-dim); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 8px; background: #111; color: #fff; border: 1px solid #444; font-weight: 600; font-size: 14px; transition: transform 0.15s; }
.store-btn:hover { transform: translateY(-2px); }
.store-btn svg { width: 20px; height: 20px; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, 0.9); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ---------- Contact.asset ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.contact-grid.no-map { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.contacts { display: grid; gap: 12px; align-content: start; }
.contact-grid.no-map .contacts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; transition: transform 0.15s, border-color 0.15s; }
.contact-card:hover { transform: translateX(4px); border-color: var(--select); }
.contact-card .c-ico { color: var(--text); display: flex; }
.contact-card .c-ico > * { width: 30px; height: 30px; }
.contact-card h4 { margin: 0; font-size: 16px; }
.contact-card p { margin: 1px 0 0; color: var(--text-dim); font-size: 14px; font-family: 'Fira Code', Menlo, monospace; overflow-wrap: anywhere; }
.contact-card .arrow { margin-left: auto; color: var(--text-mute); }
.window { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-height: 340px; }
.window iframe { flex: 1; width: 100%; border: 0; filter: var(--map-filter); }

/* ---------- footer: Console window ---------- */
.site-footer { padding: 0 0 28px; }
.console { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 0; height: 34px; background: var(--bg-2); border-bottom: 1px solid var(--border); font-size: 13px; }
.console-bar .itab { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--panel); box-shadow: inset 0 2px 0 var(--accent); font-weight: 600; }
.console-bar .counts { margin-left: auto; display: flex; gap: 12px; color: var(--text-dim); }
.console-bar .counts span { display: flex; align-items: center; gap: 4px; }
.console-lines { padding: 14px 16px; font: 13.5px/1.75 'Fira Code', Menlo, monospace; color: var(--text-dim); overflow-wrap: anywhere; }
.footer-cursor { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: text-bottom; background: var(--text-dim); animation: blink 1s steps(1) infinite; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; color: var(--text-mute); font-size: 13px; }
.footer-links nav { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- doc pages (privacy, terms, 404) ---------- */
.doc-main { padding: calc(var(--header-h) + 48px) 0 64px; min-height: 100vh; }
.doc { max-width: 820px; margin: 0 auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.doc .inspector-tabbar { height: 36px; }
.markdown-body { padding: 28px 32px 36px; font-size: 16px; line-height: 1.75; }
.markdown-body h1 { font-size: 32px; margin: 0 0 18px; letter-spacing: -0.02em; line-height: 1.2; }
.markdown-body h2 { font-size: 22px; margin: 32px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.markdown-body h3 { font-size: 18px; margin: 24px 0 8px; }
.markdown-body p, .markdown-body ul, .markdown-body ol { margin: 0 0 14px; color: var(--text-dim); }
.markdown-body a { color: var(--accent-light); text-decoration: underline; }
.markdown-body code { font-family: 'Fira Code', Menlo, monospace; background: var(--field); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.not-found { text-align: center; padding: 70px 24px 80px; }
.not-found h1 { margin: 0; font-size: clamp(80px, 18vw, 150px); font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.not-found p { font: 15px/1.6 'Fira Code', Menlo, monospace; margin: 18px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .section { padding: 72px 0; }
    .window { min-height: 280px; }
}
@media (max-width: 640px) {
    :root { --header-h: 50px; }
    body { font-size: 15px; }
    .site-header .container { gap: 8px; padding: 0 10px; }
    .logo { display: none; }
    .tab { padding: 0 8px; font-size: 12.5px; }
    .tab .ico { display: none; }
    .play-group { display: none; }
    .gizmo { display: none; }
    #code-background { font-size: 11px; padding: 12px; }
    .tagline { font-size: 14px; }
    .btn { height: 46px; padding: 0 20px; font-size: 15px; }
    .hero-stats { gap: 20px; }
    .builds { grid-template-columns: 1fr; gap: 18px; }
    .about-text p { font-size: 16px; }
    .go-tags { grid-template-columns: auto 1fr; }
    .props { grid-template-columns: 84px 1fr; }
    .media-strip > * { height: 180px; }
    .contact-grid.no-map .contacts { grid-template-columns: 1fr; }
    .markdown-body { padding: 22px 18px 28px; }
    .console-bar .counts { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
