/* ============================================================
   MINIMAL MONO DESIGN SYSTEM
   warm paper palette / thin hairlines / flat surfaces
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #faf9f5;
  --surface: #f1efe8;
  --text: #1f1d1a;
  --muted: #6f6b63;
  --border: #e5e2d9;
  --accent: #6b5ce7;
  --accent-soft: rgba(107, 92, 231, 0.09);
  --dot: #d8d5ca;
  --divider: #e5e2d9;
  --photo-bg: #eae7de;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

html.dark {
  --bg: #191817;
  --surface: #232120;
  --text: #f2f0e9;
  --muted: #a8a399;
  --border: #33312d;
  --accent: #8d80f9;
  --accent-soft: rgba(141, 128, 249, 0.12);
  --dot: #3a3833;
  --divider: #33312d;
  --photo-bg: #232120;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--dot);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

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

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.preloading,
html.preloading body {
  overflow: hidden;
}

.preloader-text {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.preloader-text::after {
  content: '_';
  color: var(--accent);
  animation: caret-blink 0.9s steps(2) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.preloader-bar {
  width: 200px;
  height: 2px;
  border-radius: 0;
  background: var(--dot);
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  animation: preloader-load 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes preloader-load {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 72px;
  padding: 120px 32px 80px;
}

.hero-left {
  position: relative;
}

.photo-circle {
  width: 300px;
  height: 300px;
  border-radius: 24px;
  background: var(--photo-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* small status chip pinned to the photo */
.hero-left::after {
  content: '● online';
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

.hero-right {
  min-width: 0;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -4px;
  margin-bottom: 32px;
}

.hero-text {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 520px;
}

.highlight {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--dot);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: text-decoration-color 0.25s;
}

.highlight:hover {
  text-decoration-color: var(--accent);
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--divider);
  margin: 28px 0;
}

.hero-quote {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 40px;
  max-width: 520px;
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 24px;
  transition: border-color 0.25s, color 0.25s;
}

.learn-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.learn-more svg {
  transition: transform 0.25s;
}

.learn-more:hover svg {
  transform: translateY(3px);
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 32px;
  display: flex;
  flex-direction: column;
  transition: background 0.25s ease;
}

.section > * {
  max-width: 1080px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section-alt {
  background: var(--surface);
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.2;
  margin-bottom: 0;
}

.section-divider {
  height: 1px;
  background: var(--divider);
  margin: 28px 0 44px;
  transform: scaleX(0);
  transform-origin: left;
}

.reveal-visible .section-divider {
  animation: draw-section-line 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: 0.3s;
}

@keyframes draw-section-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.section-text-block {
  max-width: 780px;
  margin-bottom: 48px;
}

.section-text-block p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

.section-text-block p + p {
  margin-top: 20px;
}

/* ===== INTERNSHIP ROWS ===== */
.internships {
  max-width: 780px;
  margin-top: 8px;
}

.internship-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--divider);
}

.internship-item:last-child {
  border-bottom: 1px solid var(--divider);
}

.internship-period {
  flex-shrink: 0;
  width: 230px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.9;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.internship-desc {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

/* ===== TECH ICONS ===== */
.tech-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.tech-icon {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* keep icon tiles opaque on the tinted designer section */
.section-alt .tech-icon {
  background: var(--bg);
}

.tech-icon:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tech-icon svg {
  width: 44px;
  height: 44px;
}

.tech-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* ===== GITHUB / BEHANCE LINK ===== */
.github-link {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

#designer .github-link {
  margin-top: 32px;
}

.github-link a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--dot);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s;
}

.github-link a:hover {
  text-decoration-color: var(--accent);
}

/* ===== EDUCATION TIMELINE ===== */
.timeline {
  position: relative;
  max-width: 780px;
  width: 100%;
  padding-left: 40px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 46px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--divider);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-period {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}

.timeline-place {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.timeline-specialty {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.timeline-badge {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 6px 12px;
}

/* ===== CAROUSEL ===== */
.carousel {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.carousel-frame {
  border: none;
  border-radius: 20px;
  padding: 0;
  background: transparent;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: grab;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
}

.slide-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, transform 0.15s;
}

.carousel-btn-left {
  left: 12px;
}

.carousel-btn-right {
  right: 12px;
}

.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 20px;
  height: 3px;
  border: none;
  border-radius: 2px;
  padding: 0;
  background: var(--dot);
  cursor: pointer;
  transition: background 0.25s, width 0.25s;
}

.carousel-dot:hover {
  background: var(--accent);
}

.carousel-dot.active {
  background: var(--accent);
  width: 32px;
}

/* ===== LIGHTBOX ===== */
[v-cloak] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 19, 17, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.12s ease-out;
}

.lightbox-img.no-transition {
  transition: none;
}

.lightbox-img:active {
  cursor: grabbing;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, color 0.25s;
}

.lightbox-close:hover {
  border-color: #fff;
}

/* ===== FIXED TOGGLES ===== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 900;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, color 0.25s, transform 0.15s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon-moon {
  display: none;
}

html.dark .theme-toggle .icon-sun {
  display: none;
}

html.dark .theme-toggle .icon-moon {
  display: block;
}

.lang-toggle {
  position: fixed;
  top: 20px;
  right: 74px;
  z-index: 900;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, color 0.25s, transform 0.15s;
}

.lang-toggle:hover {
  border-color: var(--accent);
}

/* ===== CONSOLE ===== */
.term-btn {
  position: fixed;
  top: 20px;
  right: 124px;
  z-index: 900;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, color 0.25s;
}

.term-btn:hover {
  border-color: var(--accent);
}

.terminal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(20, 19, 17, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-card {
  width: 560px;
  max-width: calc(100vw - 32px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(31, 29, 26, 0.25);
}

html.dark .terminal-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.terminal-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s;
}

.terminal-close:hover {
  color: var(--text);
}

.terminal-log {
  padding: 16px;
  height: 300px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line.t-in {
  color: var(--accent);
  margin-top: 6px;
}

.terminal-line.t-in:first-child {
  margin-top: 0;
}

.terminal-line.t-out {
  color: var(--text);
}

.terminal-line.t-err {
  color: #d05656;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: var(--accent);
}

/* ===== RUNNER mini-game ===== */
.terminal-game {
  padding: 14px 16px 12px;
}

.run-canvas {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  touch-action: none;
}

.terminal-game-hint {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--muted);
  text-align: center;
}

.hint-touch {
  display: none;
}

/* touch devices: keyboard hints are useless, show tap hint */
@media (hover: none) and (pointer: coarse) {
  .hint-keys {
    display: none;
  }

  .hint-touch {
    display: inline;
  }
}

/* ===== SCROLL PROGRESS (top hairline) ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 960;
  height: 2px;
  width: var(--scroll-progress, 0%);
  background: var(--accent);
  transition: width 0.2s linear;
}

body.lightbox-open .scroll-progress,
body.lightbox-open .theme-toggle,
body.lightbox-open .lang-toggle,
body.lightbox-open .term-btn {
  opacity: 0;
  pointer-events: none;
}

/* ===== EASTER EGGS ===== */
.easter54 {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-mono);
  font-size: clamp(220px, 55vw, 560px);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--accent);
  animation: easter54-pop 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes easter54-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  18% {
    opacity: 1;
    transform: scale(1);
  }
  70% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

html.sber-mode {
  --accent: #21a038;
  --accent-soft: rgba(33, 160, 56, 0.1);
}

/* ===== REVEAL ON SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MUSIC PLAYER ===== */
.player {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: background 0.25s, border-color 0.25s;
}

.section-alt .player-card {
  background: var(--bg);
}

.player-visual {
  flex-shrink: 0;
}

.player-disc {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #35342f, #131311 72%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  animation: spin 7s linear infinite;
  animation-play-state: paused;
}

.player-disc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0 14px,
    rgba(255, 255, 255, 0.04) 14px 15px
  );
}

.player-disc::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.12), transparent 55%);
}

.player-disc-inner {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}

.player-disc-hole {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #131311;
}

.player-disc.spinning {
  animation-play-state: running;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.player-body {
  flex: 1;
  min-width: 0;
}

.player-now {
  margin-bottom: 20px;
}

.player-now-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.player-title {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-fade-enter-active {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.track-fade-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.track-fade-enter-from {
  opacity: 0;
  transform: translateY(10px);
}

.track-fade-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

.player-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.player-eq span {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: eq-bounce 1s ease-in-out infinite;
  transform-origin: bottom;
}

.player-eq span:nth-child(1) { height: 55%; animation-delay: 0s; }
.player-eq span:nth-child(2) { height: 100%; animation-delay: 0.22s; }
.player-eq span:nth-child(3) { height: 40%; animation-delay: 0.38s; }
.player-eq span:nth-child(4) { height: 75%; animation-delay: 0.12s; }

.player-eq.muted span {
  animation-play-state: paused;
  opacity: 0.35;
}

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.player-progress {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: var(--dot);
  cursor: pointer;
  touch-action: none;
}

.player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--accent);
}

.player-progress-knob {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.25s ease;
}

.player-progress:hover .player-progress-knob,
.player-progress:active .player-progress-knob {
  transform: translate(-50%, -50%) scale(1);
}

.player-times {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 1px;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.player-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, color 0.25s, transform 0.15s;
}

.player-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.player-btn:active {
  transform: scale(0.94);
}

.player-btn-play {
  width: 58px;
  height: 58px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.player-btn-play:hover {
  color: #fff;
  transform: translateY(-2px);
}

.player-tracklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.track-item:hover {
  border-color: var(--accent);
}

.track-item-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.track-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.track-item.active .track-item-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.track-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-item-eq {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.track-item.active .track-item-eq {
  opacity: 1;
}

.track-item-eq span {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: eq-bounce 1s ease-in-out infinite;
  animation-play-state: paused;
  transform-origin: bottom;
}

.track-item-eq span:nth-child(1) { height: 55%; animation-delay: 0s; }
.track-item-eq span:nth-child(2) { height: 100%; animation-delay: 0.22s; }
.track-item-eq span:nth-child(3) { height: 40%; animation-delay: 0.38s; }

.track-item.active.playing .track-item-eq span {
  animation-play-state: running;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text);
  padding: 64px 32px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1080px;
  margin: 0 auto 72px;
  flex-wrap: wrap;
  gap: 48px;
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.footer-copy {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}

.footer-contacts-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
}

.footer-contact svg {
  color: var(--accent);
}

.footer-contact a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.25s;
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-watermark {
  overflow: hidden;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.footer-watermark-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: watermark-marquee 45s linear infinite;
  will-change: transform;
}

.footer-watermark-track span {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 3px;
  flex-shrink: 0;
  margin-right: 16px;
  pointer-events: none;
}

.footer-watermark-track span:nth-child(odd) {
  color: var(--border);
}

.footer-watermark-track span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
}

@keyframes watermark-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== TELEGRAM AD MODAL ===== */
.ad-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 950;
}

.ad-card {
  width: 380px;
  max-width: calc(100vw - 32px);
  position: relative;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(31, 29, 26, 0.18);
}

html.dark .ad-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ad-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s, background 0.25s;
}

.ad-close:hover {
  color: var(--text);
}

.ad-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 16px;
  padding-right: 24px;
}

.ad-title svg {
  flex-shrink: 0;
  color: var(--accent);
}

.ad-widget-host {
  max-height: 240px;
  overflow-y: auto;
}

.ad-widget-host iframe {
  width: 100%;
  border: none;
}

.ad-fallback {
  display: block;
  text-align: center;
  padding: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  border: 1px dashed var(--border);
  border-radius: 10px;
  transition: border-color 0.25s;
}

.ad-fallback:hover {
  border-color: var(--accent);
}

.ad-enter-active,
.ad-leave-active {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.ad-enter-from,
.ad-leave-to {
  transform: translateY(calc(100% + 48px));
  opacity: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
    gap: 44px;
    padding: 96px 24px 64px;
  }

  .hero-right {
    justify-self: start;
  }

  .photo-circle {
    width: 240px;
    height: 240px;
  }

  .section {
    padding: 72px 24px;
  }

  .player-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 24px;
  }

  .internship-item {
    flex-direction: column;
    gap: 6px;
  }

  .internship-period {
    width: auto;
  }

  .player-title {
    white-space: normal;
  }

  .player-disc {
    width: 150px;
    height: 150px;
  }

  .player-body {
    width: 100%;
  }

  .footer {
    padding: 48px 24px 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }
}

/* ===== SMALL PHONES (<= 480px) ===== */
@media (max-width: 480px) {
  .hero {
    padding: 72px 20px 48px;
    gap: 32px;
  }

  .photo-circle {
    width: 200px;
    height: 200px;
  }

  .hero-title {
    font-size: clamp(36px, 12vw, 48px);
    letter-spacing: -2px;
    margin-bottom: 24px;
  }

  .hero-text {
    font-size: 14px;
  }

  .section {
    padding: 56px 20px;
  }

  .section-text-block {
    margin-bottom: 36px;
  }

  .section-text-block p {
    font-size: 14px;
  }

  .tech-icon {
    width: 72px;
    height: 72px;
  }

  .tech-icon img,
  .tech-icon svg {
    width: 36px;
    height: 36px;
  }

  .carousel-frame {
    border-radius: 14px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .carousel-btn-left {
    left: 8px;
  }

  .carousel-btn-right {
    right: 8px;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline::before {
    left: 34px;
  }

  .footer {
    padding: 40px 20px 0;
  }

  .footer-name {
    font-size: 17px;
  }

  .footer-watermark-track span {
    font-size: 16px;
  }

  .ad-wrap {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .ad-card {
    width: 100%;
    max-width: none;
  }

  .player-card {
    padding: 24px 16px;
    border-radius: 14px;
  }

  .player-disc {
    width: 130px;
    height: 130px;
  }

  .player-disc-inner {
    width: 52px;
    height: 52px;
  }

  .player-btn {
    width: 40px;
    height: 40px;
  }

  .player-btn-play {
    width: 52px;
    height: 52px;
  }

  .track-item {
    padding: 10px 12px;
    font-size: 13px;
  }
}
