/* Antakov portfolio refactor — lightweight visual system */
:root {
  --site-bg: #080c16;
  --site-surface: rgba(17, 24, 39, .72);
  --site-surface-strong: #111827;
  --site-text: #f8fafc;
  --site-muted: #a8b3c7;
  --site-accent: #8b8df8;
  --site-accent-strong: #6d5dfc;
  --site-border: rgba(148, 163, 184, .18);
  --site-radius: 20px;
  --site-shadow: 0 24px 70px rgba(2, 6, 23, .32);
  --site-container: 80rem;
  --site-focus: #c4b5fd;
}

html { scroll-padding-top: 88px; }
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(99,102,241,.12), transparent 32rem),
    radial-gradient(circle at 88% 16%, rgba(192,132,252,.08), transparent 28rem),
    var(--bg-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(148,163,184,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 72%);
}

::selection { color: #fff; background: rgba(99,102,241,.72); }
.site-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--site-focus);
  outline-offset: 3px;
}
:where(button, a) { -webkit-tap-highlight-color: transparent; }

header.fixed {
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
  border: 1px solid var(--site-border) !important;
  border-radius: 18px;
  background: rgba(8,12,22,.76) !important;
  box-shadow: 0 12px 36px rgba(2,6,23,.2);
  backdrop-filter: blur(16px) saturate(125%);
}
header.fixed > div { max-width: var(--site-container); }
header.fixed a { min-height: 44px; display: inline-flex; align-items: center; }
.site-theme-btn {
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: 10px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: rgba(129,140,248,.10);
  color: var(--site-text);
  cursor: pointer;
}
header button.lg\:hidden { min-width: 44px; min-height: 44px; }

main { overflow: clip; }
main > div > section:not(:first-child),
main section[id] {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
h1 span.absolute { display: none; }
section { position: relative; }
section > .max-w-7xl { max-width: var(--site-container); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.holo-border {
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)) !important;
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow);
}
.holo-border::before { opacity: .44; }

main .rounded-2xl,
main .rounded-3xl {
  border-color: var(--site-border);
}
main img {
  background: var(--site-surface-strong);
}

/* Portfolio cards: calmer motion and clearer hierarchy */
#portfolio .group,
section .group {
  transform: translateZ(0);
}
#portfolio img {
  transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .3s ease !important;
}
#portfolio .group:hover img { transform: scale(1.035) !important; }

/* Remove unresolved template destinations instead of misleading visitors. */
a[href*="yourusername"] { display: none !important; }

/* Fixed, accessible mobile navigation supplied by site-refactor.js. */
.site-mobile-nav {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 12px;
  border: 1px solid var(--site-border);
  border-radius: 16px;
  background: rgba(8,12,22,.97);
  box-shadow: var(--site-shadow);
}
.site-mobile-nav[data-open="true"] { display: grid; gap: 4px; }
.site-mobile-nav a {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--site-text);
  text-decoration: none;
}
.site-mobile-nav a:hover { background: rgba(129,140,248,.12); color: #c7d2fe; }
.site-examples-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 80;
  width: 220px;
  padding: 10px;
  transform: translateX(-50%);
  border: 1px solid var(--site-border);
  border-radius: 16px;
  background: rgba(8,12,22,.98);
  box-shadow: var(--site-shadow);
}
.site-examples-menu[hidden] { display: none; }
.site-examples-menu a {
  display: flex !important;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--site-text);
  text-decoration: none;
}
.site-examples-menu a:hover,
.site-examples-menu a:focus-visible { background: rgba(129,140,248,.14); color: #c7d2fe; }
.site-files {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed rgba(129,140,248,.45);
  border-radius: 16px;
  background: rgba(99,102,241,.07);
}
.site-files label { color: var(--site-text); font-weight: 800; }
.site-files input { min-height: 44px; color: var(--site-muted); }
.site-files small { color: var(--site-muted); }
.site-form-status { min-height: 24px; text-align: center; color: var(--site-muted); font-weight: 700; }
.site-form-status[data-state="success"] { color: #4ade80; }
.site-form-status[data-state="error"] { color: #f87171; }

/* Keep motion decorative and inexpensive. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1023px) {
  header.fixed { padding: 6px 10px !important; }
  .antakov-theme-btn { top: auto !important; right: 66px !important; width: 40px !important; height: 40px !important; }
}

@media (max-width: 640px) {
  :root { --site-radius: 16px; }
  header.fixed { top: 8px !important; left: 8px !important; right: 8px !important; }
  main section { scroll-margin-top: 82px; }
  main .px-6 { padding-left: 1rem; padding-right: 1rem; }
  .noise-overlay { display: none !important; }
  .o1, .o2, .o3, .c1, .c2, .c3, .cube-spin, .core-spin { animation: none !important; }
}
