/* Casper DD 1.0.4 — custom Ghost 6 theme — deregowski.net
   Lightweight, self-hosted and dependency-free. */
:root {
  color-scheme: light;
  --bg: #fbfcfb; --surface: #ffffff; --surface-soft: #f4f7f6;
  --ink: #19232b; --body: #36444a; --muted: #728087;
  --teal: #07595d; --teal-bright: #0b7477; --teal-tint: #e7f2f0;
  --line: #e0e8e7; --line-strong: #cbd7d5;
  --terminal: #14242a; --terminal-text: #dbeeea;
  --shadow: 0 16px 55px -36px rgba(18,50,54,.23);
  --container: 1180px;
  --radius: 17px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c161a; --surface: #132126; --surface-soft: #101d21;
  --ink: #f0f5f4; --body: #bbcbcc; --muted: #8da4a5;
  --teal: #61c9c2; --teal-bright: #88e1d7; --teal-tint: #183f40;
  --line: #263c42; --line-strong: #395357;
  --terminal: #071317; --terminal-text: #d2efea;
  --shadow: 0 16px 60px -36px rgba(0,0,0,.65);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
/* Ghost 6 typography: fonts selected in Design & branding override system defaults. */
body { margin: 0; background: var(--bg); color: var(--body); font-family: var(--gh-font-body, var(--font)); -webkit-font-smoothing: antialiased; line-height: 1.6; }
body, button, input, textarea, select { font-family: var(--gh-font-body, var(--font)); }
h1, h2, h3, h4, h5, h6 { font-family: var(--gh-font-heading, var(--font)); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 3px; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; }
.dd-shell { min-height: 100vh; display: flex; flex-direction: column; }
.dd-shell > main { flex: 1; }
.dd-wrap { width: min(calc(100% - 64px), var(--container)); margin-inline: auto; }
.dd-skip { position: absolute; left: 12px; top: -99px; background: var(--surface); color: var(--ink); padding: 10px 15px; z-index: 1000; }
.dd-skip:focus { top: 12px; }
.dd-accent { color: var(--teal); }
.dd-eyebrow { font-size: 11px; line-height: 1.5; letter-spacing: .24em; font-weight: 760; text-transform: uppercase; color: var(--teal); margin: 0 0 17px; }
.dd-lead { font-size: 17px; line-height: 1.75; color: var(--body); }
h1,h2,h3,h4 { color: var(--ink); letter-spacing: -.042em; font-weight: 740; }
h1,h2,h3,p { margin-top: 0; }
h1 em, h2 em { font-style: normal; color: var(--teal); }
/* Header and native Ghost navigation */
.dd-header { position: relative; z-index: 30; border-bottom: 1px solid var(--line); background: var(--bg); }
.dd-header-inner { height: 88px; display: flex; gap: 20px; align-items: center; }
.dd-brand { display: inline-flex; gap: 10px; align-items: center; flex-shrink: 0; color: var(--ink); }
.dd-brand-text { font-size: 18px; font-weight: 550; letter-spacing: -.045em; white-space: nowrap; }
.dd-brand-text span { color: var(--teal); }
.dd-mark-stack { position: relative; flex: 0 0 48px; width: 48px; height: 38px; display: block; }
.dd-brand-mark { display: block; width: 48px; height: 38px; max-width: none; object-fit: contain; }
.dd-mark-stack .dd-brand-mark { position: absolute; top: 0; left: 0; }
.dd-dark-only { display: none !important; }
html[data-theme="dark"] .dd-dark-only { display: block !important; }
html[data-theme="dark"] .dd-light-only { display: none !important; }
.dd-navigation { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.dd-navigation .nav { margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(10px,1.6vw,25px); list-style: none; }
.dd-navigation .nav a { color: var(--body); display: block; font-size: 13px; font-weight: 570; transition: color .2s; white-space: nowrap; }
.dd-navigation .nav a:hover, .dd-navigation .nav-current a { color: var(--teal); }
.dd-header-tools { display: flex; gap: 6px; align-items: center; margin-left: 11px; }
.dd-icon-button { border: 0; background: transparent; color: var(--body); width: 38px; height: 38px; display: inline-flex; justify-content: center; align-items: center; border-radius: 10px; }
.dd-icon-button:hover { background: var(--teal-tint); color: var(--teal); }
.dd-menu-toggle { display: none; flex-direction: column; gap: 5px; }
.dd-menu-toggle span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
/* buttons */
.dd-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dd-button { display: inline-flex; align-items: center; justify-content: center; gap: 25px; padding: 12px 20px; min-height: 47px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; font-size: 13px; transition: transform .2s, background .2s, border-color .2s; }
.dd-button:hover { transform: translateY(-2px); }
.dd-button-primary { color: #ffffff; background: #07595d; border-color: #07595d; }
.dd-button-primary:hover { background: #08747a; }
.dd-button-outline { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.dd-button-outline:hover { border-color: var(--teal); background: var(--teal-tint); }
.dd-text-link { font-size: 13px; color: var(--teal); font-weight: 680; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dd-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Hero */
.dd-hero { position: relative; display: grid; grid-template-columns: 52% 48%; min-height: 585px; align-items: center; padding-block: 75px 95px; }
.dd-hero-copy { position: relative; z-index: 2; }
.dd-hero h1 { font-size: clamp(49px,5vw,80px); line-height: 1.065; letter-spacing: -.072em; margin: 0 0 23px; }
.dd-hero-role { font-weight: 650; color: var(--ink); font-size: 15px; margin: 0 0 20px; }
.dd-bullet { color: var(--teal); margin-inline: 5px; }
.dd-hero-copy .dd-lead { max-width: 510px; font-size: 15px; margin-bottom: 30px; }
.dd-hero-proof { color: var(--muted); margin-top: 45px; font-size: 10px; font-weight: 730; letter-spacing: .17em; display: flex; gap: 10px; align-items: center; }
.dd-dot { background: var(--teal); width: 7px; height: 7px; border-radius: 50%; }
.dd-hero-art { position: relative; height: 440px; display: flex; align-items: center; justify-content: center; isolation: isolate; }
.dd-hero-art::before { content: ""; position: absolute; inset: 8% 0 3% 12%; background: radial-gradient(circle at center, color-mix(in srgb, var(--teal) 9%, transparent), transparent 68%); z-index: -3; }
.dd-art-orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; z-index: -2; }
.dd-art-orbit-one { width: 378px; height: 378px; }
.dd-art-orbit-two { width: 275px; height: 275px; border-style: dashed; opacity: .7; }
.dd-hero-symbol { width: 220px; transform: translate(0px,-52px); filter: drop-shadow(0 17px 25px rgba(7,89,93,.1)); }
.dd-hero-symbol img { display: block; }
.dd-terminal { position: absolute; width: min(78%,365px); right: 0; bottom: -17px; border-radius: 11px; border: 1px solid #36555a; background: var(--terminal); color: var(--terminal-text); box-shadow: 0 20px 40px rgba(3,16,18,.22); overflow: hidden; }
.dd-terminal-bar { height: 37px; display: flex; align-items: center; padding: 0 14px; gap: 5px; border-bottom: 1px solid #355054; }
.dd-terminal-bar span { width: 7px; height: 7px; border-radius: 100%; background: #ec8179; }
.dd-terminal-bar span:nth-child(2) { background: #d7bb76; }
.dd-terminal-bar span:nth-child(3) { background: #65bb9a; }
.dd-terminal-bar small { margin-left: auto; font-size: 10px; color: #91aba9; }
.dd-terminal-content { padding: 20px 22px 17px; font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dd-terminal-content p { margin: 0 0 3px; }
.dd-terminal-content p:first-child { margin-bottom: 10px; }
.dd-terminal-content b { color: #5fddd3; }
.dd-terminal-content span { color: #60d2b6; margin-right: 6px; }
.dd-terminal-content small { color: #799c9b; float: right; }
.dd-cursor { display: inline-block; width: 6px; height: 13px; background: #50c9bd; vertical-align: middle; opacity: .8; }
.dd-art-label { position: absolute; right: -20px; top: 4px; font-size: 9px; color: var(--muted); letter-spacing: .24em; writing-mode: vertical-rl; }
/* Expertise row */
.dd-advantages { background: var(--surface-soft); border-block: 1px solid var(--line); }
.dd-advantages-grid { display: grid; grid-template-columns: repeat(4,1fr); padding-block: 28px; }
.dd-advantages-grid > div { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0px 12px; padding: 5px 22px; border-right: 1px solid var(--line); }
.dd-advantages-grid > div:first-child { padding-left: 0; }
.dd-advantages-grid > div:last-child { border: 0; }
.dd-adv-icon { grid-row: 1 / span 2; font-size: 24px; color: var(--teal); line-height: 1.1; }
.dd-advantages-grid strong { font-size: 12px; color: var(--ink); }
.dd-advantages-grid small { font-size: 11px; color: var(--muted); line-height: 1.4; }
/* Sections / projects */
.dd-section { padding-block: 94px 96px; }
.dd-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 30px; }
.dd-section-heading .dd-eyebrow { margin-bottom: 6px; }
.dd-section-heading h2, .dd-next-reading h2 { font-size: clamp(29px, 3.3vw, 43px); line-height: 1.15; margin: 0; }
.dd-project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.dd-project-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 270px; padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: border .25s,transform .25s; }
.dd-project-card:hover { border-color: var(--teal); transform: translateY(-4px); }
.dd-project-top { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.dd-project-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 12px; background: var(--teal-tint); color: var(--teal); }
.dd-project-no, .dd-project-bottom { color: var(--muted); font-size: 10px; letter-spacing: .1em; font-weight: 650; }
.dd-project-card h3 { font-size: 22px; line-height: 1.15; margin-bottom: 10px; }
.dd-project-card h3 a:hover { color: var(--teal); }
.dd-project-card > p { font-size: 13px; line-height: 1.68; color: var(--body); margin-bottom: 23px; }
.dd-project-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.dd-project-bottom a { font-size: 23px; color: var(--teal); line-height: 1; }
/* Journal cards */
.dd-journal-zone { background: var(--surface-soft); border-block: 1px solid var(--line); }
.dd-post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 23px; }
.dd-post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 0; transition: transform .2s, border-color .2s; }
.dd-post-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.dd-card-image { display: block; position: relative; aspect-ratio: 16/9; background: var(--surface-soft); overflow: hidden; }
.dd-card-image > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.dd-post-card:hover .dd-card-image > img { transform: scale(1.03); }
.dd-no-image { display:grid; place-items:center; background: radial-gradient(circle at 75% 0%,var(--teal-tint),transparent 65%),var(--surface-soft); }
.dd-no-image img { opacity: .85; }
/* Admin's Drawer: true code-themed fallbacks on posts lacking feature images.
   CSS selects the tag via {{post_class}} -> tag-admins-drawer (Ghost documented behavior).
   The archive class is a backup for the specific tag page.
   Both fallback layers occupy the FULL image box (position:absolute/inset:0),
   avoiding unresolved percentage heights inside the aspect-ratio container. */
.dd-card-image > .dd-code-fallback,
.dd-card-image > .dd-no-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dd-code-fallback {
  display: none;
  background-color: #10232a;
  background-image: url("../images/code-terminal.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  transition: transform .35s ease;
}
/* Project posts and archive: use artwork, not the CD monogram fallback. */
.dd-post-card.tag-admins-drawer .dd-no-image,
.dd-archive-admins-drawer .dd-post-card .dd-no-image { display: none; }
.dd-post-card.tag-admins-drawer .dd-code-fallback,
.dd-archive-admins-drawer .dd-post-card .dd-code-fallback { display: block; }
.dd-post-card:hover .dd-code-fallback { transform: scale(1.035); }
.dd-post-grid > .dd-post-card:nth-child(4n + 2) .dd-code-fallback { background-image: url("../images/code-editor.svg"); }
.dd-post-grid > .dd-post-card:nth-child(4n + 3) .dd-code-fallback { background-image: url("../images/code-automation.svg"); }
.dd-post-grid > .dd-post-card:nth-child(4n + 4) .dd-code-fallback { background-image: url("../images/code-infra.svg"); }

.dd-card-body { display: flex; flex-direction: column; padding: 21px 23px 18px; min-height: 222px; flex: 1; }
.dd-card-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 10px; color: var(--muted); align-items: center; margin-bottom: 10px; }
.dd-card-meta a { color: var(--teal); font-weight: 690; }
.dd-card-body h3 { font-size: 20px; line-height: 1.28; margin: 0 0 10px; }
.dd-card-body h3 a:hover { color: var(--teal); }
.dd-card-body > p { color: var(--body); font-size: 12px; line-height: 1.65; margin-bottom: 17px; }
.dd-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: 11px; color: var(--muted); }
.dd-card-arrow { font-size: 22px; color: var(--teal); line-height: 1; }
.dd-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 48px auto 0; max-width: 460px; font-size: 12px; }
.dd-page-count { color: var(--muted); }
.dd-page-link { border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 16px; color: var(--ink); font-weight: 600; }
.dd-page-link:hover { color: var(--teal); border-color: var(--teal); }
.dd-archive { padding-block: 75px 110px; }
.dd-archive-header { margin: 0 0 54px; max-width: 800px; }
.dd-archive-header h1 { font-size: clamp(43px, 6vw, 70px); margin: 0 0 10px; line-height: 1.15; }
.dd-archive-header .dd-lead { margin: 0; }
.dd-author-avatar { width: 86px; height: 86px; object-fit: cover; border-radius: 50%; margin-bottom: 15px; }
.dd-outro { padding-block: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dd-outro h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.13; margin: 0 0 15px; }
.dd-outro p:not(.dd-eyebrow) { margin: 0; font-size: 14px; }
/* Article / Ghost editor blocks */
.dd-article-wrap { max-width: 1080px; padding-block: 60px 105px; }
.dd-article { min-width: 0; }
.dd-article-header { max-width: 780px; margin: 0 auto 45px; }
.dd-post-breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 11px; color: var(--muted); margin-bottom: 25px; }
.dd-post-breadcrumb a:hover { color: var(--teal); }
.dd-article-header h1 { font-size: clamp(40px, 5.6vw, 67px); line-height: 1.12; margin: 0 0 22px; letter-spacing: -.055em; overflow-wrap: break-word; }
.dd-article-subtitle { font-size: clamp(17px,2.1vw,21px); line-height: 1.55; color: var(--muted); }
.dd-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.dd-article-cover { margin: 30px auto 48px; max-width: 1080px; }
.dd-article-cover img { width: 100%; height: auto; display: block; border-radius: 10px; }
.dd-article-cover figcaption, .kg-image-card figcaption, .kg-gallery-card figcaption { margin-top: 9px; text-align: center; font-size: 12px; color: var(--muted); }
.dd-content { max-width: 760px; margin-inline: auto; color: var(--body); font-size: 17px; line-height: 1.88; overflow-wrap: anywhere; }
.dd-content > * { margin-block: 0 1.55em; }
.dd-content h2,.dd-content h3,.dd-content h4 { color: var(--ink); margin: 1.8em 0 .65em; line-height: 1.25; }
.dd-content h2 { font-size: clamp(27px, 3vw, 37px); }
.dd-content h3 { font-size: 24px; }
.dd-content a:not(.kg-btn) { color: var(--teal); text-underline-offset: 3px; text-decoration: underline; text-decoration-color: color-mix(in srgb,var(--teal) 45%,transparent); }
.dd-content a:hover { text-decoration-color: var(--teal); }
.dd-content strong { color: var(--ink); }
.dd-content ul,.dd-content ol { padding-left: 1.5em; }
.dd-content li { padding-left: .25em; margin-bottom: .3em; }
.dd-content blockquote { margin: 1.7em 0; padding: .35em 1.4em; border-left: 3px solid var(--teal); font-size: 1.1em; color: var(--ink); background: var(--surface-soft); border-radius: 0 10px 10px 0; }
.dd-content hr { border: 0; height: 1px; background: var(--line); margin-block: 3em; }
.dd-content :not(pre) > code { color: var(--teal); background: var(--teal-tint); padding: .14em .35em; border-radius: 4px; font-size: .86em; }
.dd-content pre { position: relative; background: #13242b; color: #e0eeed; padding: 28px 24px; border-radius: 9px; font: 13px/1.75 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; overflow-x: auto; white-space: pre; }
.dd-content pre code { color: inherit; background: transparent; font: inherit; }
.dd-content .dd-code-copy { position: absolute; top: 8px; right: 9px; background: #274149; color: #e0eeed; border: 1px solid #3b5e64; border-radius: 5px; padding: 3px 9px; font-size: 10px; }
.dd-content .dd-code-copy:hover { background: #33575e; }
.dd-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 14px; }
.dd-content th,.dd-content td { border: 1px solid var(--line); padding: 9px 14px; text-align: left; }
.dd-content th { color: var(--ink); background: var(--surface-soft); }
.dd-content img { max-width: 100%; height: auto; }
.dd-content figure { margin-inline: 0; }
.dd-content .kg-width-wide { width: min(980px,calc(100vw - 65px)); max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
.dd-content .kg-width-full { width: 100vw; max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
.dd-content .kg-image { display: block; margin: 0 auto; }
.dd-content .kg-card { max-width: 100%; }
.dd-content .kg-bookmark-card { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.dd-content .kg-bookmark-container { display: flex; align-items: stretch; }
.dd-content .kg-bookmark-content { min-width: 0; padding: 17px; flex: 1; }
.dd-content .kg-bookmark-title { font-weight: 700; color: var(--ink); }
.dd-content .kg-bookmark-description { font-size: 13px; color: var(--muted); }
.dd-content .kg-bookmark-metadata { font-size: 11px; color: var(--muted); }
.dd-content .kg-bookmark-thumbnail { flex: 0 0 30%; max-height: 220px; object-fit: cover; }
.dd-content .kg-callout-card { border-radius: 9px; }
.dd-content .kg-button-card { text-align: center; }
.dd-content .kg-btn { display: inline-block; background: #07595d; color: #fff; border-radius: 7px; padding: 10px 22px; }
.dd-content .kg-gallery-container { display: flex; flex-direction: column; gap: 10px; }
.dd-content .kg-gallery-row { display: flex; flex-direction: row; gap: 10px; }
.dd-content .kg-gallery-image { flex: 1 1 0; min-width: 0; }
.dd-content .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.dd-content .kg-video-container, .dd-content .kg-embed-card { max-width: 100%; }
.dd-content iframe { max-width: 100%; }
.dd-article-footer { max-width: 760px; margin: 60px auto 0; padding-top: 23px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.dd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-tags a { background: var(--surface-soft); color: var(--teal); border: 1px solid var(--line); font-size: 11px; padding: 5px 10px; border-radius: 5px; }
.dd-share { display: flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: .15em; color: var(--muted); }
.dd-share-button { background: transparent; color: var(--teal); border: 0; font-size: 12px; letter-spacing: 0; font-weight: 690; }
.dd-comments { max-width: 760px; margin: 60px auto 0; }
.dd-comments h2 { font-size: 25px; }
.dd-next-reading { max-width: 760px; margin: 80px auto 0; padding-top: 35px; border-top: 1px solid var(--line); }
.dd-next-reading h2 { margin-bottom: 25px; }
/* Footer */
.dd-footer { background: var(--surface-soft); border-top: 1px solid var(--line); }
.dd-footer-main { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-block: 55px 38px; }
.dd-footer-brand { margin-bottom: 10px; }
.dd-footer-main p { font-size: 12px; color: var(--muted); margin: 0; }
.dd-footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; color: var(--body); }
.dd-footer-links a:hover { color: var(--teal); }
.dd-footer-bottom { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding-block: 18px; color: var(--muted); font-size: 10px; }
.dd-footer-bottom small { font-size: inherit; }
.dd-footer-bottom a { margin-left: auto; color: var(--teal); }
.dd-error { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 120px; min-height: 500px; }
.dd-error h1 { font-size: clamp(90px, 18vw, 190px); line-height: 1; margin: 0 0 15px; }
.dd-error p:not(.dd-eyebrow) { font-size: 18px; margin-bottom: 25px; }
/* Dark refined tweaks */
html[data-theme="dark"] .dd-hero-art::before { background: radial-gradient(circle at center,rgba(12,119,122,.16),transparent 65%); }
html[data-theme="dark"] .dd-hero-symbol { filter: drop-shadow(0 10px 32px rgba(31,192,188,.13)); }
html[data-theme="dark"] .dd-card-image { background: #132a30; }
/* 1.0.4 hero portrait — a human counterpoint to the technical terminal.
   All sizing stays inside the existing hero art container. */
.dd-hero-art-portrait { isolation: isolate; }
.dd-hero-portrait {
  position: absolute; left: 16%; top: 4%; margin: 0;
  width: 310px; z-index: 1;
}
.dd-portrait-frame {
  aspect-ratio: 1 / 1;
  position: relative; overflow: hidden; border-radius: 50%;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--teal) 36%, var(--line));
  background: linear-gradient(135deg, var(--surface) 0%, var(--teal-tint) 100%);
  box-shadow: 0 23px 55px -34px rgba(5,32,35,.63), 0 0 0 13px color-mix(in srgb, var(--teal) 5%, transparent);
}
.dd-portrait-frame::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; z-index: 1; pointer-events: none; }
.dd-portrait-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  border-radius: 50%; display: block;
  transform: scale(1.035);
}
.dd-portrait-tag {
  position: absolute; left: -14px; top: -17px; z-index: 4;
  padding: 8px 12px; border-radius: 5px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font: 700 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em; color: var(--ink); white-space: nowrap;
  box-shadow: var(--shadow);
}
.dd-portrait-tag span { color: var(--teal); }
.dd-hero-art-portrait .dd-terminal { z-index: 3; bottom: -14px; }
.dd-hero-art-portrait .dd-art-orbit-one { width: 402px; height: 402px; }
.dd-hero-art-portrait .dd-art-orbit-two { width: 336px; height: 336px; opacity: .48; }
html[data-theme="dark"] .dd-portrait-frame { box-shadow: 0 28px 58px -36px rgba(0,0,0,.9), 0 0 0 13px rgba(97,201,194,.045); }
@media (max-width: 1050px) and (min-width: 801px) {
  .dd-hero-art-portrait .dd-hero-portrait { left: 17%; }
}
@media (max-width: 800px) {
  .dd-hero-art-portrait { height: 400px; }
  .dd-hero-art-portrait .dd-hero-portrait { width: 268px; left: calc(50% - 150px); top: 0; }
  .dd-hero-art-portrait .dd-terminal { right: max(0px, 8%); bottom: 0; }
  .dd-hero-art-portrait .dd-art-orbit-one { width: 325px; height: 325px; }
  .dd-hero-art-portrait .dd-art-orbit-two { width: 250px; height: 250px; }
}
@media (max-width: 570px) {
  .dd-hero-art-portrait { height: 482px; }
  .dd-hero-art-portrait .dd-hero-portrait { width: 228px; top: 15px; left: calc(50% - 114px); }
  .dd-hero-art-portrait .dd-portrait-tag { left: -33px; top: -14px; font-size: 8px; }
  .dd-hero-art-portrait .dd-terminal { right: 0; bottom: 4px; width: min(93%, 330px); }
  .dd-hero-art-portrait .dd-art-orbit-one { width: 290px; height: 290px; top: -11px; left: 50%; transform: translateX(-50%); }
  .dd-hero-art-portrait .dd-art-orbit-two { width: 215px; height: 215px; top: 27px; left: 50%; transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 1050px) {
  .dd-header-inner { height: 76px; }
  .dd-brand-text { font-size: 16px; }
  .dd-navigation .nav { gap: 13px; }
  .dd-navigation .nav a { font-size: 12px; }
  .dd-hero { min-height: 540px; padding-block: 55px 70px; }
  .dd-hero-art { transform: scale(.85); transform-origin: center right; }
  .dd-advantages-grid > div { padding-inline: 12px; }
}
@media (max-width: 800px) {
  .dd-wrap { width: min(calc(100% - 40px), var(--container)); }
  .dd-menu-toggle { display: inline-flex; }
  .dd-header-inner { position: relative; }
  .dd-navigation { display: none; position: absolute; left: -20px; right: -20px; top: calc(100% + 1px); padding: 18px 20px 23px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(0,0,0,.07); }
  .dd-navigation.is-open { display: block; }
  .dd-navigation .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .dd-navigation .nav a { font-size: 15px; padding: 10px 0; }
  .dd-header-tools { margin-left: auto; }
  .dd-hero { grid-template-columns: 1fr; padding-block: 70px 50px; gap: 25px; }
  .dd-hero-copy .dd-lead { max-width: 660px; }
  .dd-hero-art { transform: none; height: 350px; }
  .dd-hero-symbol { width: 185px; transform: translate(-35px, -38px); }
  .dd-art-orbit-one { width: 300px; height: 300px; }
  .dd-art-orbit-two { width: 225px; height: 225px; }
  .dd-terminal { width: 320px; right: max(0px,10%); bottom: -10px; }
  .dd-art-label { right: 0; }
  .dd-advantages-grid { grid-template-columns: repeat(2,1fr); gap: 20px 0; }
  .dd-advantages-grid > div:nth-child(2) { border-right: 0; }
  .dd-advantages-grid > div:nth-child(3) { padding-left: 0; }
  .dd-project-grid,.dd-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dd-outro { flex-direction: column; align-items: start; }
  .dd-section { padding-block: 70px; }
}
@media (max-width: 570px) {
  .dd-wrap { width: min(calc(100% - 32px),var(--container)); }
  .dd-header-inner { height: 67px; gap: 9px; }
  .dd-brand-text { font-size: 16px; }
  .dd-mark-stack { transform: scale(.85); transform-origin: left center; flex-basis: 40px; width: 40px; }
  .dd-header-tools { gap: 0; }
  .dd-icon-button { width: 34px; }
  .dd-navigation { left: -16px; right: -16px; }
  .dd-hero { padding-block: 66px 37px; }
  .dd-hero h1 { font-size: clamp(43px, 10.5vw, 65px); }
  .dd-hero-role { font-size: 13px; }
  .dd-hero-copy .dd-lead { font-size: 14px; }
  .dd-hero-proof { margin-top: 30px; }
  .dd-hero-art { height: 330px; }
  .dd-terminal { right: 0; bottom: 0; width: min(98%, 330px); }
  .dd-hero-symbol { transform: translate(-20px,-50px); width: 160px; }
  .dd-art-orbit-one { width: 270px; height: 270px; }
  .dd-art-orbit-two { width: 185px; height: 185px; }
  .dd-advantages-grid { padding-block: 25px; gap: 23px 0; }
  .dd-advantages-grid > div { grid-template-columns: 1fr; gap: 6px; padding: 0 10px; }
  .dd-advantages-grid .dd-adv-icon { grid-row: auto; }
  .dd-advantages-grid strong { font-size: 11px; }
  .dd-advantages-grid small { font-size: 10px; }
  .dd-project-grid,.dd-post-grid { grid-template-columns: 1fr; }
  .dd-project-card { min-height: 225px; }
  .dd-section-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .dd-card-image { aspect-ratio: 16/8; }
  .dd-card-body { min-height: 180px; }
  .dd-outro { padding-block: 65px; }
  .dd-footer-main { flex-direction: column; align-items: flex-start; padding-block: 35px; }
  .dd-footer-bottom { flex-wrap: wrap; }
  .dd-footer-bottom small:nth-child(2) { display: none; }
  .dd-archive { padding-block: 55px 65px; }
  .dd-archive-header { margin-bottom: 35px; }
  .dd-article-wrap { width: min(calc(100% - 32px), 1080px); padding-block: 43px 75px; }
  .dd-article-header h1 { font-size: clamp(36px, 9vw, 52px); }
  .dd-content { font-size: 15.5px; line-height: 1.8; }
  .dd-content pre { padding: 28px 15px 17px; font-size: 11px; }
  .dd-article-cover { margin-bottom: 30px; }
  .dd-content .kg-width-wide { width: calc(100vw - 26px); }
  .dd-article-footer { flex-direction: column; }
}
/* Overrides after Casper base mobile rules: prevent its .dd-hero-art height
   from collapsing the portrait+terminal layout on small screens. */
@media (max-width: 800px) {
  .dd-hero-art.dd-hero-art-portrait { height: 425px; }
}
@media (max-width: 570px) {
  .dd-hero-art.dd-hero-art-portrait { height: 482px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Ghost page-editor support: pages can hide their title and feature image. */
.dd-page-no-header > .dd-content { margin-top: 0; }
.dd-article-wrap:has(.dd-page-no-header > .dd-content > .kg-width-full:first-child) { padding-top: 0; }


/* Casper DD 1.0.9 -- seasonal drone photography behind home hero and expertise.
   Background photos are original user photographs, not generated images.
   The image is selected by real Rzeszow sunrise/sunset, not by theme colors. */
.dd-season-stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--bg);
  --dd-scene-align: center 50%;
}
.dd-season-background {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}
.dd-season-photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: var(--dd-scene-align);
  background-repeat: no-repeat;
  will-change: opacity;
  transform: translateZ(0);
  transition: opacity 1.35s ease;
}
.dd-season-photo.is-visible { opacity: 1; }
.dd-season-veil {
  position: absolute;
  inset: 0;
  /* Large readable left area; landscape remains visible on right. */
  background:
    linear-gradient(90deg, rgba(251,252,251,.97) 0%, rgba(251,252,251,.90) 32%, rgba(251,252,251,.47) 61%, rgba(251,252,251,.14) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(251,252,251,.18) 25%, transparent 58%);
  transition: background .2s ease;
}
html[data-theme="dark"] .dd-season-veil {
  background:
    linear-gradient(90deg, rgba(12,22,26,.99) 0%, rgba(12,22,26,.94) 27%, rgba(12,22,26,.72) 51%, rgba(12,22,26,.32) 79%, rgba(12,22,26,.28) 100%),
    linear-gradient(0deg, #0c161a 0%, rgba(12,22,26,.27) 32%, transparent 64%);
}
/* When it is after sunset, image and gradient combine for a blue-hour mood. */
.dd-season-stage[data-dd-period="night"] .dd-season-photo {
  filter: brightness(.71) saturate(.69) hue-rotate(5deg) contrast(1.07);
}
html[data-theme="dark"] .dd-season-stage[data-dd-period="night"] .dd-season-photo {
  filter: brightness(.52) saturate(.66) hue-rotate(7deg) contrast(1.11);
}
.dd-season-stage[data-dd-period="night"] .dd-season-veil {
  background:
    linear-gradient(90deg, rgba(251,252,251,.99) 0%, rgba(251,252,251,.94) 28%, rgba(247,249,250,.66) 56%, rgba(230,234,240,.37) 100%),
    linear-gradient(0deg, #fbfcfb 0%, rgba(251,252,251,.15) 35%, transparent 72%);
}
html[data-theme="dark"] .dd-season-stage[data-dd-period="night"] .dd-season-veil {
  background:
    linear-gradient(90deg, #0c161a 0%, rgba(12,22,26,.96) 29%, rgba(12,22,26,.71) 55%, rgba(7,21,29,.43) 100%),
    linear-gradient(0deg, #0c161a 0%, rgba(12,22,26,.24) 30%, transparent 66%);
}
/* Fine-tuned framing for aerial imagery with different aspect ratios. */
.dd-season-stage[data-dd-season="spring"] { --dd-scene-align: center 47%; }
.dd-season-stage[data-dd-season="summer"] { --dd-scene-align: center 51%; }
.dd-season-stage[data-dd-season="autumn"] { --dd-scene-align: center 44%; }
.dd-season-stage[data-dd-season="winter"] { --dd-scene-align: center 52%; }
/* The previous boxed expertise strip becomes four translucent technical tiles. */
.dd-season-stage .dd-advantages {
  position: relative;
  background: transparent;
  border-block-color: color-mix(in srgb,var(--line) 76%, transparent);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.dd-season-stage .dd-advantages-grid { gap: 12px; padding-block: 17px; }
.dd-season-stage .dd-advantages-grid > div {
  position: relative;
  border: 1px solid color-mix(in srgb,var(--line-strong) 65%,transparent);
  background: color-mix(in srgb,var(--surface) 83%,transparent);
  border-radius: 12px;
  padding: 15px 16px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px -27px rgba(0,0,0,.38);
}
html[data-theme="dark"] .dd-season-stage .dd-advantages-grid > div {
  background: rgba(15,34,41,.86);
  border-color: rgba(114,170,177,.29);
}
.dd-season-stage .dd-advantages-grid > div:first-child { padding-left:16px; }
.dd-season-stage .dd-advantages-grid > div:last-child { border: 1px solid color-mix(in srgb,var(--line-strong) 65%,transparent); }
html[data-theme="dark"] .dd-season-stage .dd-advantages-grid > div:last-child { border-color:rgba(114,170,177,.29); }
/* Atmospheric photos should not compete with the content on a narrow phone. */
@media (max-width:800px) {
  .dd-season-photo { background-position: 64% 50%; }
  .dd-season-stage .dd-advantages-grid { gap:10px; }
  .dd-season-stage .dd-advantages-grid > div { padding:14px; }
  .dd-season-veil {
    background:linear-gradient(180deg,rgba(251,252,251,.9) 0%,rgba(251,252,251,.87) 48%,rgba(251,252,251,.59) 79%,var(--bg) 100%);
  }
  html[data-theme="dark"] .dd-season-veil {
    background:linear-gradient(180deg,rgba(12,22,26,.93) 0%,rgba(12,22,26,.82) 57%,rgba(12,22,26,.68) 85%,var(--bg) 100%);
  }
}
@media (max-width:570px) {
  .dd-season-stage .dd-advantages-grid > div {padding:13px 11px; min-height:92px;}
  .dd-season-stage .dd-advantages-grid > div:first-child {padding-left:11px;}
  .dd-season-stage .dd-advantages-grid > div .dd-adv-icon {font-size:20px;}
  .dd-season-stage .dd-advantages-grid strong {font-size:11px;}
  .dd-season-stage .dd-advantages-grid small {font-size:10px;}
}
@media (prefers-reduced-motion:reduce) {
  .dd-season-photo {transition-duration:0s !important;}
}


/* Casper DD 1.0.11 — shared, restrained seasonal photography on secondary pages.
   Backdrop is full-bleed; all Ghost content remains in its original constrained wrap.
   No image sits behind article body or cards. The scene fades entirely into --bg.
   Relative opacity is intentionally lower than on the homepage. */
.dd-season-subpage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  --dd-subpage-image-strength: .46;
  --dd-subpage-scene-height: 490px;
}
.dd-season-subpage > .dd-season-subpage-stage {
  position: absolute;
  inset: 0 0 auto;
  height: var(--dd-subpage-scene-height);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}
.dd-season-subpage > .dd-wrap {
  position: relative;
  z-index: 1;
}
/* Specific sections have their own contrast level — Mavic is more photographic. */
.dd-season-category-admins { --dd-subpage-image-strength: .43; }
.dd-season-category-personal { --dd-subpage-image-strength: .53; }
.dd-season-category-mavic { --dd-subpage-image-strength: .72; }
.dd-season-category-journal { --dd-subpage-image-strength: .39; }
.dd-season-category-author { --dd-subpage-image-strength: .38; }
.dd-season-post-page { --dd-subpage-image-strength: .26; --dd-subpage-scene-height: 450px; }
.dd-season-static-page { --dd-subpage-image-strength: .23; --dd-subpage-scene-height: 425px; }
.dd-season-subpage-stage .dd-season-photo.is-visible {
  opacity: var(--dd-subpage-image-strength);
}
/* Keep the scene lighter on a bright theme and always fade to a solid surface. */
.dd-season-subpage-stage .dd-season-veil,
.dd-season-subpage-stage[data-dd-period="night"] .dd-season-veil {
  background:
    linear-gradient(90deg, rgba(251,252,251,.56) 0%, rgba(251,252,251,.30) 55%, rgba(251,252,251,.14) 100%),
    linear-gradient(180deg, rgba(251,252,251,.16) 0%, rgba(251,252,251,.38) 41%, rgba(251,252,251,.87) 77%, #fbfcfb 99%);
}
html[data-theme="dark"] .dd-season-subpage-stage .dd-season-veil,
html[data-theme="dark"] .dd-season-subpage-stage[data-dd-period="night"] .dd-season-veil {
  background:
    linear-gradient(90deg, rgba(12,22,26,.68) 0%, rgba(12,22,26,.38) 55%, rgba(12,22,26,.27) 100%),
    linear-gradient(180deg, rgba(12,22,26,.25) 0%, rgba(12,22,26,.42) 43%, rgba(12,22,26,.92) 78%, #0c161a 99%);
}
/* Archives retain the existing grid, footer, pagination, and real post thumbnails. */
.dd-season-archive-page .dd-archive {
  padding-top: 79px;
}
.dd-season-archive-page .dd-archive-header {
  min-height: 228px;
  margin-bottom: 43px;
}
.dd-season-archive-page .dd-post-grid,
.dd-season-archive-page .dd-pagination {
  position: relative;
}
/* Single posts: constrain photography to heading; restore solid article background. */
.dd-season-post-page .dd-article-header {
  min-height: 276px;
}
.dd-season-article-page .dd-article-cover,
.dd-season-article-page .dd-content,
.dd-season-article-page .dd-article-footer,
.dd-season-article-page .dd-comments,
.dd-season-article-page .dd-next-reading {
  position: relative;
}
.dd-season-static-page .dd-article-header {
  min-height: 242px;
}
/* If Ghost Page Editor hides title and feature photo, suppress seasonal artwork.
   This preserves existing landing pages and custom full-width layouts. */
.dd-season-no-page-header .dd-season-subpage-stage { display: none; }
.dd-season-no-page-header .dd-article-wrap {
  padding-top: 43px;
}
@media (max-width: 800px) {
  .dd-season-subpage {
    --dd-subpage-scene-height: 445px;
  }
  .dd-season-archive-page .dd-archive {
    padding-top: 62px;
  }
  .dd-season-archive-page .dd-archive-header {
    min-height: 206px;
    margin-bottom: 35px;
  }
  .dd-season-subpage-stage .dd-season-photo {
    background-position: 58% 50%;
  }
  .dd-season-subpage-stage .dd-season-veil,
  .dd-season-subpage-stage[data-dd-period="night"] .dd-season-veil {
    background: linear-gradient(180deg, rgba(251,252,251,.48) 0%, rgba(251,252,251,.61) 44%, rgba(251,252,251,.93) 78%, #fbfcfb 99%);
  }
  html[data-theme="dark"] .dd-season-subpage-stage .dd-season-veil,
  html[data-theme="dark"] .dd-season-subpage-stage[data-dd-period="night"] .dd-season-veil {
    background: linear-gradient(180deg, rgba(12,22,26,.50) 0%, rgba(12,22,26,.67) 43%, rgba(12,22,26,.95) 78%, #0c161a 99%);
  }
  .dd-season-post-page .dd-article-header { min-height: 250px; }
  .dd-season-static-page .dd-article-header { min-height: 210px; }
}
@media (max-width: 570px) {
  .dd-season-subpage { --dd-subpage-scene-height: 405px; }
  .dd-season-archive-page .dd-archive { padding-top: 48px; }
  .dd-season-archive-page .dd-archive-header { min-height: 175px; margin-bottom: 30px; }
  .dd-season-archive-page .dd-archive-header h1 { font-size: clamp(40px, 10vw, 55px); }
  .dd-season-post-page .dd-article-header { min-height: 220px; }
  .dd-season-static-page .dd-article-header { min-height: 190px; }
  /* Ensure text and cards remain readable over strong cloud highlights. */
  .dd-season-subpage-stage .dd-season-photo.is-visible {
    opacity: calc(var(--dd-subpage-image-strength) * .78);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dd-season-subpage-stage .dd-season-photo { transition: none; }
}
