:root {
    color-scheme: light;
    --bg: #f8fafc;
    --bg-elevated: rgba(255, 255, 255, 0.88);
    --surface: #ffffff;
    --surface-2: #fbfcfe;
    --surface-3: #f1f5f9;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(79, 70, 229, 0.18);
    --text: #0f172a;
    --muted: #64748b;
    --accent: #4f46e5;
    --accent-2: #60a5fa;
    --accent-soft: rgba(79, 70, 229, 0.10);
    --success: #059669;
    --warning: #d97706;
    --shadow-lg: 0 22px 58px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 14px 32px rgba(15, 23, 42, 0.06);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --max-width: 1240px;
}

body[data-theme="dark"] {
    color-scheme: dark;
    --bg: #08101d;
    --bg-elevated: rgba(10, 17, 31, 0.82);
    --surface: #101a2f;
    --surface-2: #13203a;
    --surface-3: #192846;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(96, 165, 250, 0.28);
    --text: #eef4ff;
    --muted: #98a7c4;
    --accent: #60a5fa;
    --accent-2: #22d3ee;
    --accent-soft: rgba(96, 165, 250, 0.14);
    --success: #34d399;
    --warning: #fbbf24;
    --shadow-lg: 0 28px 70px rgba(2, 6, 23, 0.34);
    --shadow-md: 0 18px 40px rgba(2, 6, 23, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.10), transparent 28%),
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, #111827 12%), var(--bg));
    color: var(--text);
    min-height: 100vh;
    overflow-x: clip;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: color-mix(in srgb, var(--accent) 28%, white 72%);
}

.scroll-progress {
    position: fixed;
    inset: 0 0 auto;
    height: 4px;
    z-index: 80;
    background: rgba(79, 70, 229, 0.08);
}

.scroll-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.12s linear;
}

.page-shell {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 70;
    padding-top: 20px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-elevated);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.brand strong {
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.brand span {
    color: var(--muted);
    font-size: 13px;
}

.topbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-width: 0;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.topbar-nav a,
.theme-toggle,
.icon-button,
.filter-chip,
.control-select,
.search-input,
.modal-link,
.primary-link,
.secondary-link,
.to-top,
.faq-trigger {
    transition: 0.2s ease;
}

.topbar-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
}

.topbar-nav a:hover,
.topbar-nav a:focus-visible {
    color: var(--text);
    background: var(--surface-3);
}

.theme-toggle,
.icon-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover,
.icon-button:hover,
.filter-chip:hover,
.filter-chip.is-active,
.faq-trigger:hover,
.faq-item[open] .faq-trigger {
    border-color: var(--border-strong);
    background: var(--surface-3);
}

.section {
    margin-top: 42px;
}

.hero {
    padding-top: 34px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 22px;
    align-items: stretch;
}

.panel,
.hero-card,
.focus-card,
.metric-card,
.catalog-shell,
.timeline-card,
.testimonials-shell,
.faq-shell,
.contact-shell,
.footer-shell,
.modal-panel {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.hero-card::before {
    width: 280px;
    height: 280px;
    right: -90px;
    bottom: -130px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.28), rgba(14, 165, 233, 0));
}

.hero-card::after {
    width: 220px;
    height: 220px;
    left: -100px;
    top: -80px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0));
}

.hero-kicker,
.section-kicker,
.metric-card span,
.project-status,
.meta-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-card h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    max-width: 10ch;
}

.hero-card p,
.section-intro,
.metric-card p,
.timeline-copy p,
.testimonial-card p,
.faq-copy,
.contact-copy p,
.footer-copy p,
.empty-state p,
.project-copy,
.modal-body p,
.about-copy p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-actions,
.contact-actions,
.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.primary-link,
.secondary-link,
.modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    white-space: normal;
}

.primary-link,
.modal-link.is-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.secondary-link,
.modal-link {
    background: var(--surface);
    border-color: var(--border);
}

.primary-link:hover,
.secondary-link:hover,
.modal-link:hover {
    transform: translateY(-2px);
}

.hero-tags,
.project-tags,
.contact-tags,
.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tag,
.project-tag,
.meta-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 13px;
}

.hero-side {
    display: grid;
    gap: 20px;
}

.focus-card,
.about-card,
.metric-card,
.timeline-card,
.testimonials-shell,
.faq-shell,
.contact-shell,
.footer-shell {
    padding: 24px;
}

.focus-list,
.metric-grid,
.timeline-list,
.testimonials-grid,
.footer-grid {
    display: grid;
    gap: 14px;
}

.focus-item,
.metric-card,
.timeline-step,
.testimonial-card,
.contact-panel,
.footer-panel {
    padding: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-2) 92%, transparent));
    border: 1px solid var(--border);
}

.focus-item strong,
.timeline-step h3,
.testimonial-card h3,
.about-card h2,
.catalog-header h2,
.section-head h2,
.contact-panel h3,
.footer-panel h3 {
    display: block;
    margin: 0 0 8px;
    font-size: 18px;
}

.focus-item p,
.timeline-step p,
.testimonial-card span,
.contact-panel p,
.footer-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.about-card,
.about-copy {
    height: 100%;
}

.about-copy {
    display: grid;
    gap: 14px;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card.compact {
    padding: 18px;
}

.metric-card.compact strong {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-spotlight {
    position: relative;
    overflow: hidden;
}

.about-spotlight::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 68%);
    pointer-events: none;
}

.section-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.featured-shell,
.devlog-shell,
.timeline-shell,
.cta-shell,
.tech-shell,
.services-shell,
.press-shell,
.behind-shell,
.newsletter-shell {
    padding: 28px;
}

.featured-grid,
.devlog-grid,
.cta-grid,
.stack-grid,
.services-grid,
.behind-grid {
    display: grid;
    gap: 18px;
}

.featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.featured-card,
.devlog-card,
.cta-card,
.stack-card,
.service-card,
.press-card,
.behind-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, transparent), color-mix(in srgb, var(--surface-2) 95%, transparent));
    box-shadow: var(--shadow-md);
}

.featured-card {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.featured-media,
.behind-card img {
    position: relative;
    aspect-ratio: 16 / 10;
}

.featured-media img,
.behind-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content,
.devlog-card,
.cta-card,
.stack-card,
.service-card,
.press-card,
.behind-card div {
    padding: 20px;
}

.featured-topline,
.devlog-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.featured-content h3,
.devlog-card h3,
.cta-card h3,
.stack-card h3,
.service-card h3,
.press-card h3,
.behind-card h3 {
    margin: 12px 0 10px;
    font-size: 22px;
}

.featured-content p,
.devlog-card p,
.cta-card p,
.service-card p,
.press-card p,
.behind-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.featured-actions,
.press-downloads {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.devlog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cta-grid,
.stack-grid,
.services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.press-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.behind-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.behind-card {
    overflow: hidden;
}

.stack-card .project-tags,
.service-card .project-tags {
    margin-top: 16px;
}

.newsletter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    gap: 22px;
    align-items: center;
}

.newsletter-form {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 94%, transparent));
    border: 1px solid var(--border);
}

.newsletter-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.project-summary {
    color: var(--muted);
}

.modal-hero {
    position: relative;
}

.modal-hero img {
    cursor: zoom-in;
}

.lightbox-launch {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: rgba(8, 15, 30, 0.72);
    color: white;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.modal-trailer {
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-2);
    min-height: 220px;
}

.modal-trailer iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
    display: block;
}

.trailer-fallback {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.modal-devlog {
    display: grid;
    gap: 12px;
}

.modal-devlog-entry {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.modal-devlog-entry strong {
    display: block;
    margin-bottom: 8px;
}

.bio-modal-panel {
    width: min(780px, 100%);
}

.bio-modal-copy {
    display: grid;
    gap: 14px;
}

.bio-modal-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.lightbox-panel {
    width: min(1200px, 100%);
}

.lightbox-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.lightbox-stage img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.46);
}

.lightbox-nav {
    min-width: 84px;
}

.metric-card strong {
    display: block;
    margin-top: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.06em;
}

.catalog-shell {
    padding: 28px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 24px;
}

.catalog-header p,
.section-head p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 68ch;
    line-height: 1.7;
}

.control-stack {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.search-row,
.sort-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.search-input,
.control-select {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.search-input {
    flex: 1 1 300px;
}

.control-select {
    min-width: 180px;
    cursor: pointer;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.filter-chip.category-games {
    background: var(--surface);
    border-color: rgba(255, 173, 51, 0.16);
    color: #c2410c;
}

.filter-chip.category-applications {
    background: var(--surface);
    border-color: rgba(248, 113, 113, 0.16);
    color: #b91c1c;
}

.filter-chip.category-assets {
    background: var(--surface);
    border-color: rgba(245, 158, 11, 0.16);
    color: #c27803;
}

.filter-chip.category-bots {
    background: var(--surface);
    border-color: rgba(194, 65, 12, 0.16);
    color: #9a3412;
}

.filter-chip.category-sites {
    background: var(--surface);
    border-color: rgba(56, 189, 248, 0.16);
    color: #0c4a6e;
}

.catalog-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--muted);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.project-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-2) 96%, transparent));
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    min-height: 100%;
}

.project-card.games {
    border-color: rgba(249, 115, 22, 0.12);
    background: linear-gradient(180deg, rgba(255, 243, 205, 0.55), rgba(255, 250, 235, 0.45));
}

.project-card.applications {
    border-color: rgba(248, 113, 113, 0.12);
    background: linear-gradient(180deg, rgba(255, 229, 230, 0.55), rgba(255, 244, 245, 0.45));
}

.project-card.assets {
    border-color: rgba(245, 158, 11, 0.12);
    background: linear-gradient(180deg, rgba(255, 249, 196, 0.55), rgba(255, 253, 230, 0.45));
}

.project-card.bots {
    border-color: rgba(194, 65, 12, 0.12);
    background: linear-gradient(180deg, rgba(255, 230, 228, 0.55), rgba(255, 244, 243, 0.45));
}

.project-card.sites {
    border-color: rgba(14, 165, 233, 0.12);
    background: linear-gradient(180deg, rgba(235, 249, 255, 0.62), rgba(245, 252, 255, 0.56));
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-3);
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-status {
    position: absolute;
    top: 14px;
    left: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: white;
}

.project-content {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.project-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.project-title {
    margin: 0;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.project-category {
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.project-card.games {
    border-color: rgba(255, 140, 0, 0.18);
}

.project-card.games .project-category {
    background: rgba(255, 248, 232, 0.85);
    border-color: rgba(255, 173, 51, 0.2);
    color: #92400e;
}

.project-card.applications {
    border-color: rgba(248, 113, 113, 0.18);
}

.project-card.applications .project-category {
    background: rgba(255, 243, 244, 0.85);
    border-color: rgba(248, 113, 113, 0.2);
    color: #9f1239;
}

.project-card.assets {
    border-color: rgba(245, 158, 11, 0.18);
}

.project-card.assets .project-category {
    background: rgba(255, 250, 217, 0.9);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.project-card.bots {
    border-color: rgba(194, 65, 12, 0.18);
}

.project-card.bots .project-category {
    background: rgba(255, 235, 234, 0.9);
    border-color: rgba(194, 65, 12, 0.22);
    color: #7f1d1d;
}

.project-card.sites {
    border-color: rgba(14, 165, 233, 0.18);
}

.project-card.sites .project-category {
    background: rgba(239, 246, 255, 0.92);
    border-color: rgba(56, 189, 248, 0.22);
    color: #0c4a6e;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.icon-button,
.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

.card-button.is-primary {
    background: var(--accent);
    border-color: transparent;
    color: white;
}

.platform-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.platform-button,
.card-button.steam,
.card-button.itch,
.card-button.assetstore,
.card-button.web,
.card-button.other,
.primary-link.platform-button,
.modal-link.steam,
.modal-link.itch,
.modal-link.assetstore,
.modal-link.web,
.modal-link.other,
.secondary-link[data-platform="steam"],
.secondary-link[data-platform="itch"],
.secondary-link[data-platform="asset-store"],
.secondary-link[data-platform="assetstore"] {
    transition: 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.card-button.steam,
.primary-link.platform-button.steam,
.secondary-link[data-platform="steam"],
.modal-link.steam {
    background: linear-gradient(135deg, #171a21, #232730, #292e35);
    color: #f7fbff;
    border-color: transparent;
}

.card-button.itch,
.primary-link.platform-button.itch,
.secondary-link[data-platform="itch"],
.modal-link.itch {
    background: linear-gradient(135deg, #fa5c5c, #c24141);
    color: #ffffff;
    border-color: transparent;
}

.card-button.assetstore,
.primary-link.platform-button.assetstore,
.secondary-link[data-platform="asset-store"],
.secondary-link[data-platform="assetstore"],
.modal-link.assetstore {
    background: linear-gradient(135deg, #22c55e, #0f766e);
    color: white;
    border-color: transparent;
}

.card-button.web,
.primary-link.platform-button.web,
.modal-link.web {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    border-color: transparent;
}

.card-button.other,
.primary-link.platform-button.other,
.modal-link.other {
    background: var(--surface-3);
    color: var(--text);
    border-color: var(--border);
}

.card-button:hover,
.icon-button:hover {
    transform: translateY(-2px);
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed var(--border-strong);
    border-radius: 22px;
    text-align: center;
    background: var(--surface-2);
}

.empty-state.is-visible {
    display: block;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

.timeline-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-step strong {
    margin-bottom: 10px;
}

.testimonials-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-card {
    display: grid;
    gap: 10px;
}

.testimonial-card p {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.testimonial-note {
    color: var(--warning);
    font-size: 13px;
}

.faq-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 22px;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
}

.faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    background: transparent;
    border: 0;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.faq-trigger span:last-child {
    color: var(--muted);
}

.faq-item[open] .faq-trigger span:last-child {
    transform: rotate(45deg);
}

.faq-content {
    padding: 0 20px 20px;
}

.contact-shell {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

.contact-panel form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.report-form {
    gap: 16px;
}

.contact-panel label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

.contact-panel input,
.contact-panel textarea,
.contact-panel select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 14px 16px;
}

.contact-panel textarea {
    min-height: 136px;
    resize: vertical;
}

.logo {
    margin: 10px 0 8px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--accent-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.btn {
    border: 0;
}

.form-notice {
    min-height: 24px;
    margin: 2px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.form-notice.is-success {
    color: var(--success);
}

.form-notice.is-error {
    color: #ef4444;
}

.form-notice.is-pending {
    color: var(--warning);
}

.contact-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
}

#projectSummary {
    color: var(--muted);
}

.footer-shell {
    margin: 42px 0 48px;
}

.footer-grid {
    grid-template-columns: 1.2fr repeat(3, minmax(0, 0.7fr));
}

.footer-panel ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 10px;
}

.footer-panel a {
    text-decoration: none;
    color: var(--muted);
}

.footer-panel a:hover {
    color: var(--text);
}

.footer-copy {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 15, 30, 0.68);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 100;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-panel {
    width: min(1080px, 100%);
    max-height: min(88vh, 940px);
    overflow: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.modal-title-wrap h2 {
    margin: 8px 0 0;
    font-size: 30px;
}

.modal-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
}

.modal-gallery {
    display: grid;
    gap: 14px;
}

.modal-hero {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    aspect-ratio: 16 / 10;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.modal-thumb {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
}

.modal-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.modal-thumb.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}

.modal-meta {
    display: grid;
    gap: 16px;
}

.modal-body {
    display: grid;
    gap: 12px;
}

.modal-body h3 {
    margin: 0 0 4px;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.54s ease, transform 0.54s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    z-index: 60;
}

.to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1080px) {
    .hero-grid,
    .about-grid,
    .faq-layout,
    .contact-shell,
    .modal-layout,
    .footer-grid,
    .newsletter-layout,
    .press-grid {
        grid-template-columns: 1fr;
    }

    .project-grid,
    .timeline-list,
    .testimonials-grid,
    .featured-grid,
    .devlog-grid,
    .cta-grid,
    .stack-grid,
    .services-grid,
    .behind-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(calc(100% - 24px), var(--max-width));
    }

    .topbar-inner,
    .catalog-header,
    .section-head,
    .footer-copy {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar {
        position: relative;
        top: auto;
        padding-top: 12px;
    }

    .topbar-inner {
        gap: 12px;
        padding: 14px;
        border-radius: 22px;
    }

    .brand strong {
        font-size: 12px;
        line-height: 1.35;
    }

    .topbar-nav {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .topbar-nav::-webkit-scrollbar {
        display: none;
    }

    .topbar-nav a {
        flex: 0 0 auto;
        padding: 9px 12px;
        font-size: 13px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-actions .theme-toggle {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 12px;
    }

    .section {
        margin-top: 28px;
    }

    .hero {
        padding-top: 8px;
    }

    .hero-card,
    .focus-card,
    .catalog-shell,
    .timeline-card,
    .testimonials-shell,
    .faq-shell,
    .contact-shell,
    .footer-shell,
    .modal-panel,
    .featured-shell,
    .devlog-shell,
    .timeline-shell,
    .cta-shell,
    .tech-shell,
    .services-shell,
    .press-shell,
    .behind-shell,
    .newsletter-shell {
        padding: 20px;
    }

    .panel,
    .hero-card,
    .focus-card,
    .metric-card,
    .catalog-shell,
    .timeline-card,
    .testimonials-shell,
    .faq-shell,
    .contact-shell,
    .footer-shell,
    .modal-panel,
    .featured-card,
    .devlog-card,
    .cta-card,
    .stack-card,
    .service-card,
    .press-card,
    .behind-card,
    .project-card {
        border-radius: 18px;
    }

    .project-grid,
    .timeline-list,
    .testimonials-grid,
    .metric-grid,
    .modal-thumbs,
    .featured-grid,
    .devlog-grid,
    .cta-grid,
    .stack-grid,
    .services-grid,
    .behind-grid,
    .compact-metrics {
        grid-template-columns: 1fr;
    }

    .hero-card h1 {
        max-width: none;
        font-size: clamp(2.1rem, 13vw, 3.2rem);
        line-height: 1;
        letter-spacing: -0.03em;
    }

    .hero-card p,
    .catalog-header p,
    .section-head p,
    .about-copy p,
    .project-copy,
    .modal-body p {
        line-height: 1.62;
    }

    .hero-actions,
    .contact-actions,
    .modal-links,
    .featured-actions,
    .press-downloads {
        display: grid;
        grid-template-columns: 1fr;
    }

    .primary-link,
    .secondary-link,
    .modal-link,
    .card-button,
    .icon-button,
    .filter-chip {
        min-height: 46px;
    }

    .primary-link,
    .secondary-link,
    .modal-link,
    .contact-actions .btn,
    .newsletter-form .btn {
        width: 100%;
    }

    .search-row,
    .sort-row,
    .catalog-meta,
    .footer-copy {
        align-items: stretch;
    }

    .search-input,
    .control-select {
        width: 100%;
        flex-basis: 100%;
    }

    .filter-group {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .filter-group::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .project-top,
    .featured-topline,
    .contact-row {
        flex-direction: column;
        align-items: stretch;
    }

    .project-category,
    .project-status,
    .hero-kicker,
    .section-kicker,
    .metric-card span,
    .meta-label,
    .tag,
    .project-tag,
    .meta-item,
    .chip {
        overflow-wrap: anywhere;
    }

    .project-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .project-actions .card-button {
        width: 100%;
    }

    .project-content,
    .featured-content,
    .devlog-card,
    .cta-card,
    .stack-card,
    .service-card,
    .press-card,
    .behind-card div {
        padding: 16px;
    }

    .contact-row .secondary-link {
        width: 100%;
    }

    .modal {
        align-items: stretch;
        place-items: stretch;
        padding: 0;
    }

    .modal-panel {
        width: 100%;
        max-height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
        padding: 16px;
    }

    .modal-header {
        gap: 12px;
        align-items: stretch;
        flex-direction: column;
    }

    .modal-title-wrap h2 {
        font-size: clamp(1.45rem, 8vw, 2rem);
        line-height: 1.1;
    }

    .modal-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-trailer iframe {
        min-height: 240px;
    }

    .meta-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    .lightbox-stage {
        gap: 10px;
    }

    .lightbox-stage {
        grid-template-columns: 1fr;
    }

    .lightbox-nav {
        width: 100%;
    }

    .lightbox-stage img {
        max-height: 62vh;
    }

    .to-top {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 420px) {
    .page-shell {
        width: min(calc(100% - 16px), var(--max-width));
    }

    .topbar-inner,
    .hero-card,
    .focus-card,
    .catalog-shell,
    .timeline-card,
    .testimonials-shell,
    .faq-shell,
    .contact-shell,
    .footer-shell,
    .featured-shell,
    .devlog-shell,
    .timeline-shell,
    .cta-shell,
    .tech-shell,
    .services-shell,
    .press-shell,
    .behind-shell,
    .newsletter-shell {
        padding: 16px;
    }

    .hero-card h1 {
        font-size: clamp(1.95rem, 14vw, 2.8rem);
    }

    .featured-content h3,
    .devlog-card h3,
    .cta-card h3,
    .stack-card h3,
    .service-card h3,
    .press-card h3,
    .behind-card h3,
    .project-title {
        font-size: 18px;
    }

    .modal-trailer iframe {
        min-height: 210px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .primary-link:hover,
    .secondary-link:hover,
    .modal-link:hover,
    .card-button:hover,
    .icon-button:hover,
    .project-card:hover {
        transform: none;
    }
}

/* Final clean white portfolio style */
:root,
body[data-theme="dark"] {
    color-scheme: light;
    --bg: #f7f9fd;
    --bg-elevated: rgba(255, 255, 255, 0.94);
    --surface: #ffffff;
    --surface-2: #f8fbff;
    --surface-3: #eef4ff;
    --border: #dce4f2;
    --border-strong: #1d4ed8;
    --text: #000000;
    --muted: #4b5563;
    --accent: #2563eb;
    --accent-2: #1d4ed8;
    --accent-soft: #e8f0ff;
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.10);
    --shadow-md: 0 14px 36px rgba(15, 23, 42, 0.08);
    --radius-xl: 18px;
    --radius-lg: 16px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body,
body[data-theme="dark"] {
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
        #ffffff;
    background-size: 44px 44px;
    color: #000000;
}

.home-page .featured-shell,
.home-page .devlog-shell,
.home-page .timeline-shell,
.home-page .cta-shell,
.home-page .catalog-shell,
.home-page .press-shell,
.home-page .newsletter-shell,
.home-page .faq-shell {
    display: none;
}

#themeToggle {
    display: none;
}

.reveal,
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.page-shell {
    width: min(calc(100% - 36px), 1180px);
}

.topbar {
    top: 12px;
}

.topbar-inner,
.panel,
.hero-card,
.focus-card,
.about-card,
.contact-shell,
.footer-shell,
.catalog-shell,
.modal-panel,
.featured-card,
.devlog-card,
.cta-card,
.press-card,
.project-card,
.project-card.games,
.project-card.sites,
.project-card.assets,
.project-card.applications,
.project-card.bots {
    background: rgba(255, 255, 255, 0.96);
    color: #000000;
    border-color: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.topbar-inner {
    padding: 14px 16px;
    border-radius: 20px;
}

.brand strong {
    color: #000000;
    letter-spacing: 0.02em;
}

.topbar-nav a {
    color: #111827;
    border-radius: 12px;
    font-weight: 600;
}

.topbar-nav a:hover,
.topbar-nav a:focus-visible {
    color: #ffffff;
    background: #2563eb;
}

.hero-card::before,
.hero-card::after,
.about-spotlight::after {
    display: none;
}

.hero {
    padding-top: 52px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 22px;
}

.hero-card {
    padding: clamp(28px, 5vw, 58px);
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #dce4f2;
}

.hero-card h1 {
    max-width: 11ch;
    margin: 18px 0;
    color: #000000;
    font-size: clamp(3.2rem, 8vw, 6.6rem);
    line-height: 0.9;
    letter-spacing: -0.035em;
}

.hero-card p {
    max-width: 58ch;
    color: #1f2937;
    font-size: 18px;
}

.hero-kicker,
.section-kicker,
.metric-card span,
.project-status,
.meta-label {
    background: #e8f0ff;
    color: #1d4ed8;
    border-radius: 999px;
}

.focus-card {
    padding: 24px;
}

.metric-grid.compact-metrics {
    gap: 14px;
}

.metric-card.compact {
    min-height: 126px;
    background: #f8fbff;
    border-radius: 16px;
}

.metric-card.compact strong {
    color: #000000;
}

.primary-link,
.modal-link.is-primary,
.card-button.is-primary,
.primary-link.platform-button,
.card-button.web,
.modal-link.web {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
    font-weight: 800;
}

.secondary-link,
.modal-link,
.theme-toggle,
.icon-button,
.filter-chip,
.control-select,
.search-input,
.card-button {
    background: #ffffff;
    color: #000000;
    border-color: var(--border);
    border-radius: 12px;
    font-weight: 700;
}

.secondary-link[data-platform],
.card-button.steam,
.card-button.itch,
.card-button.assetstore,
.modal-link.steam,
.modal-link.itch,
.modal-link.assetstore {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.category-hub {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.category-block {
    position: relative;
    min-height: 220px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    text-decoration: none;
    background: #ffffff;
    color: #000000;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-block::before {
    content: "";
    position: absolute;
    inset: auto 18px 74px 18px;
    height: 1px;
    background: #dce4f2;
}

.category-block::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: #e8f0ff;
}

.category-block span {
    position: relative;
    z-index: 1;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.category-block strong {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    padding: 12px 16px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.category-block:hover {
    transform: translateY(-6px);
    border-color: #2563eb;
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.12);
}

.category-hero {
    padding: clamp(30px, 6vw, 56px);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.category-hero h1 {
    margin: 14px 0 10px;
    color: #000000;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.92;
    letter-spacing: -0.035em;
}

.category-hero p {
    max-width: 62ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 18px;
}

.about-grid {
    grid-template-columns: 1fr 1fr;
}

.about-card,
.contact-panel,
.footer-panel,
.focus-item,
.timeline-step,
.metric-card {
    border-radius: 16px;
}

.project-grid {
    gap: 22px;
}

.project-card {
    border-radius: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    border-color: #2563eb;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
}

.project-media {
    background: #eef4ff;
}

.project-content {
    padding: 22px;
}

.project-title {
    color: #000000;
    font-size: 22px;
    letter-spacing: -0.01em;
}

.project-category,
.tag,
.project-tag,
.meta-item,
.chip {
    background: #f3f7ff;
    color: #111827;
    border-color: #dce4f2;
    border-radius: 999px;
}

.catalog-shell,
.contact-shell,
.footer-shell {
    border-radius: 18px;
}

.search-input,
.control-select {
    min-height: 54px;
}

.modal-panel {
    border-radius: 18px;
}

.modal-hero,
.modal-trailer,
.modal-thumb {
    border-radius: 14px;
}

body.home-page .contact-shell {
    margin-top: 64px;
}

@media (max-width: 900px) {
    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .category-hub {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(calc(100% - 22px), var(--max-width));
    }

    .hero {
        padding-top: 20px;
    }

    .hero-card,
    .category-hero {
        padding: 24px;
        min-height: auto;
    }

    .hero-card h1,
    .category-hero h1 {
        font-size: clamp(2.6rem, 17vw, 4.2rem);
    }

    .category-hub {
        grid-template-columns: 1fr;
    }

    .category-block {
        min-height: 170px;
    }
}
