:root {
    --brand-gold: #d5b06d;
    --brand-forest: #1e312f;
    --brand-mauve: #8b6875;
    --bg-soft: #f7f5f2;
    --border-soft: #e8e0d3;
}

.site-container {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee6d8;
}

.site-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--brand-forest);
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.site-mobile-toggle {
    color: var(--brand-forest);
}

.site-nav {
    background: transparent;
    border-bottom: 0;
}

.site-nav-list {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0 0.7rem;
}

.site-nav-link {
    color: #5b6674;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
}

.site-nav-link:hover { color: var(--brand-forest); }
.site-nav-link.danger:hover { color: #b43b3b; }

.site-header-actions {
    align-items: center;
    gap: 0.55rem;
}

.site-mobile-menu {
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
}

.site-mobile-link {
    display: block;
    padding: 0.55rem 0.2rem;
    color: #41505f;
    font-weight: 600;
}

.site-mobile-link:hover { color: var(--brand-forest); }
.site-mobile-link.danger:hover { color: #b43b3b; }

.site-main {
    min-height: calc(100vh - 160px);
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--border-soft);
}

.site-footer-inner {
    text-align: center;
    color: #5b6472;
    font-size: 0.92rem;
    line-height: 1.5;
}

.site-footer-sub {
    color: #7a8492;
    margin-top: 0.3rem;
}

.site-footer-links {
    margin-top: 0.8rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.site-footer-links a {
    color: #4f5e6e;
    font-size: 0.88rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0.72rem 1.15rem;
    font-weight: 600;
    line-height: 1;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--brand-forest);
    color: #fff;
    box-shadow: 0 8px 20px rgba(30, 49, 47, 0.16);
}
.btn-primary:hover { background: #162624; transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 3px solid rgba(139, 104, 117, 0.35); outline-offset: 2px; }

.btn-secondary {
    background: #fff;
    color: var(--brand-forest);
    border-color: var(--border-soft);
}
.btn-secondary:hover { background: #fdfbf8; border-color: #d8cdb9; }
.btn-secondary:focus-visible { outline: 3px solid rgba(213, 176, 109, 0.35); outline-offset: 2px; }

.btn-danger {
    background: #b43b3b;
    color: #fff;
}
.btn-danger:hover { background: #932f2f; }

.btn-sm { min-height: 40px; padding: 0.6rem 0.85rem; font-size: 0.875rem; line-height: 1.2; }
.btn-lg { padding: 0.92rem 1.35rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input-field {
    width: 100%;
    border: 1px solid #d8d2c8;
    border-radius: 10px;
    padding: 0.68rem 0.82rem;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-field:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(213, 176, 109, 0.22);
}
.input-field:disabled { background: #f3f4f6; cursor: not-allowed; }
.input-field.error { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }

.input-label {
    display: block;
    margin-bottom: 0.38rem;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
}
.input-error { margin-top: 0.3rem; color: #dc2626; font-size: 0.8rem; }

.card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(30, 49, 47, 0.06);
    padding: 1.4rem;
}
.card-header {
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 0.85rem;
    margin-bottom: 0.95rem;
}
.card-title {
    margin: 0;
    color: var(--brand-forest);
    font-size: 1.1rem;
    font-weight: 700;
}
.card-body { color: #4b5563; }
.card-footer {
    border-top: 1px solid var(--border-soft);
    margin-top: 1rem;
    padding-top: 0.9rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.form-section {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 1rem;
    background: #fcfbf9;
}

.form-section-title {
    margin: 0 0 0.8rem;
    color: var(--brand-forest);
    font-size: 0.95rem;
    font-weight: 700;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.portfolio-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.unfold-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.unfold-sidebar {
    position: static;
}

.unfold-profile-card {
    background: #102a2a;
    color: #e6efe9;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem;
}

.unfold-avatar {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.55rem;
}

.unfold-role {
    margin-top: 0.8rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c2d3cc;
}

.unfold-name {
    margin-top: 0.3rem;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
}

.unfold-bio {
    margin-top: 0.65rem;
    color: #c9d8d2;
    line-height: 1.65;
}

.unfold-cta-group {
    margin-top: 1rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.unfold-main {
    display: grid;
    gap: 1rem;
}

.unfold-hero {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 1.15rem 1.2rem;
}

.unfold-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b6875;
    font-weight: 700;
}

.unfold-title {
    margin-top: 0.35rem;
    font-size: clamp(1.5rem, 3.6vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    color: #102a2a;
}

.unfold-subtitle {
    margin-top: 0.55rem;
    color: #5a6675;
    line-height: 1.7;
}

.unfold-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.unfold-project-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(16, 42, 42, 0.08);
}

.unfold-project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.unfold-project-placeholder {
    display: grid;
    place-items: center;
    color: #6b7280;
    background: #f3f4f6;
}

.unfold-project-body {
    padding: 1rem 1rem 1.1rem;
}

.unfold-project-title {
    font-size: 1.15rem;
    font-weight: 750;
    color: #102a2a;
}

.unfold-project-date {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #7c8796;
}

.unfold-project-excerpt {
    margin-top: 0.7rem;
    color: #3f4a58;
    line-height: 1.65;
}

.unfold-project-actions {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.landing-hero {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    color: #fff;
    position: relative;
}

.landing-top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.7rem 0;
    z-index: 2;
}

.landing-top-inner {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.landing-brand-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.landing-hero-center {
    min-height: 100vh;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 2rem 1rem;
}

.landing-hero-center h1 {
    font-size: clamp(3.1rem, 9vw, 6rem);
    font-weight: 800;
    line-height: 1;
}

.landing-hero-center p {
    margin-top: 1rem;
    font-size: clamp(1.25rem, 3vw, 2.1rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.95);
    max-width: 900px;
}

.landing-scroll {
    margin-top: 2.4rem;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.82rem;
    letter-spacing: 0.09em;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.landing-scroll-mouse {
    width: 22px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    padding-top: 5px;
}

.landing-scroll-wheel {
    width: 4px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    animation: landing-wheel-move 1.35s ease-in-out infinite;
}

.landing-scroll-text {
    font-size: 0.72rem;
    font-weight: 700;
}

@keyframes landing-wheel-move {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    70% {
        transform: translateY(9px);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.landing-portfolio-wrap {
    background: var(--bg-soft);
}

.consult-section {
    margin-top: 2.3rem;
}

.consult-card {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #fcf7ec);
    padding: 1.2rem;
}

.consult-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b6875;
    font-weight: 700;
}

.consult-title {
    margin-top: 0.35rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #102a2a;
    font-weight: 800;
    line-height: 1.2;
}

.consult-copy {
    margin-top: 0.65rem;
    color: #4f5f70;
    line-height: 1.7;
    max-width: 70ch;
}

.consult-actions {
    margin-top: 1rem;
}

.consult-cta-btn {
    font-size: 1rem;
    padding: 0.98rem 1.5rem;
    border-radius: 12px;
}

.leadmagnets-section {
    margin-top: 1.15rem;
}

.leadmagnets-head {
    margin-bottom: 0.75rem;
}

.leadmagnets-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b6875;
    font-weight: 700;
}

.leadmagnets-title {
    margin-top: 0.35rem;
    font-size: clamp(1.3rem, 2.7vw, 1.8rem);
    color: #102a2a;
    font-weight: 800;
}

.leadmagnets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.leadmagnet-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.leadmagnet-card h3 {
    color: #102a2a;
    font-weight: 760;
    font-size: 1.05rem;
}

.leadmagnet-card p {
    margin-top: 0.55rem;
    color: #4f5f70;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.leadmagnet-card-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--lm-bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(4px);
    transform: scale(1.08);
}

.leadmagnet-card-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.78);
}

.leadmagnet-card-bg > * {
    position: relative;
    z-index: 1;
}

.home-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff, #fcf8f1);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    box-shadow: 0 16px 34px rgba(30, 49, 47, 0.07);
}

.home-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--brand-mauve);
    margin-bottom: 0.65rem;
}

.home-title {
    font-size: clamp(1.9rem, 4.2vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #172a28;
    font-weight: 800;
}

.home-subtitle {
    margin-top: 0.85rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a5565;
    max-width: 62ch;
}

.home-cta-row {
    margin-top: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-brand-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.hero-brand-logo {
    width: 48px;
    height: 48px;
}

.hero-brand-title {
    color: var(--brand-forest);
    font-weight: 700;
}

.hero-brand-sub {
    color: #647284;
    font-size: 0.9rem;
}

.home-section-head {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #172a28;
}

.section-subtitle {
    color: #5f6d7c;
    margin-top: 0.35rem;
}

.app-showcase-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(30, 49, 47, 0.12);
}

.project-hero {
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 1rem;
}

.project-content-card {
    background: #fffdfa;
}

.project-section-title {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #172a28;
    margin: 0 0 0.95rem;
}

.project-prose p {
    line-height: 1.85;
}

.project-prose h1,
.project-prose h2,
.project-prose h3 {
    color: #172a28;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-top: 1.25rem;
    margin-bottom: 0.7rem;
}

.project-prose h1 { font-size: 2rem; }
.project-prose h2 { font-size: 1.6rem; }
.project-prose h3 { font-size: 1.3rem; }

.project-prose ul,
.project-prose ol {
    margin: 0.9rem 0 1rem 1.35rem;
    padding-left: 0.4rem;
}

.project-prose ul {
    list-style: disc;
}

.project-prose ol {
    list-style: decimal;
}

.project-prose li {
    margin: 0.34rem 0;
    line-height: 1.75;
}

.project-prose a {
    color: #1e312f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.apps-header h1 {
    color: var(--brand-forest);
}

.dash-layout {
    display: flex;
}

.dash-sidebar {
    box-shadow: 8px 0 22px rgba(30, 49, 47, 0.05);
}

.dash-main {
    width: 100%;
}

.dash-content-wrap {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.dash-hero {
    padding: 1.1rem 0 0.4rem;
}

.dash-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--brand-mauve);
    margin-bottom: 0.5rem;
}

.dash-title {
    font-size: clamp(1.8rem, 3.8vw, 2.7rem);
    font-weight: 800;
    color: #172a28;
    letter-spacing: -0.02em;
}

.dash-subtitle {
    color: #5d6776;
    margin-top: 0.35rem;
}

.dash-stat-card {
    background: linear-gradient(180deg, #fff, #fcf9f4);
}

.dash-stat-label {
    font-size: 0.9rem;
    color: #697586;
    font-weight: 600;
}

.dash-stat-value {
    margin-top: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-forest);
    letter-spacing: -0.02em;
}

.apps-toolbar {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 4px 14px rgba(30, 49, 47, 0.05);
}

.apps-search-form .input-field {
    min-width: 220px;
}

.apps-view-toggle .btn-secondary.ring-2 {
    border-color: var(--brand-gold);
    background: #fff8ea;
}

.apps-table-card {
    padding: 0.9rem;
}

.apps-table thead th {
    font-weight: 700;
    color: #46505f;
}

.apps-table tbody tr:hover {
    background: #fcfbf9;
}

.apps-table td,
.apps-table th {
    vertical-align: middle;
}

.apps-list-card h3 {
    color: #1f2937;
}

.apps-editor-grid {
    align-items: start;
}

.apps-form-card,
.apps-gallery-card {
    position: sticky;
    top: 88px;
}

.apps-form {
    display: grid;
    gap: 1rem;
}

.apps-editor-block {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0.9rem;
    background: #ffffff;
}

.apps-editor-block #post-editor {
    background: #fffdf9;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.post-editor-textarea {
    width: 100%;
    min-height: 280px;
    max-height: 520px;
    resize: vertical;
    overflow: auto;
    line-height: 1.7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
}

.editor-preview-wrap {
    border-top: 1px dashed #e6dccb;
    padding-top: 0.85rem;
}

.editor-preview {
    border: 1px solid #d8d2c8;
    border-radius: 10px;
    background: #fff;
    min-height: 120px;
    max-height: 340px;
    overflow: auto;
    padding: 0.9rem 1rem;
}

.project-prose blockquote {
    border-left: 4px solid var(--brand-gold);
    margin: 0.85rem 0;
    padding: 0.35rem 0 0.35rem 0.9rem;
    color: #445062;
    font-style: italic;
}

.project-prose pre {
    background: #172a28;
    color: #e6efe9;
    border-radius: 10px;
    padding: 0.8rem 0.95rem;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.6;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-zoom-trigger {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(9, 14, 18, 0.88);
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.gallery-lightbox img {
    max-width: min(1200px, 100%);
    max-height: 92vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox-nav.prev {
    left: 14px;
}

.gallery-lightbox-nav.next {
    right: 14px;
}

.seo-counter {
    color: #7a8492;
    font-weight: 600;
}

.seo-counter.ok { color: #15803d; }
.seo-counter.warn { color: #9a6700; }
.seo-counter.bad { color: #b91c1c; }

.apps-media-section img {
    box-shadow: 0 8px 18px rgba(30, 49, 47, 0.08);
}

@media (max-width: 640px) {
    .card {
        padding: 1rem;
        border-radius: 14px;
    }

    .apps-toolbar {
        padding: 0.6rem;
    }

    .apps-search-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .apps-search-form .input-field {
        width: 100%;
        min-width: 0;
    }

    .home-hero {
        padding: 1rem;
        border-radius: 18px;
    }

    .site-header-inner {
        min-height: 66px;
    }

    .site-brand {
        font-size: 1.05rem;
    }

    .site-brand-logo {
        width: 36px;
        height: 36px;
    }

    .landing-top-inner {
        justify-content: center;
    }

    .landing-brand {
        line-height: 1;
    }

    .landing-brand-logo {
        height: 42px;
    }

    .post-editor-textarea {
        min-height: 220px;
        max-height: 420px;
        resize: none;
    }
}

@media (min-width: 1024px) {
    .unfold-shell {
        grid-template-columns: 300px minmax(0, 1fr);
        align-items: start;
        gap: 1.4rem;
    }

    .unfold-sidebar {
        position: sticky;
        top: 92px;
    }

    .unfold-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leadmagnets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1279px) {
    .apps-form-card,
    .apps-gallery-card {
        position: static;
        top: auto;
    }
}

@media (min-width: 960px) {
    .home-hero {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: end;
    }
}
