:root {
  --background-color: #050505;
  --primary-color: #5b92ff;
  --shadow-color: rgba(82, 139, 255, 0.5);
  --text-color: #ffffff;
  --text-color-secondary: #aaaaaa;
  --border-radius: 5px;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 16px;
  overflow: visible;
  clip: auto;
  background: var(--primary-color);
  color: #fff;
  z-index: 100000;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--border-radius);
}

* {
  cursor: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.loader-counter {
  display: flex;
  align-items: baseline;
  user-select: none;
}

.loader-digits {
  display: flex;
  gap: 2px;
}

.loader-slot {
  width: 0.85em;
  height: 1.1em;
  overflow: hidden;
  position: relative;
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-color);
}

.loader-slot-inner {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
}

.loader-slot-inner span {
  height: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loader-percent {
  font-size: clamp(18px, 3vw, 40px);
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-left: 6px;
  align-self: flex-end;
  margin-bottom: 0.18em;
}

body {
  margin: 0;
  box-sizing: border-box;
  padding: 0 20px;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: "Zalando Sans Expanded", sans-serif;
  display: flex;
  flex-direction: column;
}

.projects-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease;
  will-change: left, top, width, height;
}

.cursor-corner {
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: var(--primary-color);
  border-style: solid;
  border-width: 0;
  transition: border-color 0.2s ease;
}

.cursor-corner.tl {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
  border-top-left-radius: 3px;
}

.cursor-corner.tr {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
  border-top-right-radius: 3px;
}

.cursor-corner.bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
  border-bottom-left-radius: 3px;
}

.cursor-corner.br {
  bottom: 0;
  right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
  border-bottom-right-radius: 3px;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary-color);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease;
  will-change: left, top;
}

.cursor.click {
  width: 18px;
  height: 18px;
}

.cursor.click .cursor-corner {
  border-color: var(--text-color);
}

.cursor.hover {
  width: 32px;
  height: 32px;
}

.cursor.hover .cursor-corner {
  border-color: var(--text-color);
}

.cursor.hover .cursor-dot {
  background-color: var(--text-color);
}

::selection {
  background-color: var(--text-color);
  color: var(--background-color);
}

header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  container-type: inline-size;
}

header .top {
  width: 100%;
  margin-top: 10px;
  height: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-direction: row;
}

header .logo img {
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

header .contact-btn {
  padding: 6px 12px;
  min-height: 36px;
  background-color: transparent;
  color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius);
  border: var(--primary-color) solid 1.5px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 0;
}

header .contact-btn:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  box-shadow: 0 0 10px var(--shadow-color);
}

header .contact-btn span {
  display: block;
  margin: 0;
  margin-top: -1px;
  padding: 0;
}

header h1 {
  width: 100%;
  text-align: left;
  font-weight: 900;
  font-style: normal;
  margin: -2vw 0;
  padding: 0;
  white-space: nowrap;
  display: block;
  overflow: hidden;
  transform: scaleY(0.85) !important;
  transform-origin: center center;
  font-size: 8vw;
  line-height: 1;
}

.separator {
  width: 100%;
  height: 15px;
  margin: 5px 0;
  padding: 0;
  display: flex;
  gap: 5px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}
.separator .line {
  width: calc(100% - 30px);
  height: 1.5px;
  margin: 0;
  padding: 0;
  margin-top: 2px;
  box-sizing: border-box;
  background-color: var(--text-color-secondary);
}

.separator .plus {
  font-size: 20px;
  color: var(--text-color-secondary);
  margin: 0;
  padding: 0;
  user-select: none;
}


main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

main .panel {
  flex: 1;
  height: 100%;
}

main .panel-large {
  flex: 2;
}

main .panel-separator {
  width: 2px;
  background-color: var(--text-color-secondary);
}

.about {
  position: relative;
  container-type: inline-size;
  contain: layout style;
  content-visibility: auto;
}

.about-content {
  padding: 15px 15px 40px 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}

.about-content::-webkit-scrollbar {
  display: none;
}

.about h2 {
  margin: 0;
  font-size: 7cqi;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.about h3 {
  margin: 0;
  font-size: 5.5cqi;
  font-weight: 600;
  color: var(--text-color);
}

.about-desc {
  margin: 0;
  font-size: 4.8cqi;
  line-height: 1.5;
  color: var(--text-color-secondary);
  transition: color 0.3s ease;
}

.about-desc .word,
.preview-desc .word {
  display: inline-block;
  white-space: nowrap;
}

.about-desc .char,
.preview-desc .char {
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.about-desc .char.active {
  color: var(--text-color);
  transform: translateY(-2px);
}

.services-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2cqi;
}

.services-list li {
  font-size: 5cqi;
  color: var(--text-color-secondary);
  padding-left: 3cqi;
  margin-left: 5cqi;
  border-left: 2px solid var(--primary-color);
  line-height: 1.3;
  transition: transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.about-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, var(--background-color), transparent);
  pointer-events: none;
}

.projects-panel {
  position: relative;
  container-type: inline-size;
  contain: layout style;
  content-visibility: auto;
}

.projects-list {
  padding: 15px 15px 40px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}

.projects-list::-webkit-scrollbar {
  display: none;
}

.projects-list h2 {
  margin: 0;
  font-size: 7cqi;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.project-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.4s ease;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  translate: 0 12px;
  animation: cardFadeIn 0.5s ease forwards;
  will-change: transform;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(57, 123, 255, 0.08),
    rgba(255, 255, 255, 0.06),
    transparent
  );
  transition: none;
  pointer-events: none;
}

.project-card:hover::before {
  animation: cardShine 0.6s ease forwards;
}

.project-card::after {
  content: attr(data-index);
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 8px -50%;
  font-size: 3cqi;
  font-weight: 700;
  color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease, translate 0.3s ease;
  pointer-events: none;
}

.project-card:hover::after {
  opacity: 0.5;
  translate: 0 -50%;
}

.project-card-fade {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 60px;
  background: linear-gradient(to left, var(--background-color), transparent);
  pointer-events: none;
  border-radius: 0 10px 10px 0;
}

.project-card:hover,
.project-card.active {
  border-color: var(--primary-color);
  background-color: rgba(57, 123, 255, 0.06);
}

.project-card:hover {
  box-shadow: 0 0 20px rgba(57, 123, 255, 0.12), inset 0 0 20px rgba(57, 123, 255, 0.03);
}

.project-card.active {
  box-shadow: 0 0 16px rgba(57, 123, 255, 0.2), inset 0 0 24px rgba(57, 123, 255, 0.04);
}

.project-card-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.05);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.3s ease;
  border: 1px solid transparent;
}

.project-card:hover .project-card-thumb {
  transform: scale(1.12) rotate(2deg);
  border-color: rgba(57, 123, 255, 0.3);
}

.project-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-card-title {
  font-size: 4.5cqi;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.3s ease, color 0.3s ease;
}

.project-card:hover .project-card-title {
  transform: translateX(4px);
  color: #fff;
}

.project-card-desc {
  font-size: 3.5cqi;
  color: var(--text-color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.6;
}

.project-card:hover .project-card-desc {
  opacity: 1;
  transform: translateX(4px);
}

@keyframes cardShine {
  to { left: 130%; }
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.preview-panel {
  position: relative;
  container-type: inline-size;
  contain: layout style;
  overflow: hidden;
  content-visibility: auto;
}

.preview-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-color-secondary);
  opacity: 0.4;
}

.preview-empty p {
  margin: 0;
  font-size: 14px;
}

.preview-content {
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.preview-content::-webkit-scrollbar {
  width: 6px;
}

.preview-content::-webkit-scrollbar-track {
  background: transparent;
}

.preview-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.preview-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-color);
}

.preview-header {
  padding: 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.preview-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.preview-title {
  font-size: 5cqi;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.preview-desc {
  font-size: 2.5cqi;
  color: var(--text-color-secondary);
  margin: 0;
  line-height: 1.5;
}

.preview-desc .char.active {
  color: var(--text-color);
  transform: translateY(-1px);
}

.preview-links {
  position: fixed;
  right: 20px;
  max-width: 70%;
  overflow: auto;
  top: 10px;
  z-index: 5;
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-direction: row;
  align-self: flex-start;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.preview-links::-webkit-scrollbar {
  height: 3px;
}

.preview-links::-webkit-scrollbar-track {
  background: transparent;
}

.preview-links::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 15px;
  white-space: nowrap;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.preview-link:hover {
  color: var(--background-color);
  box-shadow: 0 0 10px var(--shadow-color);
}

.preview-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 15px 40px 15px;
}

.preview-block {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  overflow: hidden;
}

.preview-block img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.preview-block-iframe-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.preview-block-iframe-wrap iframe {
  width: 200%;
  height: 200%;
  border: none;
  display: block;
  transform: scale(0.5);
  transform-origin: top left;
}

.iframe-preview-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
}

.iframe-preview-container .preview-block-iframe-wrap {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.iframe-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 10px;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(2px);
  outline: 1.5px solid rgba(255, 255, 255, 0.08);
  outline-offset: -1.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-color-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.iframe-placeholder:hover {
  background: rgba(5, 5, 5, 0.3);
  outline-color: var(--primary-color);
  color: var(--primary-color);
}

.iframe-placeholder span {
  font-size: 13px;
}

.preview-block-figma {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
}

.preview-block-figma iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.figma-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(5, 5, 5, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-color-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.figma-overlay:hover {
  background: rgba(5, 5, 5, 0.25);
  color: var(--primary-color);
}

.figma-overlay span {
  font-size: 13px;
}

.preview-block video {
  width: 100%;
  display: block;
  border-radius: 10px;
  cursor: pointer;
}

.video-viewer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.video-viewer.open {
  opacity: 1;
  pointer-events: all;
}

.video-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.video-viewer-wrap {
  position: relative;
  width: 90vw;
  max-width: 1100px;
  max-height: 85vh;
}

.video-viewer-player {
  width: 100%;
  max-height: 85vh;
  border-radius: 6px;
  outline: none;
}

.video-viewer-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 28px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.video-viewer-close:hover {
  opacity: 1;
}

.preview-block-caption {
  padding: 6px 15px;
  font-size: 11px;
  color: var(--text-color-secondary);
}

.preview-block-text {
  padding: 10px 15px;
  font-size: 13px;
  color: var(--text-color-secondary);
  line-height: 1.6;
}

footer {
  flex-shrink: 0;
  height: 110px;
  background-color: var(--background-color);
  container-type: inline-size;
}

footer .copy {
  margin: 0;
  padding: 0;
  color: var(--primary-color);
  font-size: 12px;
  padding-top: 5px;
}

footer .links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  width: 60%;
  margin: 0 auto;
  padding-top: 8px;
  gap: 8px;
}

footer .links a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-color-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s ease;
  padding: 6px 4px;
  min-height: 24px;
}

footer .links a:hover {
  color: var(--primary-color);
  text-decoration: underline var(--primary-color);
}

footer .links a svg {
  flex-shrink: 0;
}

/* Contact panel */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.contact-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  z-index: 8500;
  background: var(--background-color);
  border-left: 1.5px solid rgba(255, 255, 255, 0.08);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contact-panel.open {
  transform: translateX(0);
}

.contact-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.contact-panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contact-panel-close {
  background: none;
  border: none;
  color: var(--text-color-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-panel-close:hover {
  color: var(--text-color);
  transform: rotate(90deg);
}

.contact-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
}

.contact-panel-body::-webkit-scrollbar {
  display: none;
}

.contact-quick-links {
  display: flex;
  gap: 8px;
}

.contact-quick-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-color-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-quick-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(91, 146, 255, 0.06);
  box-shadow: 0 0 16px rgba(91, 146, 255, 0.1);
}

.contact-divider {
  height: 1.5px;
  background: rgba(255, 255, 255, 0.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-color-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-form-group input,
.contact-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(91, 146, 255, 0.12);
}

.contact-type-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.contact-type-btn {
  flex: 1;
  padding: 12px 12px;
  min-height: 44px;
  background: transparent;
  border: none;
  color: var(--text-color-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.contact-type-btn.active {
  background: var(--primary-color);
  color: #fff;
}

.contact-type-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-color);
}

.contact-budget-group {
  animation: contactFieldIn 0.3s ease forwards;
}

.contact-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--primary-color);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-submit:hover {
  box-shadow: 0 0 24px rgba(91, 146, 255, 0.3);
  transform: translateY(-1px);
}

.contact-submit:active {
  transform: scale(0.97);
}

.contact-submit.loading {
  opacity: 0.6;
  pointer-events: none;
}

.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  animation: contactFieldIn 0.4s ease forwards;
}

.contact-success p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
}

.contact-success span {
  font-size: 13px;
  color: var(--text-color-secondary);
}

@keyframes contactFieldIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reveal animations */
.reveal-el {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-el.reveal-up {
  transform: translateY(30px);
}

.reveal-el.reveal-scale {
  transform: scale(0.95) translateY(10px);
}

body.revealed .reveal-el {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Scroll animations */
[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-scroll-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-scroll-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Polish - improved hover states */
.project-card {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.4s ease;
}

.preview-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-color);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.preview-link:hover::before {
  transform: translateY(0);
}

header .contact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

header .contact-btn:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.services-list li {
  position: relative;
}

.services-list li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.services-list li:hover::after {
  width: 100%;
}

footer .links a {
  position: relative;
}

footer .links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

footer .links a:hover::after {
  width: 100%;
}

footer .links a:hover {
  text-decoration: none;
}

/* Polish - separator glow on hover */
.separator .plus {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.separator .plus:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px var(--shadow-color);
}

/* Polish - smooth image loading */
.preview-block img {
  transition: opacity 0.4s ease;
}

/* Mobile preview inline (accordion under project card) */
.mobile-preview-inline {
  display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  * {
    cursor: auto !important;
  }

  .cursor, .cursor-dot {
    display: none !important;
  }

  body {
    width: 100%;
    padding: 0 12px;
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  header {
    padding-top: env(safe-area-inset-top, 0);
  }

  header .top {
    margin-top: 8px;
  }

  header h1 {
    margin: -1.5vw 0;
  }

  .separator {
    margin: 3px 0;
  }

  main {
    flex-direction: column;
    overflow: visible;
    min-height: 0;
    width: calc(100vw - 20px);
  }

  main .panel {
    height: auto;
    min-height: 0;
  }

  main .panel-separator {
    display: none;
  }

  .preview-panel {
    display: none;
  }

  .about {
    container-type: normal;
  }

  .about-content {
    height: auto;
    overflow: visible;
    padding: 12px 4px 20px;
  }

  .about-fade {
    display: none;
  }

  .about h2 {
    font-size: 28px;
  }

  .about h3 {
    font-size: 20px;
  }

  .about-desc {
    font-size: 15px;
  }

  .services-list {
    gap: 10px;
  }

  .services-list li {
    font-size: 15px;
    padding-left: 10px;
    margin-left: 12px;
  }

  .projects-panel {
    container-type: normal;
  }

  .projects-list {
    height: auto;
    overflow: visible;
    padding: 12px 4px 20px;
  }

  .projects-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .projects-list h2 {
    font-size: 28px;
  }

  .project-card {
    padding: 12px;
  }

  .project-card-title {
    font-size: 15px;
  }

  .project-card-desc {
    font-size: 13px;
  }

  .project-card-thumb {
    width: 40px;
    height: 40px;
  }

  .project-card::after {
    font-size: 12px;
  }

  .project-card.active {
    border-radius: 10px 10px 0 0;
  }

  .mobile-preview-inline {
    display: none;
    border: 1.5px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: rgba(57, 123, 255, 0.03);
    margin-top: -10px;
    margin-bottom: 4px;
    overflow: hidden;
    animation: mobilePreviewOpen 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .mobile-preview-inline.open {
    display: block;
  }

  @keyframes mobilePreviewOpen {
    from {
      opacity: 0;
      max-height: 0;
    }
    to {
      opacity: 1;
      max-height: 2000px;
    }
  }

  .mobile-preview-inline .preview-header {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .mobile-preview-inline .preview-title {
    font-size: 18px;
  }

  .mobile-preview-inline .preview-desc {
    font-size: 13px;
  }

  .mobile-preview-inline .preview-links {
    position: relative;
    right: auto;
    top: auto;
    max-width: 100%;
    flex-wrap: wrap;
    padding: 0 12px 8px;
  }

  .mobile-preview-inline .preview-blocks {
    padding: 4px 8px 12px;
  }

  .mobile-preview-inline .preview-block img {
    border-radius: 8px;
  }

  .mobile-preview-inline .preview-block video {
    border-radius: 8px;
  }

  .mobile-site-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: rgba(91, 146, 255, 0.08);
    border: 1.5px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease;
  }

  .mobile-site-btn:active {
    background: rgba(91, 146, 255, 0.18);
  }

  footer {
    height: auto;
    padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0));
  }

  footer .links {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 8px 4px;
  }

  footer .links a {
    font-size: 12px;
    min-height: 44px;
    padding: 10px 6px;
  }

  .contact-panel {
    width: 100%;
    max-width: 100vw;
  }

  .video-viewer-wrap {
    width: 95vw;
  }
}

@media (hover: none) {
  .project-card:hover {
    backdrop-filter: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.08);
    background-color: transparent;
  }

  .project-card.active {
    border-color: var(--primary-color);
    background-color: rgba(57, 123, 255, 0.06);
  }

  .project-card:hover .project-card-thumb {
    transform: none;
    border-color: transparent;
  }

  .project-card:hover .project-card-title {
    transform: none;
  }

  .project-card:hover .project-card-desc {
    transform: none;
  }

  .project-card:hover::before {
    animation: none;
  }

  .project-card:hover::after {
    opacity: 0;
  }

  .services-list li:hover::after {
    width: 0;
  }

  footer .links a:hover::after {
    width: 0;
  }

  .separator .plus:hover {
    color: var(--text-color-secondary);
    text-shadow: none;
  }
}

@media (max-width: 480px) {
  header .logo img {
    height: 20px;
  }

  header .logo {
    gap: 14px;
  }

  footer .links {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Easter eggs */
.easter-cat {
  position: absolute;
  bottom: 8px;
  right: 8px;
  opacity: 0.04;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.easter-cat:hover {
  opacity: 1;
  transform: scale(1.8);
}

.easter-cat-text {
  font-size: 0;
  opacity: 0;
  color: var(--primary-color);
  font-weight: 700;
  transition: font-size 0.3s ease, opacity 0.3s ease;
}

.easter-cat:hover .easter-cat-text {
  font-size: 10px;
  opacity: 1;
}

@keyframes ee-rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

body.ee-rainbow {
  animation: ee-rainbow 2s linear infinite;
}

.ee-matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  opacity: 0.8;
}

@keyframes ee-barrel-roll {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

html.ee-barrel-roll {
  animation: ee-barrel-roll 1s ease-in-out;
}

body.ee-disco .cursor-corner { border-color: #ff00ff; }
body.ee-disco .cursor-dot { background: #ff00ff; }

@keyframes ee-disco-colors {
  0% { border-color: #ff0000; }
  16% { border-color: #ff8800; }
  33% { border-color: #ffff00; }
  50% { border-color: #00ff00; }
  66% { border-color: #0088ff; }
  83% { border-color: #ff00ff; }
  100% { border-color: #ff0000; }
}

@keyframes ee-disco-dot {
  0% { background: #ff0000; box-shadow: 0 0 8px #ff0000; }
  16% { background: #ff8800; box-shadow: 0 0 8px #ff8800; }
  33% { background: #ffff00; box-shadow: 0 0 8px #ffff00; }
  50% { background: #00ff00; box-shadow: 0 0 8px #00ff00; }
  66% { background: #0088ff; box-shadow: 0 0 8px #0088ff; }
  83% { background: #ff00ff; box-shadow: 0 0 8px #ff00ff; }
  100% { background: #ff0000; box-shadow: 0 0 8px #ff0000; }
}

body.ee-disco .cursor-corner {
  animation: ee-disco-colors 1.5s linear infinite;
}

body.ee-disco .cursor-dot {
  animation: ee-disco-dot 1.5s linear infinite;
  width: 10px;
  height: 10px;
}

body.ee-disco .cursor {
  width: 36px;
  height: 36px;
}

body.ee-flip {
  transform: scaleX(-1);
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ee-nyan {
  position: fixed;
  z-index: 99998;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes ee-nyan-fly {
  0% { left: -120px; }
  100% { left: 110vw; }
}

.ee-nyan svg,
.ee-nyan img {
  animation: ee-nyan-fly 3s linear forwards;
}

.ee-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-color);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.ee-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes ee-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-6px, -4px) rotate(-1deg); }
  20% { transform: translate(6px, 2px) rotate(1deg); }
  30% { transform: translate(-4px, 6px) rotate(0deg); }
  40% { transform: translate(4px, -2px) rotate(1deg); }
  50% { transform: translate(-2px, 4px) rotate(-1deg); }
  60% { transform: translate(6px, -6px) rotate(0deg); }
  70% { transform: translate(-6px, 2px) rotate(-1deg); }
  80% { transform: translate(2px, -4px) rotate(1deg); }
  90% { transform: translate(-4px, 6px) rotate(0deg); }
}

body.ee-shake {
  animation: ee-shake 0.15s linear infinite;
}

.ee-dvd {
  position: fixed;
  z-index: 99998;
  pointer-events: none;
}

@keyframes ee-big-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

body.ee-big h1,
body.ee-big h2,
body.ee-big h3,
body.ee-big p,
body.ee-big li,
body.ee-big span,
body.ee-big a {
  animation: ee-big-pulse 0.6s ease infinite;
}

.ee-star {
  position: absolute;
  top: -20px;
  animation: ee-star-fall linear forwards;
}

@keyframes ee-star-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

body.ee-cursor-spin .cursor {
  animation: ee-cursor-spin 0.5s linear infinite;
}

@keyframes ee-cursor-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ee-glitch-1 {
  0% { clip-path: inset(20% 0 60% 0); transform: translate(-4px, 0); }
  20% { clip-path: inset(60% 0 10% 0); transform: translate(4px, 0); }
  40% { clip-path: inset(40% 0 30% 0); transform: translate(-2px, 0); }
  60% { clip-path: inset(10% 0 70% 0); transform: translate(6px, 0); }
  80% { clip-path: inset(80% 0 5% 0); transform: translate(-3px, 0); }
  100% { clip-path: inset(30% 0 50% 0); transform: translate(2px, 0); }
}

body.ee-glitch {
  animation: ee-glitch-1 0.2s linear infinite;
}

body.ee-glitch::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99997;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.03) 2px,
    rgba(0, 255, 0, 0.03) 4px
  );
  mix-blend-mode: overlay;
}

.ee-sans-eye {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  height: 60px;
  animation: ee-sans-pulse 0.8s ease infinite;
  filter: drop-shadow(0 0 12px #0af) drop-shadow(0 0 24px #0af);
}

@keyframes ee-sans-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 12px #0af) drop-shadow(0 0 24px #0af); }
  50% { opacity: 0.7; filter: drop-shadow(0 0 6px #0af) drop-shadow(0 0 12px #06f); }
}

.ee-gol-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
}

.ee-gol-overlay canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ee-gol-info {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-color-secondary);
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0.5;
}

body.ee-thanos-mode .cursor-corner {
  border-color: #c48b00;
}

body.ee-thanos-mode .cursor-dot {
  background: #ffaa00;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

@keyframes ee-thanos-dust {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0);
  }
}
