:root {
    --bg: #050505;
    --bg-soft: #0d0d0d;
    --surface: rgba(18, 18, 18, 0.88);
    --surface-strong: #151515;
    --surface-raised: #202020;
    --text: #f5f5f5;
    --muted: #ababab;
    --subtle: #747474;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);
    --accent: #d7a736;
    --accent-strong: #f1c75b;
    --accent-cool: #6f9dff;
    --accent-cool-strong: #90b4ff;
    --accent-pink: #ec6fa8;
    --accent-pink-strong: #ff8fbe;
    --on-accent: #0a0a0a;
    --on-accent-cool: #0a0a0a;
    --focus-ring: #7aa8ff;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.28);
    --radius: 8px;
    --radius-lg: 14px;
    --nav-height: 50px;
    --container: 90vw;
    --code-bg: #0a0a0d;
    --code-text: #e9edf0;
    --code-line: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(8, 8, 8, 0.88);
    --header-bg-solid: rgba(8, 8, 8, 0.94);
    --hero-bg: #111111;
    --thumb-bg: #101010;
    --footer-bg: #070707;
    --overlay-soft: rgba(255, 255, 255, 0.06);
    --overlay-softer: rgba(255, 255, 255, 0.05);

    color-scheme: dark;
    transition: background-color 0.25s ease, color 0.25s ease;
}

:root[data-theme="light"] {
    --bg: #f6f4ee;
    --bg-soft: #ffffff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-raised: #eef0f4;
    --text: #14151a;
    --muted: #55565f;
    --subtle: #7c7d85;
    --line: rgba(20, 20, 25, 0.12);
    --line-strong: rgba(20, 20, 25, 0.22);
    --accent: #b9800f;
    --accent-strong: #92640a;
    --accent-cool: #2f62d6;
    --accent-cool-strong: #1f4bb0;
    --accent-pink: #cf3f83;
    --accent-pink-strong: #a92c69;
    --on-accent: #0a0a0a;
    --on-accent-cool: #ffffff;
    --focus-ring: #2f62d6;
    --shadow: 0 24px 60px rgba(20, 20, 25, 0.12);
    --shadow-soft: 0 10px 28px rgba(20, 20, 25, 0.08);
    --code-bg: #f3f1ea;
    --code-text: #22242b;
    --code-line: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(255, 255, 255, 0.90);
    --header-bg-solid: rgba(255, 255, 255, 0.96);
    --hero-bg: #eeeae0;
    --thumb-bg: #e7e4dc;
    --footer-bg: #ffffff;
    --overlay-soft: rgba(20, 20, 25, 0.05);
    --overlay-softer: rgba(20, 20, 25, 0.04);

    color-scheme: light;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 72% 14%, rgba(122, 168, 255, 0.12), transparent 28%),
        radial-gradient(circle at 18% 76%, rgba(215, 167, 54, 0.10), transparent 26%),
        var(--bg);
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
    color: var(--text);
    overflow-wrap: break-word;
}

button,
a,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

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

img {
    max-width: 100%;
}

.site_loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 1;
    transition: opacity 0.45s ease;
}

.site_loader.site_loader_hidden {
    opacity: 0;
    pointer-events: none;
}

.site_loader_logo {
    width: clamp(56px, 12vw, 84px);
    height: clamp(56px, 12vw, 84px);
    animation: site_loader_pulse 1.4s ease-in-out infinite;
}

@keyframes site_loader_pulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.94);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

.skip_link {
    position: fixed;
    top: -60px;
    left: 12px;
    z-index: 1000;
    padding: 12px 18px;
    border-radius: 6px;
    background: var(--accent-strong);
    color: var(--on-accent);
    font-weight: 800;
    transition: top 0.2s ease;
}

.skip_link:focus {
    top: 12px;
}

:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    html {
        scroll-behavior: auto;
    }
}

.site_header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 16px;
}

.top_nav {
    width: min(var(--container), 100%);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto;
    padding: 10px 12px;
    /* border: 1px solid var(--line); */
    border-radius: var(--radius);
    background: var(--header-bg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.brand_button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-weight: 800;
}

.jd_logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    /* border: 1px solid var(--line-strong); */
    border-radius: 50%;
    background: linear-gradient(145deg, #f7f7f7, #6d6d6d 46%, #050505 48%, #1d1d1d), var(--surface-raised);
    background: linear-gradient(145deg, #373333, #c9c9c9 46%, #c6c4c4 48%, #000000), var(--surface-raised);
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0;
    box-shadow: inset 0 0 0 21px rgba(0, 0, 0, 0.55), 0 0 0px rgba(255, 255, 255, -0.92);
}

.brand_text {
    font-size: 15px;
}

.nav_btn_container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav_controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav_btn,
.ghost_btn,
.back_btn,
.toggle_btn,
.copy_btn,
.footer_contact button {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav_btn:hover,
.nav_btn.active_nav,
.ghost_btn:hover,
.back_btn:hover,
.toggle_btn:hover,
.toggle_btn.active,
.footer_contact button:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    border-color: var(--accent);
}

.menu_toggle {
    display: none;
    width: 42px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--overlay-soft);
}

.menu_toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.theme_toggle {
    width: 42px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 17px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme_toggle:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    transform: translateY(-1px);
}

.theme_icon_sun {
    display: none;
}

[data-theme="light"] .theme_icon_moon {
    display: none;
}

[data-theme="light"] .theme_icon_sun {
    display: inline;
}

main {
    min-height: calc(100vh - 170px);
}

.page_view {
    display: none;
}

.page_view.active_page {
    display: block;
}

.hero {
    width: 100%;
    min-height: 100svh;
    position: relative;
    display: flex;
    align-items: center;
    margin: calc(-1 * (var(--nav-height) + 24px)) auto 0;
    padding: calc(var(--nav-height) + clamp(54px, 8vw, 96px)) max(5vw, calc((100vw - var(--container)) / 2)) clamp(48px, 8vw, 88px);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--hero-bg);
    box-shadow: none;
}

.hero_copy {
    position: relative;
    z-index: 2;
    width: min(640px, 100%);
    display: grid;
    gap: 20px;
    align-content: center;
}

.eyebrow {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.section_heading h1,
.about_content h1,
.guide_main h1 {
    font-size: clamp(28px, 4.2vw, 46px);
    line-height: 1.08;
    letter-spacing: 0;
}

.hero p:not(.eyebrow),
.guide_intro,
.home_contact_summary p {
    max-width: 660px;
    color: var(--muted);
    font-size: clamp(14px, 1.35vw, 18px);
    line-height: 1.75;
}

.hero_actions,
.summary_actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.primary_btn,
.ghost_link,
.code_btn,
.guide_btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.primary_btn {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

.primary_btn:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(215, 167, 54, 0.28);
}

.code_btn {
    border-color: var(--accent-pink);
    background: var(--accent-pink);
    color: var(--on-accent);
    font-family: "Poppins", Arial, sans-serif;
}

.code_btn:hover {
    background: var(--accent-pink-strong);
    border-color: var(--accent-pink-strong);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(236, 111, 168, 0.28);
}

.guide_btn {
    border-color: var(--accent-cool);
    background: var(--accent-cool);
    color: var(--on-accent-cool);
}

.guide_btn:hover {
    background: var(--accent-cool-strong);
    border-color: var(--accent-cool-strong);
    color: var(--on-accent-cool);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(111, 157, 255, 0.28);
}

.ghost_link {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
}

.ghost_link:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    transform: translateY(-2px);
}

.primary_btn:active,
.code_btn:active,
.guide_btn:active,
.ghost_link:active {
    transform: translateY(0);
}

/* The hero always sits over a photo with a dark scrim, so its text stays
   light regardless of the active site theme (light/dark mode). */
.hero_copy .eyebrow {
    color: #f1c75b;
}

.hero_copy h1 {
    color: #ffffff;
}

.hero_copy p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.82);
}

.hero_copy .ghost_link {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.hero_copy .ghost_link:hover {
    border-color: #f1c75b;
    background: rgba(241, 199, 91, 0.18);
}

.hero_stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--hero-bg);
}

.hero_stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.72) 38%, rgba(5, 5, 5, 0.42) 68%, rgba(5, 5, 5, 0.28) 100%),
        linear-gradient(180deg, rgba(5, 5, 5, 0.34) 0%, rgba(5, 5, 5, 0.18) 42%, rgba(5, 5, 5, 0.62) 100%);
    pointer-events: none;
}

.hero_stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center right;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 1s ease, transform 1s ease;
}

.hero_stage img.active_hero_image {
    opacity: 0.99;
    transform: scale(1);
}

.hero_stage img.leaving_hero_image {
    opacity: 0;
    transform: scale(1.015);
}

/* .circuit_overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 32%, rgba(255, 255, 255, 0.28) 32% 32.4%, transparent 32.4%),
        linear-gradient(0deg, transparent 0 42%, rgba(255, 255, 255, 0.22) 42% 42.4%, transparent 42.4%);
    mix-blend-mode: screen;
}

.circuit_overlay span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-strong);
    box-shadow: 0 0 24px var(--accent);
    animation: pulseNode 2.4s ease-in-out infinite;
}

.circuit_overlay span:nth-child(1) { left: 32%; top: 42%; }
.circuit_overlay span:nth-child(2) { right: 18%; top: 18%; animation-delay: 0.4s; }
.circuit_overlay span:nth-child(3) { left: 18%; bottom: 20%; animation-delay: 0.8s; }
.circuit_overlay span:nth-child(4) { right: 30%; bottom: 26%; animation-delay: 1.2s; }

@keyframes pulseNode {
    0%, 100% { transform: scale(0.85); opacity: 0.45; }
    50% { transform: scale(1.45); opacity: 1; }
} */

.hero_readout {
    display: none;
}

.hero_readout strong {
    color: var(--accent-strong);
    font-size: 18px;
}

.hero_readout span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.home_projects,
.page_shell,
.project_detail_shell,
.home_contact_summary {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(48px, 7vw, 88px) 0;
}

.section_heading {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

.section_heading h2,
.home_contact_summary h2 {
    font-size: clamp(22px, 2.6vw, 32px);
    line-height: 1.15;
}

.featured_project {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
    gap: clamp(22px, 5vw, 58px);
    align-items: center;
}

.featured_project_controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
}

.project_switch_btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--overlay-soft);
    color: var(--text);
    font-size: 18px;
    transition: 0.2s;
}

.project_switch_btn:hover {
    border-color: var(--accent);
    background: rgba(215, 167, 54, 0.16);
}

.project_gallery,
.selector_gallery,
.detail_media {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    touch-action: pan-y;
}

.project_gallery img,
.selector_gallery > img,
.guide_cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 430px;
    display: block;
    object-fit: cover;
    background: var(--thumb-bg);
    transition: opacity 0.28s ease, transform 0.35s ease;
}

.project_gallery img.image_switching,
.selector_gallery > img.image_switching,
.guide_cover.image_switching {
    opacity: 0.35;
    transform: scale(1.02);
}

.gallery_nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.58);
    transform: translateY(-50%);
}

.gallery_nav::before {
    content: "";
    width: 10px;
    height: 10px;
    display: block;
    margin: 0 auto;
    border-top: 2px solid var(--text);
    border-left: 2px solid var(--text);
}

.prev_gallery { left: 14px; }
.prev_gallery::before { transform: rotate(-45deg); }
.next_gallery { right: 14px; }
.next_gallery::before { transform: rotate(135deg); }

.project_summary,
.selector_details {
    display: grid;
    gap: 22px;
}

.title_row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.project_meta {
    color: var(--accent-cool);
    font-size: 13px;
    font-weight: 800;
}

.project_summary h3,
.selector_details h2 {
    margin-top: 4px;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.15;
}

.project_summary > p,
.selector_details > p,
.project_card p {
    color: var(--muted);
    line-height: 1.75;
}

.progress_dot {
    --progress: 0;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--progress) * 1%), var(--line-strong) 0);
}

.progress_dot span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.progress_dot.large {
    width: 78px;
    height: 78px;
}

.progress_dot.large span {
    width: 58px;
    height: 58px;
    font-size: 15px;
}

.feature_list,
.about_stats,
.resource_strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature_list span,
.about_stats span,
.resource_strip a,
.resource_grid a {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--overlay-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.resource_grid a {
    border-radius: var(--radius);
}

.project_pager {
    display: flex;
    align-items: center;
    gap: 7px;
}

.project_pager button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: var(--line-strong);
}

.project_pager button.active {
    background: var(--accent);
}

.breathing_space {
    height: 30vh;
}

.home_contact_summary {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: clamp(24px, 6vw, 70px);
    align-items: start;
    border-top: 1px solid var(--line);
}

.home_contact_summary > div:first-child {
    display: grid;
    gap: 14px;
}

.quick_facts,
.profile_grid {
    display: grid;
    gap: 12px;
}

.quick_facts div {
    display: grid;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.quick_facts span,
.profile_grid span {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.quick_facts strong,
.profile_grid strong {
    color: var(--text);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.projects_header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
}

.project_list {
    display: grid;
    gap: 18px;
}

.load_error_card {
    display: grid;
    gap: 14px;
    justify-items: start;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    color: var(--muted);
    line-height: 1.6;
}

.load_warning_banner {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--muted);
    font-size: 13px;
}

.project_list_item {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    color: var(--text);
    text-align: left;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project_list_item:hover {
    border-color: var(--accent-cool);
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.project_list_thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: var(--thumb-bg);
}

.project_list_thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project_list_item:hover .project_list_thumb img {
    transform: scale(1.04);
}

.project_list_progress {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.project_list_tag {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--accent-cool-strong);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project_list_body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 2px 0;
    min-width: 0;
}

.project_list_body h2 {
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.25;
    margin: 0;
}

.project_list_body p:not(.project_meta) {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
}

.project_list_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    align-items: center;
}

.project_list_actions .primary_btn,
.project_list_actions .code_btn,
.project_list_actions .guide_btn {
    flex: 1 1 150px;
    min-height: 46px;
}

.selector_thumbs,
.detail_thumbs {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.thumb_btn {
    width: 72px;
    height: 46px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--thumb-bg);
}

.thumb_btn.active {
    border-color: var(--accent);
}

.thumb_btn img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


.project_detail_shell {
    padding-top: 32px;
}

.guide_layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: clamp(24px, 5vw, 54px);
    align-items: start;
    margin-top: 18px;
}

.guide_main {
    display: grid;
    gap: 22px;
}

.guide_section {
    display: grid;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.guide_section h2,
.download_panel h2,
.contact_card h2 {
    font-size: 20px;
}

.guide_section p,
.step_list,
.download_panel p {
    color: var(--muted);
    line-height: 1.75;
}

.step_list {
    padding-left: 22px;
}

.guide_doc_content {
    display: grid;
    gap: 22px;
}

.guide_doc_group {
    display: grid;
    gap: 10px;
}

.guide_doc_group h3 {
    color: var(--text);
    font-size: 18px;
}

.guide_doc_group ul,
.guide_doc_group ol {
    display: grid;
    gap: 7px;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.guide_doc_group p {
    color: var(--muted);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.code_section {
    scroll-margin-top: 140px;
}

.code_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.copy_code_btn {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--accent-pink);
    border-radius: 6px;
    background: rgba(236, 111, 168, 0.14);
    color: var(--accent-pink-strong);
    font-size: 13px;
    font-weight: 800;
}

.copy_code_btn:hover {
    background: var(--accent-pink);
    color: var(--on-accent);
}

.copy_code_btn.copied {
    background: #2cd97a;
    border-color: #2cd97a;
    color: #06210f;
}

.firmware_code_block {
    max-height: 560px;
    overflow: auto;
    margin: 0;
    padding: 16px;
    border: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--code-bg);
    color: var(--code-text);
    font-size: 12px;
    line-height: 1.55;
}

.firmware_code_block code {
    font-family: Consolas, "Courier New", monospace;
    white-space: pre;
    background: none;
    text-shadow: none;
}

.code_window {
    border: 1px solid var(--accent-pink);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.code_window_bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(236, 111, 168, 0.12);
    border-bottom: 1px solid var(--line);
}

.code_dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--line-strong);
}

.code_dot_red {
    background: #ff5f56;
}

.code_dot_yellow {
    background: #ffbd2e;
}

.code_dot_green {
    background: #27c93f;
}

.code_window_filename {
    margin-left: 8px;
    color: var(--muted);
    font-size: 12px;
    font-family: Consolas, "Courier New", monospace;
    font-weight: 700;
}

/* Prism token colors, mapped to the site's yellow / blue / pink palette */
.firmware_code_block .token.comment,
.firmware_code_block .token.prolog,
.firmware_code_block .token.doctype,
.firmware_code_block .token.cdata {
    color: var(--subtle);
    font-style: italic;
}

.firmware_code_block .token.keyword,
.firmware_code_block .token.selector,
.firmware_code_block .token.atrule {
    color: var(--accent-pink-strong);
    font-weight: 700;
}

.firmware_code_block .token.string,
.firmware_code_block .token.char,
.firmware_code_block .token.attr-value {
    color: var(--accent-strong);
}

.firmware_code_block .token.number,
.firmware_code_block .token.boolean,
.firmware_code_block .token.constant {
    color: var(--accent-cool-strong);
}

.firmware_code_block .token.function,
.firmware_code_block .token.function-variable {
    color: var(--accent-pink);
}

.firmware_code_block .token.class-name,
.firmware_code_block .token.builtin {
    color: var(--accent-cool-strong);
    font-weight: 600;
}

.firmware_code_block .token.macro,
.firmware_code_block .token.property,
.firmware_code_block .token.directive-hash {
    color: var(--accent);
}

.firmware_code_block .token.operator,
.firmware_code_block .token.punctuation {
    color: var(--muted);
}

.firmware_code_block .token.variable {
    color: var(--code-text);
}

.detail_tabs {
    display: flex;
    gap: 6px;
    margin: 4px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.detail_tab_btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.detail_tab_btn:hover {
    color: var(--text);
    background: var(--overlay-softer);
}

.detail_tab_btn.active {
    color: var(--bg);
    background: var(--accent-cool);
    border-color: var(--accent-cool);
}

.detail_tab_btn.code_tab_btn {
    font-family: Consolas, "Courier New", monospace;
    color: var(--accent-pink-strong);
}

.detail_tab_btn.code_tab_btn.active {
    color: var(--on-accent);
    background: var(--accent-pink);
    border-color: var(--accent-pink);
}

.project_tab_panel {
    display: none;
    animation: fadeInTab 0.2s ease;
}

.project_tab_panel.active_project_mode {
    display: grid;
    gap: 22px;
}

@keyframes fadeInTab {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quick_action_bar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--header-bg-solid);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.quick_action_title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    color: var(--muted);
}

.quick_action_buttons {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.quick_action_buttons .primary_btn,
.quick_action_buttons .code_btn {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
}

.project_detail_page .quick_action_bar {
    margin-top: 8px;
    margin-bottom: -8px;
}

.resource_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.download_panel {
    position: sticky;
    top: 168px;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.full_width {
    width: 100%;
}

.about_layout {
    display: grid;
    grid-template-columns: minmax(240px, 390px) minmax(0, 1fr);
    gap: clamp(24px, 6vw, 70px);
    align-items: center;
}

.about_photo {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
}

.about_photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
    object-fit: cover;
}

.about_content {
    display: grid;
    gap: 18px;
}

.about_content p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.75;
}

.section_subtext {
    max-width: 640px;
    color: var(--muted);
    line-height: 1.7;
}

.skill_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.skill_card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.skill_card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.skill_card h3 {
    font-size: 16px;
    color: var(--accent-strong);
}

.skill_card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.approach_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
}

.approach_card {
    display: grid;
    gap: 8px;
}

.approach_index {
    display: inline-block;
    color: var(--accent-pink-strong);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.approach_card h3 {
    font-size: 17px;
}

.approach_card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.contact_email_btn {
    margin-top: 4px;
}

.contact_columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
}

.contact_card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

.copy_block {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.copy_block span {
    color: var(--subtle);
    font-size: 13px;
    font-weight: 700;
}

.copy_text {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.copy_btn {
    min-height: 34px;
    padding: 7px 12px;
    border-color: var(--line);
}

.profile_grid {
    grid-template-columns: minmax(80px, 0.35fr) minmax(0, 1fr);
    padding-top: 4px;
}

.site_footer {
    width: 100%;
    display: grid;
    gap: clamp(32px, 5vw, 56px);
    margin: 0 auto;
    padding: clamp(52px, 8vw, 92px) max(5vw, calc((100vw - var(--container)) / 2)) 30px;
    border-top: 1px solid var(--line);
    background: var(--footer-bg);
    color: var(--muted);
}

.footer_top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-bottom: clamp(28px, 5vw, 44px);
    border-bottom: 1px solid var(--line);
}

.footer_brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer_mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: linear-gradient(145deg, #313131, #050505);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.site_footer strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1.3;
}

.footer_brand p,
.site_footer p,
.footer_bottom {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.footer_brand p {
    max-width: 360px;
    margin-top: 2px;
}

.footer_socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer_socials a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.footer_socials a:hover {
    color: var(--text);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    transform: translateY(-2px);
}

.footer_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: clamp(26px, 5vw, 70px);
    align-items: start;
    max-width: 480px;
}

.footer_grid section {
    display: grid;
    gap: 14px;
}

.footer_grid h2 {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer_grid a,
.footer_grid button {
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.footer_grid a:hover,
.footer_grid button:hover {
    color: var(--accent-strong);
}

.footer_bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.footer_top_btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer_top_btn:hover {
    color: var(--accent-strong);
}
