/* ---------------------------------------------------------
   artem.click — WAP-миниблог
   paper, ink, one orange accent. no frameworks.
--------------------------------------------------------- */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/golos-text-400-900-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/golos-text-400-900-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0b0b0a;
  --paper: #f2efe6;
  --paper-deep: #e9e5d9;
  --muted: #625e53;
  --faint: #6f6a5e;
  --accent: #ff4f1f;
  --accent-ink: #c93400;
  --line: rgba(11, 11, 10, 0.18);
  --line-light: rgba(242, 239, 230, 0.2);
  --sans: "Golos Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  background-color: #d5d1c5;
  background-image: radial-gradient(rgba(11, 11, 10, 0.16) 0.65px, transparent 0.75px);
  background-size: 9px 9px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}

.page {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  border-inline: 1px solid var(--ink);
}

.micro-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.statusbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 9px var(--gutter) 8px;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.52);
}

.statusbar__brand {
  color: var(--paper);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
.statusbar__wap {
  color: rgba(242, 239, 230, 0.52);
}
.statusbar__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 79, 31, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

.hero__body {
  position: relative;
  z-index: 1;
  padding: 24px var(--gutter) 0;
}

.hero__eyebrow {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.52);
}
.hero__eyebrow-num {
  color: rgba(242, 239, 230, 0.52);
}

.hero__name {
  position: relative;
  margin: 26px 0 0;
  font-size: clamp(58px, 18.5vw, 86px);
  font-style: normal;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.075em;
}
.hero__name > span {
  display: block;
}
.hero__name i {
  display: inline-block;
  margin-left: 0.035em;
  font-style: normal;
  color: var(--accent);
  transform: translateY(-0.035em);
}

.hero__role {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
}
.hero__role-mark {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--accent);
}

.hero__desc {
  max-width: 34ch;
  margin: 14px 0 0;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: rgba(242, 239, 230, 0.65);
  text-wrap: pretty;
}

.hero__rubrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: rgba(242, 239, 230, 0.52);
}

.hero__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 11px 0 13px;
  border-top: 1px solid var(--line-light);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.52);
}
.hero__foot-line {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(242, 239, 230, 0.25) 0 2px,
    transparent 2px 5px
  );
}
.hero__foot a {
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.hero__foot a:hover {
  color: var(--accent);
}

.hero__star {
  position: absolute;
  z-index: 0;
  top: 94px;
  right: 18px;
  width: 38px;
  height: 38px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  opacity: 0.9;
  transform: rotate(8deg);
  pointer-events: none;
}

/* ---------- intro ---------- */

.intro {
  padding: 24px var(--gutter) 25px;
}

.intro__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.intro__top .micro-label:first-child {
  color: var(--accent-ink);
}

.intro__title {
  margin: 17px 0 10px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.intro__text {
  max-width: 40ch;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.58;
  color: #3d3a33;
  text-wrap: pretty;
}

.now {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  margin: 19px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}
.now__label {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.now__label::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  background: currentColor;
  transform: translateY(-1px);
}
.now__value {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: -0.01em;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--paper);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.nav__link {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 11px 8px 10px 10px;
  border-right: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav__link:last-child {
  border-right: 0;
}
.nav__num {
  color: var(--faint);
  font-size: 7px;
  transition: color 0.18s ease;
}
.nav__link:hover,
.nav__link:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.nav__link:hover .nav__num,
.nav__link:focus-visible .nav__num {
  color: var(--accent);
}
.nav__link.is-active {
  background: var(--ink);
  color: var(--paper);
}
.nav__link.is-active .nav__num {
  color: var(--accent);
}
.nav__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.nav::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: var(--progress, 0%);
  height: 2px;
  background: var(--accent);
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ---------- sections ---------- */

.section {
  padding: 27px var(--gutter) 7px;
  scroll-margin-top: 39px;
}
.section + .section {
  border-top: 1px solid var(--ink);
  margin-top: 19px;
}

.section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section__title {
  margin: 9px 0 0;
  font-size: 39px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.section__count {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  margin-top: 15px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.section__desc {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- posts ---------- */

.post {
  margin-top: 22px;
  scroll-margin-top: 47px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--ink);
}

.post__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.post__tag {
  color: var(--accent-ink);
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.post__title {
  margin: 10px 0 7px;
  font-size: 20.5px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.post__excerpt {
  max-width: 39ch;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.56;
  color: #555146;
  text-wrap: pretty;
}

.post__details {
  margin-top: 11px;
  border-top: 1px dotted var(--line);
}

.post__details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 9px;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.post__details summary::-webkit-details-marker {
  display: none;
}
.post__details summary:hover {
  color: var(--accent-ink);
}
.post__details summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.summary-plus {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.summary-plus::before,
.summary-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}
.summary-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.post__details[open] .summary-plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.summary-close {
  display: none;
}
.post__details[open] .summary-open {
  display: none;
}
.post__details[open] .summary-close {
  display: inline;
}

.post__body {
  padding: 2px 0 13px;
  color: #34312b;
  font-size: 12.8px;
  line-height: 1.66;
  animation: reveal 0.24s ease both;
}
.post__body p {
  margin: 0 0 10px;
}
.post__body p:last-child {
  margin-bottom: 0;
}
.post__body ul,
.post__body ol {
  margin: 0 0 10px;
}
.post__body ul {
  padding-left: 0;
  list-style: none;
}
.post__body ul li {
  position: relative;
  margin-bottom: 5px;
  padding-left: 14px;
}
.post__body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.post__body ol {
  padding-left: 18px;
}
.post__body ol li {
  margin-bottom: 5px;
  padding-left: 2px;
}
.post__body ol li::marker {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent);
}
.post__body li:last-child {
  margin-bottom: 0;
}

/* ---------- footer ---------- */

.footer {
  margin-top: 29px;
  padding: 26px var(--gutter) 18px;
  background: var(--ink);
  color: var(--paper);
}
.footer__label {
  color: rgba(242, 239, 230, 0.52);
}
.footer__word {
  margin: 16px 0 0;
  font-size: 40px;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.065em;
}
.footer__word span {
  color: var(--accent);
}
.footer__note {
  max-width: 36ch;
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.52);
  text-wrap: pretty;
}
.footer__links {
  display: flex;
  margin-top: 22px;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}
.footer__links a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px 10px 0;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.18s ease;
}
.footer__links a + a {
  padding-left: 12px;
  border-left: 1px solid var(--line-light);
}
.footer__links a:hover {
  color: var(--accent);
}
.footer__links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 239, 230, 0.52);
}

/* ---------- motion ---------- */

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 79, 31, 0.55);
  }
  60%,
  100% {
    box-shadow: 0 0 0 7px rgba(255, 79, 31, 0);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 370px) {
  :root {
    --gutter: 17px;
  }
  .hero__star {
    width: 31px;
    height: 31px;
    top: 88px;
    right: 15px;
  }
  .hero__desc {
    font-size: 13.5px;
  }
  .section__title {
    font-size: 35px;
  }
  .post__title {
    font-size: 19px;
  }
  .nav__link {
    gap: 5px;
    padding-left: 8px;
    font-size: 8.5px;
  }
  .footer__word {
    font-size: 36px;
  }
}

/* ---------- desktop frame ---------- */

@media (min-width: 720px) {
  .page {
    margin: 38px auto;
    border: 1px solid var(--ink);
    box-shadow: 14px 14px 0 rgba(11, 11, 10, 0.1);
  }
  body {
    background-size: 10px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
