/* drslon.ru - techno / matrix premium, day & night */
:root {
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", "Consolas", ui-monospace, monospace;
  --container: 1160px;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 56px;
  --header-h: 78px;
  --transition: 0.22s ease;
  --matrix-char: 0.08;
  /* vertical rhythm */
  --gap-tight: 18px;
  --gap-block: 28px;
  --gap-section: 52px;
  --gap-section-lg: 64px;
}

/* -- Night (default / after sunset) -- */
[data-theme="night"] {
  color-scheme: dark;
  --bg: #050a08;
  --bg-2: #0a1210;
  --bg-elevated: rgba(10, 22, 18, 0.88);
  --card: rgba(12, 26, 22, 0.82);
  --card-solid: #0d1a16;
  --line: rgba(0, 255, 156, 0.14);
  --line-strong: rgba(0, 255, 156, 0.28);
  --text: #e6fff4;
  --muted: #8fb3a4;
  --accent: #00ff9c;
  --accent-2: #00c875;
  --accent-dim: rgba(0, 255, 156, 0.12);
  --accent-glow: rgba(0, 255, 156, 0.35);
  --danger: #ff6b8a;
  --warn: #f0c14a;
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.45);
  --header-bg: linear-gradient(180deg, rgba(5, 10, 8, 0.94), rgba(5, 10, 8, 0.78));
  --hero-glow-a: rgba(0, 255, 156, 0.14);
  --hero-glow-b: rgba(0, 160, 255, 0.08);
  --matrix-opacity: 0.22;
  --scanline: rgba(0, 255, 156, 0.03);
  --terminal: #001a10;
  --btn-text: #02140c;
  --theme-toggle-icon: "☾";
}

/* -- Day -- */
[data-theme="day"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --bg-elevated: rgba(255, 255, 255, 0.92);
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.15);
  --text: #111827;
  --muted: #5b6472;
  --accent: #5181fe;
  --accent-2: #315fe8;
  --accent-dim: rgba(81, 129, 254, 0.1);
  --accent-glow: rgba(81, 129, 254, 0.22);
  --danger: #c23b55;
  --warn: #b8860b;
  --shadow-card: 0 12px 34px rgba(15, 23, 42, 0.07);
  --header-bg: linear-gradient(180deg, rgba(248, 250, 252, 0.97), rgba(248, 250, 252, 0.9));
  --hero-glow-a: rgba(81, 129, 254, 0.12);
  --hero-glow-b: rgba(49, 95, 232, 0.06);
  --matrix-opacity: 0.05;
  --scanline: rgba(81, 129, 254, 0.025);
  --terminal: #0f172a;
  --btn-text: #ffffff;
  --theme-toggle-icon: "☀";
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.3s ease;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% -10%, var(--hero-glow-a), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 5%, var(--hero-glow-b), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 110%, var(--hero-glow-a), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* Grid overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--matrix-opacity);
  transition: opacity 0.5s ease;
}

a { color: inherit; }
main { flex: 1 0 auto; width: 100%; position: relative; z-index: 1; }
img { max-width: 100%; display: block; height: auto; }

.lang-en { display: none; }
html[data-current-lang="en"] .lang-ru,
body[data-current-lang="en"] .lang-ru { display: none; }
html[data-current-lang="en"] .lang-en,
body[data-current-lang="en"] .lang-en { display: inline; }
html[data-current-lang="en"] .lang-en-block,
body[data-current-lang="en"] .lang-en-block { display: block; }
.lang-en-block { display: none; }
html[data-current-lang="en"] .lang-ru-block,
body[data-current-lang="en"] .lang-ru-block { display: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: var(--btn-text);
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: var(--muted);
  opacity: 0.6;
}

.seo-block {
  margin: 0;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.seo-block h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
}

.seo-block p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.seo-block p:last-child { margin-bottom: 0; }

.seo-block a { color: var(--accent); }

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

.nowrap { white-space: nowrap; }

/* -- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}

.site-header::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand img,
.brand-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 20px var(--accent-glow);
  background: var(--card-solid);
}

.brand-title { min-width: 0; }
.brand-title > span {
  display: block;
  font-size: clamp(15px, 1.8vw, 17px);
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-title small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.lang-switch button,
.icon-btn,
.burger,
.print-btn,
.btn,
.btn-secondary,
.btn-ghost {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font: inherit;
  background: transparent;
}

.site-nav a,
.lang-switch button,
.icon-btn,
.burger,
.print-btn {
  font-weight: 550;
  padding: 9px 14px;
  font-size: 13.5px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.lang-switch button:hover,
.lang-switch button.active,
.icon-btn:hover,
.burger:hover,
.print-btn:hover {
  background: var(--accent-dim);
  border-color: var(--line-strong);
  color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--accent-dim);
  border-radius: 999px;
}

.lang-switch button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--btn-text);
  font-weight: 700;
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 16px;
  line-height: 1;
}

.icon-btn .theme-icon::before {
  content: var(--theme-toggle-icon);
  font-style: normal;
}

.burger { display: none; }

/* -- Buttons -- */
.btn,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 650;
  border-radius: var(--radius-xs);
  font-size: 14.5px;
}

.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-text);
  border-color: transparent;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-secondary {
  background: var(--accent-dim);
  border-color: var(--line-strong);
  color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); border-color: var(--accent); }

.btn-ghost {
  border-color: var(--line);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }

/* -- Cards -- */
.card,
.hero-card,
.info-card,
.section-card,
.service-card,
.faq-card,
.profile-card,
.summary-card,
.content-card,
.contact-card,
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

/* -- Terminal badge -- */
.badge,
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  background: var(--accent-dim);
  padding: 7px 12px;
  border-radius: 999px;
}

.badge::before,
.hero-badge::before {
  content: "▶";
  font-size: 9px;
  opacity: 0.85;
}

.price-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

/* -- Hero -- */
.hero {
  padding: 56px 0 var(--gap-section);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: var(--space-6);
  align-items: stretch;
}

.hero-card,
.info-card,
.profile-card,
.contact-copy,
.contact-card {
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.profile-card::before,
.contact-copy::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.hero-badge { margin-bottom: var(--space-4); }

.hero h1,
.contact-copy h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-3);
  font-weight: 800;
}

.hero h1 .accent,
.contact-copy h1 .accent {
  color: var(--accent);
  text-shadow: 0 0 32px var(--accent-glow);
}

.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 54ch;
}

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

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

.hero-points div,
.stat-chip {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--accent-dim);
  color: var(--muted);
  font-size: 13.5px;
}

.hero-points strong,
.stat-chip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

/* Photo panel */
.photo-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--card-solid);
  box-shadow: var(--shadow-card), 0 0 40px var(--accent-glow);
  aspect-ratio: 4 / 3;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, var(--scanline) 3px);
  pointer-events: none;
}

[data-theme="day"] .photo-frame::after {
  background:
    linear-gradient(180deg, transparent 60%, rgba(15, 23, 42, 0.15) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, var(--scanline) 3px);
}

.photo-meta {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #d8ffe9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

[data-theme="day"] .photo-meta {
  color: #e8f0ff;
}

.photo-meta .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 156, 0.35);
  backdrop-filter: blur(8px);
}

.photo-meta .status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Contact list */
.krv-contact-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.krv-contact-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.krv-contact-list { display: grid; gap: 10px; }

.krv-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.krv-contact-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.krv-contact-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: 0 0 20px;
  display: inline-flex;
}

.krv-contact-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.krv-contact-item a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.4;
  word-break: break-word;
  color: var(--text);
}
.krv-contact-item a:hover { color: var(--accent); }

/* -- Sections -- */
.main-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: var(--gap-section-lg);
}

/* Consistent vertical rhythm between major blocks */
.main-sections > .section-head {
  margin-top: var(--gap-section);
  margin-bottom: var(--gap-tight);
}

.main-sections > .section-head:first-child {
  margin-top: 0;
}

.main-sections > .services-grid,
.main-sections > .cases-grid,
.main-sections > .two-column,
.main-sections > .faq-grid {
  margin-bottom: 0;
}

.main-sections > .two-column + .two-column {
  margin-top: var(--gap-section);
}

.main-sections > .marquee-box {
  margin-top: var(--gap-section);
}

.main-sections > .eco-strip {
  margin-top: var(--gap-block);
  margin-bottom: 0;
}

.main-sections > .seo-block {
  margin-top: var(--gap-section);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: var(--gap-tight);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.section-head h2,
.summary-card h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.65;
  font-size: 15.5px;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: 0;
}

/* Cases - 2×2 on desktop for balanced cards */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 100%;
}

.case-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--accent-glow);
}

.case-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.case-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--accent-dim);
  line-height: 1.2;
}

.case-host {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.case-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.case-card .case-role {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

.case-card .case-role strong {
  color: var(--accent);
  font-weight: 700;
}

.case-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.case-card p:last-of-type {
  flex: 1;
  margin-bottom: 16px;
}

.case-card p strong {
  color: var(--text);
  font-weight: 650;
}

.case-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
}

.service-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--accent-glow);
}

.service-card .svc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.service-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.service-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.service-card .svc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}

.service-card .svc-link {
  color: var(--accent);
  font-weight: 650;
}

.service-card .svc-host {
  color: var(--muted);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 58%;
}

/* Two column */
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: 0;
}

.section-card { padding: var(--space-5); }
.section-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.section-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.section-card li { margin-bottom: 8px; line-height: 1.55; }
.section-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.65; }

.price-highlight {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin: 4px 0 12px;
  letter-spacing: -0.02em;
}

.pricing-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.pricing-pill {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--accent-dim);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: 0;
}

.faq-card { padding: 20px; }
.faq-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.faq-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
}
.faq-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Terminal marquee */
.marquee-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--terminal);
  box-shadow: var(--shadow-card);
  margin: 0;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 255, 156, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(0, 255, 156, 0.65);
}

.terminal-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 255, 156, 0.35);
}
.terminal-bar .dot:nth-child(1) { background: #ff5f56; }
.terminal-bar .dot:nth-child(2) { background: #ffbd2e; }
.terminal-bar .dot:nth-child(3) { background: #27c93f; }

.terminal-marquee {
  overflow: hidden;
  color: #34d399;
  font-family: var(--font-mono);
  padding: 14px 0;
  font-size: 13px;
}

[data-theme="day"] .terminal-bar {
  border-bottom-color: rgba(81, 129, 254, 0.15);
  color: rgba(81, 129, 254, 0.7);
}

.marquee-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: marquee 42s linear infinite;
  will-change: transform;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* -- Resume -- */
.resume-hero { padding: 40px 0 var(--gap-section); }
.resume-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 28px;
  align-items: start;
}

.profile-card img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  margin-bottom: 20px;
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 4px var(--accent-dim), 0 0 28px var(--accent-glow);
}

.profile-card h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.profile-card .profile-name {
  display: block;
}

.profile-card .profile-role {
  display: block;
  margin-top: 8px;
  font-size: 0.62em;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--muted);
}

.profile-card .profile-lead,
.profile-card > p:not(.visually-hidden) {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.profile-card .krv-contact-list {
  gap: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 28px;
  padding-bottom: var(--gap-section-lg);
}

.content-card,
.summary-card {
  padding: 28px;
}

.profile-card {
  padding: 28px;
}

.profile-card .btn-secondary,
.profile-card .print-btn {
  margin-top: 20px;
}

/* Labels + body inside cards: no nested-span collapse */
.item-label {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.item-body {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 400;
}

.summary-list,
.skills-list,
.language-list,
.timeline,
.pricing-list {
  display: grid;
  gap: 12px;
}

.summary-item,
.skill-item,
.language-item,
.timeline-item,
.cert-item,
.edu-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--accent-dim);
}

/* legacy fallback if strong/span still used */
.summary-item strong,
.skill-item strong,
.language-item strong {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.summary-item > span,
.skill-item > span,
.language-item > span,
.timeline-item p,
.timeline-item li,
.cert-item p,
.edu-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

.timeline-item {
  gap: 0;
}

.timeline-item time,
.cert-item time,
.edu-item time {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 999px;
  margin: 0 0 10px;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.timeline-item h3,
.cert-item h3,
.edu-item h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.timeline-item p {
  margin: 0;
}

.timeline-item ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.timeline-item li {
  margin: 0 0 6px;
  line-height: 1.6;
}

.timeline-item li:last-child {
  margin-bottom: 0;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.stack span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  color: var(--accent);
}

.side-stack {
  display: grid;
  gap: 20px;
}

.side-stack.tight { gap: 12px; }

/* Resume page: section titles under kicker */
.page-resume .summary-card .section-kicker,
.page-resume .content-card .section-kicker {
  margin: 0 0 12px;
  line-height: 1.2;
}

.page-resume .summary-card h2,
.page-resume .content-card h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 2.3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-resume .summary-list,
.page-resume .skills-list,
.page-resume .language-list,
.page-resume .timeline {
  gap: 14px;
}

.page-resume .content-card > .skills-list,
.page-resume .content-card > .timeline,
.page-resume .content-card > .language-list,
.page-resume .content-card > .side-stack {
  margin-top: 0;
}

.page-resume .resume-hero .breadcrumbs {
  margin: 0 0 20px;
}

.page-resume .nav-wrap {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-resume .resume-badge {
  margin: 0 0 14px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.45;
  font-size: 12px;
}

.page-resume .resume-tags {
  margin-top: 18px;
}

.page-resume .resume-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.page-resume .resume-cta-row .btn-secondary,
.page-resume .resume-cta-row .btn-ghost {
  margin-top: 0;
}

.page-resume .resume-main-stack {
  display: grid;
  gap: 20px;
}

.page-resume .timeline-item h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.page-resume .timeline-item h3 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.page-resume .resume-footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-resume .case-metrics {
  margin: 0;
}

.page-resume .case-metrics ul {
  margin-top: 12px;
}

/* Contact page */
.page-contact .hero { padding: 48px 0 var(--gap-section-lg); }
.contact-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: var(--space-5);
  align-items: start;
}

.page-contact .eco-strip {
  margin-top: var(--gap-block);
}

/* Privacy policy page */
.page-privacy .privacy-page {
  padding: 40px 0 var(--gap-section-lg);
}

.page-privacy .privacy-wrap {
  max-width: 760px;
}

.page-privacy .privacy-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.page-privacy .privacy-card h2 {
  margin: 28px 0 12px;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.page-privacy .privacy-lead {
  margin-bottom: 12px;
}

.page-privacy .privacy-meta {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--accent-dim);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-family: var(--font-mono);
}

.page-privacy .privacy-card .item-body {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.page-privacy .privacy-list {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.page-privacy .privacy-list li {
  margin: 0 0 6px;
}

.page-privacy .privacy-card code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--accent-dim);
  word-break: break-all;
}

.page-privacy .privacy-updated {
  margin-top: 28px;
}

.page-contact .footer-meta,
.page-home .hero-card > .footer-meta,
.contact-card > .footer-meta {
  margin-top: var(--gap-tight);
}

.page-contact .contact-copy h1 {
  max-width: 14ch;
}

.page-contact .hero-points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.page-contact .hero-points div {
  min-height: 0;
}

.page-contact .hero-points div:last-child {
  grid-column: 1 / -1;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: var(--gap-section) 0 calc(36px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.footer-box {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: var(--gap-block);
  border-top: 1px solid var(--line);
  padding-top: var(--gap-block);
  align-items: center;
  font-size: 14px;
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-dim);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.footer-links a:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.footer-meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  opacity: 0.75;
  line-height: 1.5;
}

/* Ecosystem strip */
.eco-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 4px 0;
}

.eco-strip a {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-dim);
  text-decoration: none;
  color: var(--muted);
  transition: var(--transition);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.eco-strip a:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

/* -- Responsive: desktop → tablet → phone → SE -- */

/* Focus visible - keyboard a11y */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.btn-secondary:focus-visible,
.btn-ghost:focus-visible,
.lang-btn:focus-visible,
.icon-btn:focus-visible,
.burger:focus-visible,
.print-btn:focus-visible,
.service-card:focus-visible,
.case-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-hint[hidden] { display: none !important; }

/* Large tablet / small laptop */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: var(--space-4);
  }
}

/* iPad / tablet portrait & landscape-ish */
@media (max-width: 980px) {
  .hero-grid,
  .two-column,
  .faq-grid,
  .resume-hero-grid,
  .content-grid,
  .contact-hero-grid {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .cases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    max-height: min(70vh, 420px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-card);
    flex-direction: column;
    align-items: stretch;
    backdrop-filter: blur(16px);
    z-index: 120;
  }

  .site-nav.open { display: flex; }
  .site-nav a {
    justify-content: flex-start;
    min-height: 44px;
  }
  .burger {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
  }

  .icon-btn,
  .print-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* iPhone Pro Max / large phones / small tablets */
@media (max-width: 768px) {
  .hero-points { grid-template-columns: 1fr; }
  .services-grid,
  .cases-grid { grid-template-columns: 1fr; }

  .hero h1,
  .contact-copy h1 {
    font-size: clamp(26px, 7.2vw, 36px);
  }

  .lead { font-size: 16px; }
  .photo-frame { aspect-ratio: 16 / 11; }
}

/* iPhone / Android phones */
@media (max-width: 640px) {
  html { scroll-behavior: auto; }

  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .header-inner {
    min-height: auto;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px) * 0);
  }

  .brand { width: 100%; }
  .brand img,
  .brand-avatar { width: 44px; height: 44px; min-width: 44px; }

  .brand-title > span {
    font-size: 15px;
    white-space: normal;
    line-height: 1.2;
  }

  .brand-title small {
    font-size: 10px;
    line-height: 1.35;
  }

  .nav-wrap {
    width: 100%;
    gap: 8px;
  }

  .lang-switch { flex: 1; }
  .lang-switch button {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
  }

  .site-nav {
    width: 100%;
    right: 0;
  }

  .hero-card,
  .info-card,
  .section-card,
  .service-card,
  .faq-card,
  .profile-card,
  .summary-card,
  .content-card,
  .contact-copy,
  .contact-card,
  .seo-block {
    padding: 18px;
  }

  .hero,
  .resume-hero { padding: 28px 0 32px; }

  .main-sections {
    padding-bottom: 48px;
  }

  .main-sections > .section-head {
    margin-top: 40px;
    margin-bottom: 16px;
  }

  .main-sections > .two-column + .two-column,
  .main-sections > .marquee-box,
  .main-sections > .seo-block {
    margin-top: 40px;
  }

  .main-sections > .eco-strip {
    margin-top: 24px;
  }

  .content-grid,
  .page-contact .hero { padding-bottom: 48px; }

  .seo-block { padding: 20px; }

  .page-contact .contact-copy h1 { max-width: none; }
  .page-contact .hero-points { grid-template-columns: 1fr; }
  .page-contact .hero-points div:last-child { grid-column: auto; }

  .btn,
  .btn-secondary,
  .btn-ghost {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-actions .btn-secondary,
  .hero-actions .btn-ghost {
    width: 100%;
  }

  .footer-box {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .footer-links a {
    justify-content: center;
    min-height: 44px;
  }

  .eco-strip a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
  }

  .site-footer {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }

  /* reduce paint cost on mobile */
  .card,
  .hero-card,
  .info-card,
  .section-card,
  .service-card,
  .faq-card,
  .profile-card,
  .summary-card,
  .content-card,
  .contact-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* iPhone SE / small Android (≤390) */
@media (max-width: 390px) {
  .footer-links { grid-template-columns: 1fr; }

  .hero-points div,
  .stat-chip {
    min-height: 0;
    padding: 12px;
  }

  .krv-contact-item {
    min-height: 48px;
    padding: 10px 12px;
  }

  .price-highlight { font-size: 24px; }

  .hero h1,
  .contact-copy h1 {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* iPhone landscape */
@media (max-height: 430px) and (orientation: landscape) {
  .site-header { position: relative; }
  .hero { padding-top: 20px; }
  .site-nav {
    max-height: 60vh;
  }
}

/* Hover only where supported (avoid sticky hover on touch) */
@media (hover: none) {
  .service-card:hover,
  .faq-card:hover,
  .krv-contact-item:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-text {
    animation: none;
    padding-left: 12px;
    white-space: normal;
  }
  .photo-meta .status::before { animation: none; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  #matrix-canvas { display: none; }
}

/* Print */
@media print {
  #matrix-canvas,
  .site-header,
  .site-footer,
  .burger,
  .icon-btn,
  .lang-switch,
  .print-btn,
  .marquee-box,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  body::before,
  body::after { display: none !important; }

  .card,
  .content-card,
  .profile-card,
  .summary-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  a { text-decoration: none; color: #000; }
}
