/* v1.20 — portfolio-first, capability-led, browser-native interaction */
.portfolio-home-v20 {
  --v20-max: 1240px;
  --v20-gap: clamp(28px, 5vw, 72px);
  --v20-soft: color-mix(in srgb, var(--v18-panel) 82%, var(--v18-bg));
}

.portfolio-home-v20 main,
.portfolio-home-v20 .v20-footer {
  width: min(calc(100% - 40px), var(--v20-max));
  margin-inline: auto;
}

.v20-header__inner { width: min(calc(100% - 40px), var(--v20-max)); }
.v20-header .v18-nav { gap: clamp(14px, 1.8vw, 24px); }
.v20-header .v18-nav a { font-size: 12px; }
.v20-actions { gap: 7px; }
.v20-command {
  min-height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--v18-line);
  background: var(--v18-panel);
  color: var(--v18-muted);
  cursor: pointer;
  border-radius: 4px;
}
.v20-command:hover { color: var(--v18-text); border-color: color-mix(in srgb, var(--v18-accent) 70%, var(--v18-line)); }
.v20-command > span { font-size: 16px; line-height: 1; }
.v20-command kbd {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 650 9px/1 var(--font-mono);
  letter-spacing: .04em;
}

/* Hero */
.v20-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  grid-template-rows: minmax(500px, calc(100svh - 132px)) auto;
  gap: 0 var(--v20-gap);
  align-items: center;
  border-bottom: 1px solid var(--v18-line);
}
.v20-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.96%, color-mix(in srgb, var(--v18-line) 54%, transparent) 50%, transparent 50.04%);
  opacity: .55;
}
.v20-hero__copy { position: relative; z-index: 2; padding: clamp(58px, 7vw, 92px) 0; }
.v20-eyebrow {
  margin: 0 0 28px;
  color: var(--v18-accent);
  font: 750 10px/1.2 var(--font-mono);
  letter-spacing: .14em;
}
.v20-hero h1 {
  margin: 0;
  font-size: clamp(62px, 9vw, 124px);
  line-height: .84;
  letter-spacing: -.075em;
  font-weight: 790;
}
.v20-lead {
  max-width: 760px;
  margin: 34px 0 0;
  font-size: clamp(21px, 2.2vw, 32px);
  line-height: 1.5;
  letter-spacing: -.025em;
  font-weight: 720;
}
.v20-intro {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--v18-muted);
  font-size: 14px;
  line-height: 1.9;
}
.v20-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 34px; }
.v20-primary-link,
.v20-quiet-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 0 14px;
  border: 1px solid var(--v18-line);
  background: var(--v18-panel);
  font-size: 12px;
  font-weight: 740;
}
.v20-primary-link { min-width: 190px; border-color: color-mix(in srgb, var(--v18-accent) 75%, var(--v18-line)); }
.v20-primary-link:hover,
.v20-quiet-link:hover { background: var(--v18-accent-soft); border-color: var(--v18-accent); }
.v20-primary-link b,
.v20-quiet-link b { color: var(--v18-accent); }

.v20-hero-stage {
  position: relative;
  z-index: 1;
  min-height: clamp(360px, 50vh, 520px);
  overflow: hidden;
  border: 1px solid var(--v18-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--v18-panel) 86%, transparent), color-mix(in srgb, var(--v18-bg) 95%, transparent));
  isolation: isolate;
}
.v20-hero-stage::before,
.v20-hero-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.v20-hero-stage::before {
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}
.v20-hero-stage::after {
  width: 42%;
  height: 1px;
  right: 0;
  top: 28%;
  background: var(--v18-accent);
  box-shadow: -22vw 132px 0 color-mix(in srgb, var(--v18-green) 60%, transparent);
  opacity: .45;
}
.v20-signal-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.v20-stage-top,
.v20-stage-center,
.v20-runtime { position: absolute; z-index: 2; }
.v20-stage-top {
  inset: 0 0 auto 0;
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--v18-line);
  color: var(--v18-muted);
  font: 650 9px/1 var(--font-mono);
  letter-spacing: .08em;
}
.v20-stage-center {
  left: clamp(24px, 4vw, 52px);
  right: clamp(24px, 4vw, 52px);
  top: 44%;
  translate: 0 -50%;
  max-width: 450px;
}
.v20-stage-center strong { display: block; max-width: 390px; font-size: clamp(18px, 2vw, 26px); line-height: 1.35; letter-spacing: -.025em; }
.v20-stage-center p { max-width: 430px; margin: 13px 0 0; color: var(--v18-muted); font-size: 12px; line-height: 1.75; }
.v20-stage-cross {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 24px;
  position: relative;
}
.v20-stage-cross::before,
.v20-stage-cross::after { content: ""; position: absolute; background: var(--v18-accent); }
.v20-stage-cross::before { width: 32px; height: 1px; top: 15px; left: 0; }
.v20-stage-cross::after { width: 1px; height: 32px; left: 15px; top: 0; }
.v20-runtime {
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  border: 1px solid var(--v18-line);
  background: var(--v18-line);
}
.v20-runtime span {
  min-height: 42px;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--v18-panel) 94%, transparent);
  color: var(--v18-muted);
  font: 650 8px/1 var(--font-mono);
  white-space: nowrap;
}
.v20-runtime i { width: 5px; height: 5px; background: var(--v18-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v18-green) 12%, transparent); }
.v20-runtime span.is-unsupported i { background: var(--v18-muted); box-shadow: none; }

.v20-tech-rail {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border-top: 1px solid var(--v18-line);
}
.v20-tech-rail span {
  flex: 1 0 auto;
  padding: 0 clamp(12px, 2vw, 24px);
  border-right: 1px solid var(--v18-line);
  color: var(--v18-muted);
  font: 650 9px/1 var(--font-mono);
  letter-spacing: .07em;
  text-align: center;
}
.v20-tech-rail span:first-child { padding-left: 0; text-align: left; }
.v20-tech-rail span:last-child { border-right: 0; padding-right: 0; text-align: right; }

/* Shared sections */
.v20-section { padding: clamp(70px, 8vw, 108px) 0; border-bottom: 1px solid var(--v18-line); }
.v20-section-head {
  display: grid;
  grid-template-columns: minmax(150px, .42fr) minmax(0, 1.58fr);
  gap: var(--v20-gap);
  margin-bottom: clamp(34px, 5vw, 58px);
  align-items: start;
}
.v20-section-head > div:first-child { padding-top: 8px; display: flex; gap: 14px; color: var(--v18-muted); font: 650 9px/1 var(--font-mono); letter-spacing: .09em; }
.v20-section-head > div:first-child span:first-child { color: var(--v18-accent); }
.v20-section-head h2 { margin: 0; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.v20-section-head div:last-child > p { max-width: 720px; margin: 14px 0 0; color: var(--v18-muted); font-size: 14px; line-height: 1.8; }

/* Capability explorer */
.v20-capability-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  gap: 0;
  border: 1px solid var(--v18-line);
  background: var(--v18-panel);
  min-height: 470px;
}
.v20-capability-list { border-right: 1px solid var(--v18-line); }
.v20-capability-row {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--v18-line);
  background: transparent;
  color: var(--v18-text);
  text-align: left;
  cursor: pointer;
}
.v20-capability-row:last-child { border-bottom: 0; }
.v20-capability-row:hover,
.v20-capability-row.is-active { background: color-mix(in srgb, var(--v18-accent) 7%, var(--v18-panel)); }
.v20-capability-row.is-active { box-shadow: inset 3px 0 0 var(--v18-accent); }
.v20-capability-row > span:first-child { color: var(--v18-accent); font: 700 9px/1 var(--font-mono); }
.v20-capability-row strong { display: block; font-size: 16px; }
.v20-capability-row small { display: block; margin-top: 5px; color: var(--v18-muted); font-size: 11px; line-height: 1.45; }
.v20-capability-row > b { color: var(--v18-muted); font-size: 14px; font-weight: 500; transition: transform .18s ease, color .18s ease; }
.v20-capability-row.is-active > b { color: var(--v18-accent); transform: translateX(3px); }

.v20-capability-detail {
  position: relative;
  min-width: 0;
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0 76%, color-mix(in srgb, var(--v18-accent) 7%, transparent) 76%),
    var(--v20-soft);
}
.v20-capability-detail::before {
  content: attr(data-index);
  position: absolute;
  right: -10px;
  bottom: -42px;
  color: color-mix(in srgb, var(--v18-accent) 10%, transparent);
  font: 800 clamp(130px, 18vw, 240px)/1 var(--font-mono);
  letter-spacing: -.08em;
  pointer-events: none;
}
.v20-capability-detail > div { position: relative; z-index: 1; }
.v20-capability-detail .v20-detail-kicker { color: var(--v18-accent); font: 700 9px/1 var(--font-mono); letter-spacing: .08em; }
.v20-capability-detail h3 { margin: 22px 0 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.v20-capability-detail p { max-width: 510px; margin: 18px 0 0; color: var(--v18-muted); font-size: 13px; line-height: 1.85; }
.v20-detail-tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 32px; }
.v20-detail-tags span { padding: 7px 9px; border: 1px solid var(--v18-line); background: var(--v18-panel); color: var(--v18-muted); font: 650 9px/1 var(--font-mono); }

/* Engineering matrix */
.v20-engineering-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--v18-line);
  border-left: 1px solid var(--v18-line);
}
.v20-engineering-item {
  min-height: 250px;
  padding: clamp(26px, 4vw, 44px);
  border-right: 1px solid var(--v18-line);
  border-bottom: 1px solid var(--v18-line);
  background: color-mix(in srgb, var(--v18-panel) 82%, transparent);
  position: relative;
  overflow: hidden;
}
.v20-engineering-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--v18-accent);
  transition: width .28s ease;
}
.v20-engineering-item:hover::after { width: 100%; }
.v20-engineering-item > span { color: var(--v18-accent); font: 700 9px/1 var(--font-mono); letter-spacing: .08em; }
.v20-engineering-item h3 { margin: clamp(46px, 6vw, 72px) 0 12px; font-size: clamp(22px, 2.4vw, 31px); letter-spacing: -.035em; }
.v20-engineering-item p { max-width: 520px; margin: 0; color: var(--v18-muted); font-size: 13px; line-height: 1.8; }
.v20-proof-rail {
  display: flex;
  border: 1px solid var(--v18-line);
  border-top: 0;
  overflow: auto hidden;
  scrollbar-width: none;
}
.v20-proof-rail::-webkit-scrollbar { display: none; }
.v20-proof-rail span { flex: 1 0 auto; min-height: 58px; padding: 0 18px; display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--v18-line); color: var(--v18-muted); font: 650 9px/1 var(--font-mono); white-space: nowrap; }
.v20-proof-rail span:last-child { border-right: 0; }
.v20-proof-rail b { color: var(--v18-text); font-size: 11px; }

/* Activity */
.v20-activity-list { border-top: 1px solid var(--v18-line); }
.v20-activity-row {
  min-height: 112px;
  display: grid;
  grid-template-columns: 66px minmax(170px, .62fr) minmax(0, 1.38fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 8px;
  border-bottom: 1px solid var(--v18-line);
}
.v20-activity-row:hover { background: color-mix(in srgb, var(--v18-accent) 4%, transparent); }
.v20-activity-row > span:first-child { color: var(--v18-accent); font: 700 9px/1 var(--font-mono); }
.v20-activity-row strong { font-size: 18px; letter-spacing: -.02em; }
.v20-activity-row small { display: block; margin-top: 6px; color: var(--v18-muted); font: 600 9px/1.4 var(--font-mono); }
.v20-activity-row p { margin: 0; color: var(--v18-muted); font-size: 12px; line-height: 1.7; }
.v20-activity-row > b { color: var(--v18-accent); font-size: 18px; font-weight: 500; }
.v20-activity-row .v20-activity-status { display: inline-flex; align-items: center; gap: 7px; }
.v20-activity-status::before { content: ""; width: 5px; height: 5px; background: var(--v18-green); }

/* About */
.v20-about-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: var(--v20-gap); align-items: start; }
.v20-about-copy { max-width: 720px; }
.v20-about-copy p { margin: 0 0 18px; color: var(--v18-muted); font-size: clamp(15px, 1.35vw, 17px); line-height: 1.95; }
.v20-about-meta { margin: 0; border-top: 1px solid var(--v18-line); }
.v20-about-meta > div { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--v18-line); }
.v20-about-meta dt { color: var(--v18-accent); font: 700 9px/1.4 var(--font-mono); }
.v20-about-meta dd { margin: 0; color: var(--v18-muted); font-size: 12px; line-height: 1.6; }

.v20-social { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.v20-social a { min-height: 92px; }
.v20-footer { width: min(calc(100% - 40px), var(--v20-max)); }

/* Cross-document navigation: progressive enhancement */
@view-transition { navigation: auto; }
.v18-brand,
.hub-brand,
.brand-v16 { view-transition-name: dzkrium-brand; }
::view-transition-old(dzkrium-brand),
::view-transition-new(dzkrium-brand) { animation-duration: .22s; }

@media (max-width: 1040px) {
  .v20-header .v18-nav { gap: 13px; }
  .v20-header .v18-nav a { font-size: 11px; }
  .v20-command kbd { display: none; }
  .v20-command { width: 42px; padding: 0; justify-content: center; }
}

@media (max-width: 900px) {
  .portfolio-home-v20 main,
  .portfolio-home-v20 .v20-footer,
  .v20-header__inner { width: min(calc(100% - 28px), var(--v20-max)); }
  .v20-hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 0; }
  .v20-hero::before { display: none; }
  .v20-hero__copy { padding-bottom: 52px; }
  .v20-hero-stage { min-height: 400px; margin-bottom: 46px; }
  .v20-tech-rail { grid-column: 1; overflow-x: auto; scrollbar-width: none; }
  .v20-tech-rail::-webkit-scrollbar { display: none; }
  .v20-tech-rail span { flex: 0 0 auto; }
  .v20-tech-rail span:first-child { padding-left: 12px; text-align: center; }
  .v20-tech-rail span:last-child { padding-right: 12px; text-align: center; }
  .v20-section-head { grid-template-columns: 1fr; gap: 14px; }
  .v20-section-head > div:first-child { padding-top: 0; }
  .v20-capability-layout { grid-template-columns: 1fr; min-height: 0; }
  .v20-capability-list { border-right: 0; }
  .v20-capability-detail { min-height: 300px; border-top: 1px solid var(--v18-line); }
  .v20-about-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .v20-command { width: 38px; min-height: 36px; }
  .v20-command > span { font-size: 15px; }
  .v20-hero h1 { font-size: clamp(52px, 17vw, 78px); }
  .v20-lead { font-size: 21px; }
  .v20-intro { font-size: 13px; }
  .v20-hero__actions { align-items: stretch; }
  .v20-primary-link { flex: 1 1 180px; }
  .v20-quiet-link { min-width: 74px; }
  .v20-hero-stage { min-height: 360px; }
  .v20-stage-center { left: 20px; right: 20px; top: 43%; }
  .v20-stage-center p { font-size: 11px; }
  .v20-runtime { grid-template-columns: 1fr 1fr; }
  .v20-runtime span { min-height: 34px; }
  .v20-section { padding: 60px 0; }
  .v20-section-head h2 { font-size: 34px; }
  .v20-capability-row { min-height: 70px; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; padding-inline: 12px; }
  .v20-capability-row strong { font-size: 15px; }
  .v20-capability-row small { font-size: 10px; }
  .v20-capability-detail { padding: 26px 20px; min-height: 280px; }
  .v20-engineering-grid { grid-template-columns: 1fr; }
  .v20-engineering-item { min-height: 210px; }
  .v20-engineering-item h3 { margin-top: 40px; }
  .v20-activity-row { grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; padding-inline: 0; }
  .v20-activity-row > div:nth-of-type(2) { grid-column: 2 / -1; }
  .v20-activity-row p { margin-top: -6px; }
  .v20-about-meta > div { grid-template-columns: 72px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .v20-engineering-item::after,
  .v20-capability-row > b { transition: none; }
}

.v20-social a > span { color: inherit; display: grid; gap: 7px; }
.v20-social small { color: var(--v18-muted); font: 650 9px/1 var(--font-mono); }
.v20-social strong { color: var(--v18-text); font-size: 17px; }
.v20-social a > b { color: var(--v18-accent); font-size: 16px; font-weight: 500; }
