:root {
    color-scheme: light;
    --bg: #f7f8fa;
    --surface: #000000;
    --text: #15181d;
    --muted: #5f5f5f;
    --line: #dfe3e8;
    --line-strong: #c9cfd7;
    --nav-bg: rgb(232 232 232);
    --accent: #224a7a;
    --soft: #eef2f7;
    --code: #f0f2f5;
    --shell: 880px;
    --font-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-family: var(--font-ui);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #000;
    --surface: #000000;
    --text: #edf1f6;
    --muted: #b1b1b1;
    --line: #181818;
    --line-strong: #3b4552;
    --nav-bg: rgb(18 18 18);
    --accent: #78fff2;
    --soft: #171d25;
    --code: #191f28;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 9px 12px; background: var(--text); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { padding-top: 26px; }
.header-inner { min-height: 50px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; max-width: 180px; font-size: 13px; font-weight: 800; letter-spacing: .105em; text-transform: uppercase; }
.brand-logo { display: block; width: auto; max-width: 150px; max-height: 32px; }
.logo-dark { display: none; }
html[data-theme="dark"] .brand.has-dark-logo .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 13px; }
.site-nav a { color: var(--muted); transition: color .15s; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--text); }
.theme-toggle, .menu-toggle { border: 0; background: none; padding: 6px; cursor: pointer; }
.menu-toggle { display: none;font-size: 26px;line-height: 1; }
.main-content { min-height: 70vh;padding-top: 54px; }

.section { padding: 0 0 86px; }
.intro { padding: 36px 0 112px; }
.intro h1 { max-width: 720px; margin: 0; font-size: clamp(29px, 4.4vw, 48px); font-weight: 650; line-height: 1.16; letter-spacing: -.035em; }
.ruled-section { border-top: 1px solid var(--line); padding-top: 19px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-heading h2, .profile-section > h2, .profile-meta-section h2 { margin: 0; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.section-heading a { color: var(--muted); font-size: 12px; }

.line-list { border-bottom: 1px solid var(--line); }
.line-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; min-height: 90px; padding: 10px 10px; border-top: 1px solid var(--line); transition: border-color .15s; }
.line-item:hover { background-color: var(--line); }
.line-copy { min-width: 0; }
.line-copy strong { display: block; font-size: 16px; line-height: 1.35; }
.line-copy p { margin: 5px 0 0; color: var(--muted); font-size: 13px; white-space: normal; }
.line-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.line-arrow { color: var(--accent); font-size: 20px; }

/* Project marks are a clear visual anchor, not favicon-sized decoration. */
.project-line { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; }
.project-icon { 
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    padding: 5px;
}
.project-icon--uploaded { background: var(--surface); }
.project-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.project-icon--uploaded img { padding: 2px; }
.project-icon--fallback { padding: 14px; color: var(--muted); }
.detail-icon { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 16px; }
.detail-icon--fallback { padding: 18px; }
.destination-badge { display: inline-flex; align-items: center; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; line-height: 1.25; }
.destination-badge--asset-store { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }

.team-lines { border-bottom: 1px solid var(--line); }
.team-lines > a { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr) 20px; align-items: center; column-gap: 24px; min-height: 62px; padding: 10px 0; border-top: 1px solid var(--line); }
.team-lines > a strong { font-size: 14px; }
.team-lines > a span { color: var(--muted); font-size: 13px; }
.team-lines > a span:last-child { text-align: right; }

.page-header { padding: 18px 0 74px; }
.page-header h1, .detail-header h1, .profile-header h1 { margin: 0; font-size: clamp(36px, 6vw, 62px); font-weight: 650; line-height: 1.06; letter-spacing: -.045em; }
.page-header p { max-width: 580px; margin: 15px 0 0; color: var(--muted); }
.page-list { margin-bottom: 80px; }
.back-link { display: inline-block; margin-bottom: 58px; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 12px; letter-spacing: .055em; text-transform: uppercase; }
.lead { max-width: 690px; margin: 18px 0 0; color: var(--muted); font-size: 19px; line-height: 1.55; }
.detail-header { padding: 8px 0 50px; }
.detail-title-row { display: flex; align-items: center; gap: 18px; }
.project-detail-identity { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; gap: 18px; }
.project-detail-copy { min-width: 0; }
.project-detail .detail-header h1 { max-width: 800px; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.1; }
.project-detail .lead { max-width: 700px; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 25px; font-size: 13px; }
.project-destination, .project-repository { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 600; }
.project-destination { background: var(--text); border-color: var(--text); color: var(--bg); }
.project-destination:hover, .project-destination:focus-visible { opacity: .88; }
.project-repository { color: var(--muted); }
.project-repository:hover, .project-repository:focus-visible { color: var(--text); border-color: var(--text); }
.cover-image { margin: 0 0 56px; }
.cover-image img { display: block; width: 100%; max-height: 640px; object-fit: cover; background: var(--soft); }

/* Content uses the same family as the navigation and summaries. */
.prose { max-width: 720px; font-family: var(--font-ui); font-size: 18px; line-height: 1.78; }
.project-detail .prose { max-width: 700px; color: var(--muted); font-size: 17px; line-height: 1.84; letter-spacing: .004em; }
.project-detail .prose h2, .project-detail .prose h3, .project-detail .prose h4 { color: var(--text); font-weight: 600; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { font-family: inherit; line-height: 1.25; letter-spacing: -.02em; margin: 2.3em 0 .7em; }
.prose h2 { font-size: 27px; }
.prose h3 { font-size: 22px; }
.prose p { margin: 0 0 1.35em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { padding-left: 1.25em; }
.prose blockquote { margin: 1.8em 0; padding-left: 18px; border-left: 2px solid var(--line-strong); color: var(--muted); }
.prose pre { overflow: auto; padding: 18px; border: 1px solid var(--line); background: var(--code); font: 13px/1.6 "SFMono-Regular", Consolas, monospace; }
.prose code { padding: .12em .3em; background: var(--code); font-family: "SFMono-Regular", Consolas, monospace; font-size: .86em; }
.prose pre code { padding: 0; background: none; }
.prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.content-image { margin: 2.2em 0; }
.content-image img { display: block; width: 100%; background: var(--soft); }
figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 70px; }
.gallery figure, .portfolio-gallery figure { margin: 0; }
.gallery img, .portfolio-gallery img { display: block; width: 100%; background: var(--soft); }

.profile-header { padding: 8px 0 48px; }
.profile-identity { display: flex; align-items: center; gap: 24px; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 96px; height: 96px; margin-bottom: 0; border-radius: 50%; object-fit: cover; background: var(--soft); font-weight: 700; }
.profile-identity-copy .eyebrow { margin-bottom: 7px; }
.profile-content { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); align-items: start; gap: 52px; }
.profile-content--without-meta { grid-template-columns: minmax(0, 1fr); }
.profile-meta { padding-top: 18px; border-top: 1px solid var(--line); }
.profile-meta-section + .profile-meta-section { margin-top: 34px; }
.profile-meta-section h2 { margin-bottom: 14px; }
.profile-section { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-section > h2 { margin-bottom: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span { padding: 6px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.link-stack { border-bottom: 1px solid var(--line); }
.link-stack a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.team-index { margin-bottom: 80px; border-bottom: 1px solid var(--line); }
.team-index > a { display: grid; grid-template-columns: 80px minmax(0, 1fr) 20px; align-items: center; gap: 22px; min-height: 120px; padding: 19px 0; border-top: 1px solid var(--line); }
.team-avatar img, .avatar-placeholder { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; object-fit: cover; background: var(--soft); font-weight: 700; }
.team-copy h2 { margin: 0; font-size: 18px; }
.team-copy p, .team-copy > span { color: var(--muted); font-size: 13px; }
.team-copy p { margin: 2px 0 7px; }
.portfolio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 18px; }
.portfolio-grid > a img, .portfolio-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); color: var(--muted); font-size: 12px; }
.portfolio-grid > a > div { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.portfolio-grid > a strong { font-size: 14px; }
.portfolio-grid > a span, .portfolio-grid > a p { color: var(--muted); font-size: 12px; }
.portfolio-grid > a p { margin: 4px 0 0; }
.portfolio-gallery { display: grid; gap: 24px; margin-top: 70px; }
.contact-line { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.contact-line span { color: var(--muted); }
.site-footer { padding: 32px 0 42px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-inner > div:first-child { display: grid; gap: 3px; }
.footer-inner small { color: var(--muted); font-size: 11px; }
.footer-links { display: flex; gap: 18px; }
.notice {
    margin-bottom: 24px;
    padding: 10px 10px;
    background-color: rgb(215 0 0 / 14%);
    border: 1px solid #2f1212;
    color: var(--text);
}
.empty-state, .error-page p { color: var(--muted); }
.error-page { padding: 80px 0; }
.error-page h1 { font-size: 40px; }
.error-page a { text-decoration: underline; }

@media (max-width: 700px) {
    .shell { width: min(var(--shell), calc(100% - 32px)); }
    .site-header { padding-top: 16px; }
    .menu-toggle { display: block; }
    .site-nav { display: none; position: absolute; z-index: 20; top: 64px; right: 16px; left: 16px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); background: var(--nav-bg); }
    .site-nav.open { display: flex; }
    .site-nav a, .site-nav button { padding: 10px; text-align: left; }
    .main-content { padding-top: 38px; }
    .intro { padding: 28px 0 78px; }
    .section { padding-bottom: 66px; }
    .line-item, .project-line { grid-template-columns: 56px minmax(0, 1fr); gap: 25px; }
    .line-item:not(.project-line) { grid-template-columns: 1fr; }
    .project-icon { width: 50px; height: 50px; border-radius: 10px; }
    .line-meta { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; gap: 8px; white-space: normal; }
    .line-item:not(.project-line) .line-meta { grid-column: 1; }
    .team-lines > a { grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr) 18px; gap: 12px; }
    .page-header { padding-bottom: 52px; }
    .back-link { margin-bottom: 42px; }
    .gallery, .portfolio-grid { grid-template-columns: 1fr; }
    .team-index > a { grid-template-columns: 64px minmax(0, 1fr) 18px; gap: 14px; }
    .team-avatar img, .avatar-placeholder { width: 64px; height: 64px; }
    .team-copy > span { display: none; }
    .prose { font-size: 17px; }
    .footer-inner, .contact-line { align-items: flex-start; flex-direction: column; gap: 12px; }
    .contact-line { gap: 5px; }
    .detail-title-row { align-items: flex-start; }
    .detail-icon { width: 60px; height: 60px; border-radius: 14px; }
    .project-detail-identity { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; }
    .project-detail .detail-header h1 { font-size: clamp(31px, 9vw, 42px); }
    .detail-actions { align-items: stretch; flex-direction: column; }
    .project-destination, .project-repository { justify-content: space-between; }
    .profile-identity { gap: 16px; }
    .profile-avatar { width: 72px; height: 72px; }
    .profile-content { display: block; }
    .profile-meta { margin-bottom: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
