@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #111417;
  --bg-nav: #0a0b0c;
  --surface: #161a1e;
  --surface-hover: #1a2024;
  --surface-sunken: #131518;
  --ink: #0c0d0f;
  --text: #edeeef;
  --strong: #f4f5f6;
  --lead: #d6d8db;
  --body: #c4c7cb;
  --muted: #9a9da1;
  --dim: #8a8d92;
  --faint: #62656a;
  --footer: #b6b9bd;
  --accent: #8fe3a2;
  --accent-hover: #a4e9b3;
  --cyan: #79cfec;
  --cyan-hover: #93d9ef;
  --button: #4ea368;
  --button-hover: #3d8a54;
  --button-cyan: #3f9fc1;
  --button-cyan-hover: #2f8aa8;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --layout-wide: 1600px;
  --layout-media: 1360px;
  --layout-reading: 780px;
  --layout-legal: 820px;
  --layout-gutter-total: clamp(40px, 6vw, 128px);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

.hardware-page ::selection {
  background: var(--cyan);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure,
p,
h1,
h2,
h3,
h4,
ul,
ol {
  margin-top: 0;
}

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

button,
input,
textarea {
  font: inherit;
}

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

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
  position: fixed !important;
  z-index: 1000;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 16px;
  margin: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-nav);
}

.admin-bar .site-header {
  top: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  max-width: 1664px;
  padding: 10px 32px;
  margin: 0 auto;
}

.site-logo {
  display: inline-flex;
  flex: none;
  align-items: center;
}

.site-logo-image {
  width: auto;
  height: 22px;
  object-fit: contain;
}

.site-logo-text {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
}

.site-logo-text span {
  color: var(--accent);
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 34px;
}

.primary-menu .menu {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a,
.primary-menu .current-menu-ancestor > a {
  color: var(--text);
}

.primary-menu .contact-nav-link {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
}

.primary-menu .contact-nav-link:hover {
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle > span:not(.screen-reader-text) {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: 5px 0;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] > span:nth-of-type(2) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] > span:nth-of-type(3) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] > span:nth-of-type(4) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.menu-backdrop {
  position: fixed;
  z-index: 90;
  inset: 68px 0 0;
  display: none;
  border: 0;
  background: rgba(0, 0, 0, 0.44);
}

.site-main {
  min-height: 65vh;
  padding-top: 68px;
}

/* Shared layout */
.content-shell,
.front-page-content > .wp-block-group,
.page-content > .wp-block-group,
.section-block {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-wide));
  margin-right: auto;
  margin-left: auto;
}

.front-page-content > .wp-block-group.alignfull,
.page-content > .wp-block-group.alignfull {
  width: 100%;
  max-width: none;
}

.page-content > :first-child,
.front-page-content > :first-child {
  margin-top: 0;
}

.section-block,
.section-block.wp-block-group {
  padding-top: 64px;
  padding-bottom: 64px;
  border-top: 1px solid var(--line);
}

.content-shell > .section-block {
  width: 100%;
}

/* WordPress constrains every direct child of a Group block to contentSize.
 * Site sections deliberately use the wider shell; readable prose keeps its
 * own narrower limits further below. */
.content-shell.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.section-block.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.about-copy.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none;
}

.page-content > .wp-block-group.legal-page {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-legal));
}

.page-hero,
.blog-hero {
  padding-top: 88px;
  padding-bottom: 56px;
}

.page-hero.compact {
  padding-top: 72px;
}

.page-hero h1,
.blog-hero h1 {
  max-width: 900px;
  margin: 20px 0 24px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-hero > p,
.blog-hero > p,
.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 14.5px;
  line-height: 1.3;
}

.hardware-page .eyebrow,
.eyebrow-cyan {
  color: var(--cyan);
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.section-title {
  margin: 8px 0 0;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-heading > p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 15.5px;
}

.section-heading.center {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading.center > p {
  margin-right: auto;
  margin-left: auto;
}

.button,
.wp-element-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 26px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
  background: var(--button-hover);
}

.hardware-page .button,
.hardware-page .wp-element-button,
.hardware-page .wp-block-button__link {
  background: var(--button-cyan);
}

.hardware-page .button:hover,
.hardware-page .wp-element-button:hover,
.hardware-page .wp-block-button__link:hover {
  background: var(--button-cyan-hover);
}

.arrow-link {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
}

.arrow-link span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.arrow-link:hover span {
  transform: translateX(4px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.cta-row h2 {
  margin: 0 0 6px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.cta-row p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Homepage */
.home-hero,
.home-hero.wp-block-group {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: clamp(72px, 6vw, 112px);
  padding-top: 96px;
  padding-bottom: 88px;
  border-top: 0;
}

.home-hero-copy > p:first-child,
.home-kicker {
  margin-bottom: 26px;
  color: var(--accent);
  font-size: 14.5px;
}

.home-hero h1 {
  margin: 0 0 26px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.home-hero-copy > p:not(:first-child) {
  max-width: 680px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.home-hero .wp-block-buttons {
  align-items: center;
  gap: 24px;
}

.home-hero .cta-row {
  justify-content: flex-start;
  padding-top: 0;
  border-top: 0;
}

.home-hero .wp-block-button:nth-child(2) .wp-block-button__link {
  min-height: auto;
  padding: 8px 0;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}

.home-hero .wp-block-button:nth-child(2) .wp-block-button__link:hover {
  color: var(--accent);
}

.home-hero .is-style-outline .wp-block-button__link {
  min-height: auto;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 500;
}

.home-profile,
.home-profile figure,
.home-profile .wp-block-image {
  width: 100%;
  margin: 0;
}

.home-profile img {
  width: 100%;
  height: clamp(380px, 25vw, 480px);
  border-radius: 10px;
  object-fit: cover;
}

.about-grid,
.contact-grid,
.setup-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(56px, 6vw, 104px);
}

.about-grid h2,
.setup-grid h2 {
  margin: 8px 0 0;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.about-copy {
  max-width: 860px;
}

.about-copy p:first-child {
  margin-bottom: 18px;
  color: var(--body);
  font-size: 18px;
  line-height: 1.75;
}

.about-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.technology-card {
  padding: 32px 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.technology-card:hover {
  transform: translateY(-5px);
  border-color: rgba(143, 227, 162, 0.4);
  background: var(--surface-hover);
}

.technology-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 4px;
  margin: 0 auto 18px;
  border-radius: 12px;
  background: #0f1214;
}

.technology-logo img,
.elementor-page .technology-logo > img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.technology-card h3 {
  margin: 0 0 6px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.technology-copy,
.technology-copy p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.6;
}

.contact-section,
.contact-section.wp-block-group {
  padding-top: 80px;
  padding-bottom: 96px;
}

.contact-grid {
  grid-template-columns: 1fr 1fr;
  gap: clamp(64px, 7vw, 120px);
}

.contact-copy h2 {
  margin: 8px 0 20px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.contact-copy > p {
  max-width: 480px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-details a {
  color: var(--text);
  font-size: 16px;
  transition: color 0.2s ease;
}

.contact-details a:hover {
  color: var(--accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form label:not(.contact-honeypot) {
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--faint);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 116px;
  resize: vertical;
}

.contact-form .button {
  align-self: flex-start;
  margin-top: 8px;
}

.contact-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-privacy {
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.5;
}

.form-privacy a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-status {
  margin: 0;
  font-size: 14px;
}

.form-status-success {
  color: var(--accent);
}

.form-status-error {
  color: #f0a3a3;
}

/* Projects, certificates, hardware */
.project-grid,
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

.project-card {
  min-width: 0;
}

.project-media {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--surface-sunken);
}

.project-media img,
.elementor-page .project-media > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.02);
}

.project-card h2 {
  margin: 0 0 10px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.project-card h2 span {
  display: inline-block;
  color: var(--accent);
  font-size: 15px;
  transition: transform 0.2s ease;
}

.project-card:hover h2 span {
  transform: translate(3px, -3px);
}

.project-card p,
.certificate-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.certificate-grid {
  gap: 48px 40px;
}

.certificate-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-sunken);
}

.certificate-media img,
.elementor-page .certificate-media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.certificate-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.certificate-title h2 {
  margin: 0;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.certificate-title span {
  flex: none;
  color: var(--faint);
  font-size: 14px;
}

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

.hardware-gallery figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin: 0;
  border-radius: 8px;
  background: var(--surface-sunken);
}

.hardware-gallery img,
.elementor-page .hardware-gallery figure > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hardware-gallery figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 7px 10px;
  border-radius: 5px;
  background: rgba(10, 11, 12, 0.78);
  color: var(--footer);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hardware-gallery figure:hover figcaption,
.hardware-gallery figure:focus-within figcaption {
  opacity: 1;
}

.hardware-spec {
  width: 100%;
}

.hardware-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.hardware-row:last-child {
  border-bottom: 1px solid var(--line);
}

.hardware-row strong {
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.hardware-row span {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.proxmox-section {
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.proxmox-section .setup-grid > div:first-child > p {
  margin-top: 12px;
  color: var(--faint);
  font-size: 13.5px;
}

.proxmox-panels {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.proxmox-panel {
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 26, 30, 0.55);
}

.proxmox-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.proxmox-panel h3 {
  margin: 0;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}

.proxmox-panel header p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.proxmox-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 13px;
}

.proxmox-status i,
.proxmox-node i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--cyan);
}

.proxmox-status.offline,
.proxmox-error {
  color: #ef8a7f;
}

.proxmox-status.stale,
.proxmox-warning {
  color: #e6bd6a;
}

.proxmox-status.offline i,
.proxmox-node i.offline {
  background: #ef8a7f;
}

.proxmox-status.stale i {
  background: #e6bd6a;
}

.proxmox-error,
.proxmox-warning {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.proxmox-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
}

.proxmox-summary strong {
  margin-left: 6px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 16px;
}

.proxmox-node {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(110px, 1fr));
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.proxmox-node:first-child {
  border-top: 0;
}

.proxmox-node > div > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 15px;
}

.proxmox-node small {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--dim);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxmox-node > span {
  color: var(--faint);
  font-size: 12px;
}

.proxmox-node > span strong {
  display: block;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

.proxmox-updated,
.proxmox-refresh-state {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 11.5px;
}

.proxmox-refresh-state[data-state="error"] {
  color: #ef8a7f;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--surface-sunken);
  color: var(--faint);
  font-size: 13px;
}

/* Blog cards and index */
.blog-search {
  display: flex;
  max-width: 440px;
  gap: 8px;
  margin-top: 32px;
}

.blog-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
}

.blog-search input:focus {
  border-color: var(--accent);
}

.blog-search button {
  flex: none;
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.blog-listing,
.archive-shell {
  padding-top: 24px;
  padding-bottom: 96px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 227, 162, 0.3);
  background: var(--surface-hover);
}

.post-card-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-sunken);
}

.post-card-media img,
.elementor-page .post-card-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-media img {
  transform: scale(1.025);
}

.post-card-content {
  padding: 22px;
}

.post-card-content h2 {
  margin: 10px 0 10px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.post-card-content h2 a:hover {
  color: var(--accent);
}

.post-card-content > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 14px;
  color: var(--faint);
  font-size: 12.5px;
}

.post-card-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  margin-bottom: 32px;
}

.post-card-featured .post-card-media {
  height: 100%;
  min-height: 330px;
  aspect-ratio: auto;
}

.post-card-featured .post-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.post-card-featured .post-card-content h2 {
  font-size: 28px;
}

.navigation.pagination {
  margin-top: 48px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links .page-numbers {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}

.nav-links .current,
.nav-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.archive-description,
.empty-state {
  color: var(--muted);
}

/* Single post */
.post-header {
  width: min(calc(100% - var(--layout-gutter-total)), 900px);
  padding-top: 64px;
  padding-bottom: 40px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 14.5px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--text);
  transform: translateX(-3px);
}

.post-header h1 {
  margin: 20px 0 28px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--faint);
  font-size: 14.5px;
}

.post-meta > span:first-child {
  color: var(--muted);
}

.post-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3a3d42;
}

.post-hero {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-media));
  height: clamp(480px, 34vw, 620px);
  overflow: hidden;
  margin: 0 auto 56px;
  border-radius: 10px;
  background: var(--surface-sunken);
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-disclosure {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-reading));
  padding: 16px 20px;
  margin: 0 auto 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.post-disclosure p {
  margin: 0;
}

.post-disclosure p + p {
  margin-top: 10px;
}

.post-disclosure strong {
  color: var(--strong);
  font-weight: 500;
}

.prose,
.legal-page {
  color: var(--body);
  font-size: 18px;
  line-height: 1.8;
}

.post-content {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-reading));
  margin: 0 auto;
}

.prose > :first-child,
.legal-page .prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p,
.legal-page p {
  margin: 0 0 24px;
  color: var(--body);
  font-size: 18px;
  line-height: 1.8;
}

.prose > p:first-of-type {
  color: var(--lead);
  font-size: 21px;
  line-height: 1.7;
}

.prose h2,
.legal-page h2 {
  margin: 48px 0 18px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  scroll-margin-top: 96px;
}

.prose h3,
.legal-page h3 {
  margin: 36px 0 14px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  scroll-margin-top: 96px;
}

.prose h4 {
  margin: 28px 0 12px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.prose ul,
.prose ol,
.legal-page ul,
.legal-page ol {
  padding-left: 26px;
  margin: 0 0 24px;
}

.prose li,
.legal-page li {
  margin-bottom: 10px;
  color: var(--body);
  line-height: 1.7;
}

.prose li::marker,
.legal-page li::marker {
  color: var(--accent);
}

.prose a,
.legal-page a {
  color: var(--accent);
  border-bottom: 1px solid rgba(143, 227, 162, 0.35);
  transition: border-color 0.2s ease;
}

.prose a:hover,
.legal-page a:hover {
  border-bottom-color: var(--accent);
}

.prose strong,
.legal-page strong {
  color: var(--strong);
  font-weight: 600;
}

.prose blockquote {
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  border-left: 3px solid var(--accent);
  color: var(--lead);
}

.prose blockquote p {
  margin: 0;
  color: inherit;
  font-size: 19px;
}

.prose hr {
  height: 1px;
  margin: 42px 0;
  border: 0;
  background: var(--line);
}

.prose code,
.legal-page code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #20252a;
  color: #c7f0d1;
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.prose pre,
.prose [data-rehype-pretty-code-figure] pre {
  overflow-x: auto;
  padding: 20px;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1012;
  color: #d7dde3;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 2;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.prose [data-line] span {
  color: var(--shiki-dark, var(--shiki-light, inherit));
}

.prose figure:not([data-rehype-pretty-code-figure]),
.prose .wp-block-image {
  margin: 32px 0;
}

.prose img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.prose figcaption {
  margin-top: 8px;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

.prose table {
  width: 100%;
  margin: 30px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  text-align: left;
}

.prose th {
  background: var(--surface);
  color: var(--strong);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-reading));
  gap: 10px;
  padding-top: 24px;
  margin: 0 auto;
}

.post-tags a {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.post-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.author-card {
  display: flex;
  align-items: center;
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-reading));
  gap: 18px;
  padding: 30px 0;
  margin: 48px auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.author-avatar {
  display: grid;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-sunken);
}

.author-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.author-avatar-fallback {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.author-copy {
  min-width: 0;
}

.author-card .author-byline {
  margin: 0 0 4px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.35;
}

.author-byline strong {
  font-weight: 600;
}

.author-card .author-description {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.related-posts {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-media));
  padding: 64px 0 96px;
  margin: 0 auto;
}

/* Legal pages */
.legal-page {
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-legal));
  padding-top: 88px;
  padding-bottom: 96px;
  margin: 0 auto;
}

.legal-page > h1,
.legal-page > .wp-block-heading:first-child {
  margin: 0 0 12px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.legal-page > p:first-of-type {
  margin-bottom: 48px;
  color: var(--faint);
  font-size: 14.5px;
}

/* Error page */
.error-page {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  width: min(calc(100% - var(--layout-gutter-total)), var(--layout-media));
  min-height: 68vh;
  gap: 48px;
  padding: 80px 0;
  margin: 0 auto;
}

.error-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.error-code i {
  color: var(--faint);
  font-style: normal;
}

.error-copy h1 {
  margin: 0 0 20px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.error-copy > p {
  max-width: 560px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.error-actions > a:not(.button) {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.error-actions > a:not(.button):hover {
  color: var(--accent);
}

.cat {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.cat-body,
.cat-head,
.cat-ear,
.cat-paw {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #252c31;
}

.cat-body {
  inset: auto 12% 7%;
  height: 58%;
  border-radius: 42% 42% 36% 36%;
  background: #20262a;
}

.cat-head {
  top: 12%;
  left: 20%;
  width: 60%;
  height: 50%;
  border-radius: 44%;
}

.cat-ear {
  top: 7%;
  width: 22%;
  height: 21%;
}

.cat-ear.left {
  left: 24%;
  transform: rotate(-20deg);
  border-radius: 12% 80% 18% 80%;
}

.cat-ear.right {
  right: 24%;
  transform: rotate(20deg);
  border-radius: 80% 12% 80% 18%;
}

.cat-eyes {
  position: absolute;
  top: 32%;
  left: 33%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 54px 0 0 var(--accent);
}

.cat-nose {
  position: absolute;
  top: 40%;
  left: 49%;
  width: 16px;
  height: 12px;
  border-radius: 50%;
  background: #0b0d0f;
}

.cat-whisker {
  position: absolute;
  top: 46%;
  left: 30%;
  width: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.cat-whisker.two {
  top: 50%;
  transform: rotate(7deg);
}

.cat-paw {
  bottom: 17%;
  width: 15%;
  height: 13%;
  border: 0;
  border-radius: 45%;
  background: #181d20;
}

.cat-paw.left { left: 30%; }
.cat-paw.right { right: 30%; }

.cat-tail {
  position: absolute;
  top: 58%;
  right: 8%;
  width: 13%;
  height: 28%;
  transform: rotate(28deg);
  border-right: 14px solid rgba(143, 227, 162, 0.8);
  border-radius: 50%;
}

.cat code {
  position: absolute;
  bottom: 2%;
  left: 12%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: var(--surface);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Blog search */
.blog-search-page {
  width: min(calc(100% - var(--layout-gutter-total)), 900px);
  min-height: 62vh;
  padding: 88px 0 96px;
  margin: 0 auto;
}

.blog-search-page > .eyebrow {
  display: block;
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 14.5px;
}

.blog-search-page > h1 {
  margin: 0 0 28px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.blog-search-form {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.blog-search-form input {
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.blog-search-form input::placeholder { color: var(--faint); }
.blog-search-form input:focus { border-color: var(--accent); }

.blog-search-form button {
  flex: none;
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.blog-search-form button:hover { background: var(--button-hover); }

.search-summary {
  margin: 0 0 24px;
  color: var(--faint);
  font-size: 14px;
}

.blog-search-results { display: flex; flex-direction: column; }

.blog-search-result {
  display: block;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-search-result:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.blog-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 13px;
}

.blog-search-meta span { color: var(--accent); }

.blog-search-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3a3d42;
}

.blog-search-result h2 {
  margin: 0 0 6px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.blog-search-result:hover h2 { color: var(--accent); }

.blog-search-result p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-search-back {
  display: inline-block;
  margin-top: 48px;
  color: var(--muted);
  font-size: 14.5px;
}

.blog-search-back:hover { color: var(--text); }

/* Elementor page containers */
.elementor-page .elementor-widget:not(:last-child) {
  margin-block-end: 0;
}

.mo-e-page {
  width: 100%;
  max-width: none;
  background: var(--bg);
  color: var(--text);
}

.mo-e-section {
  border-top: 1px solid var(--line);
}

.mo-e-hero {
  border-top: 0;
}

.mo-e-eyebrow .elementor-heading-title {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.3;
}

.hardware-page .mo-e-eyebrow .elementor-heading-title {
  color: var(--cyan);
}

.mo-e-display-title .elementor-heading-title {
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.mo-e-page-title .elementor-heading-title {
  max-width: 980px;
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.mo-e-section-title .elementor-heading-title {
  color: var(--strong);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.mo-e-lead,
.mo-e-body {
  max-width: 760px;
}

.mo-e-lead .elementor-widget-container,
.mo-e-lead p {
  margin: 0;
  color: var(--lead);
  font-size: 18px;
  line-height: 1.75;
}

.mo-e-body .elementor-widget-container,
.mo-e-body p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.mo-e-body p:last-child,
.mo-e-lead p:last-child {
  margin-bottom: 0;
}

.mo-e-profile img,
.elementor-page .mo-e-profile img {
  width: 100%;
  height: clamp(380px, 27vw, 520px);
  border-radius: 12px;
  object-fit: cover;
}

.mo-e-buttons .elementor-widget-button {
  width: auto;
}

.mo-e-button .elementor-button {
  min-height: 46px;
  padding: 13px 26px;
  border-radius: 8px;
  background: var(--button);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.mo-e-button .elementor-button:hover {
  background: var(--button-hover);
  color: var(--ink);
}

.hardware-page .mo-e-button .elementor-button {
  background: var(--button-cyan);
}

.hardware-page .mo-e-button .elementor-button:hover {
  background: var(--button-cyan-hover);
}

.mo-e-button-link .elementor-button {
  padding: 10px 0;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}

.mo-e-button-link .elementor-button:hover {
  background: transparent;
  color: var(--accent);
}

.mo-e-shortcode,
.mo-e-shortcode > .elementor-widget-container {
  width: 100%;
}

.mo-e-legal .elementor-widget-container {
  color: var(--body);
  font-size: 18px;
  line-height: 1.8;
}

.mo-e-legal h1,
.mo-e-legal h2,
.mo-e-legal h3 {
  color: var(--strong);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.mo-e-legal h1 { font-size: clamp(32px, 4vw, 44px); }
.mo-e-legal h2 { margin: 48px 0 18px; font-size: 26px; }
.mo-e-legal h3 { margin: 36px 0 14px; font-size: 21px; }
.mo-e-legal p { margin: 0 0 24px; color: var(--body); }
.mo-e-legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.mo-e-search-inner {
  width: 100%;
}

@media (max-width: 860px) {
  .mo-e-profile img,
  .elementor-page .mo-e-profile img { height: 420px; }
}

@media (max-width: 560px) {
  .mo-e-display-title .elementor-heading-title { font-size: 38px; }
  .mo-e-page-title .elementor-heading-title { font-size: 34px; }
  .mo-e-profile img,
  .elementor-page .mo-e-profile img { height: 320px; }
  .mo-e-lead .elementor-widget-container, .mo-e-lead p { font-size: 17px; }
}

/* Footer */
.site-footer {
  padding: 64px 32px 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-nav);
}

.footer-main,
.footer-bottom {
  width: 100%;
  max-width: var(--layout-wide);
  margin: 0 auto;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .site-logo {
  margin-bottom: 18px;
}

.footer-brand .site-logo-image {
  height: 20px;
}

.footer-brand p {
  margin: 0;
  color: #7c7f84;
  font-size: 14.5px;
  line-height: 1.65;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 72px;
}

.footer-columns > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-columns h2 {
  margin: 0 0 4px;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
}

.footer-columns a,
.footer-columns span {
  color: var(--footer);
  font-size: 14.5px;
  transition: color 0.2s ease;
}

.footer-columns a:hover {
  color: var(--text);
}

.footer-columns span {
  color: var(--faint);
}

.footer-bottom {
  padding-top: 24px;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--faint);
  font-size: 13.5px;
}

/* Motion: content remains visible unless JS has initialized. */
@keyframes risein {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero-copy,
.home-profile,
.page-hero > *,
.blog-hero > * {
  animation: risein 0.6s ease both;
}

.has-js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .has-js .reveal { opacity: 1; transform: none; }
}

@media (min-width: 1400px) {
  .project-grid,
  .certificate-grid,
  .hardware-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .home-hero,
  .home-hero.wp-block-group,
  .about-grid,
  .contact-grid,
  .setup-grid,
  .error-page {
    grid-template-columns: 1fr;
  }

  .home-hero { gap: 48px; }
  .home-profile { max-width: 620px; }
  .technology-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card-featured { grid-template-columns: 1fr; }
  .post-card-featured .post-card-media { min-height: 300px; }
  .project-grid, .certificate-grid { grid-template-columns: 1fr; }
  .project-grid { gap: 56px; }
  .error-page { min-height: auto; }
}

@media (max-width: 680px) {
  .admin-bar .site-header { top: 46px; }
  #wpadminbar { position: fixed; }
  .site-nav { padding-right: 20px; padding-left: 20px; }
  .menu-toggle { display: block; }
  .primary-menu {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px;
    border-top: 1px solid var(--line);
    background: var(--bg-nav);
  }
  .primary-menu.open { display: flex; }
  .primary-menu .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-menu .menu li { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .primary-menu a { display: block; padding: 13px 0; }
  .primary-menu .contact-nav-link { border: 0; color: var(--accent); }
  .menu-backdrop.open { display: block; }
  .admin-bar .menu-backdrop { inset-block-start: 114px; }
  .hardware-gallery { grid-template-columns: 1fr; }
  .hardware-gallery figcaption { opacity: 1; }
  .post-hero { height: 360px; }
  .proxmox-node { grid-template-columns: 1fr; gap: 10px; }
  .footer-main { flex-direction: column; }
}

@media (max-width: 560px) {
  .content-shell,
  .front-page-content > .wp-block-group,
  .page-content > .wp-block-group,
  .section-block,
  .post-header,
  .post-hero,
  .post-content,
  .post-disclosure,
  .post-tags,
  .author-card,
  .related-posts,
  .legal-page,
  .error-page,
  .blog-search-page {
    width: min(100% - 40px, var(--layout-wide));
  }
  .home-hero, .home-hero.wp-block-group { padding-top: 64px; padding-bottom: 64px; }
  .home-profile img { height: 320px; }
  .section-block, .section-block.wp-block-group { padding-top: 52px; padding-bottom: 52px; }
  .page-hero, .blog-hero { padding-top: 64px; padding-bottom: 44px; }
  .technology-grid, .post-grid, .post-grid.two { grid-template-columns: 1fr; }
  .contact-fields-row { grid-template-columns: 1fr; }
  .contact-section, .contact-section.wp-block-group { padding-top: 60px; padding-bottom: 72px; }
  .hardware-row { grid-template-columns: 1fr; gap: 6px; }
  .post-card-featured .post-card-content { padding: 26px 22px; }
  .post-card-featured .post-card-content h2 { font-size: 22px; }
  .post-header { padding-top: 48px; }
  .post-hero { height: 280px; margin-bottom: 42px; }
  .prose, .prose p, .legal-page { font-size: 16.5px; }
  .prose > p:first-of-type { font-size: 18px; }
  .author-card { align-items: flex-start; }
  .certificate-title { flex-direction: column; gap: 3px; }
  .site-footer { padding-right: 20px; padding-left: 20px; }
  .footer-columns { width: 100%; gap: 36px 48px; }
  .blog-search { flex-direction: column; }
  .blog-search button { align-self: flex-start; }
}

/* Xpro Elementor Theme Builder: global header and footer. */
.xpro-theme-builder-header .mo-xpro-header {
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  width: 100%;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-nav);
  padding: 0 !important;
}

.admin-bar .xpro-theme-builder-header .mo-xpro-header {
  top: 32px;
}

.xpro-theme-builder-header .mo-xpro-header-inner {
  width: 100%;
  max-width: 1664px;
  margin-inline: auto;
}

.xpro-theme-builder-header .mo-xpro-header-inner > .e-con-inner {
  flex-wrap: nowrap;
}

.xpro-theme-builder-header .mo-xpro-site-logo,
#xpro-theme-builder-footer .mo-xpro-site-logo {
  flex: 0 0 auto;
  margin: 0;
}

.xpro-theme-builder-header .mo-xpro-site-logo .elementor-widget-container > a,
#xpro-theme-builder-footer .mo-xpro-site-logo .elementor-widget-container > a,
.xpro-theme-builder-header .mo-xpro-site-logo .xpro-site-logo,
#xpro-theme-builder-footer .mo-xpro-site-logo .xpro-site-logo {
  display: flex;
  align-items: center;
}

.xpro-theme-builder-header .mo-xpro-site-logo img,
#xpro-theme-builder-footer .mo-xpro-site-logo img {
  display: block;
  width: auto;
  max-width: min(42vw, 220px);
  object-fit: contain;
}

.xpro-theme-builder-header .mo-xpro-header-actions {
  --width: auto;
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
  width: auto;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 !important;
}

.xpro-theme-builder-header .mo-xpro-menu {
  flex: 0 1 auto;
  width: auto;
}

.xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav {
  flex-wrap: nowrap;
  gap: 34px;
}

.xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li > a {
  min-width: 0;
  padding: 10px 0;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li > a:hover,
.xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-item > a,
.xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li.current_page_item > a,
.xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-ancestor > a {
  color: var(--text);
}

.xpro-theme-builder-header .mo-xpro-menu a:focus-visible,
.xpro-theme-builder-header .mo-header-contact .elementor-button:focus-visible,
.xpro-theme-builder-header .xpro-elementor-horizontal-menu-toggler:focus-visible,
.xpro-theme-builder-header .xpro-elementor-horizontal-menu-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.xpro-theme-builder-header .mo-header-contact .elementor-button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.xpro-theme-builder-header .mo-header-contact .elementor-button:hover,
.xpro-theme-builder-header .mo-header-contact .elementor-button:focus-visible {
  border-bottom-color: var(--accent);
  background: transparent;
  color: var(--text);
}

#xpro-theme-builder-footer .mo-xpro-footer > .footer-main,
#xpro-theme-builder-footer .mo-xpro-footer > .footer-bottom {
  width: 100%;
  max-width: var(--layout-wide);
}

#xpro-theme-builder-footer .mo-xpro-footer > .footer-main {
  padding: 0;
}

#xpro-theme-builder-footer .footer-brand,
#xpro-theme-builder-footer .footer-columns,
#xpro-theme-builder-footer .mo-footer-column {
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
  padding: 0;
}

#xpro-theme-builder-footer .footer-columns {
  --width: auto;
  width: auto;
  flex: 0 1 auto;
}

#xpro-theme-builder-footer .footer-brand .mo-xpro-site-logo {
  margin-bottom: 0;
}

#xpro-theme-builder-footer .mo-footer-brand-copy .elementor-widget-container > :first-child,
#xpro-theme-builder-footer .mo-footer-title .elementor-heading-title {
  margin-top: 0;
}

#xpro-theme-builder-footer .mo-footer-brand-copy .elementor-widget-container > :last-child {
  margin-bottom: 0;
}

#xpro-theme-builder-footer .mo-footer-column {
  --width: auto;
  flex: 0 1 auto;
  min-width: 140px;
}

#xpro-theme-builder-footer .mo-footer-title .elementor-heading-title {
  margin: 0 0 4px;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

#xpro-theme-builder-footer .mo-footer-links,
#xpro-theme-builder-footer .mo-footer-links .elementor-widget-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

#xpro-theme-builder-footer .mo-footer-links a,
#xpro-theme-builder-footer .mo-footer-links span {
  display: block;
  margin: 0;
}

#xpro-theme-builder-footer .mo-footer-copyright,
#xpro-theme-builder-footer .mo-footer-copyright .elementor-widget-container {
  margin: 0;
}

#xpro-theme-builder-footer .mo-xpro-footer > .footer-bottom {
  padding: 24px 0 0;
}

@media (min-width: 768px) and (max-width: 1100px) {
  .xpro-theme-builder-header .mo-xpro-header-inner {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  .xpro-theme-builder-header .mo-xpro-site-logo img {
    max-width: 180px;
    height: 18px !important;
  }

  .xpro-theme-builder-header .mo-xpro-header-actions {
    gap: 16px !important;
  }

  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav {
    gap: 18px;
  }

  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li > a,
  .xpro-theme-builder-header .mo-header-contact .elementor-button {
    font-size: 14px;
  }
}

@media (max-width: 782px) {
  .admin-bar .xpro-theme-builder-header .mo-xpro-header {
    top: 46px;
  }
}

@media (max-width: 767px) {
  .xpro-theme-builder-header .mo-xpro-header-inner {
    gap: 12px !important;
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  .xpro-theme-builder-header .mo-xpro-site-logo img {
    max-width: 170px;
    height: 18px !important;
  }

  .xpro-theme-builder-header .mo-xpro-header-actions {
    flex-wrap: nowrap;
    gap: 10px !important;
  }

  .xpro-theme-builder-header .xpro-elementor-horizontal-menu-responsive-mobile {
    z-index: 1001;
    width: min(400px, 100%);
    height: 100dvh;
    padding: 30px;
    border-left: 1px solid var(--line);
    background: var(--bg-nav) !important;
    color: var(--text);
    text-align: left;
  }

  .admin-bar .xpro-theme-builder-header .xpro-elementor-horizontal-menu-responsive-mobile {
    top: 46px;
    height: calc(100dvh - 46px);
  }

  .xpro-theme-builder-header .xpro-elementor-horizontal-menu-overlay {
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72) !important;
  }

  .xpro-theme-builder-header .xpro-elementor-horizontal-menu-toggler,
  .xpro-theme-builder-header .xpro-elementor-horizontal-menu-close {
    color: var(--text) !important;
  }

  .xpro-theme-builder-header .xpro-elementor-horizontal-menu-close {
    border: 1px solid var(--line);
    background: transparent !important;
  }

  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav {
    gap: 0;
    padding-top: 20px;
  }

  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li > a {
    width: 100%;
    min-height: 0;
    padding: 15px 0;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    color: var(--muted) !important;
  }

  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li > a:hover,
  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-item > a,
  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li.current_page_item > a,
  .xpro-theme-builder-header .mo-xpro-menu .xpro-elementor-horizontal-navbar-nav > li.current-menu-ancestor > a {
    color: var(--text) !important;
  }

  #xpro-theme-builder-footer .mo-xpro-footer > .footer-main {
    flex-direction: column;
  }

  #xpro-theme-builder-footer .mo-footer-column {
    --width: 100%;
    flex-basis: 100%;
    min-width: 0;
  }

  #xpro-theme-builder-footer .mo-xpro-footer .footer-columns {
    --width: 100%;
    width: 100%;
    gap: 36px 48px !important;
  }
}

@media (max-width: 560px) {
  .xpro-theme-builder-header .mo-xpro-header-inner {
    gap: 10px !important;
  }

  .xpro-theme-builder-header .mo-xpro-site-logo img {
    max-width: 145px;
    height: 17px !important;
  }

  .xpro-theme-builder-header .mo-xpro-header-actions {
    gap: 8px !important;
  }

  .xpro-theme-builder-header .mo-header-contact .elementor-button {
    padding-bottom: 1px;
    font-size: 13px;
  }
}
