/*
Theme Name: Krylo Security
Theme URI: https://krylosecurity.com/blog
Author: Krylo Solutions
Author URI: https://krylo.co
Description: Block theme for the Krylo Security blog. Header, footer and page color match krylosecurity.com so the jump from the main site to /blog feels like one site, not two. Built with no external requests (fonts self-hosted), no third-party JS, no block-library CSS bloat, and a small hardened functions.php.
Version: 1.0.7
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: Unlicensed, all rights reserved
Text Domain: krylo-blog
*/

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

html {
  background: #032f2c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Stops mobile Chrome/Brave panning the page sideways when something pokes past
     the edge. clip, not hidden, on both html and body: hidden would turn body into
     its own scroll container and the sticky header would stop sticking. */
  overflow-x: clip;
}

body {
  color: #ffffff;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
  /* Static approximation of the main site's animated WebGL background. A live shader
     is deliberately not used here: it would add a Three.js-sized dependency to a
     theme whose entire brief is to stay fast, for a page most people read once and
     leave. Same resting palette (Abyss/Trench/Current), no runtime cost. */
  background:
    radial-gradient(ellipse 120% 55% at 12% -8%, rgba(0, 179, 158, 0.16), transparent 60%),
    radial-gradient(ellipse 90% 50% at 92% 8%, rgba(92, 230, 209, 0.08), transparent 55%),
    radial-gradient(ellipse 100% 60% at 50% 115%, rgba(0, 130, 124, 0.14), transparent 60%),
    linear-gradient(180deg, #032f2c 0%, #02201e 45%, #011a18 100%);
  background-attachment: fixed;
}

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

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

::selection {
  background: #00e5db;
  color: #012624;
}

:focus-visible {
  outline: 2px solid #cbfffc;
  outline-offset: 3px;
  border-radius: 2px;
}

.krylo-container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 60px);
}

.krylo-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #00e5db;
  color: #012624;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
}

.krylo-skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ── Header ───────────────────────────────────────────────────────────── */
/* WordPress wraps the header part in its own <header class="wp-block-template-part">,
   only as tall as the header itself, so a sticky .krylo-header had nowhere to stick
   and scrolled away. The wrapper is what sticks; it spans the whole page. */
.wp-site-blocks > .wp-block-template-part:first-child,
.wp-site-blocks > .wp-block-template-part:has(> .krylo-header) {
  position: sticky;
  top: 0;
  z-index: 100;
}

.krylo-header {
  position: relative;
  z-index: 100;
  height: 92px;
  display: flex;
  align-items: center;
  background-color: rgba(3, 47, 44, 0.28);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(112, 119, 119, 0.18);
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease;
}

.krylo-header.is-scrolled {
  height: 72px;
  background-color: rgba(2, 36, 34, 0.72);
  border-bottom-color: rgba(203, 255, 252, 0.12);
}

.krylo-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.krylo-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.krylo-logo:hover {
  opacity: 0.85;
}

.krylo-logo img {
  height: 75px;
  width: auto;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.krylo-header.is-scrolled .krylo-logo img {
  height: 56px;
}

.krylo-nav-dock {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(1, 38, 36, 0.55);
  border: 1px solid rgba(203, 255, 252, 0.12);
  border-radius: 9999px;
  padding: 4px 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.krylo-nav-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 9999px;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #bbc7c6;
  border: 1px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.krylo-nav-pill:hover {
  color: #ffffff;
  background-color: rgba(203, 255, 252, 0.08);
  border-color: rgba(203, 255, 252, 0.15);
  transform: translateY(-1px);
}

.krylo-nav-pill.is-current {
  color: #ffffff;
  background: rgba(203, 255, 252, 0.14);
  border-color: rgba(0, 229, 219, 0.35);
  box-shadow: 0 0 16px rgba(0, 229, 219, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.krylo-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.krylo-btn-pink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(90deg, #fad1ff, #fffdfa, #edfffe, #cbfffc, #cbfffc, #edfffe, #fffdfa, #fad1ff);
  background-size: 200% 100%;
  background-position: 100% 0%;
  color: #012624;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: background-position 0.5s ease, transform 0.15s ease;
}

.krylo-btn-pink:hover {
  background-position: 0% 0%;
  transform: translateY(-1px);
  color: #012624;
}

/* ── Mobile menu: same button and sheet as the main site (Navigation.tsx) ── */
.krylo-menu-button {
  display: none;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 8px 0 18px;
  border-radius: 9999px;
  border: 1px solid rgba(203, 255, 252, 0.16);
  background: rgba(1, 38, 36, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.krylo-menu-button:hover,
.krylo-header.menu-open .krylo-menu-button {
  border-color: rgba(0, 229, 219, 0.45);
  background: rgba(1, 46, 43, 0.8);
}

.krylo-menu-button:focus-visible {
  outline: 2px solid #00e5db;
  outline-offset: 3px;
}

/* The label swaps between Menu and Close by sliding, inside a fixed-height window. */
.krylo-menu-label {
  position: relative;
  display: grid;
  height: 1.2em;
  overflow: hidden;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.krylo-menu-label > span {
  grid-area: 1 / 1;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.krylo-menu-label > span:last-child {
  transform: translateY(110%);
}

.krylo-header.menu-open .krylo-menu-label > span:first-child {
  transform: translateY(-110%);
}

.krylo-header.menu-open .krylo-menu-label > span:last-child {
  transform: translateY(0);
}

.krylo-menu-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cbfffc, #edfffe 55%, #fad1ff);
}

.krylo-menu-icon > span {
  position: absolute;
  left: 9px;
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: #012624;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), top 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.krylo-menu-icon > span:first-child {
  top: 12px;
}

.krylo-menu-icon > span:last-child {
  top: 16.5px;
}

.krylo-header.menu-open .krylo-menu-icon > span:first-child {
  top: 14.25px;
  transform: rotate(45deg);
}

.krylo-header.menu-open .krylo-menu-icon > span:last-child {
  top: 14.25px;
  transform: rotate(-45deg);
}

/* The sheet sits under the sticky header (z-index 100), so the Close button stays
   on top of it, and over everything else on the page. */
.krylo-sheet {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(0, 179, 158, 0.18), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(250, 209, 255, 0.07), transparent 60%),
    #011d1c;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition:
    clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s linear 0.6s;
}

.krylo-sheet.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition:
    clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s linear 0s;
}

/* Sizes scale with the visible screen (dvh = height left after the browser's own
   bars, vw = width), so the whole sheet, CTA included, fits on a short phone and
   only gets roomier on a tall one. */
.krylo-sheet-inner {
  --sheet-h: 1vh;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: calc(92px + clamp(8px, calc(var(--sheet-h) * 4), 48px));
  padding-bottom: max(clamp(16px, calc(var(--sheet-h) * 3), 28px), env(safe-area-inset-bottom));
}

@supports (height: 1dvh) {
  .krylo-sheet-inner {
    --sheet-h: 1dvh;
  }
}

/* Everything inside rises in a short stagger once the sheet has opened. */
.krylo-sheet-links > li,
.krylo-sheet-services,
.krylo-sheet-foot {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.krylo-sheet.is-open .krylo-sheet-links > li,
.krylo-sheet.is-open .krylo-sheet-services,
.krylo-sheet.is-open .krylo-sheet-foot {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) calc(0.22s + var(--i, 0) * 0.06s),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) calc(0.22s + var(--i, 0) * 0.06s);
}

.krylo-sheet ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.krylo-sheet-links {
  border-top: 1px solid rgba(203, 255, 252, 0.1);
}

.krylo-sheet-links > li {
  border-bottom: 1px solid rgba(203, 255, 252, 0.1);
}

.krylo-sheet-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(10px, calc(var(--sheet-h) * 2.1), 20px) 2px;
  color: #ffffff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.krylo-sheet-label {
  font-family: var(--wp--preset--font-family--matter);
  /* Width term keeps "Cybersecurity Blogs" on one line; height term shrinks the
     list on short screens. */
  font-size: clamp(22px, min(7.2vw, calc(var(--sheet-h) * 4.6)), 40px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  transition: color 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.krylo-sheet-arrow {
  --arrow: clamp(32px, calc(var(--sheet-h) * 5), 40px);
  display: grid;
  place-items: center;
  flex: 0 0 var(--arrow);
  height: var(--arrow);
  border-radius: 50%;
  border: 1px solid rgba(203, 255, 252, 0.16);
  color: rgba(203, 255, 252, 0.7);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.krylo-sheet-link:hover .krylo-sheet-label,
.krylo-sheet-link:focus-visible .krylo-sheet-label {
  transform: translateX(6px);
}

.krylo-sheet-link:hover .krylo-sheet-arrow,
.krylo-sheet-link:focus-visible .krylo-sheet-arrow {
  background: rgba(0, 229, 219, 0.14);
  border-color: rgba(0, 229, 219, 0.5);
  color: #ffffff;
}

.krylo-sheet-link:focus-visible {
  outline: 2px solid #00e5db;
  outline-offset: 2px;
  border-radius: 6px;
}

.krylo-sheet-link.is-active .krylo-sheet-label {
  color: #00e5db;
}

.krylo-sheet-link.is-active .krylo-sheet-label::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 12px;
  vertical-align: 0.35em;
  border-radius: 50%;
  background: #00e5db;
  box-shadow: 0 2px 10px rgba(0, 229, 219, 0.55);
}

.krylo-sheet-link.is-active .krylo-sheet-arrow {
  border-color: rgba(0, 229, 219, 0.5);
  color: #00e5db;
}

.krylo-sheet-services {
  margin-top: clamp(14px, calc(var(--sheet-h) * 3), 28px);
}

.krylo-sheet-services-title {
  margin: 0 0 clamp(8px, calc(var(--sheet-h) * 1.4), 12px);
  font-size: 13px;
  color: rgba(187, 199, 198, 0.75);
}

.krylo-sheet-services ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.krylo-sheet-services a {
  display: inline-flex;
  align-items: center;
  min-height: clamp(34px, calc(var(--sheet-h) * 4.8), 40px);
  padding: 0 clamp(12px, 3.6vw, 16px);
  border-radius: 9999px;
  border: 1px solid rgba(203, 255, 252, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  color: rgba(237, 255, 254, 0.88);
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.krylo-sheet-services a:hover,
.krylo-sheet-services a:focus-visible {
  border-color: rgba(0, 229, 219, 0.5);
  background: rgba(0, 229, 219, 0.1);
  color: #ffffff;
  outline: none;
}

.krylo-sheet-foot {
  margin-top: auto;
  padding-top: clamp(16px, calc(var(--sheet-h) * 3.6), 36px);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, calc(var(--sheet-h) * 1.4), 14px);
}

.krylo-sheet-cta {
  width: 100%;
  justify-content: center;
  padding: clamp(13px, calc(var(--sheet-h) * 2), 17px) 24px;
  border-radius: 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.krylo-sheet-email {
  align-self: center;
  font-size: 15px;
  color: #00e5db;
  text-decoration: underline;
  text-decoration-color: rgba(0, 229, 219, 0.35);
  text-underline-offset: 4px;
  padding: 6px 4px;
}

.krylo-sheet-note {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(187, 199, 198, 0.7);
}

/* Very short screens: drop the supporting line so the CTA still sits on screen. */
@media (max-height: 640px) {
  .krylo-sheet-note {
    display: none;
  }
}

@media (max-width: 991px) {
  .krylo-nav-dock,
  .krylo-cta-desktop {
    display: none !important;
  }
  .krylo-menu-button {
    display: inline-flex;
  }
  .krylo-sheet {
    display: block;
  }
  /* A calmer logo size on small screens, so the header reads as one line. */
  .krylo-logo img,
  .krylo-header.is-scrolled .krylo-logo img {
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .krylo-sheet,
  .krylo-sheet.is-open {
    transition: none;
  }
  .krylo-sheet-links > li,
  .krylo-sheet-services,
  .krylo-sheet-foot,
  .krylo-sheet.is-open .krylo-sheet-links > li,
  .krylo-sheet.is-open .krylo-sheet-services,
  .krylo-sheet.is-open .krylo-sheet-foot {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .krylo-menu-label > span,
  .krylo-menu-icon > span,
  .krylo-sheet-label {
    transition: none;
  }
}

/* ── Archive: post grid ──────────────────────────────────────────────── */
.krylo-archive-head {
  position: relative;
  padding-top: clamp(48px, 8vh, 88px);
  padding-bottom: clamp(32px, 5vh, 56px);
}

/* A faint grid, the same telemetry/radar language used on the main site's Attack
   Surface section, rather than a flat empty header. Pure CSS, no image request. */
.krylo-archive-head::before {
  content: "";
  position: absolute;
  /* Kept inside the container's width: negative side insets here widened the
     page past the screen on phones and left a dark strip down the right edge. */
  inset: -20px 0 auto;
  height: 260px;
  background-image:
    linear-gradient(90deg, rgba(0, 229, 219, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 229, 219, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 20% 0%, black, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 100% at 20% 0%, black, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.krylo-archive-head > * {
  position: relative;
  z-index: 1;
}

.krylo-eyebrow {
  display: inline-block;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #cbfffc 0%, #edfffe 26%, #fffdfa 48%, #fad1ff 89%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.krylo-page-title {
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 16px;
}

.krylo-page-lede {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 17px;
  line-height: 1.6;
  color: #bbc7c6;
  max-width: 60ch;
}

.krylo-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: clamp(56px, 9vh, 104px);
  /* Numbers each post 01, 02, 03… regardless of how many real posts exist -
     no PHP, no JS, just a native CSS counter reset on the grid. */
  counter-reset: krylo-post-index;
  list-style: none;
}

/* core/post-template renders each post as an <li>; that <li> is the actual grid
   item (the .krylo-post-card below is one level further in), so sizing/spanning
   rules that need to affect layout target the <li>, not the card. */
.krylo-post-grid > li {
  counter-increment: krylo-post-index;
  min-width: 0;
}

/* The most recent post gets a wide, two-up featured treatment instead of blending
   into the grid - one unmissable entry point, then the rest as a scan-list. */
.krylo-post-grid > li:first-child {
  grid-column: 1 / -1;
}

.krylo-post-grid > li:first-child .krylo-post-card {
  flex-direction: row;
  align-items: stretch;
}

/* Featured images are 1200 x 630 share cards with text on them, so the media box
   keeps that exact shape and nothing is cropped. The card text sits beside it,
   centred, however tall it is. */
.krylo-post-grid > li:first-child .krylo-post-card-media {
  aspect-ratio: 1200 / 630;
  width: 50%;
  flex-shrink: 0;
  align-self: center;
}

.krylo-post-grid > li:first-child .krylo-post-card-body {
  padding: clamp(24px, 3vw, 40px);
  justify-content: center;
}

.krylo-post-grid > li:first-child h2 {
  font-size: clamp(22px, 2.6vw, 32px);
}

.krylo-post-grid > li:first-child .krylo-post-excerpt {
  font-size: 15.5px;
  -webkit-line-clamp: 3;
}

.krylo-post-grid > li:first-child .krylo-post-card::before {
  content: "featured";
}

@media (max-width: 820px) {
  .krylo-post-grid > li:first-child .krylo-post-card {
    flex-direction: column;
  }
  .krylo-post-grid > li:first-child .krylo-post-card-media {
    width: 100%;
    aspect-ratio: 1200 / 630;
  }
}

.krylo-post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(112, 119, 119, 0.24);
  background: rgba(1, 38, 36, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.krylo-post-card:hover {
  border-color: rgba(0, 229, 219, 0.4);
  background: rgba(1, 46, 43, 0.6);
  transform: translateY(-4px);
}

/* Index label, e.g. "02 //", the same mono telemetry mark used on the main site's
   Attack Surface section. Sits on the card, not the media box, so it survives
   whether or not the post has a featured image. */
.krylo-post-card::before {
  content: counter(krylo-post-index, decimal-leading-zero);
  position: absolute;
  /* Top right, so it never covers the logo in the top-left of the share cards. */
  top: 14px;
  right: 16px;
  z-index: 2;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(203, 255, 252, 0.75);
  background: rgba(1, 20, 19, 0.55);
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

/* A corner bracket that draws in on hover - the same HUD/terminal vocabulary as
   the radar section elsewhere on the site, done with two borders, no image. */
.krylo-post-card::after {
  content: "";
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border-bottom: 1.5px solid rgba(0, 229, 219, 0);
  border-right: 1.5px solid rgba(0, 229, 219, 0);
  opacity: 0;
  transform: translate(-4px, -4px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  z-index: 2;
  pointer-events: none;
}

.krylo-post-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
  border-color: rgba(0, 229, 219, 0.6);
}

.krylo-post-card-media {
  position: relative;
  /* The share cards' own shape (1200 x 630), so they show whole, never cropped. */
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  /* Most posts won't have a featured image set yet, so this needs to look designed
     on its own, not like a broken/missing image. A faint diagonal scan pattern in
     the brand teal, same idea as the radar grid elsewhere on the site. Any real
     <img> post-featured-image renders sits on top and fully covers it. */
  background-color: #04211f;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(0, 229, 219, 0.07) 0px,
      rgba(0, 229, 219, 0.07) 1px,
      transparent 1px,
      transparent 14px
    ),
    radial-gradient(ellipse 90% 70% at 20% 15%, rgba(0, 179, 158, 0.22), transparent 65%);
}

.krylo-post-card-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.krylo-post-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.krylo-post-tag {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00e5db;
  border: 1px solid rgba(0, 229, 219, 0.3);
  background: rgba(0, 229, 219, 0.08);
  border-radius: 4px;
  padding: 4px 10px;
}

.krylo-post-card h2 {
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
}

.krylo-post-card h2 a:hover {
  color: #cbfffc;
}

.krylo-post-excerpt {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 14.5px;
  line-height: 1.6;
  color: #bbc7c6;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.krylo-post-meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(187, 199, 198, 0.7);
}

@media (max-width: 1100px) {
  .krylo-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .krylo-post-grid {
    grid-template-columns: 1fr;
  }
}

/* Pagination */
.wp-block-query-pagination {
  margin-top: 8px;
  padding-bottom: clamp(48px, 8vh, 88px);
}

.wp-block-query-pagination a,
.wp-block-query-pagination__page {
  font-family: var(--wp--preset--font-family--matter);
  font-size: 14px;
  color: #bbc7c6;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(112, 119, 119, 0.28);
}

.wp-block-query-pagination a:hover {
  color: #ffffff;
  border-color: rgba(0, 229, 219, 0.4);
}

.wp-block-query-pagination__page.current {
  color: #ffffff;
  background: rgba(203, 255, 252, 0.14);
  border-color: rgba(0, 229, 219, 0.35);
}

/* ── Single post ─────────────────────────────────────────────────────── */
.krylo-post-head {
  padding-top: clamp(48px, 8vh, 88px);
  padding-bottom: clamp(24px, 4vh, 40px);
}

.krylo-post-head .wp-block-post-title {
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
  max-width: 24ch;
  margin: 0 0 20px;
}

.krylo-post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 13px;
  color: #bbc7c6;
}

.krylo-post-byline .wp-block-avatar img {
  border-radius: 9999px;
  width: 32px;
  height: 32px;
}

.krylo-post-byline .sep {
  opacity: 0.5;
}

.krylo-post-featured {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(112, 119, 119, 0.2);
  margin-bottom: clamp(32px, 6vh, 56px);
}

.krylo-post-content {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 17px;
  line-height: 1.75;
  color: rgba(237, 255, 254, 0.92);
  padding-bottom: clamp(48px, 8vh, 96px);
}

.krylo-post-content > * + * {
  margin-top: 1.4em;
}

.krylo-post-content h2 {
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin-top: 2em;
}

.krylo-post-content h3 {
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
  font-size: 22px;
  color: #ffffff;
  margin-top: 1.8em;
}

.krylo-post-content a {
  color: #00e5db;
  text-decoration: underline;
  text-decoration-color: rgba(0, 229, 219, 0.35);
  text-underline-offset: 3px;
}

.krylo-post-content a:hover {
  text-decoration-color: #00e5db;
}

.krylo-post-content blockquote {
  border-left: 2px solid rgba(0, 229, 219, 0.4);
  padding-left: 20px;
  font-style: italic;
  color: #bbc7c6;
}

.krylo-post-content code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(112, 119, 119, 0.24);
  padding: 2px 6px;
  border-radius: 4px;
}

.krylo-post-content pre {
  background: rgba(1, 26, 24, 0.7);
  border: 1px solid rgba(112, 119, 119, 0.24);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
}

.krylo-post-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.krylo-post-content ul,
.krylo-post-content ol {
  padding-left: 1.4em;
}

.krylo-post-content img,
.krylo-post-content figure {
  border-radius: 12px;
}

.krylo-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: clamp(48px, 8vh, 88px);
}

.krylo-post-tags a {
  font-family: var(--wp--preset--font-family--matter);
  font-size: 12px;
  color: #bbc7c6;
  border: 1px solid rgba(112, 119, 119, 0.28);
  border-radius: 9999px;
  padding: 6px 14px;
}

.krylo-post-tags a:hover {
  color: #ffffff;
  border-color: rgba(0, 229, 219, 0.4);
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.krylo-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(72px, 12vh, 130px);
  background: linear-gradient(180deg, rgba(1, 26, 24, 0) 0%, rgba(1, 26, 24, 0.7) 18%, rgba(1, 20, 19, 0.96) 100%);
  border-top: 1px solid rgba(203, 255, 252, 0.08);
}

.krylo-footer-kicker {
  font-family: var(--wp--preset--font-family--matter);
  font-size: 15px;
  color: #bbc7c6;
  margin-bottom: 14px;
}

.krylo-footer-email-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.krylo-footer-email {
  font-family: var(--wp--preset--font-family--matter);
  font-weight: 500;
  font-size: clamp(26px, 5vw, 64px);
  letter-spacing: -0.03em;
  color: #ffffff;
  background-image: linear-gradient(90deg, #cbfffc, #fffdfa 50%, #fad1ff);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 0.08em;
  transition: background-size 0.6s ease;
}

.krylo-footer-email:hover {
  background-size: 100% 2px;
}

.krylo-footer-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wp--preset--font-family--matter);
  font-size: 14px;
  min-width: 88px;
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(203, 255, 252, 0.22);
  background: rgba(3, 47, 44, 0.35);
  color: #edfffe;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.krylo-footer-copy:hover {
  border-color: rgba(203, 255, 252, 0.5);
  background: rgba(203, 255, 252, 0.08);
  color: #ffffff;
}

.krylo-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 100px);
  margin-top: clamp(56px, 9vh, 96px);
  padding-top: clamp(36px, 5vh, 56px);
  border-top: 1px solid rgba(203, 255, 252, 0.1);
}

.krylo-footer-about {
  max-width: 36ch;
  font-family: var(--wp--preset--font-family--matter);
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(237, 255, 254, 0.86);
  margin-bottom: 28px;
}

.krylo-footer-nav {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.krylo-footer-heading {
  font-family: var(--wp--preset--font-family--matter);
  font-size: 13px;
  color: rgba(187, 199, 198, 0.62);
  margin-bottom: 20px;
}

.krylo-footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.krylo-footer-nav a {
  font-family: var(--wp--preset--font-family--matter);
  font-size: 15px;
  color: rgba(237, 255, 254, 0.84);
}

.krylo-footer-nav a:hover {
  color: #ffffff;
}

.krylo-footer-wordmark {
  display: block;
  width: 100%;
  height: auto;
  margin: clamp(48px, 8vh, 88px) 0 clamp(18px, 3vh, 28px);
  -webkit-mask-image: linear-gradient(180deg, black 18%, rgba(0, 0, 0, 0.35) 62%, transparent 98%);
  mask-image: linear-gradient(180deg, black 18%, rgba(0, 0, 0, 0.35) 62%, transparent 98%);
}

.krylo-footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(203, 255, 252, 0.1);
  font-family: var(--wp--preset--font-family--matter);
  font-size: 13px;
  color: rgba(187, 199, 198, 0.7);
}

.krylo-footer-legal a,
.krylo-footer-legal button {
  font-family: var(--wp--preset--font-family--matter);
  font-size: 13px;
  color: rgba(187, 199, 198, 0.9);
  background: none;
  border: none;
  cursor: pointer;
}

.krylo-footer-legal a:hover,
.krylo-footer-legal button:hover {
  color: #ffffff;
}

.krylo-footer-top {
  margin-left: auto;
}

@media (max-width: 1100px) {
  .krylo-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .krylo-footer-nav {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
