:root {
    --bg: #1e1e1e;
    --surface: #252526;
    --surface-raised: #2d2d30;
    --surface-hover: #2a2d2e;
    --activity: #333333;
    --text: #d4d4d4;
    --text-muted: #ababab;
    --accent: #3794ff;
    --accent-strong: #007acc;
    --accent-soft: rgba(55, 148, 255, 0.12);
    --border: #3c3c3c;
    --success: #4ec975;
    --danger: #f48771;
    --syntax-blue: #569cd6;
    --syntax-green: #7aaa68;
    --syntax-orange: #ce9178;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color-scheme: dark;
    font-size: 16px;
}

html[data-theme="light"] {
    --bg: #ffffff;
    --surface: #f3f3f3;
    --surface-raised: #ffffff;
    --surface-hover: #e8e8e8;
    --activity: #2c2c2c;
    --text: #2f2f2f;
    --text-muted: #585858;
    --accent: #006fc9;
    --accent-strong: #0066b8;
    --accent-soft: rgba(0, 102, 184, 0.09);
    --border: #d5d5d5;
    --success: #137333;
    --danger: #b42318;
    --syntax-blue: #0000ff;
    --syntax-green: #008000;
    --syntax-orange: #a31515;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    color-scheme: light;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 3000;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 4px;
    background: var(--accent-strong);
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.svg-sprite {
    position: absolute;
    overflow: hidden;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.title-bar {
    position: relative;
    height: 28px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
}

.mac-buttons {
    position: absolute;
    left: 14px;
    display: flex;
    gap: 8px;
}

.mac-buttons span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.mac-buttons span:nth-child(1) { background: #ff5f56; }
.mac-buttons span:nth-child(2) { background: #ffbd2e; }
.mac-buttons span:nth-child(3) { background: #27c93f; }

.app-container {
    position: relative;
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.activity-bar {
    width: 44px;
    flex: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    background: var(--activity);
    z-index: 20;
}

.activity-bottom {
    position: relative;
}

.activity-icon,
.mobile-icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #b8b8b8;
    cursor: pointer;
}

.activity-icon {
    position: relative;
}

.activity-icon .icon {
    width: 23px;
    height: 23px;
}

.activity-icon:hover,
.activity-icon:focus-visible {
    color: #fff;
}

.activity-icon.active::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--accent);
}

.sidebar {
    width: 218px;
    flex: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border-right: 1px solid var(--border);
    transition: width 180ms ease, transform 180ms ease;
}

.sidebar.collapsed {
    width: 0;
    border-right-width: 0;
}

.sidebar-header {
    height: 32px;
    flex: none;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-content {
    overflow: auto;
}

.folder-header {
    min-width: 200px;
    height: 28px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 700;
}

.folder-header .chevron {
    width: 15px;
    height: 15px;
    transform: rotate(90deg);
}

.file-list {
    min-width: 200px;
    list-style: none;
}

.file-item {
    position: relative;
    color: var(--text);
}

.file-item:hover {
    background: var(--surface-hover);
}

.file-item.active {
    background: color-mix(in srgb, var(--surface-hover) 68%, transparent);
}

.file-item.active::before {
    content: "";
    position: absolute;
    inset: 7px auto 7px 0;
    width: 2px;
    border-radius: 0 2px 2px 0;
    background: var(--accent);
}

.file-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 22px;
    color: inherit;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.file-label {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
}

.file-extension {
    margin-left: auto;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    opacity: 0.72;
}

.file-item.active .file-link {
    color: var(--text);
}

.file-item.active .file-type-icon {
    color: var(--accent);
}

.file-type-icon {
    width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    flex: none;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

.file-type-md { color: #4aa5f0; border: 1px solid currentColor; }
.file-type-php { color: #a9a3e8; border: 1px solid currentColor; font-size: 7px; }
.file-type-yml { color: #e37933; border: 1px solid currentColor; }
.file-type-json { color: #dcdcaa; font-size: 10px; }
.file-type-file { color: var(--text-muted); border: 1px solid currentColor; }

.editor-area {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.mobile-header {
    display: none;
}

.editor-tabs {
    height: 34px;
    flex: none;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--surface);
}

.editor-tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    min-width: max-content;
    height: 34px;
    display: flex;
    align-items: center;
    border-top: 1px solid transparent;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 12px;
}

.tab-main {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0 5px 0 11px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.tab:hover {
    background: var(--surface-hover);
}

.tab.active {
    border-top-color: var(--accent);
    border-bottom-color: transparent;
    background: var(--bg);
    color: var(--text);
}

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

.tab-label .file-type-icon {
    width: 16px;
    height: 16px;
    font-size: 7px;
}

.tab-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0;
    margin-right: 5px;
}

.tab-close .icon {
    width: 14px;
    height: 14px;
}

.tab:hover .tab-close,
.tab-close:focus-visible {
    opacity: 1;
}

.tab:only-child .tab-close {
    display: none;
}

.tab-close:hover {
    background: rgba(127, 127, 127, 0.2);
}

.breadcrumbs {
    height: 24px;
    flex: none;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10.5px;
}

.separator {
    font-size: 18px;
    opacity: 0.7;
}

.editor-content-container {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.code-page {
    display: none;
    min-height: 100%;
    padding: 24px 28px 68px 0;
    font-family: var(--mono);
}

.code-page.active {
    display: flex;
}

.line-numbers {
    width: 44px;
    flex: none;
    padding-right: 10px;
    text-align: right;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 24px;
    opacity: 0.3;
    user-select: none;
}

.code-line-wrapper {
    position: relative;
}

.git-gutter {
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
}

.git-added { background: #2ea043; }
.git-modified { background: var(--accent-strong); }

.code-content {
    width: calc(100% - 44px);
    min-width: 0;
}

.landing-content,
.profile-content,
.links-content,
.contact-page {
    max-width: 1160px;
    margin: 0 auto;
    padding-right: 20px;
    font-family: var(--sans);
}

.hero {
    position: relative;
    padding: clamp(28px, 4vw, 52px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(135deg, var(--accent-soft), transparent 55%),
        var(--surface);
}

.hero::after {
    content: "</>";
    position: absolute;
    right: clamp(18px, 5vw, 62px);
    top: 28px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: clamp(42px, 7vw, 84px);
    font-weight: 700;
    opacity: 0.08;
    pointer-events: none;
}

.eyebrow,
.code-label,
.project-kicker,
.directory-type {
    font-family: var(--mono);
    letter-spacing: 0.02em;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--syntax-green);
    font-size: 12px;
}

.code-label,
.project-kicker,
.directory-type {
    color: color-mix(in srgb, var(--syntax-green) 72%, var(--text-muted));
    font-size: 11px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
}

.hero h1 {
    max-width: 840px;
    color: var(--text);
    font-size: clamp(2.25rem, 4.65vw, 4.35rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.hero-summary {
    max-width: 700px;
    margin-top: 22px;
    color: color-mix(in srgb, var(--text) 76%, var(--text-muted));
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.7;
}

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

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 17px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent-strong);
    color: #fff;
}

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

.button-secondary {
    border-color: var(--border);
    background: var(--surface-raised);
    color: var(--text);
}

.button-secondary:hover {
    border-color: var(--accent);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
    list-style: none;
}

.trust-list li {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
}

.content-section {
    position: relative;
    padding: clamp(46px, 5.5vw, 66px) 10px 0;
}

.section-heading {
    max-width: 700px;
    margin-bottom: 21px;
}

.section-heading h2,
.final-cta h2,
.page-intro h1 {
    margin-top: 8px;
    color: var(--text);
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.service-card,
.principles-grid article {
    padding: 24px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.service-number {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
}

.service-card h3,
.principles-grid h3 {
    margin-top: 18px;
    color: var(--text);
    font-size: 1.1rem;
}

.service-card p,
.principles-grid p {
    margin-top: 11px;
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.68;
}

.service-card .service-stack {
    margin-top: 26px;
    color: var(--syntax-orange);
    font-family: var(--mono);
    font-size: 11px;
}

.featured-project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 36px;
    padding: clamp(25px, 4vw, 42px);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}

.featured-project h3 {
    max-width: 700px;
    margin-top: 10px;
    color: var(--text);
    font-size: clamp(1.35rem, 2.7vw, 2rem);
    line-height: 1.25;
}

.featured-project p:not(.project-kicker) {
    max-width: 700px;
    margin-top: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

.text-link {
    color: var(--accent);
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.text-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.confidential-note {
    max-width: 760px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.process-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    list-style: none;
    counter-reset: process;
}

.process-list li {
    counter-increment: process;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    padding: 27px;
    background: transparent;
}

.process-list li + li {
    border-left: 1px solid var(--border);
}

.process-list li::before {
    content: "0" counter(process);
    margin-bottom: auto;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
}

.process-list strong {
    margin-top: 34px;
    color: var(--text);
}

.process-list span {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

.final-cta {
    margin-top: clamp(52px, 7vw, 78px);
    padding: clamp(28px, 4vw, 48px);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface) 62%);
}

.final-cta p:not(.code-label) {
    max-width: 680px;
    margin-top: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

.final-cta .button {
    margin-top: 24px;
}

.page-intro {
    max-width: 850px;
    padding: clamp(26px, 4vw, 46px) 10px 10px;
}

.page-intro > p:last-child {
    max-width: 68ch;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(30px, 6vw, 80px);
}

.prose-block p {
    max-width: 68ch;
    color: var(--text-muted);
    line-height: 1.8;
}

.prose-block p + p {
    margin-top: 18px;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.principles-grid article h3 {
    margin-top: 0;
}

.stack-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.stack-list div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 20px 24px;
    background: var(--surface);
}

.stack-list div + div {
    border-top: 1px solid var(--border);
}

.stack-list dt {
    color: var(--syntax-blue);
    font-family: var(--mono);
    font-size: 13px;
}

.stack-list dd {
    color: var(--text-muted);
    line-height: 1.5;
}

.compact-cta {
    margin-bottom: 20px;
}

.link-directory {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 30px 10px 20px;
}

.directory-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease;
}

.directory-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.directory-card.primary-card {
    background: linear-gradient(145deg, var(--accent-soft), var(--surface));
}

.directory-card h2 {
    margin-top: 22px;
    font-size: 1.35rem;
}

.directory-card p {
    margin-top: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.directory-card .text-link {
    margin-top: auto;
    padding-top: 30px;
}

.contact-intro {
    max-width: 800px;
}

.contact-form {
    max-width: 850px;
    margin: 24px 10px 20px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

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

.form-field {
    min-width: 0;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label,
.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.form-field input:not(.file-input-hidden),
.form-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    padding: 12px 13px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.6;
}

.form-field input:hover,
.form-field textarea:hover {
    border-color: color-mix(in srgb, var(--text-muted) 70%, var(--border));
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.field-hint {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.optional-details {
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

.optional-details summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 650;
}

.optional-details summary:hover {
    color: var(--text);
}

.optional-details summary span {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
}

.optional-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 5px 0 24px;
}

.file-input-hidden,
.honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.file-button {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-raised);
    cursor: pointer;
    font-weight: 500 !important;
}

.file-button:hover {
    border-color: var(--accent);
}

.file-list-preview {
    margin-top: 10px;
    list-style: none;
}

.file-list-preview li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 5px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.78rem;
}

.file-list-preview li + li {
    margin-top: 5px;
}

.remove-file {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: none;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.remove-file:hover {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
}

.form-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
}

.privacy-note {
    max-width: 560px;
}

.privacy-note a {
    text-underline-offset: 2px;
}

.privacy-summary {
    color: color-mix(in srgb, var(--text) 76%, var(--text-muted));
    font-size: 0.82rem;
    line-height: 1.55;
}

.privacy-summary strong {
    color: var(--text);
}

.privacy-technical {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.55;
}

.submit-button {
    flex: none;
}

.form-status {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    line-height: 1.5;
}

.form-status:empty,
.form-status[hidden] {
    display: none;
}

.form-status.success {
    border-color: color-mix(in srgb, var(--success) 55%, var(--border));
    background: color-mix(in srgb, var(--success) 10%, transparent);
    color: var(--success);
}

.form-status.error {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
    background: color-mix(in srgb, var(--danger) 9%, transparent);
    color: var(--danger);
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.grecaptcha-badge {
    visibility: hidden !important;
}

.page-load-error {
    max-width: 540px;
    margin: 70px auto;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.page-load-error p {
    margin: 12px 0 20px;
    color: var(--text-muted);
}

.settings-menu {
    display: none;
    position: absolute;
    left: 40px;
    bottom: 2px;
    z-index: 1200;
    min-width: 180px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-raised);
    box-shadow: var(--shadow);
}

.settings-menu.open {
    display: block;
}

.settings-item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-size: 13px;
}

.settings-item:hover,
.settings-item.active-theme {
    background: var(--surface-hover);
}

.settings-item.active-theme {
    color: var(--accent);
}

.status-bar {
    height: 26px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-family: var(--sans);
    font-size: 11px;
    user-select: none;
}

.status-left,
.status-right {
    height: 100%;
    display: flex;
    align-items: center;
}

.status-item {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
}

.status-available {
    color: #e7ffe7;
}

.sidebar-overlay {
    display: none;
}

.noscript-message {
    position: fixed;
    inset: auto 16px 34px;
    z-index: 5000;
    max-width: 760px;
    margin: auto;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-raised);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: center;
    line-height: 1.5;
}

.mobile-language-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 5px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.mobile-language-link:hover { background: var(--surface-hover); }

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

.footer-links .language-link {
    color: var(--accent);
}

.collaboration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.collaboration-grid article {
    padding: 23px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.collaboration-grid strong { color: var(--text); }

.collaboration-grid p {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.68;
}

.privacy-content {
    max-width: 960px;
    padding: 0 34px 70px;
    font-family: var(--sans);
}

.privacy-content .code-label { font-family: var(--mono); }

.privacy-sections {
    display: grid;
    gap: 42px;
    padding-top: 48px;
}

.privacy-sections section { scroll-margin-top: 20px; }

.privacy-sections h2 {
    color: var(--text);
    font-size: clamp(1.2rem, 2.3vw, 1.55rem);
    line-height: 1.25;
}

.privacy-sections p,
.privacy-sections li {
    color: var(--text-muted);
    line-height: 1.75;
}

.privacy-sections p {
    max-width: 68ch;
}

.privacy-sections p,
.privacy-sections ul { margin-top: 12px; }

.privacy-sections ul { padding-left: 22px; }
.privacy-sections a { color: var(--accent); }

.not-found-page {
    width: min(820px, calc(100% - 32px));
    min-height: 70%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin: auto;
    padding: 50px 20px;
}

.not-found-page h1 {
    margin-top: 10px;
    color: var(--text);
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.not-found-page > p:not(.code-label) {
    max-width: 620px;
    margin-top: 18px;
    color: var(--text-muted);
    line-height: 1.7;
}

.not-found-page .button { margin-top: 25px; }

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, 0.35); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(127, 127, 127, 0.58); }

@media (max-width: 1080px) {
    .service-grid,
    .link-directory,
    .collaboration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-grid > :last-child:nth-child(odd),
    .link-directory > :last-child:nth-child(odd),
    .collaboration-grid > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .directory-card {
        min-height: 210px;
    }

    .featured-project {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

@media (max-width: 768px) {
    body {
        height: 100dvh;
    }

    .title-bar,
    .activity-bar,
    .editor-tabs,
    .breadcrumbs,
    .status-bar {
        display: none;
    }

    .mobile-header {
        position: relative;
        height: 52px;
        flex: none;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
    }

    .mobile-icon-button {
        width: 52px;
        height: 52px;
        color: var(--text);
    }

    .current-file-mobile {
        flex: 1;
        overflow: hidden;
        color: var(--text-muted);
        font-family: var(--mono);
        font-size: 12px;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .settings-menu-mobile {
        inset: 48px 8px auto auto;
        bottom: auto;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1100;
        width: min(84vw, 310px);
        height: 100dvh;
        border-right: 1px solid var(--border);
        box-shadow: var(--shadow);
        transform: translateX(-102%);
    }

    .sidebar.collapsed {
        width: min(84vw, 310px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        height: 52px;
    }

    .file-link {
        min-height: 46px;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1050;
        background: rgba(0, 0, 0, 0.58);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .code-page {
        padding: 0 0 55px;
    }

    .line-numbers {
        display: none;
    }

    .code-content {
        width: 100%;
    }

    .landing-content,
    .profile-content,
    .links-content,
    .contact-page,
    .privacy-content {
        padding: 0 16px;
    }

    .hero {
        margin-top: 16px;
        padding: 27px 20px;
        border-radius: 10px;
    }

    .hero::after {
        right: 15px;
        top: 20px;
    }

    .hero h1 {
        font-size: clamp(2.05rem, 10.5vw, 2.9rem);
    }

    .hero-summary {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .trust-list {
        margin-top: 24px;
    }

    .content-section {
        padding-top: 48px;
    }

    .service-grid,
    .process-list,
    .principles-grid,
    .link-directory,
    .collaboration-grid,
    .form-grid,
    .optional-content {
        grid-template-columns: 1fr;
    }

    .service-grid > :last-child:nth-child(odd),
    .link-directory > :last-child:nth-child(odd),
    .collaboration-grid > :last-child:nth-child(odd) {
        grid-column: auto;
    }

    .process-list {
        gap: 0;
    }

    .process-list li + li {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .process-list li {
        min-height: 155px;
    }

    .split-section {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .stack-list div {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .page-intro {
        padding: 34px 4px 5px;
    }

    .link-directory {
        padding: 25px 0 10px;
    }

    .contact-form {
        margin: 22px 0 10px;
        padding: 20px 16px;
    }

    .form-field-full {
        grid-column: auto;
    }

    .optional-content {
        gap: 20px;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-button {
        width: 100%;
        order: -1;
    }

    .final-cta {
        margin-top: 54px;
        padding: 28px 22px;
    }
}

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

@media print {
    body { height: auto; overflow: visible; }
    .title-bar, .activity-bar, .sidebar, .editor-tabs, .breadcrumbs, .status-bar, .mobile-header { display: none !important; }
    .editor-content-container { overflow: visible; }
    .code-page { padding: 0; }
    .line-numbers { display: none; }
    .code-content { width: 100%; }
}
