/* ================================================================
   Владимир Кокурин — личная страница
   ================================================================ */

:root {
  --bg: #F2F3FA;
  --bg2: #E4E6F3;
  --ink: #0E1430;
  --ink2: #2F3852;
  --line: rgba(15, 22, 48, .16);
  --accent: #4252FA;
  --glass: rgba(255, 255, 255, .5);
  --glass-brd: rgba(255, 255, 255, .8);
  --scene-bg: #F2F3FA;
  --scene-g1: #B6B0E6;
  --scene-g2: #4A55A0;
  --grid: 0.15, 0.17, 0.28;

  --content: 1200px;
  --pad: 48px;
  --panel-w: 900px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --head: 'Onest', var(--sans);
}

html.dark {
  --bg: #060916;
  --bg2: #0C1022;
  --ink: #EEF1FF;
  --ink2: #B6BFDC;
  --line: rgba(255, 255, 255, .16);
  --accent: #8C9BFF;
  --glass: rgba(255, 255, 255, .07);
  --glass-brd: rgba(255, 255, 255, .24);
  --scene-bg: #060916;
  --scene-g1: #26349A;
  --scene-g2: #0D6E96;
  --grid: 0.82, 0.87, 1.0;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button { font: inherit; color: inherit; }

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

h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 500; letter-spacing: -.035em; }

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

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

.wrap {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  box-sizing: border-box;
}

/* ---------- skip ---------- */
.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip:focus { transform: translateY(0); }

/* ---------- фон ---------- */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: block;
  z-index: -1;
  pointer-events: none;
}

html.nogl #bg { display: none; }

html.nogl body {
  background:
    radial-gradient(120% 90% at 22% 8%, rgba(var(--grid), .30) 0%, transparent 55%),
    radial-gradient(100% 80% at 84% 88%, var(--scene-g2) 0%, transparent 62%),
    radial-gradient(90% 70% at 50% 40%, var(--scene-g1) 0%, transparent 68%),
    var(--scene-bg);
  background-color: var(--bg);
}

/* ---------- шапка ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  box-sizing: border-box;
  padding: 22px var(--pad) 21px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 100%);
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: var(--panel-w);
  margin-right: auto;
  padding: 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.logo {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
}
.logo span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(66, 82, 250, .45); transform: scale(1); }
  55%  { box-shadow: 0 0 0 9px rgba(66, 82, 250, 0); transform: scale(1.06); }
  100% { box-shadow: 0 0 0 0 rgba(66, 82, 250, 0); transform: scale(1); }
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink2);
}
.nav a {
  position: relative;
  padding: 0 0 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* активный пункт меню */
.nav a[aria-current="page"], .mnav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  opacity: 1;
  border-bottom-color: var(--accent);
}

/* ---------- переключатель темы ---------- */
.theme {
  position: relative;
  flex: none;
  width: 58px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease;
}
.theme:hover { border-color: var(--accent); }
.th-ico {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  color: var(--ink2);
  transform: translateY(-50%);
  transition: opacity .25s ease, color .25s ease;
}
.th-sun { left: 8px; }
.th-moon { right: 8px; }
.th-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(10, 14, 40, .28);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
html.dark .th-knob { transform: translateX(28px); }
html.dark .th-sun { opacity: .45; }
html.dark .th-moon { color: var(--ink); }
html:not(.dark) .th-sun { color: var(--ink); }
html:not(.dark) .th-moon { opacity: .45; }

/* ---------- бургер и мобильное меню ---------- */
.burger {
  display: none;
  position: relative;
  flex: none;
  margin-left: auto;
  width: 40px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass);
  cursor: pointer;
}
.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .28s ease, opacity .2s ease;
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 19px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

.mnav {
  display: none;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding: 4px var(--pad) 20px;
}
.mnav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--head);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.035em;
}
.mnav.open { display: flex; }
.mnav-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink2);
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(16px, 2.6vh, 28px);
  padding-bottom: 0;
}

.kicker {
  margin: 0 0 14px;
  padding: 8px 10px 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink2);
}

.panel {
  max-width: var(--panel-w);
  margin: 0;
  padding: 14px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  box-shadow: 0 24px 70px rgba(10, 14, 40, .12),
              inset 0 1px 0 rgba(255, 255, 255, .55);
}

.hero-fig {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg2);
  container-type: inline-size;
}
.hero-fig img {
  width: 100%;
  aspect-ratio: 1640 / 1025;
  object-fit: cover;
  border-radius: 16px;
}

.badge {
  position: absolute;
  left: clamp(8px, 1.7cqw, 30px);
  bottom: clamp(8px, 1.7cqw, 30px);
  max-width: 52cqw;
  padding: clamp(7px, 1.1cqw, 18px) clamp(9px, 1.3cqw, 20px);
  border-radius: clamp(9px, 1.2cqw, 14px);
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.badge-name {
  display: block;
  font-family: var(--head);
  font-weight: 500;
  font-size: clamp(15px, 5.2cqw, 46px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: #ECEEF8;
  text-shadow: 0 1px 3px rgba(4, 6, 18, .55);
}
.badge-sub {
  display: block;
  margin-top: 9px;
  max-width: 34ch;
  font-family: var(--sans);
  font-size: clamp(10.5px, 1.72cqw, 15px);
  line-height: 1.35;
  color: rgba(236, 238, 248, .86);
  text-shadow: 0 1px 2px rgba(4, 6, 18, .5);
}

.hero-sub-mobile { display: none; }

/* ---------- тело панели под фото ---------- */
.hero-body {
  padding: 28px 16px 6px;
}

/* ---------- масштаб ---------- */
.scale { margin-bottom: 16px; }
.scale-h {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink2);
}
.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.s-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}
.s-item:first-child { padding-left: 0; border-left: 0; }
.s-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(17px, 1.75vw, 24px);
  letter-spacing: -.02em;
  color: var(--ink);
  white-space: nowrap;
}
.s-lbl {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink2);
}
@media (max-width: 720px) {
  .scale-grid { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .s-item { padding: 0 0 0 14px; }
  .s-item:nth-child(odd) { padding-left: 0; border-left: 0; }
}

.hero-note {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 56ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink2);
}

/* ---------- секции ---------- */
.sec {
  padding-top: 74px;
}
.sec:first-of-type { padding-top: 64px; }

.sec-h {
  margin: 0 0 26px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink2);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.rows { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.rows .row:first-child { border-top: none; }
.row-k {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.row-v {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink2);
  max-width: 74ch;
}

#scale .row-k {
  font-size: clamp(17px, 1.3vw, 20px);
  letter-spacing: -.02em;
  white-space: nowrap;
}

.sec { scroll-margin-top: 84px; }

#portfolio .row-k {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .09em;
  color: var(--accent);
}

/* ---------- обо мне ---------- */
.about {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: start;
}
.about-fig {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--line);
}
.about-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.about-txt p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink2);
}
.about-txt p:first-child { color: var(--ink); }
.about-txt p:last-child { margin-bottom: 0; }

/* ---------- блог ---------- */
.posts { display: flex; flex-direction: column; }
.post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .3s ease, color .25s ease;
}
.posts .post:first-child { border-top: 1px solid var(--line); }
.post-t {
  font-family: var(--head);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.25;
  letter-spacing: -.035em;
  color: var(--ink);
}
.post-a {
  flex: none;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent);
  transition: transform .3s ease;
}
.post:hover { padding-left: 10px; }
.post:hover .post-a { transform: translateX(6px); }

/* ---------- контакты ---------- */
.mail {
  display: inline-block;
  font-family: var(--head);
  font-weight: 500;
  font-size: clamp(24px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -.035em;
  color: var(--ink);
  word-break: break-word;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size .4s cubic-bezier(.4, 0, .2, 1), color .25s ease;
  padding-bottom: 6px;
}
.mail:hover { background-size: 100% 2px; color: var(--accent); }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- краткие разделы ---------- */
.hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, border-color .18s ease;
}
.hub-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.hc-k { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.hc-t { margin: 0; font-family: var(--head); font-weight: 500; font-size: clamp(19px, 1.9vw, 25px); letter-spacing: -.03em; color: var(--ink); }
.hc-d { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.hc-a { margin-top: auto; padding-top: 6px; font-family: var(--mono); font-size: 15px; color: var(--accent); }

/* ---------- контакты ---------- */
.soc {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}
.soc-a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  color: var(--ink);
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.soc-a:hover, .soc-a:focus-visible { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

@media (max-width: 760px) {
  .hub { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-card, .soc-a { transition: none; }
  .hub-card:hover, .soc-a:hover { transform: none; }
}

/* ---------- подвал ---------- */
.ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 22px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink2);
}
.ft-r { font-variant-numeric: tabular-nums; }

/* ---------- фолбэки прозрачности ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel { background: var(--bg2); }
  .pill,
  .theme,
  .burger { background: var(--bg2); }
  .badge { background: transparent; }
}
@media (prefers-reduced-transparency: reduce) {
  .panel,
  .pill,
  .theme,
  .burger,
  .hdr-in { background: var(--bg2); }
  .panel { background: var(--bg2); }
  .panel, .pill, .theme, .burger, .hdr-in {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .about { grid-template-columns: 260px 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  :root { --pad: 20px; }

  .nav { display: none; }
  .hdr > .hdr-in > .theme { display: none; }
  .burger { display: block; }
  .hdr-in { gap: 16px; }
  .hdr { padding-top: 14px; padding-bottom: 14px; }

  .hero { padding-top: 22px; }
  .kicker { font-size: 10.5px; letter-spacing: .07em; margin-bottom: 12px; }

  .panel { padding: 10px; border-radius: 20px; }
  .hero-fig, .hero-fig img { border-radius: 12px; }
  .badge-sub { margin-top: 6px; }

  .hero-body { padding: 20px 6px 12px; }

  .sec { padding-top: 56px; }
  .sec:first-of-type { padding-top: 48px; }

  .row { grid-template-columns: 1fr; gap: 8px; padding: 16px 0; }
  #scale .row-k { font-size: 20px; }

  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-fig { max-width: 300px; }

  .post { padding: 18px 0; gap: 16px; }

  .ft { margin-top: 64px; font-size: 10.5px; }
}

@media (max-width: 420px) {
  .mail { font-size: clamp(20px, 6.4vw, 30px); }
}

/* подпись уезжает под фото на узком экране */
@media (max-width: 520px) {
  .badge-sub { display: none; }
  .hero-sub-mobile {
    display: block;
    margin: 10px 2px 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ink2);
  }
}

/* ---------- уменьшенная анимация ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .skip { transform: translateY(0); position: absolute; clip-path: inset(50%); }
  .skip:focus { clip-path: none; }
}

/* ---------- внутренние страницы ---------- */
.page-panel {
  padding: 22px 30px 34px;
  background: rgba(10, 14, 30, .58);
  backdrop-filter: blur(28px) saturate(115%);
  -webkit-backdrop-filter: blur(28px) saturate(115%);
}
html:not(.dark) .page-panel { background: rgba(255, 255, 255, .66); }
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 28px;
  align-items: start;
  margin-bottom: 8px;
}
.page-h1 {
  margin: 0 0 10px;
  font-family: var(--head);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--ink);
}
.page-lead {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}
.page-list { margin: 0; padding: 0 0 0 18px; list-style: disc; }
.page-list li { margin: 6px 0; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.page-list li::marker { color: var(--accent); }
.page-photo { margin: 0; }
.page-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.ps { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.ps-h {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .78;
}
.ps-h3 {
  margin: 22px 0 12px;
  font-family: var(--head);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.ps p { margin: 0 0 12px; font-size: 15px; line-height: 1.68; color: var(--ink2); max-width: 72ch; }
.ps-list { margin: 0 0 4px; padding: 0 0 0 20px; list-style: disc; font-size: 15px; max-width: 72ch; }
.ps-list li { margin: 8px 0; font-size: 15px; line-height: 1.62; color: var(--ink2); }
.ps-list li::marker { color: var(--accent); }
.nw { white-space: nowrap; }
.ps-note { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.ps-note-k { color: var(--ink); }
.edu-main { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.edu-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.edu-list li { display: flex; flex-direction: column; gap: 3px; }
.edu-t { font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.edu-s { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink2); }
.quotes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.quotes li {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
@media (max-width: 780px) {
  .page-panel { padding: 18px 18px 26px; }
  .page-head { grid-template-columns: 1fr; gap: 18px; }
  .page-photo { order: -1; max-width: 100%; }
  .edu-list { grid-template-columns: 1fr; }
}

/* ---------- читаемость длинного текста (тёмная тема) ---------- */
html.dark .ps p, html.dark .ps-list li, html.dark .page-list li, html.dark .ps-note { color: #C3CCE6; }

/* ---------- страница «Инструменты» ---------- */
.apps { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.app {
  padding: 20px 22px 18px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}
.app-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.app-k { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.app-t { margin: 0; font-family: var(--head); font-weight: 500; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.app-st {
  margin-left: auto;
  padding: 3px 9px 2px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink2);
}
.app-st-wip { color: var(--accent); border-color: var(--accent); }
.app-d { margin: 0 0 12px; font-size: 15px; line-height: 1.62; color: var(--ink2); max-width: 72ch; }
.app-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.app-meta > div { display: flex; flex-direction: column; gap: 2px; }
.app-meta dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); opacity: .8; }
.app-meta dd { margin: 0; font-size: 13.5px; color: var(--ink); }
@media (max-width: 780px) {
  .app { padding: 16px 16px 14px; }
  .app-top { display: grid; grid-template-columns: auto 1fr; align-items: baseline; }
  .app-k { grid-row: 1; }
  .app-t { grid-row: 1; grid-column: 2; font-size: 18px; }
  .app-st { grid-row: 2; grid-column: 2; justify-self: start; margin-left: 0; }
}
html.dark .app-d { color: #C3CCE6; }

/* ---------- страница «Блог» ---------- */
.posts2 { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.post2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 16px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, border-color .18s ease;
}
.post2:hover { transform: translateY(-2px); border-color: var(--accent); }
.p2-top { display: flex; gap: 12px; align-items: baseline; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.p2-date { margin-left: auto; white-space: nowrap; }
.p2-t { font-family: var(--head); font-weight: 500; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
.p2-d { font-size: 14.5px; line-height: 1.6; color: var(--ink2); max-width: 72ch; }
.p2-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.p2-tag { padding: 2px 8px 1px; border-radius: 999px; border: 1px solid var(--glass-brd); font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
@media (max-width: 780px) {
  .post2 { padding: 15px 15px 14px; }
  .p2-t { font-size: 16.5px; }
}

/* ---------- страница «Контакты» ---------- */
.clist { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.crow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease;
}
a.crow:hover { border-color: var(--accent); transform: translateY(-1px); }
.crow-static { cursor: default; }
.ci { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; border: 1px solid var(--glass-brd); color: var(--ink); }
.cm { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ck { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.cv { font-size: 15px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.ca { margin-left: auto; font-family: var(--mono); font-size: 15px; color: var(--accent); }
@media (max-width: 780px) {
  .crow { padding: 13px 14px; gap: 11px; }
  .ci { width: 34px; height: 34px; }
  .cv { font-size: 14px; }
  .ca { display: none; }
}

.mx-set { display: grid; place-items: center; width: 20px; height: 20px; }
.mx-ico { grid-area: 1 / 1; display: block; width: 20px; height: 20px; }
html.dark .mx-ico--dark { display: none; }
html:not(.dark) .mx-ico--white { display: none; }

/* ленты: hub, иконки и подвал по ширине стеклянной панели */
.hub.wrap,
.soc.wrap,
.ft.wrap {
  padding-right: calc(var(--pad) + max(0px, min(100%, var(--content)) - 2 * var(--pad) - var(--panel-w)));
}

.hub {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 26px;
}
.hub-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  column-gap: 16px;
  row-gap: 5px;
  padding: 17px 20px 16px;
  border-radius: 18px;
}
.hc-k { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
.hc-t { grid-column: 2; grid-row: 1; }
.hc-d { grid-column: 2; grid-row: 2; max-width: 78ch; font-size: 14px; line-height: 1.55; }
.hc-a { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; align-self: center; justify-self: end; }

@media (max-width: 760px) {
  .hub-card { grid-template-columns: 26px minmax(0, 1fr) 18px; column-gap: 11px; padding: 15px 15px 14px; }
  .hc-d { font-size: 13.5px; }
}

.soc { justify-content: center; margin-top: 24px; }

/* подвал: текст по краям ленты, линия-разделитель — ровно по ширине панели */
.ft.wrap {
  padding-left: var(--pad);
  padding-right: calc(var(--pad) + max(0px, min(100%, var(--content)) - 2 * var(--pad) - var(--panel-w)));
}
.ft {
  position: relative;
  border-top: 0;
  margin-top: 34px;
  padding-top: 16px;
  padding-bottom: 28px;
}
/* рамка рисуется по border-box и вылезла бы за панель — линия идёт по padding-box */
.ft::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: calc(var(--pad) + max(0px, min(100%, var(--content)) - 2 * var(--pad) - var(--panel-w)));
  height: 1px;
  background: var(--line);
}

/* единое стекло: внутренние страницы как главная */
.page-panel {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  box-shadow: 0 24px 70px rgba(10, 14, 40, .12),
              inset 0 1px 0 rgba(255, 255, 255, .55);
}
html:not(.dark) .page-panel {
  background: var(--glass);
  box-shadow: 0 24px 70px rgba(20, 24, 60, .08),
              inset 0 1px 0 rgba(255, 255, 255, .9);
}

.app-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 15px 7px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: gap .18s ease, background .18s ease, color .18s ease;
}
.app-go:hover {
  gap: 13px;
  background: var(--accent);
  color: #fff;
}

html:not(.dark) .page-photo img { box-shadow: inset 0 0 0 1px rgba(14, 20, 48, .10); }

/* портрет: в светлой теме чуть мягче, чтобы не выглядел тёмным островом */
html:not(.dark) .page-photo img {
  filter: brightness(1.06) contrast(.96);
}

/* «Обо мне»: кадр в полном размере — во всю ширину панели под вводным текстом */
.page-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.page-photo { width: 100%; max-width: 860px; margin: 4px auto 0; }
.page-photo img { border-radius: 20px; }

/* «Контакты»: без вводного заголовка — надзаголовок работает как h1 */
.page-panel .kicker { margin: 0 0 16px; padding: 0; font-size: 11.5px; letter-spacing: .1em; font-weight: 500; }
.page-panel .clist { margin-top: 0; }
