/* ============================================================
   style.css — Daniil Ratnikov Portfolio
   Design: Advanced Neumorphism + Glassmorphism accents
   ============================================================ */

/* ═══ CUSTOM PROPERTIES ═══ */
:root {
  --bg:       #edf0f7;
  --bg-d:     #e3e7f0;
  --card:     #edf0f7;
  --fg:       #1e2235;
  --fg-m:     #5e6480;
  --fg-s:     #9197b3;

  --accent:   #6d5dfc;
  --accent-2: #4facfe;
  --accent-3: #f857a6;
  --success:  #3fc58e;
  --warning:  #f59e0b;
  --error:    #ef4444;

  --sh-l:  rgba(255,255,255,0.95);
  --sh-d:  rgba(163,177,198,0.55);

  --r:     16px;
  --r-sm:  10px;
  --r-lg:  24px;
  --r-pill:999px;

  --ff-head: 'Space Grotesk', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;

  --ease:    cubic-bezier(0.4,0,0.2,1);
  --tr:      0.3s cubic-bezier(0.4,0,0.2,1);
  --tr-slow: 0.6s cubic-bezier(0.4,0,0.2,1);

  --nav-h: 68px;
  --grad:  linear-gradient(135deg, var(--accent), var(--accent-2));
  --border:rgba(255,255,255,0.7);
}

[data-theme="dark"] {
  --bg:    #1a1c27;
  --bg-d:  #13151e;
  --card:  #1e2130;
  --fg:    #e0e5f5;
  --fg-m:  #7b82a8;
  --fg-s:  #4a5070;

  --accent:   #7c6dfd;
  --accent-2: #5bb8ff;

  --sh-l:  rgba(255,255,255,0.04);
  --sh-d:  rgba(0,0,0,0.5);
  --border:rgba(255,255,255,0.06);
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--tr), color var(--tr);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-d); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }

h1,h2,h3,h4,h5 { font-family: var(--ff-head); line-height: 1.2; }
a { color: var(--accent); text-decoration: none; transition: color var(--tr); }
ul { list-style: none; }
img { max-width: 100%; }

/* ═══ LAYOUT ═══ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section--alt { background: var(--bg-d); }
.section-header { text-align: center; margin-bottom: 3rem; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  padding: 6px 16px;
  background: var(--card);
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l);
  border-radius: var(--r-pill);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══ SCROLL PROGRESS ═══ */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: var(--grad);
  width: 0%; z-index: 9999;
  transition: width 0.1s linear;
}

/* ═══ NAVIGATION ═══ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--tr), box-shadow var(--tr);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(237,240,247,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 24px rgba(0,0,0,0.08);
}
[data-theme="dark"] .nav.scrolled {
  background: rgba(26,28,39,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 24px rgba(0,0,0,0.3);
}

.nav__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  height: 100%; display: flex; align-items: center; gap: 1rem;
}

.nav__logo {
  flex-shrink: 0;
  width: 42px; height: 42px;
  background: var(--grad);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 4px 4px 12px var(--sh-d), -2px -2px 8px var(--sh-l), 0 0 20px rgba(109,93,252,0.3);
  transition: transform var(--tr), box-shadow var(--tr);
}
.nav__logo:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 18px var(--sh-d), -2px -2px 8px var(--sh-l), 0 0 28px rgba(109,93,252,0.4);
}
.nav__logo-text { font-family: var(--ff-head); font-weight: 800; font-size: 0.85rem; color: #fff; }

.nav__links { display: flex; gap: 2px; margin-left: auto; }

.nav__link {
  color: var(--fg-m); font-size: 0.875rem; font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: all var(--tr);
}
.nav__link:hover, .nav__link.active {
  color: var(--accent);
  background: var(--card);
  box-shadow: 3px 3px 8px var(--sh-d), -3px -3px 8px var(--sh-l);
}

.nav__actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* ═══ BTN-ICON ═══ */
.btn-icon {
  position: relative;
  width: 40px; height: 40px;
  border: none; background: var(--card);
  color: var(--fg-m); border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l);
  font-family: var(--ff-body); font-size: 0.8rem; font-weight: 700;
  transition: all var(--tr);
}
.btn-icon:hover { color: var(--accent); box-shadow: 6px 6px 14px var(--sh-d), -6px -6px 14px var(--sh-l); }
.btn-icon:active { box-shadow: inset 3px 3px 8px var(--sh-d), inset -3px -3px 8px var(--sh-l); }

.icon-sun, .icon-moon { width: 17px; height: 17px; position: absolute; transition: all var(--tr); }
[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"]  .icon-sun  { opacity: 0; transform: rotate(90deg)  scale(0.5); }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 12px 28px;
  border-radius: var(--r-pill);
  font-family: var(--ff-body); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--tr);
  white-space: nowrap;
}
.btn i { width: 18px; height: 18px; }

.btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: 6px 6px 16px var(--sh-d), -2px -2px 8px var(--sh-l), 0 4px 20px rgba(109,93,252,0.35);
}
.btn--primary:hover {
  transform: translateY(-2px); color: #fff;
  box-shadow: 8px 8px 22px var(--sh-d), -2px -2px 8px var(--sh-l), 0 8px 30px rgba(109,93,252,0.45);
}

.btn--secondary {
  background: var(--card); color: var(--fg);
  box-shadow: 6px 6px 14px var(--sh-d), -6px -6px 14px var(--sh-l);
}
.btn--secondary:hover {
  transform: translateY(-2px); color: var(--accent);
  box-shadow: 8px 8px 20px var(--sh-d), -8px -8px 20px var(--sh-l);
}

.btn--full { width: 100%; justify-content: center; }

/* ═══ BURGER ═══ */
.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 10px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  position: relative; z-index: 1002; /* stays above mobile-menu overlay */
  border-radius: 50%;
  transition: background var(--tr);
}
.burger:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.burger span {
  display: block; width: 22px; height: 2px;
  background: var(--fg); border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.2s ease, background 0.3s ease;
  transform-origin: center;
}
.burger.active span { background: var(--accent); }
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══ MOBILE MENU ═══ */
body.no-scroll { overflow: hidden; }

.mobile-menu {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  z-index: 1001; /* above nav (1000), below burger (1002) */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  padding: calc(var(--nav-h) + 2rem) 2rem 3rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-menu__links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.1rem; width: 100%; max-width: 380px;
}
.mobile-menu__links li {
  width: 100%; text-align: center;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open .mobile-menu__links li {
  opacity: 1; transform: translateY(0);
  transition-delay: calc(var(--i, 0) * 0.04s + 0.15s);
}
.mobile-menu__links a {
  display: block; padding: 0.85rem 1.5rem;
  font-size: 1.35rem; font-family: var(--ff-head); font-weight: 700;
  color: var(--fg); border-radius: var(--r-md);
  transition: all var(--tr);
  position: relative;
}
.mobile-menu__links a::after {
  content: ''; position: absolute; left: 50%; bottom: 0.55rem;
  width: 0; height: 2px; background: var(--grad);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}
.mobile-menu__links a:hover,
.mobile-menu__links a:active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.mobile-menu__links a:hover::after { width: 40%; }

.mobile-menu__footer {
  display: flex; gap: 0.9rem;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s ease 0.55s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.55s;
}
.mobile-menu.open .mobile-menu__footer { opacity: 1; transform: translateY(0); }
.mobile-menu__footer a {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--fg-m);
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l);
  transition: all var(--tr);
}
.mobile-menu__footer a:hover {
  color: var(--accent); transform: translateY(-3px);
  box-shadow: 6px 6px 14px var(--sh-d), -6px -6px 14px var(--sh-l);
}
.mobile-menu__footer a i { width: 20px; height: 20px; }

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
  text-align: center;
}

.hero__orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); animation: float-orb 10s ease-in-out infinite; }
.orb--1 { width: 520px; height: 520px; background: radial-gradient(circle,rgba(109,93,252,.18),transparent 70%); top: -120px; right: -80px; animation-delay: 0s; }
.orb--2 { width: 420px; height: 420px; background: radial-gradient(circle,rgba(79,172,254,.14),transparent 70%); bottom: -60px; left: -60px; animation-delay: 4s; }
.orb--3 { width: 320px; height: 320px; background: radial-gradient(circle,rgba(248,87,166,.10),transparent 70%); top: 45%; left: 35%; animation-delay: 8s; }
@keyframes float-orb {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(18px,-28px) scale(1.05); }
  66%      { transform: translate(-14px,18px) scale(0.95); }
}

.hero__content { position: relative; z-index: 1; max-width: 820px; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 8px 20px;
  background: var(--card); border-radius: var(--r-pill);
  font-size: 0.85rem; font-weight: 500; color: var(--accent);
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l);
  margin-bottom: 1.5rem;
}
.hero__badge i { width: 14px; height: 14px; animation: pulse 2s ease infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.25)} }

.hero__title { font-size: clamp(2.4rem,6vw,4.4rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero__name {
  display: block;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 0.2rem;
}
.hero__role { display: block; color: var(--fg-m); font-size: clamp(1.1rem,3vw,1.7rem); font-weight: 500; min-height: 1.6em; }
.cursor-blink { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero__desc { font-size: 1.05rem; color: var(--fg-m); max-width: 620px; margin: 0 auto 2rem; line-height: 1.75; }

.hero__stats {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; margin-bottom: 2rem;
  background: var(--card); padding: 1.25rem 2.5rem; border-radius: var(--r-lg);
  box-shadow: 8px 8px 22px var(--sh-d), -8px -8px 22px var(--sh-l);
  flex-wrap: wrap;
}
.hero__stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero__stat-value { display: flex; align-items: baseline; }
.hero__stat-num {
  font-family: var(--ff-head); font-size: 2.4rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.hero__stat-plus { font-family: var(--ff-head); font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.hero__stat-label { font-size: 0.78rem; color: var(--fg-m); font-weight: 500; }
.hero__stat-div { width: 1px; height: 48px; background: var(--border); }

.hero__cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* Floating tags */
.hero__float-tags { position: absolute; inset: 0; pointer-events: none; display: none; z-index: 0; }
@media (min-width: 1100px) { .hero__float-tags { display: block; } }
.float-tag {
  position: absolute;
  font-family: var(--ff-mono); font-size: 0.75rem; font-weight: 500;
  color: var(--accent); background: var(--card);
  padding: 6px 14px; border-radius: var(--r-pill);
  box-shadow: 4px 4px 12px var(--sh-d), -4px -4px 12px var(--sh-l);
  top: var(--ty); left: var(--tx);
  animation: float-tag 5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.float-tag--r { left: auto; right: var(--tx); }
@keyframes float-tag {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Scroll hint */
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--fg-s); font-size: 0.72rem;
  animation: bounce-y 2.5s ease infinite;
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--fg-s); border-radius: 12px;
  display: flex; align-items: flex-start; justify-content: center; padding: 4px;
}
.scroll-mouse__dot { width: 3px; height: 7px; background: var(--fg-s); border-radius: 2px; animation: scroll-dot 2s ease infinite; }
@keyframes scroll-dot { 0%,100%{transform:translateY(0);opacity:1} 60%{transform:translateY(12px);opacity:.2} }
@keyframes bounce-y { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

/* ═══ REVEAL ANIMATIONS ═══ */
.reveal, .reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal       { transform: translateY(28px); }
.reveal-up    { transform: translateY(40px); }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal.visible,.reveal-up.visible,.reveal-left.visible,.reveal-right.visible {
  opacity: 1; transform: translate(0,0);
}
[data-delay="0"] { transition-delay: 0s; }
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }

/* ═══ ABOUT ═══ */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; align-items: start; }
.about-left { text-align: center; }

.avatar-wrap { margin-bottom: 1.5rem; display: flex; justify-content: center; }
.avatar { position: relative; width: 170px; height: 170px; display: flex; align-items: center; justify-content: center; }
.avatar > span {
  width: 170px; height: 170px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-head); font-size: 2.8rem; font-weight: 800; color: #fff;
  box-shadow: 10px 10px 28px var(--sh-d), -10px -10px 28px var(--sh-l), 0 0 40px rgba(109,93,252,.3);
  z-index: 1;
}
.avatar-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box;
  animation: spin 9s linear infinite;
}
.avatar-ring--2 { inset: -24px; animation: spin 14s linear infinite reverse; opacity: 0.45; }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

.about-contacts { display: flex; flex-direction: column; gap: 0.6rem; }
.cpill {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 10px 16px;
  background: var(--card); border-radius: var(--r-pill);
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l);
  color: var(--fg-m); font-size: 0.82rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all var(--tr); text-align: left;
}
.cpill:hover { color: var(--accent); box-shadow: 5px 5px 14px var(--sh-d), -5px -5px 14px var(--sh-l), 0 0 16px rgba(109,93,252,.2); }
.cpill i { width: 15px; height: 15px; flex-shrink: 0; }

.about-text { color: var(--fg-m); line-height: 1.8; margin-bottom: 1rem; font-size: 1rem; }

.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.hl-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem; background: var(--card); border-radius: var(--r);
  box-shadow: 5px 5px 12px var(--sh-d), -5px -5px 12px var(--sh-l);
  transition: transform var(--tr);
}
.hl-item:hover { transform: translateY(-3px); }
.hl-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background-color: color-mix(in srgb, var(--c) 14%, transparent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hl-icon i { width: 18px; height: 18px; color: var(--c); }
.hl-item strong { display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 2px; }
.hl-item span   { display: block; font-size: 0.78rem; color: var(--fg-m); }

/* ═══ TIMELINE ═══ */
.timeline { max-width: 820px; margin: 0 auto; padding-left: 56px; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 22px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  opacity: 0.25;
}
.tl-item { position: relative; margin-bottom: 2.5rem; }
.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute; left: -56px; top: 1.4rem;
  width: 46px; height: 46px;
  background: var(--grad); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; z-index: 1;
  box-shadow: 4px 4px 12px var(--sh-d), -2px -2px 8px var(--sh-l), 0 0 20px rgba(109,93,252,.3);
}
.tl-dot i { width: 20px; height: 20px; color: #fff; }

.tl-card {
  background: var(--card); border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: 8px 8px 20px var(--sh-d), -8px -8px 20px var(--sh-l);
  transition: transform var(--tr);
}
.tl-card:hover { transform: translateX(5px); }

.tl-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; gap: 1rem; }
.tl-period { display: block; font-size: 0.78rem; color: var(--accent); font-weight: 600; font-family: var(--ff-mono); margin-bottom: 5px; }
.tl-role { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.tl-company { display: flex; align-items: center; gap: 6px; color: var(--fg-m); font-size: 0.86rem; flex-wrap: wrap; }
.tl-company i { width: 13px; height: 13px; }
.tl-dur {
  font-size: 0.78rem; color: var(--fg-s);
  padding: 4px 12px;
  background: var(--bg-d);
  box-shadow: inset 3px 3px 6px var(--sh-d), inset -3px -3px 6px var(--sh-l);
  border-radius: var(--r-pill); white-space: nowrap; flex-shrink: 0;
}

/* Sub-projects inside timeline card */
.tl-project { margin-bottom: 1rem; }
.tl-project:last-of-type { margin-bottom: 0; }
.tl-project-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; color: var(--accent);
  font-family: var(--ff-mono);
  padding: 4px 12px; margin-bottom: 0.6rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--r-pill);
}
.tl-project-label i { width: 12px; height: 12px; }

.tl-team { font-size: 0.8rem; color: var(--fg-m); margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; }
.tl-team i { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

/* HR / Tech split */
.tl-section-sep { display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0 0.5rem; }
.tl-section-sep span { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-m); white-space: nowrap; opacity: 0.6; }
.tl-section-sep::before, .tl-section-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.tl-achs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; }
.tl-achs li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.9rem; color: var(--fg-m); line-height: 1.55; }
.tl-achs--hr li { color: var(--fg); font-weight: 600; }
.ai {
  width: 27px; height: 27px; border-radius: 7px;
  background-color: color-mix(in srgb, var(--c) 14%, transparent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.ai i { width: 13px; height: 13px; color: var(--c); }

.tech-stack { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 1rem; border-top: 1px solid var(--border); }
.tt {
  font-family: var(--ff-mono); font-size: 0.73rem;
  padding: 4px 10px;
  background: var(--bg-d);
  box-shadow: inset 2px 2px 5px var(--sh-d), inset -2px -2px 5px var(--sh-l);
  border-radius: var(--r-pill); color: var(--accent); font-weight: 500;
}

/* ═══ BADGES ═══ */
.badge { font-size: 0.7rem; padding: 3px 10px; border-radius: var(--r-pill); font-weight: 700; white-space: nowrap; }
.badge--remote  { background: rgba(63,197,142,.15);  color: var(--success); }
.badge--android { background: rgba(63,197,142,.15);  color: var(--success); }
.badge--java    { background: rgba(109,93,252,.15);  color: var(--accent); }
.badge--backend { background: rgba(79,172,254,.15);  color: var(--accent-2); }
.badge--game    { background: rgba(248,87,166,.15);  color: var(--accent-3); }
.badge--hw      { background: rgba(245,158,11,.15);  color: var(--warning); }
.badge--python  { background: rgba(63,197,142,.15);  color: #3fc58e; }

/* ═══ SKILLS ═══ */
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.sg {
  background: var(--card); border-radius: var(--r-lg); padding: 1.25rem;
  box-shadow: 6px 6px 16px var(--sh-d), -6px -6px 16px var(--sh-l);
  transition: transform var(--tr);
}
.sg:hover { transform: translateY(-4px); }
.sg__head { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.sg__head i { width: 18px; height: 18px; color: var(--accent); }
.sg__head h3 { font-size: 0.92rem; font-weight: 700; }
.sg__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st {
  font-size: 0.8rem; padding: 6px 13px;
  background: var(--bg-d);
  box-shadow: 3px 3px 7px var(--sh-d), -3px -3px 7px var(--sh-l);
  border-radius: var(--r-pill); color: var(--fg-m); font-weight: 500;
  transition: all var(--tr);
}
.st:hover, .st--hi {
  background: var(--card); color: var(--accent);
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l), 0 0 12px rgba(109,93,252,.18);
}

/* ═══ ACHIEVEMENTS ═══ */
.sub-title {
  font-size: 1.1rem; font-weight: 700; color: var(--fg-m);
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.sub-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.ach-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; margin-bottom: 3rem; }
.ach-card {
  background: var(--card); border-radius: var(--r-lg); padding: 1.25rem 1rem;
  box-shadow: 6px 6px 16px var(--sh-d), -6px -6px 16px var(--sh-l);
  text-align: center; transition: all var(--tr);
  position: relative; overflow: hidden;
}
.ach-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.ach-card--gold::before    { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.ach-card--silver::before  { background: linear-gradient(90deg,#9ca3af,#d1d5db); }
.ach-card--bronze::before  { background: linear-gradient(90deg,#b45309,#d97706); }
.ach-card--finalist::before{ background: var(--grad); }
.ach-card:hover { transform: translateY(-5px); box-shadow: 10px 10px 26px var(--sh-d), -10px -10px 26px var(--sh-l); }
.ach-top { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.medal { font-size: 2rem; }
.ach-place { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.ach-card h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.4rem; }
.ach-card p  { font-size: 0.78rem; color: var(--fg-m); line-height: 1.5; }

.kpi-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 1.25rem; }
.kpi-card {
  background: var(--card); border-radius: var(--r-lg); padding: 1.25rem 1rem;
  box-shadow: 6px 6px 16px var(--sh-d), -6px -6px 16px var(--sh-l);
  text-align: center; transition: all var(--tr);
}
.kpi-card:hover { transform: translateY(-5px); }
.kpi-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--r-pill);
  background-color: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--c); margin-bottom: 0.75rem; letter-spacing: .05em; text-transform: uppercase;
}
.kpi-num {
  font-family: var(--ff-head); font-size: 2.1rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1; margin-bottom: 0.3rem;
}
.kpi-ico { height: 2.4rem; display: flex; align-items: center; justify-content: center; margin-bottom: 0.3rem; }
.kpi-ico i { width: 34px; height: 34px; color: var(--accent); }
.kpi-label { font-size: 0.83rem; font-weight: 700; margin-bottom: 4px; }
.kpi-sub   { font-size: 0.73rem; color: var(--fg-m); line-height: 1.4; }

/* ═══ PROJECTS ═══ */
.proj-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
a.proj-card { color: inherit; }
.proj-card {
  background: var(--card); border-radius: var(--r-lg); padding: 1.25rem;
  box-shadow: 6px 6px 16px var(--sh-d), -6px -6px 16px var(--sh-l);
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: all var(--tr);
}
.proj-card:hover { transform: translateY(-6px); box-shadow: 12px 12px 28px var(--sh-d), -12px -12px 28px var(--sh-l); }
.proj-top { display: flex; align-items: flex-start; justify-content: space-between; }
.proj-icon {
  width: 50px; height: 50px; border-radius: var(--r);
  background-color: color-mix(in srgb, var(--c) 14%, transparent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 3px 3px 8px var(--sh-d), -3px -3px 8px var(--sh-l);
}
.proj-icon i { width: 22px; height: 22px; color: var(--c); }
.proj-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.proj-title { font-size: 1.05rem; font-weight: 700; }
.proj-desc  { font-size: 0.86rem; color: var(--fg-m); line-height: 1.65; flex: 1; }
.proj-foot  { display: flex; gap: 0.5rem; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.proj-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.83rem; font-weight: 600; color: var(--accent);
  padding: 6px 14px; background: var(--bg-d); border-radius: var(--r-pill);
  box-shadow: 3px 3px 8px var(--sh-d), -3px -3px 8px var(--sh-l);
  transition: all var(--tr);
}
.proj-link:hover { transform: translateY(-2px); box-shadow: 5px 5px 12px var(--sh-d), -5px -5px 12px var(--sh-l); }
.proj-link i { width: 13px; height: 13px; }
.proj-status {
  font-size: 0.78rem; font-weight: 600; color: var(--fg-m);
  padding: 4px 12px; background: var(--bg-d); border-radius: var(--r-pill);
  box-shadow: inset 2px 2px 5px var(--sh-d), inset -2px -2px 5px var(--sh-l);
}
.proj-status--live  { color: var(--success); background: rgba(63,197,142,.1); box-shadow: none; }
.proj-status--award { color: var(--warning); background: rgba(245,158,11,.1);  box-shadow: none; }

/* Featured project card — JGuardrails (flagship open source) */
.proj-card--featured {
  position: relative; grid-column: span 2;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--card)) 0%, var(--card) 60%);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.proj-card--featured::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--r-lg);
  padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.3;
}
.proj-card--featured .proj-desc { font-size: 0.92rem; }
.proj-star {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.8rem; font-weight: 700; color: var(--warning);
  padding: 3px 10px; margin-left: 8px;
  background: rgba(245,158,11,.14);
  border-radius: var(--r-pill); vertical-align: middle;
}
.proj-star i { width: 13px; height: 13px; fill: currentColor; }

/* Section subtitle */
.section-subtitle {
  margin-top: 0.6rem; font-size: 0.95rem; color: var(--fg-m);
  max-width: 680px; margin-left: auto; margin-right: auto; line-height: 1.6;
}

/* ═══ HABR PUBLICATIONS ═══ */
.habr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.habr-card {
  display: flex; flex-direction: column; gap: 0.85rem;
  background: var(--card); border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: 6px 6px 16px var(--sh-d), -6px -6px 16px var(--sh-l);
  color: inherit; transition: all var(--tr);
  position: relative; overflow: hidden;
}
.habr-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.habr-card:hover { transform: translateY(-6px); box-shadow: 12px 12px 28px var(--sh-d), -12px -12px 28px var(--sh-l); }
.habr-card:hover::before { transform: scaleX(1); }

.habr-card__head { display: flex; justify-content: space-between; align-items: center; }
.habr-card__logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
  box-shadow: 3px 3px 8px var(--sh-d), -3px -3px 8px var(--sh-l);
}
.habr-card__logo i { width: 18px; height: 18px; }
.habr-card__date { font-size: 0.75rem; color: var(--fg-m); font-family: var(--ff-mono); }

.habr-card__title { font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.habr-card__desc { font-size: 0.86rem; color: var(--fg-m); line-height: 1.6; flex: 1; }

.habr-card__tags { display: flex; flex-wrap: wrap; gap: 5px; }
.habr-tag {
  font-size: 0.7rem; font-weight: 600; padding: 3px 10px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--r-pill); font-family: var(--ff-mono);
}

.habr-card__stats {
  display: flex; align-items: center; gap: 1rem; padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.habr-stat { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--fg-m); font-weight: 600; }
.habr-stat i { width: 14px; height: 14px; }
.habr-card__link { margin-left: auto; color: var(--accent); transition: transform 0.25s ease; }
.habr-card__link i { width: 18px; height: 18px; }
.habr-card:hover .habr-card__link { transform: translate(3px, -3px); }

.habr-profile {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--accent);
  padding: 12px 22px; background: var(--card); border-radius: var(--r-pill);
  box-shadow: 5px 5px 12px var(--sh-d), -5px -5px 12px var(--sh-l);
  transition: all var(--tr);
  margin: 0 auto; display: flex; width: fit-content;
}
.habr-profile:hover { transform: translateY(-3px); box-shadow: 8px 8px 18px var(--sh-d), -8px -8px 18px var(--sh-l); }
.habr-profile i { width: 16px; height: 16px; }

/* Platform blocks (Habr / dev.to) */
.pub-platform { margin-bottom: 2.5rem; }
.pub-platform:last-child { margin-bottom: 0; }
.pub-platform__head {
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 1.25rem; padding: 0 0.2rem;
}
.pub-platform__logo {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; font-family: var(--ff-mono);
  box-shadow: 4px 4px 10px var(--sh-d), -4px -4px 10px var(--sh-l);
  flex-shrink: 0;
}
.pub-platform__logo--habr {
  background: #4c8eda; color: #fff;
  font-size: 1.4rem;
}
.pub-platform__logo--devto {
  background: #0a0a0a; color: #fff;
  font-size: 0.9rem; letter-spacing: -0.5px;
}
:root.dark .pub-platform__logo--devto { background: #fff; color: #0a0a0a; }
.pub-platform__info { flex: 1; min-width: 0; }
.pub-platform__name { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.pub-platform__sub { font-size: 0.78rem; color: var(--fg-m); display: block; margin-top: 2px; }
.pub-platform__all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  padding: 8px 14px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transition: all var(--tr); flex-shrink: 0;
}
.pub-platform__all:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateX(2px);
}
.pub-platform__all i { width: 14px; height: 14px; }

/* dev.to accent variation */
.habr-card--devto::before { background: linear-gradient(90deg, #0a0a0a, #555); }
:root.dark .habr-card--devto::before { background: linear-gradient(90deg, #fff, #aaa); }

@media (max-width: 768px) {
  .habr-grid { grid-template-columns: 1fr; }
  .proj-card--featured { grid-column: span 1; }
  .pub-platform__head { flex-wrap: wrap; }
  .pub-platform__all { margin-left: 56px; }
}

/* ═══ GOALS ═══ */
.goals-tl {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1.5rem;
  position: relative;
}
.goals-tl::before {
  content: ''; position: absolute;
  left: 102px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  opacity: 0.2;
}
.goal-item { display: flex; align-items: center; gap: 0; }
.goal-year {
  width: 80px; text-align: right;
  font-family: var(--ff-mono); font-size: 0.75rem; font-weight: 600; color: var(--accent);
  flex-shrink: 0; padding-right: 0.5rem;
}
.goal-connector { width: 44px; display: flex; justify-content: center; flex-shrink: 0; z-index: 1; }
.goal-node {
  width: 38px; height: 38px; border-radius: 50%;
  background-color: color-mix(in srgb, var(--nc,var(--accent)) 18%, transparent);
  border: 2px solid var(--nc,var(--accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px color-mix(in srgb, var(--nc,var(--accent)) 30%, transparent);
}
.goal-node i { width: 16px; height: 16px; color: var(--nc,var(--accent)); }
.goal-card {
  flex: 1; background: var(--card); padding: 1rem 1.25rem;
  border-radius: var(--r-lg); margin-left: 0.75rem;
  box-shadow: 5px 5px 14px var(--sh-d), -5px -5px 14px var(--sh-l);
  transition: transform var(--tr);
}
.goal-card:hover { transform: translateX(5px); }
.goal-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.goal-card p  { font-size: 0.84rem; color: var(--fg-m); line-height: 1.5; }

/* ═══ EDUCATION ═══ */
.edu-card {
  display: flex; align-items: flex-start; gap: 1.5rem;
  background: var(--card); padding: 2rem; border-radius: var(--r-lg);
  box-shadow: 8px 8px 22px var(--sh-d), -8px -8px 22px var(--sh-l);
  max-width: 680px; margin: 0 auto; transition: transform var(--tr);
}
.edu-card:hover { transform: translateY(-4px); }
.edu-icon {
  width: 64px; height: 64px; background: var(--grad); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 4px 4px 12px var(--sh-d), -4px -4px 12px var(--sh-l), 0 0 24px rgba(109,93,252,.28);
}
.edu-icon i { width: 30px; height: 30px; color: #fff; }
.edu-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.edu-major { color: var(--accent); font-weight: 600; font-size: 0.92rem; margin-bottom: 0.75rem; }
.edu-meta  { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.edu-pill  {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--fg-m);
  padding: 6px 13px; background: var(--bg-d); border-radius: var(--r-pill);
  box-shadow: inset 2px 2px 5px var(--sh-d), inset -2px -2px 5px var(--sh-l);
}
.edu-pill--accent { color: var(--success); }
.edu-pill i { width: 13px; height: 13px; }

/* ═══ CONTACT ═══ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-intro { font-size: 1rem; color: var(--fg-m); line-height: 1.75; margin-bottom: 1.5rem; }
.contact-cards { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.ccard {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--card); border-radius: var(--r);
  box-shadow: 5px 5px 12px var(--sh-d), -5px -5px 12px var(--sh-l);
  color: var(--fg); transition: all var(--tr);
}
.ccard:hover { transform: translateX(5px); box-shadow: 7px 7px 16px var(--sh-d), -7px -7px 16px var(--sh-l), 0 0 18px rgba(109,93,252,.12); }
.ccard__icon {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  background-color: color-mix(in srgb, var(--c) 15%, transparent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ccard__icon i { width: 18px; height: 18px; color: var(--c); }
.ccard__lbl { display: block; font-size: 0.72rem; color: var(--fg-m); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.ccard__val { display: block; font-size: 0.88rem; font-weight: 600; }

.socials { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.soc {
  width: 46px; height: 46px; background: var(--card); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-m);
  box-shadow: 5px 5px 12px var(--sh-d), -5px -5px 12px var(--sh-l);
  transition: all var(--tr);
}
.soc i { width: 18px; height: 18px; }
.soc:hover { color: var(--accent); transform: translateY(-4px); box-shadow: 7px 7px 16px var(--sh-d), -7px -7px 16px var(--sh-l), 0 0 20px rgba(109,93,252,.25); }

.contact-right {
  background: var(--card); border-radius: var(--r-lg); padding: 2rem;
  box-shadow: 10px 10px 26px var(--sh-d), -10px -10px 26px var(--sh-l);
}
.cform { display: flex; flex-direction: column; gap: 1rem; }
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg label { font-size: 0.83rem; font-weight: 600; color: var(--fg-m); }
.fg input, .fg select, .fg textarea {
  background: var(--bg-d); border: none; outline: none;
  border-radius: var(--r-sm); padding: 12px 16px;
  font-size: 0.9rem; font-family: var(--ff-body); color: var(--fg);
  box-shadow: inset 4px 4px 10px var(--sh-d), inset -4px -4px 10px var(--sh-l);
  transition: box-shadow var(--tr); width: 100%;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  box-shadow: inset 4px 4px 10px var(--sh-d), inset -4px -4px 10px var(--sh-l), 0 0 0 2px var(--accent);
}
.fg textarea { resize: vertical; min-height: 120px; }
.form-status { padding: 12px 16px; border-radius: var(--r-sm); font-size: 0.88rem; font-weight: 500; display: none; text-align: center; }
.form-status.success { display: block; background: rgba(63,197,142,.1); color: var(--success); border: 1px solid rgba(63,197,142,.3); }
.form-status.error   { display: block; background: rgba(239,68,68,.1);  color: var(--error);   border: 1px solid rgba(239,68,68,.3); }

/* ═══ FOOTER ═══ */
.footer { background: var(--bg-d); padding: 1.5rem 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__copy { font-size: 0.85rem; color: var(--fg-m); }
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a { font-size: 0.85rem; color: var(--fg-m); transition: color var(--tr); }
.footer__links a:hover { color: var(--accent); }

/* ═══ BACK TO TOP ═══ */
.back-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--card); border: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: 5px 5px 12px var(--sh-d), -5px -5px 12px var(--sh-l);
  opacity: 0; transform: translateY(20px); transition: all var(--tr); z-index: 100;
}
.back-top.visible { opacity: 1; transform: translateY(0); }
.back-top:hover   { transform: translateY(-3px); }
.back-top i { width: 20px; height: 20px; }

/* ═══ FLOAT CONTROLS ═══ */
.float-ctrl { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 0.65rem; z-index: 100; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .kpi-grid    { grid-template-columns: repeat(3,1fr); }
  .ach-grid    { grid-template-columns: repeat(2,1fr); }
  .skills-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .burger     { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; }
  .proj-grid  { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .goals-tl::before { left: 80px; }
  .hero__float-tags { display: none !important; }
}
@media (max-width: 600px) {
  :root { --nav-h: 64px; }
  .container { padding: 0 1.1rem; }
  .section { padding: 3.5rem 0; }
  .section-title { font-size: 1.75rem; }
  .section-subtitle { font-size: 0.9rem; padding: 0 0.5rem; }

  /* Nav controls — shrink on tiny screens */
  .nav__actions { gap: 0.35rem; }
  .btn-icon { width: 40px; height: 40px; }
  .nav__logo-text { font-size: 0.72rem; }

  /* Hero */
  .hero { padding: calc(var(--nav-h) + 1.5rem) 1.1rem 3rem; }
  .hero__title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero__desc { font-size: 0.95rem; }
  .hero__stats { gap: 1rem; padding: 0.9rem 1.2rem; flex-wrap: wrap; justify-content: center; }
  .hero__stat-div { display: none; }
  .hero__stat-value { font-size: 1.6rem; }
  .hero__stat-label { font-size: 0.72rem; }
  .hero__cta { flex-direction: column; width: 100%; align-items: stretch; }
  .hero__cta .btn { width: 100%; justify-content: center; }

  /* Grids collapse */
  .ach-grid    { grid-template-columns: repeat(2,1fr); }
  .kpi-grid    { grid-template-columns: repeat(2,1fr); }
  .proj-grid   { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .habr-grid   { grid-template-columns: 1fr; }
  .proj-card--featured { grid-column: span 1; }

  /* Goals */
  .goals-tl::before { display: none; }
  .goal-item  { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .goal-year  { width: auto; text-align: left; padding-right: 0; }
  .goal-card  { margin-left: 0; }
  .goal-connector { display: none; }

  /* Timeline */
  .timeline { padding-left: 40px; }
  .timeline::before { left: 16px; }
  .tl-dot  { left: -40px; width: 32px; height: 32px; }
  .tl-dot i { width: 16px; height: 16px; }
  .tl-card { padding: 1.2rem; }
  .tl-header  { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .tl-dur     { align-self: flex-start; }
  .tl-role    { font-size: 1.05rem; }
  .tl-company { flex-wrap: wrap; }
  .tl-achs li { font-size: 0.88rem; }

  /* Education */
  .edu-card   { flex-direction: column; }

  /* Publications — platform header stacking */
  .pub-platform__head { flex-wrap: wrap; gap: 0.7rem; }
  .pub-platform__all { margin-left: auto; }
  .pub-platform__name { font-size: 1rem; }
  .pub-platform__sub { font-size: 0.72rem; }

  /* Contact form */
  .contact-form { padding: 1.2rem; }

  /* Footer */
  .footer__inner { flex-direction: column; text-align: center; gap: 1rem; }
  .footer__links { justify-content: center; flex-wrap: wrap; }

  /* Floating controls */
  .back-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero__badge { font-size: 0.75rem; padding: 6px 14px; }
  .hero__badge i { width: 14px; height: 14px; }
  .nav__logo { padding: 4px 8px; }
  .mobile-menu__links a { font-size: 1.2rem; padding: 0.7rem 1rem; }
}
