/* =========================================================
   Саид Исоков - портфолио
   ========================================================= */

/* ---------- fonts (самостоятельный хостинг, без внешних запросов) ---------- */
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/oswald-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/oswald-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/oswald-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 700;
  font-display: swap;
  src: url("../assets/fonts/jbmono-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 700;
  font-display: swap;
  src: url("../assets/fonts/jbmono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/jbmono-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 {
  --bg: #0b0d10;
  --bg-alt: #12161b;
  --surface: #171c22;
  --surface-2: #1d232b;
  --border: #262d36;
  --text: #eef1f4;
  --text-dim: #9aa5b1;
  --text-dim-2: #6c7784;

  --accent: #c7d300;       /* неоновый лайм */
  --accent-soft: #c7d30024;
  --accent-2: #7c9a3c;     /* приглушённый оливковый */
  --accent-2-soft: #7c9a3c26;

  --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", "SFMono-Regular", monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;

  --shadow: 0 20px 50px -20px rgba(0,0,0,.6);
  --transition: .25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
/* эмодзи-иконки иногда рендерятся моно-версией символьного шрифта вместо
   цветной - явно просим цветное представление и подходящий эмодзи-шрифт */
.hero-meta, .contact-icon, .placeholder-icon, .featured-icon,
.launch-chip, .app-placeholder {
  font-variant-emoji: emoji;
}
button { color: inherit; font: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 200;
  will-change: transform;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Фоновая подложка на всю страницу: разлитые огни цвета акцента + оливы,
   тактическая сетка и диагональные полосы вместо плоского чёрного фона.
   position:fixed - подложка не двигается при скролле, даёт ощущение глубины. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  /* у каждого пятна конечная точка - тот же цвет с нулевой альфой (не голый
     "transparent"), иначе браузер даёт мутную серо-бурую кайму на стыке */
  background:
    radial-gradient(65vw 55vh at 6% -6%, rgba(124,154,60,.16) 0%, rgba(124,154,60,0) 62%),
    radial-gradient(60vw 60vh at 106% 6%, rgba(199,211,0,.15) 0%, rgba(199,211,0,0) 60%),
    radial-gradient(55vw 50vh at 12% 118%, rgba(199,211,0,.12) 0%, rgba(199,211,0,0) 58%),
    radial-gradient(65vw 55vh at 100% 110%, rgba(124,154,60,.14) 0%, rgba(124,154,60,0) 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* альфа задана прямо в цвете каждого слоя - раньше это дополнительно
     умножалось на общий opacity:.16 элемента и сетку было почти не видно */
  background-image:
    repeating-linear-gradient(135deg, rgba(199,211,0,.035) 0 3px, rgba(199,211,0,0) 3px 34px),
    linear-gradient(rgba(124,154,60,.1) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(124,154,60,.1) 1.5px, transparent 1.5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.2'/%3E%3C/svg%3E");
  background-size: auto, 64px 64px, 64px 64px, 140px 140px;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .01em;
  text-wrap: balance;
}

/* монокод: числа, теги, технические подписи - опознавательный знак QA/dev */
.section-tag,
.timeline-period,
.edu-year,
.fact-num, .fact-plus,
.logo,
.contact-value,
.lang-switch-btn,
.launch-chip,
.project-tag,
.skill-chip,
.pill,
.eyebrow {
  font-family: var(--font-mono);
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-accent {
  background: var(--accent);
  color: #12150a;
  box-shadow: 0 10px 30px -10px var(--accent-soft), 0 0 0 1px transparent;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(199,211,0,.55); }
.btn:active { transform: scale(.96); }
.btn-ghost {
  background: rgba(11,13,16,.55);
  backdrop-filter: blur(6px);
  border-color: rgba(255,255,255,.28);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(11,13,16,.75); border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11,13,16,.7);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.scrolled {
  border-color: var(--border);
  background: rgba(11,13,16,.9);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.logo {
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 1.1rem;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-link {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-dim);
  position: relative;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-link:hover::after { width: 100%; }

.nav-cta { padding: 10px 22px; font-size: .88rem; }

.lang-switch {
  display: flex;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch-btn {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text-dim-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lang-switch-btn:hover { color: var(--text); }
.lang-switch-btn.active { background: var(--accent); color: #12150a; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
}
.burger span {
  display: block; height: 2px; width: 24px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 74px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -5%;
  /* без непрозрачной подложки - хero делит общий фон страницы (body::before),
     здесь только лёгкая дополнительная подсветка поверх него, без шва на стыке секций */
  background:
    radial-gradient(700px 500px at 85% 15%, rgba(199,211,0,.1), rgba(199,211,0,0) 60%),
    radial-gradient(600px 500px at 10% 90%, rgba(124,154,60,.11), rgba(124,154,60,0) 55%);
  z-index: -1;
  animation: heroDrift 22s ease-in-out infinite alternate;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,154,60,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,154,60,.14) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 60% 30%, black, transparent 70%);
}
@keyframes heroDrift {
  0% { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 30px -20px, -25px 25px, 0 0; }
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 80px 24px 60px;
}

.hero-text {
  position: relative;
}
.hero-text::before {
  content: "";
  position: absolute;
  inset: -24px -16px;
  background: radial-gradient(120% 100% at 0% 40%, rgba(5,6,7,.55), rgba(5,6,7,0) 75%);
  z-index: -1;
  pointer-events: none;
}
.hero-text .reveal:nth-child(1) { transition-delay: .05s; }
.hero-text .reveal:nth-child(2) { transition-delay: .16s; }
.hero-text .reveal:nth-child(3) { transition-delay: .27s; }
.hero-text .reveal:nth-child(4) { transition-delay: .38s; }
.hero-text .reveal:nth-child(5) { transition-delay: .49s; }

.hero-photo {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  transition-delay: .2s;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: radial-gradient(circle at 50% 30%, var(--accent-soft), transparent 70%);
  z-index: -1;
  border-radius: 50%;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 3px solid var(--text);
  box-shadow: var(--shadow);
}
/* два шарика, вращающихся по кругу рамки - в отдельных обёртках, каждая
   крутится сама по себе (transform: rotate), а точка сидит на краю обёртки */
.orbit-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: orbitSpin 16s linear infinite;
}
.orbit-wrap-a { animation-duration: 15s; }
.orbit-wrap-b { animation-duration: 21s; animation-direction: reverse; }
.orbit-dot {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px 1px currentColor;
}
.orbit-dot-a { background: var(--accent-2); color: var(--accent-2); }
.orbit-dot-b { background: var(--accent); color: var(--accent); top: auto; bottom: -8px; }
@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(3.1rem, 8.5vw, 5.8rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 22px;
  letter-spacing: -.02em;
}
.accent-text { color: var(--accent); }

.hero-lead {
  max-width: 640px;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-actions .btn { padding: 13px 20px; font-size: .92rem; }

.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--text-dim-2);
}
.meta-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color var(--transition);
}
.meta-link:hover { color: var(--accent); }
.meta-link:active { transform: scale(.96); }

.icon-tg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.15em;
  display: inline-block;
}

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollcue 1.6s infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- HUD-уголки (наведение) ---------- */
/* Общий фирменный акцент: скобки-мишень "прицела" по углам карточки при наведении.
   Используем ::before там, где он ещё не занят под другой эффект. */
.hud-corners { position: relative; }
.hud-corners::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 3;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 2px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 16px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 2px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 16px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 2px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 16px 2px no-repeat;
}
.hud-corners:hover::before { opacity: 1; }

/* project-card / app-card уже используют ::before под "прожектор" - уголки вешаем на ::after */
.project-card::after,
.app-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 3;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 2px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 18px 2px no-repeat;
}
.project-card:hover::after,
.app-card:hover::after { opacity: 1; }

/* ---------- sections (generic) ---------- */
.section { padding: 120px 0; }
.section-alt { background: rgba(8,10,12,.82); }

/* Фоновый водяной знак номера секции - сквозной опознавательный элемент дизайна */
.section-head { position: relative; }
.section-head::before {
  content: attr(data-num);
  position: absolute;
  top: -.5em;
  left: -.06em;
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 12vw, 9rem);
  font-weight: 700;
  color: var(--accent);
  opacity: .18;
  line-height: 1;
  letter-spacing: -.02em;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  white-space: nowrap;
}
.section-head::after {
  content: "";
  position: absolute;
  inset: -18px -14px;
  background: radial-gradient(90% 130% at 20% 45%, rgba(5,6,7,.6), rgba(5,6,7,0) 78%);
  z-index: 0;
  pointer-events: none;
  border-radius: 20px;
}
.section-head > * { position: relative; z-index: 2; }

.section-tag {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 1rem;
  margin: 0 0 12px;
}
.section-title {
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.section-desc {
  position: relative;
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 48px;
  font-size: 1.02rem;
}
.section-desc::before {
  content: "";
  position: absolute;
  inset: -10px -12px;
  background: radial-gradient(100% 160% at 15% 50%, rgba(5,6,7,.55), rgba(5,6,7,0) 78%);
  z-index: -1;
  pointer-events: none;
  border-radius: 16px;
}
.section-desc-center::before {
  background: radial-gradient(70% 160% at 50% 50%, rgba(5,6,7,.55), rgba(5,6,7,0) 78%);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-left { display: flex; flex-direction: column; }
.about-text { position: relative; margin-top: 24px; }
.about-text::before {
  content: "";
  position: absolute;
  inset: -16px -12px;
  background: radial-gradient(100% 115% at 20% 40%, rgba(5,6,7,.55), rgba(5,6,7,0) 78%);
  z-index: -1;
  pointer-events: none;
  border-radius: 20px;
}
.about-text p { position: relative; color: var(--text-dim); margin: 0 0 18px; font-size: 1.02rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-facts {
  display: grid;
  gap: 18px;
}
.fact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fact-num-line { display: flex; align-items: baseline; gap: 2px; }
.fact-num, .fact-plus { font-size: 2.2rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.fact-label { color: var(--text-dim); font-size: .92rem; }

/* ---------- timeline ---------- */
.timeline {
  position: relative;
  margin-top: 40px;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -39px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
}
.timeline-dot-active { animation: dotPulse 2.2s ease-out infinite; }
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.timeline-head h3 { font-size: 1.4rem; }
.timeline-period {
  font-size: .82rem;
  color: var(--accent);
  font-weight: 600;
}
.timeline-sub { color: var(--text-dim-2); font-size: .9rem; margin: 0 0 16px; }
.timeline-list { margin: 0; padding-left: 20px; color: var(--text-dim); display: grid; gap: 8px; }
.timeline-list li { font-size: .96rem; }

/* ---------- launch chip & subsection head ---------- */
.launch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid #c7d30044;
  color: var(--accent);
  font-weight: 700;
  font-size: .76rem;
  margin-bottom: 14px;
  animation: chipGlow 2.6s ease-in-out infinite;
}
@keyframes chipGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(199,211,0,.3); }
  50% { box-shadow: 0 0 14px 2px rgba(199,211,0,.35); }
}
.subsection-head { position: relative; margin: 8px 0 28px; padding-top: 32px; border-top: 1px solid var(--border); }
.subsection-head-first { padding-top: 0; border-top: none; margin-top: 4px; }
.subsection-head-center { text-align: center; }
.section-desc-center { text-align: center; margin-left: auto; margin-right: auto; }
.subsection-head::before {
  content: "";
  position: absolute;
  inset: 4px -12px;
  background: radial-gradient(100% 220% at 15% 60%, rgba(5,6,7,.55), rgba(5,6,7,0) 78%);
  z-index: -1;
  pointer-events: none;
  border-radius: 14px;
}
.subsection-head-center::before {
  background: radial-gradient(70% 220% at 50% 60%, rgba(5,6,7,.55), rgba(5,6,7,0) 78%);
}
.subsection-head > * { position: relative; }
.subsection-head .section-tag { margin: 0; font-size: 1.05rem; letter-spacing: .08em; }

/* ---------- apps ---------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.app-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 1;
}
.app-card:hover::before { opacity: 1; }
.app-card:hover {
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateY(-6px) scale(1.02);
  border-color: #ffffff22;
  box-shadow: var(--shadow);
}
.app-body { position: relative; z-index: 2; padding: 22px 24px 26px; }
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.app-icon { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; border: 1px solid var(--border); }
.app-head h3 { font-size: 1.35rem; }

/* ---------- carousel ---------- */
/* Carousel renders as a small centered thumbnail (not full card width) so screenshots
   stay compact while still showing the whole image, uncropped. */
.app-carousel {
  display: flex;
  justify-content: center;
  padding: 22px 20px 6px;
}
.carousel-frame { position: relative; width: 100%; max-width: 190px; }
.app-carousel-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
/* ArzonTop screenshots are taller (raw device shots) - own ratio so nothing gets cropped */
.app-carousel.tall .carousel-frame { max-width: 168px; }
.app-carousel.tall .app-carousel-track { aspect-ratio: 577 / 1280; }
.app-carousel-track::-webkit-scrollbar { display: none; }
.app-slide { flex: 0 0 100%; scroll-snap-align: start; }
.app-slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(11,13,16,.8);
  border: 1px solid #ffffff44;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}
.carousel-arrow:hover { background: var(--accent); color: #12150a; border-color: var(--accent); }
.carousel-arrow:active { transform: translateY(-50%) scale(.9); }
.carousel-prev { left: -18px; }
.carousel-next { right: -18px; }
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(11,13,16,.55);
  backdrop-filter: blur(3px);
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.carousel-dot.active { background: var(--accent); transform: scale(1.3); }
.app-carousel.single .carousel-arrow,
.app-carousel.single .carousel-dots { display: none; }

/* zoomable images (open fullscreen lightbox on click) */
.carousel-frame, .project-media { position: relative; }
.zoomable { cursor: zoom-in; }
.carousel-frame::after,
.project-media::after {
  content: "⤢";
  position: absolute;
  bottom: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(11,13,16,.75);
  border: 1px solid #ffffff33;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 6;
}
.carousel-frame:hover::after,
.project-media:hover::after { opacity: 1; }

/* ---------- кастомный курсор-кольцо ---------- */
html.custom-cursor, html.custom-cursor a, html.custom-cursor button { cursor: none; }
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1.5px solid rgba(238,241,244,.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3000;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width .25s cubic-bezier(.16,.8,.24,1), height .25s cubic-bezier(.16,.8,.24,1),
    background-color .25s ease, border-color .25s ease, opacity .2s ease;
}
.cursor-ring.visible { opacity: 1; }
.cursor-ring.hover {
  width: 86px;
  height: 86px;
  background: rgba(238,241,244,.1);
  border-color: var(--accent);
}
@media (hover: none), (pointer: coarse) {
  .cursor-ring { display: none !important; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,6,8,.94);
  backdrop-filter: blur(6px);
  padding: 56px;
}
.lightbox.open { display: flex; }
body.lightbox-locked { overflow: hidden; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.7);
  object-fit: contain;
  opacity: 0;
  transform: scale(.97);
  transition: opacity .25s ease, transform .25s ease;
}
.lightbox.open .lightbox-img { opacity: 1; transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 22px; right: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid #ffffff33;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-close:hover { background: var(--accent); color: #12150a; transform: rotate(90deg); }
.lightbox .lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid #ffffff33;
  color: var(--text);
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.lightbox .lightbox-arrow:hover { background: var(--accent); color: #12150a; }
.lightbox .lightbox-prev { left: 22px; }
.lightbox .lightbox-next { right: 22px; }
@media (max-width: 640px) {
  .lightbox { padding: 20px; }
  .lightbox .lightbox-arrow { width: 42px; height: 42px; font-size: 1.4rem; }
  .lightbox-close { width: 38px; height: 38px; top: 12px; right: 12px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 40px;
}
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 1;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover {
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateY(-6px) scale(1.02);
  border-color: #ffffff22;
  box-shadow: var(--shadow);
}
.project-media {
  aspect-ratio: 16/9;
  background: var(--surface-2);
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-media img { transform: scale(1.08); }

.app-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    repeating-linear-gradient(135deg, var(--surface-2) 0 14px, #ffffff05 14px 28px);
  color: var(--text-dim-2);
}
.app-placeholder.alt {
  background:
    repeating-linear-gradient(135deg, #7c9a3c15 0 14px, var(--surface-2) 14px 28px);
}
.placeholder-icon { font-size: 2.2rem; opacity: .85; }
.placeholder-text { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }

.project-body { padding: 24px 26px 28px; }
.project-tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.project-tag-locked { color: var(--text-dim); background: #ffffff0d; }
.project-body { position: relative; z-index: 2; }
.project-body h3 { font-size: 1.32rem; margin-bottom: 10px; }
.project-body p { color: var(--text-dim); font-size: .92rem; margin: 0; }
.project-desc { margin-bottom: 14px !important; }
.project-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.skill-chip {
  font-size: .76rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: border-color var(--transition), color var(--transition);
}
.project-card:hover .skill-chip { border-color: #ffffff2a; }
.project-list {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-dim);
  display: grid;
  gap: 6px;
  font-size: .86rem;
}
.project-list:last-child { margin-bottom: 0; }

/* ---------- skills ---------- */
.skills-featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
  margin-bottom: 28px;
}
.featured-skill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.featured-skill:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px -18px var(--accent-soft);
}
.featured-icon { font-size: 1.5rem; line-height: 1; }
.featured-label { font-weight: 700; font-size: .96rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.skill-card:hover { border-color: #ffffff22; transform: translateY(-3px); }
.skill-card h3 { font-size: 1.2rem; margin-bottom: 18px; color: var(--accent); }
.skill-card-wide { grid-column: 1 / -1; }
.skill-card-wide .pills { gap: 10px 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-size: .84rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.pill:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

.languages {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.languages h3 { font-size: 1.2rem; margin-bottom: 20px; color: var(--accent); }
.lang-row { display: grid; gap: 18px; }
.lang-item {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  align-items: center;
  gap: 16px;
  font-size: 1.08rem;
  font-weight: 600;
}
.lang-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.lang-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(.16,.8,.24,1);
}
.lang-level { color: var(--text-dim-2); text-align: right; font-size: .95rem; font-weight: 600; }

/* ---------- education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 40px;
}
.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 34px;
}
.edu-year {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 220px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-dim);
  border-right: 1px solid var(--border);
  padding-right: 32px;
}
.edu-type {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 1.02rem;
}
.edu-body { flex: 1 1 auto; min-width: 0; }
.edu-card {
  transition: border-color var(--transition), transform var(--transition);
}
.edu-card:hover { border-color: #ffffff22; transform: translateY(-3px); }
.edu-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.edu-sub { color: var(--text-dim-2); font-size: .86rem; margin: 0 0 14px; }
.edu-card p:last-child { color: var(--text-dim); font-size: .92rem; margin: 0; }
.edu-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 20px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: transform var(--transition), border-color var(--transition);
}
button.contact-card {
  font-family: inherit;
  appearance: none;
  cursor: pointer;
  width: 100%;
}
.contact-card:is(a, button):hover { transform: translateY(-4px); border-color: var(--accent); }
.contact-card:is(a, button):active { transform: translateY(-1px) scale(.98); }
.contact-icon { font-size: 1.6rem; }
.contact-label { color: var(--text-dim-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.contact-value { font-size: 1.04rem; font-weight: 600; }

/* ---------- copy-to-clipboard ---------- */
.copy-done { display: none; }
.copy-trigger.copied .copy-label { display: none; }
.copy-trigger.copied .copy-done { display: inline; }
.contact-card .copy-done { color: var(--accent); }
.copy-hint {
  font-size: .78rem;
  color: var(--text-dim-2);
  margin-top: 2px;
}
.copy-trigger.copied .copy-hint { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { background: rgba(11,13,16,.55); border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 600;
}
.footer-inner a { transition: color var(--transition); }
.footer-inner a:hover { color: var(--accent); }

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(.98);
  transition: opacity .7s cubic-bezier(.16,.8,.24,1), transform .7s cubic-bezier(.16,.8,.24,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* stagger: incremental transition-delay for direct children of a grid/list */
.stagger > *:nth-child(1) { transition-delay: .04s; }
.stagger > *:nth-child(2) { transition-delay: .10s; }
.stagger > *:nth-child(3) { transition-delay: .16s; }
.stagger > *:nth-child(4) { transition-delay: .22s; }
.stagger > *:nth-child(5) { transition-delay: .28s; }
.stagger > *:nth-child(6) { transition-delay: .34s; }
.stagger > *:nth-child(7) { transition-delay: .40s; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-featured { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 74px; left: 0; right: 0;
    background: rgba(11,13,16,.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-130%);
    transition: transform var(--transition);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-cta { display: none; }
  .burger { display: flex; }
  .project-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .skills-featured { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .lang-item { grid-template-columns: 90px 1fr 70px; }
  .hero-meta { flex-direction: column; gap: 10px; align-items: flex-start; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { order: -1; max-width: 240px; }
  .edu-card { flex-direction: column; gap: 14px; padding: 24px 22px; }
  .edu-year { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; gap: 8px 14px; border-right: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 14px; width: 100%; }
}
